Skip to content

Commit

Permalink
Temp drop configurable knockback
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Feb 3, 2024
1 parent 0fd3883 commit 532ae83
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ index 8d3c1897044f9a2bbe1911e1a72dc9a00fb246df..03112a42d1cf3460af5d5ce9d1fdd038
}

diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
index 26c7a5020e9fd9dac212c6540dc79cad26e64796..ac21530de2ecb4c5b1ded30abf2bca473c813701 100644
index 8db4b1268e7bc18d60cc53f2753a73c2fc3ec242..64adf80c1d11b631bc772586f649a79387521bcd 100644
--- a/src/main/java/org/dreeam/leaf/LeafConfig.java
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
@@ -206,6 +206,7 @@ public class LeafConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ index 5dd66c3434205c03eecb842ee0211d9e19ff110f..413c648691ce45bce536e870d772d033
}
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d246d49b510160a9a53f6f4fc18398596d4e305a..df07fbabe36573282c60f4a469e1b9534405d7a0 100644
index 2b4279efe6698e786f9db8066f73b7934c8660d4..6833487fbb4b93b8834db299d99ce93a08a89a7a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -188,7 +188,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -187,7 +187,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private boolean hasPlayedBefore = false;
private final ConversationTracker conversationTracker = new ConversationTracker();
private final Set<String> channels = new HashSet<String>();
Expand All @@ -41,7 +41,7 @@ index d246d49b510160a9a53f6f4fc18398596d4e305a..df07fbabe36573282c60f4a469e1b953
private final Set<UUID> unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0;
@@ -2137,9 +2137,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2136,9 +2136,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

@Override
public boolean canSee(org.bukkit.entity.Entity entity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,18 @@ index 785196e6f4677074890ca965e9add85ccfd0e6e3..c2d9b3110756fa35829f0c01c06331f9

@Override
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
index ac21530de2ecb4c5b1ded30abf2bca473c813701..d6510b90913245f68a5828ef7097381edbbc1780 100644
index 64adf80c1d11b631bc772586f649a79387521bcd..09a23b3adbe5b6ce8a809b22915f25e9316d54bd 100644
--- a/src/main/java/org/dreeam/leaf/LeafConfig.java
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
@@ -314,6 +314,8 @@ public class LeafConfig {
public static double verticalLimit = 0.4000000059604645D;
public static double extraHorizontal = 0.5D;
public static double extraVertical = 0.1D;
@@ -307,4 +307,11 @@ public class LeafConfig {
private static void vanillaEndTeleport() {
useVanillaEndTeleport = getBoolean("use-vanilla-end-teleport", useVanillaEndTeleport, "Vanilla End Gateway Teleport");
}
+
+ public static boolean snowballCanKnockback = false;
+ public static boolean eggCanKnockback = false;
private static void knockback() {
friction = getDouble("playerKnockback.friction", friction);
horizontal = getDouble("playerKnockback.horizontal", horizontal);
@@ -321,5 +323,7 @@ public class LeafConfig {
verticalLimit = getDouble("playerKnockback.verticalLimit", verticalLimit);
extraHorizontal = getDouble("playerKnockback.extraHorizontal", extraHorizontal);
extraVertical = getDouble("playerKnockback.extraVertical", extraVertical);
+ private static void knockback() {
+ snowballCanKnockback = getBoolean("playerKnockback.snowball-knockback-players", snowballCanKnockback, "Make snowball can knockback players");
+ eggCanKnockback = getBoolean("playerKnockback.egg-knockback-players", eggCanKnockback, "Make egg can knockback players");
}
+ }
}

0 comments on commit 532ae83

Please sign in to comment.