diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/SkStuff.iml b/SkStuff.iml
index 3df7d4c..186bff2 100644
--- a/SkStuff.iml
+++ b/SkStuff.iml
@@ -18,13 +18,22 @@
+
+
+
+
+ BUKKIT
+
+
+
+
-
+
@@ -155,5 +164,6 @@
+
\ No newline at end of file
diff --git a/bin/META-INF/MANIFEST.MF b/bin/META-INF/MANIFEST.MF
old mode 100644
new mode 100755
diff --git a/bin/META-INF/SkStuff.kotlin_module b/bin/META-INF/SkStuff.kotlin_module
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/SkStuff.class b/bin/me/TheBukor/SkStuff/SkStuff.class
index 0c6d0aa..758f2bc 100644
Binary files a/bin/me/TheBukor/SkStuff/SkStuff.class and b/bin/me/TheBukor/SkStuff/SkStuff.class differ
diff --git a/bin/me/TheBukor/SkStuff/effects/EffClearPathGoals.class b/bin/me/TheBukor/SkStuff/effects/EffClearPathGoals.class
index 807391d..3732af1 100644
Binary files a/bin/me/TheBukor/SkStuff/effects/EffClearPathGoals.class and b/bin/me/TheBukor/SkStuff/effects/EffClearPathGoals.class differ
diff --git a/bin/me/TheBukor/SkStuff/effects/EffGZipFile.class b/bin/me/TheBukor/SkStuff/effects/EffGZipFile.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/effects/EffMakeJump.class b/bin/me/TheBukor/SkStuff/effects/EffMakeJump.class
index cf3be69..9458e1a 100644
Binary files a/bin/me/TheBukor/SkStuff/effects/EffMakeJump.class and b/bin/me/TheBukor/SkStuff/effects/EffMakeJump.class differ
diff --git a/bin/me/TheBukor/SkStuff/effects/EffRemovePathGoal.class b/bin/me/TheBukor/SkStuff/effects/EffRemovePathGoal.class
index 84f78a9..b6333f2 100644
Binary files a/bin/me/TheBukor/SkStuff/effects/EffRemovePathGoal.class and b/bin/me/TheBukor/SkStuff/effects/EffRemovePathGoal.class differ
diff --git a/bin/me/TheBukor/SkStuff/effects/EffSetPathGoal.class b/bin/me/TheBukor/SkStuff/effects/EffSetPathGoal.class
index 87d78be..e043a78 100644
Binary files a/bin/me/TheBukor/SkStuff/effects/EffSetPathGoal.class and b/bin/me/TheBukor/SkStuff/effects/EffSetPathGoal.class differ
diff --git a/bin/me/TheBukor/SkStuff/effects/EffShowEntityEffect.class b/bin/me/TheBukor/SkStuff/effects/EffShowEntityEffect.class
index ac14df1..3705cb5 100644
Binary files a/bin/me/TheBukor/SkStuff/effects/EffShowEntityEffect.class and b/bin/me/TheBukor/SkStuff/effects/EffShowEntityEffect.class differ
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprFireProof.class b/bin/me/TheBukor/SkStuff/expressions/ExprFireProof.class
index 10c34a1..49c7a37 100644
Binary files a/bin/me/TheBukor/SkStuff/expressions/ExprFireProof.class and b/bin/me/TheBukor/SkStuff/expressions/ExprFireProof.class differ
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprGlideState.class b/bin/me/TheBukor/SkStuff/expressions/ExprGlideState.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprInventoryOwner.class b/bin/me/TheBukor/SkStuff/expressions/ExprInventoryOwner.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprNoClip.class b/bin/me/TheBukor/SkStuff/expressions/ExprNoClip.class
index 2a807b1..da7a114 100644
Binary files a/bin/me/TheBukor/SkStuff/expressions/ExprNoClip.class and b/bin/me/TheBukor/SkStuff/expressions/ExprNoClip.class differ
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprNoGravityState.class b/bin/me/TheBukor/SkStuff/expressions/ExprNoGravityState.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprTimespanToNumber.class b/bin/me/TheBukor/SkStuff/expressions/ExprTimespanToNumber.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprToLowerCase.class b/bin/me/TheBukor/SkStuff/expressions/ExprToLowerCase.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprToUpperCase.class b/bin/me/TheBukor/SkStuff/expressions/ExprToUpperCase.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/expressions/ExprWordsToUpperCase.class b/bin/me/TheBukor/SkStuff/expressions/ExprWordsToUpperCase.class
old mode 100644
new mode 100755
diff --git a/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_13_R2.class b/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_13_R2.class
index 4ebc38a..ebd6d8a 100644
Binary files a/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_13_R2.class and b/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_13_R2.class differ
diff --git a/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_14_R1.class b/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_14_R1.class
index 6893287..dfb0de7 100644
Binary files a/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_14_R1.class and b/bin/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_14_R1.class differ
diff --git a/bin/me/TheBukor/SkStuff/util/NMS_v1_13_R2.class b/bin/me/TheBukor/SkStuff/util/NMS_v1_13_R2.class
index a3485c5..4d9473c 100644
Binary files a/bin/me/TheBukor/SkStuff/util/NMS_v1_13_R2.class and b/bin/me/TheBukor/SkStuff/util/NMS_v1_13_R2.class differ
diff --git a/bin/me/TheBukor/SkStuff/util/NMS_v1_14_R1.class b/bin/me/TheBukor/SkStuff/util/NMS_v1_14_R1.class
index b76f5d3..28f2b3c 100644
Binary files a/bin/me/TheBukor/SkStuff/util/NMS_v1_14_R1.class and b/bin/me/TheBukor/SkStuff/util/NMS_v1_14_R1.class differ
diff --git a/bin/me/TheBukor/SkStuff/util/NMS_v1_15_R1.class b/bin/me/TheBukor/SkStuff/util/NMS_v1_15_R1.class
index 4f614c6..96e3c74 100644
Binary files a/bin/me/TheBukor/SkStuff/util/NMS_v1_15_R1.class and b/bin/me/TheBukor/SkStuff/util/NMS_v1_15_R1.class differ
diff --git a/bin/me/TheBukor/SkStuff/util/ReflectionUtils.class b/bin/me/TheBukor/SkStuff/util/ReflectionUtils.class
index 38ce87a..630a07a 100644
Binary files a/bin/me/TheBukor/SkStuff/util/ReflectionUtils.class and b/bin/me/TheBukor/SkStuff/util/ReflectionUtils.class differ
diff --git a/plugin.yml b/plugin.yml
old mode 100644
new mode 100755
diff --git a/src/META-INF/MANIFEST.MF b/src/META-INF/MANIFEST.MF
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/SkStuff.java b/src/me/TheBukor/SkStuff/SkStuff.java
old mode 100644
new mode 100755
index afeaa58..d1c4fcf
--- a/src/me/TheBukor/SkStuff/SkStuff.java
+++ b/src/me/TheBukor/SkStuff/SkStuff.java
@@ -27,15 +27,15 @@ public class SkStuff extends JavaPlugin {
Skript.registerExpression(ExprStepLength.class, Number.class, ExpressionType.PROPERTY, "[the] step length of %entity%", "%entity%'s step length");
Skript.registerEffect(EffClearPathGoals.class, "(clear|delete) [all] pathfind[er] goals (of|from) %livingentities%");
Skript.registerEffect(EffRemovePathGoal.class, "remove pathfind[er] goal (0¦(avoid|run away from) entit(y|ies)|1¦break door[s]|2¦breed|3¦eat grass|4¦(flee from the sun|seek shad(e|ow))|5¦float (in[side]|on) water|6¦follow (owner|tamer)|7¦follow (adult|parent)[s]|8¦(fight back|react to|target) (damager|attacker)|9¦o(c|z)elot jump on blocks|10¦leap at target|11¦look at entit(y|ies)|12¦melee attack entit(y|ies)|13¦move to[wards] target|14¦target nearest entity|15¦o(c|z)elot attack [chicken[s]]|16¦open door[s]|17¦(panic|flee)|18¦look around randomly|19¦(walk around randomly|wander)|20¦sit|21¦[creeper] (explode|inflate|swell)|22¦squid (swim|wander)|23¦shoot fireball[s]|24¦[silverfish] hide (in[side]|on) block[s]|25¦(wake other silverfish[es]|[silverfish] call (help|reinforcement|other [hidden] silverfish[es]))|26¦[enderm(a|e)n] pick[[ ]up] block[s]|27¦[enderm(a|e)n] place block[s]|28¦[enderman] attack player (staring|looking) [at eye[s]]|29¦ghast move to[wards] target|30¦ghast (idle move[ment]|wander|random fl(ight|y[ing]))|31¦(tempt to|follow players (holding|with)) [a[n]] item|32¦target [random] entity (if|when) (not tamed|untamed)|33¦guardian attack [entity]|34¦[z[ombie[ ]]pig[man]] attack [player[s]] (if|when) angry|35¦[z[ombie[ ]]pig[man]] (react to|fight back|target) (attacker|damager) (if|when) angry|36¦[rabbit] eat carrot crops|37¦[killer] rabbit [melee] attack|38¦slime [random] jump|39¦slime change (direction|facing) randomly|40¦slime (idle move[ment]|wander)|41¦follow [entity]|42¦bow shoot) from %livingentities%");
- // Note to self: whenever adding a new pathfinder goal, increase the expression index for 'entities' in EffSetPathGoal
- Skript.registerEffect(EffSetPathGoal.class, "add pathfind[er] goal [[with] priority %-integer%] (0¦(avoid|run away from) %*entitydatas%[, radius %-number%[, speed %-number%[, speed (if|when) (close|near) %-number%]]]|1¦break door[s]|2¦breed[,[move[ment]] speed %-number%]|3¦eat grass|4¦(flee from the sun|seek shad(e|ow))[, [move[ment]] speed %-number%]|5¦(float (in[side]|on) water|swim)|6¦follow (owner|tamer)[, speed %-number%[, min[imum] distance %-number%[, max[imum] distance %-number%]]]|7¦follow (adult|parent)[s][, [move[ment]] speed %-number%]|8¦(fight back|react to|target) (damager|attacker) [[of] type] %*entitydatas%[, call ([for] help|reinforcement) %-boolean%]|9¦o(c|z)elot jump on blocks[, [move[ment]] speed %-number%]|10¦leap at target[, [leap] height %-number%]|11¦look at %*entitydatas%[, (radius|max[imum] distance) %-number%]|12¦melee attack %*entitydatas%[, [move[ment]] speed %-number%[, (memorize|do('nt| not) forget) target [for [a] long[er] time] %-boolean%]]|13¦move to[wards] target[, [move[ment]] speed %-number%[, (radius|max[imum] distance) %-number%]]|14¦target nearest [entity [of] type] %*entitydatas%[, check sight %-boolean%]|15¦o(c|z)elot attack|16¦open door[s]|17¦(panic|flee)[, [move[ment]] speed %-number%]|18¦look around randomly|19¦(walk around randomly|wander)[, [move[ment]] speed %-number%[, min[imum] [of] %-timespan% between mov(e[ment][s]|ing)]]|20¦sit|21¦[creeper] (explode|inflate|swell)|22¦squid (swim around|wander)|23¦shoot fireball[s]|24¦[silverfish] hide (in[side]|on) block[s]|25¦((call|summon|wake) [other] [hidden] silverfish[es])|26¦[enderman] pick[[ ]up] block[s]|27¦[enderman] place block[s]|28¦[enderman] attack player (staring|looking) at [their] eye[s]]|29¦ghast move to[wards] target|30¦ghast (idle move[ment]|wander|random fl(ight|y[ing]))|31¦(tempt to|follow players (holding|with)) %-itemstack%[, [move[ment]] speed %number%[, scared of player movement %-boolean%]]|32¦target [random] %*entitydatas% (if|when) (not |un)tamed|33¦guardian attack [entities]|34¦[z[ombie[ ]]pig[man]] attack [player[s]] (if|when) angry|35¦[z[ombie[ ]]pig[man]] (react to|fight back|target) (attacker|damager) (if|when) angry|36¦[rabbit] eat carrot crops|37¦[killer] rabbit [melee] attack|38¦slime [random] jump|39¦slime change (direction|facing) randomly|40¦slime (idle move[ment]|wander)|41¦follow %*entitydatas%[, radius %-number%[, speed %-number%[, [custom[ ]]name[d] %-string%]]]|42¦bow shoot[, [move[ment]] speed %-number%[, unk[nown] param[eter] %-number%[, follow range %-number%]]])) to %livingentities%");
+
+ Skript.registerEffect(EffSetPathGoal.class, "add pathfind[er] goal [[with] priority %-integer%] (0¦(avoid|run away from) %*entitydatas%[, radius %-number%[, speed %-number%[, speed (if|when) (close|near) %-number%]]]|1¦break door[s]|2¦breed[,[move[ment]] speed %-number%]|3¦eat grass|4¦(flee from the sun|seek shad(e|ow))[, [move[ment]] speed %-number%]|5¦(float (in[side]|on) water|swim)|6¦follow (owner|tamer)[, speed %-number%[, min[imum] distance %-number%[, max[imum] distance %-number%]]]|7¦follow (adult|parent)[s][, [move[ment]] speed %-number%]|8¦(fight back|react to|target) (damager|attacker) [[of] type] %*entitydatas%[, call ([for] help|reinforcement) %-boolean%]|9¦o(c|z)elot jump on blocks[, [move[ment]] speed %-number%]|10¦leap at target[, [leap] height %-number%]|11¦look at %*entitydatas%[, (radius|max[imum] distance) %-number%]|12¦melee attack %*entitydatas%[, [move[ment]] speed %-number%[, (memorize|do('nt| not) forget) target [for [a] long[er] time] %-boolean%]]|13¦move to[wards] target[, [move[ment]] speed %-number%[, (radius|max[imum] distance) %-number%]]|14¦target nearest [entity [of] type] %*entitydatas%[, check sight %-boolean%]|15¦o(c|z)elot attack|16¦open door[s]|17¦(panic|flee)[, [move[ment]] speed %-number%]|18¦look around randomly|19¦(walk around randomly|wander)[, [move[ment]] speed %-number%[, min[imum] [of] %-timespan% between mov(e[ment][s]|ing)]]|20¦sit|21¦[creeper] (explode|inflate|swell)|22¦squid (swim around|wander)|23¦shoot fireball[s]|24¦[silverfish] hide (in[side]|on) block[s]|25¦((call|summon|wake) [other] [hidden] silverfish[es])|26¦[enderman] pick[[ ]up] block[s]|27¦[enderman] place block[s]|28¦[enderman] attack player (staring|looking) at [their] eye[s]]|29¦ghast move to[wards] target|30¦ghast (idle move[ment]|wander|random fl(ight|y[ing]))|31¦(tempt to|follow players (holding|with)) %-itemstack%[, [move[ment]] speed %number%[, scared of player movement %-boolean%]]|32¦target [random] %*entitydatas% (if|when) (not |un)tamed|33¦guardian attack [entities]|34¦[z[ombie[ ]]pig[man]] attack [player[s]] (if|when) angry|35¦[z[ombie[ ]]pig[man]] (react to|fight back|target) (attacker|damager) (if|when) angry|36¦[rabbit] eat carrot crops|37¦[killer] rabbit [melee] attack|38¦slime [random] jump|39¦slime change (direction|facing) randomly|40¦slime (idle move[ment]|wander)|41¦follow %*entitydatas%[, radius %-number%[, speed %-number%[, [custom[ ]]name[d] %-string%]]]|42¦bow shoot[, [move[ment]] speed %-number%[, unk[nown] param[eter] %-number%[, follow range %-number%]]]) to %livingentities%");
Skript.registerEffect(EffMakeJump.class, "make %livingentities% jump", "force %livingentities% to jump");
Skript.registerExpression(ExprNoClip.class, Boolean.class, ExpressionType.PROPERTY, "no[( |-)]clip (state|mode) of %entities%", "%entities%'s no[( |-)]clip (state|mode)");
Skript.registerExpression(ExprFireProof.class, Boolean.class, ExpressionType.PROPERTY, "fire[ ]proof (state|mode) of %entities%", "%entities%'s fire[ ]proof (state|mode)");
}
- Metrics metrics = new Metrics(this, 1);
- metrics.startSubmitting();
- getLogger().info("Hooked into Metrics! Woohoo!!");
+ //Metrics metrics = new Metrics(this, 1);
+ //metrics.startSubmitting();
+ //getLogger().info("Hooked into Metrics! Woohoo!!");
getLogger().info("Everything's ready!");
} else {
getLogger().info("Unable to find Skript or Skript isn't accepting registrations, disabling SkStuff...");
@@ -43,52 +43,49 @@ public class SkStuff extends JavaPlugin {
}
}
- private boolean setupNMSVersion() {
+ public static boolean setupNMSVersion() {
String version = ReflectionUtils.getVersion();
switch (version) {
case "v1_8_R3.":
nmsMethods = new NMS_v1_8_R3();
- getLogger().info("It looks like you're running 1.8.8!");
+ Bukkit.getLogger().info("It looks like you're running 1.8.8!");
break;
case "v1_9_R2.":
nmsMethods = new NMS_v1_9_R2();
- getLogger().info("It looks like you're running 1.9.4!");
+ Bukkit.getLogger().info("It looks like you're running 1.9.4!");
break;
case "v1_10_R1.":
nmsMethods = new NMS_v1_10_R1();
- getLogger().info("It looks like you're running 1.10.2!");
+ Bukkit.getLogger().info("It looks like you're running 1.10.2!");
break;
case "v1_11_R1.":
nmsMethods = new NMS_v1_11_R1();
- getLogger().info("It looks like you're running 1.11.2!");
+ Bukkit.getLogger().info("It looks like you're running 1.11.2!");
break;
case "v1_12_R1.":
nmsMethods = new NMS_v1_12_R1();
- getLogger().info("It looks like you're running 1.12.2!");
+ Bukkit.getLogger().info("It looks like you're running 1.12.2!");
break;
case "v1_13_R2.":
nmsMethods = new NMS_v1_13_R2();
- getLogger().info("It looks like you're running 1.13.2!");
+ Bukkit.getLogger().info("It looks like you're running 1.13.2!");
break;
case "v1_14_R1.":
nmsMethods = new NMS_v1_14_R1();
- getLogger().info("It looks like you're running 1.14.4!");
+ Bukkit.getLogger().info("It looks like you're running 1.14.4!");
break;
case "v1_15_R1.":
nmsMethods = new NMS_v1_15_R1();
- getLogger().info("It looks like you're running 1.15.2!");
- break;
- case "v1_16_R2.":
- nmsMethods = new NMS_v1_16_R2();
- getLogger().info("It looks like you're running 1.16.3!");
+ Bukkit.getLogger().info("It looks like you're running 1.15.2!");
break;
+
case "v1_16_R3.":
nmsMethods = new NMS_v1_16_R3();
- getLogger().info("It looks like you're running 1.16.4!");
+ Bukkit.getLogger().info("It looks like you're running 1.16.4!");
break;
default:
- getLogger().warning("It looks like you're running an unsupported server version, some features will not be available :(");
+ Bukkit.getLogger().warning("It looks like you're running an unsupported server version, some features will not be available :(");
break;
}
return nmsMethods != null;
diff --git a/src/me/TheBukor/SkStuff/bstats/Metrics.java b/src/me/TheBukor/SkStuff/bstats/Metrics.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/effects/EffClearPathGoals.java b/src/me/TheBukor/SkStuff/effects/EffClearPathGoals.java
old mode 100644
new mode 100755
index 8b4f529..73057ec
--- a/src/me/TheBukor/SkStuff/effects/EffClearPathGoals.java
+++ b/src/me/TheBukor/SkStuff/effects/EffClearPathGoals.java
@@ -2,6 +2,7 @@ package me.TheBukor.SkStuff.effects;
import javax.annotation.Nullable;
+import org.bukkit.Bukkit;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
@@ -33,7 +34,11 @@ public class EffClearPathGoals extends Effect {
LivingEntity[] ents = entities.getAll(e);
for (LivingEntity ent : ents) {
if (!(ent instanceof Player || ent instanceof ArmorStand || ent == null)) {
- SkStuff.getNMSMethods().clearPathfinderGoals(ent);
+ if (SkStuff.setupNMSVersion()) {
+ SkStuff.getNMSMethods().clearPathfinderGoals(ent);
+ } else {
+ //Bukkit.getMobGoals().removeAllGoals(ent);
+ }
}
}
}
diff --git a/src/me/TheBukor/SkStuff/effects/EffMakeJump.java b/src/me/TheBukor/SkStuff/effects/EffMakeJump.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/effects/EffRemovePathGoal.java b/src/me/TheBukor/SkStuff/effects/EffRemovePathGoal.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/effects/EffSetPathGoal.java b/src/me/TheBukor/SkStuff/effects/EffSetPathGoal.java
old mode 100644
new mode 100755
index 7617354..e171db4
--- a/src/me/TheBukor/SkStuff/effects/EffSetPathGoal.java
+++ b/src/me/TheBukor/SkStuff/effects/EffSetPathGoal.java
@@ -96,7 +96,7 @@ public final class EffSetPathGoal extends Effect {
@SuppressWarnings("unchecked")
@Override
- public final boolean init(Expression>[] expr, int matchedPattern, Kleenean arg2, ParseResult result) {
+ public boolean init(Expression>[] expr, int matchedPattern, Kleenean arg2, ParseResult result) {
goalPriority = (Expression) expr[0];
mark = result.mark;
if (mark == 0) {
@@ -155,7 +155,7 @@ public final class EffSetPathGoal extends Effect {
bowShootUnkParam = (Expression) expr[36];
bowShootFollowRange = (Expression) expr[37];
}
- entities = (Expression) expr[38];
+ entities = (Expression) expr[expr.length - 1];
/* Debug stuff, just in case I need it
int i = 0;
for (Expression> expression : expr) {
@@ -550,9 +550,6 @@ public final class EffSetPathGoal extends Effect {
case "v1.15_R1.":
newGoals.add(new PathfinderGoalFollow_v1_15_R1((net.minecraft.server.v1_15_R1.EntityCreature) nmsEnt, nmsClass, radius, spd, usesName, customName));
break;
- case "v1.16_R2.":
- newGoals.add(new PathfinderGoalFollow_v1_16_R2((net.minecraft.server.v1_16_R2.EntityCreature) nmsEnt, nmsClass, radius, spd, usesName, customName));
- break;
case "v1.16_R3.":
newGoals.add(new PathfinderGoalFollow_v1_16_R3((net.minecraft.server.v1_16_R3.EntityCreature) nmsEnt, nmsClass, radius, spd, usesName, customName));
break;
diff --git a/src/me/TheBukor/SkStuff/effects/EffShowEntityEffect.java b/src/me/TheBukor/SkStuff/effects/EffShowEntityEffect.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/expressions/ExprFireProof.java b/src/me/TheBukor/SkStuff/expressions/ExprFireProof.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/expressions/ExprNoClip.java b/src/me/TheBukor/SkStuff/expressions/ExprNoClip.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/expressions/ExprStepLength.java b/src/me/TheBukor/SkStuff/expressions/ExprStepLength.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_13_R2.java b/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_13_R2.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_14_R1.java b/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_14_R1.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_15_R1.java b/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_15_R1.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_16_R2.java b/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_16_R2.java
deleted file mode 100644
index 7ef4f8e..0000000
--- a/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_16_R2.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package me.TheBukor.SkStuff.pathfinders;
-
-import net.minecraft.server.v1_16_R2.Entity;
-import net.minecraft.server.v1_16_R2.EntityCreature;
-import net.minecraft.server.v1_16_R2.EntityLiving;
-import net.minecraft.server.v1_16_R2.PathfinderGoal;
-
-import java.util.List;
-
-public class PathfinderGoalFollow_v1_16_R2 extends PathfinderGoal {
- private final EntityCreature follower;
- private EntityLiving followed;
- private final Class> followedClass;
- private final float radius;
- private final double speed;
- private final boolean isByName;
- private final String customName;
-
- public PathfinderGoalFollow_v1_16_R2(EntityCreature follower, Class> followedClass, float radius, double speed, boolean isByName, String customName) {
- this.follower = follower;
- this.followedClass = followedClass;
- this.radius = radius;
- this.speed = speed;
- this.isByName = isByName;
- this.customName = customName;
- }
-
- // a() is shouldExecute()
- @SuppressWarnings("unchecked")
- @Override
- public boolean a() {
- if (followed == null) {
- List> list = follower.world.a((Class extends Entity>) followedClass, follower.getBoundingBox().grow(radius, 4.0D, radius));
- if (list.isEmpty()) {
- return false;
- }
- if (isByName) {
- for (Object entity : list) {
- if (((EntityLiving) entity).getCustomName().equals(customName)) {
- followed = (EntityLiving) entity;
- return true;
- }
- }
- } else {
- followed = (EntityLiving) list.get(0);
- return true;
- }
- }
- return true;
- }
-
- // b() is shouldContinueExecuting()
- @Override
- public boolean b() {
- if (followed.dead) {
- followed = null;
- return false;
- } else if (followed.h(follower) < 9.0D || followed.h(follower) > Math.pow(radius, 2)) { // h() = distanceSquaredFrom()
- return false; // if 3 blocks away or not in radius, stop moving.
- //Maybe I'll add a teleport feature later.
- } else if (isByName) {
- if (!followed.getCustomName().equals(customName)) {
- followed = null;
- return false;
- }
- }
- //return follower.getNavigation().n(); // n() means hasNoPath()
- return true;
- // n() is now protected void and I'm not sure how to access it, so I'm just returning a boolean, this probably will cause some issues with this pathfinder goal, if you know a better solution, let me know. - Govindas.
- }
-
- // c() is execute()
- @Override
- public void c () {
- follower.getNavigation().a(followed, speed); // a() means moveTo()
- }
-
-
- }
diff --git a/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_16_R3.java b/src/me/TheBukor/SkStuff/pathfinders/PathfinderGoalFollow_v1_16_R3.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMSInterface.java b/src/me/TheBukor/SkStuff/util/NMSInterface.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_10_R1.java b/src/me/TheBukor/SkStuff/util/NMS_v1_10_R1.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_11_R1.java b/src/me/TheBukor/SkStuff/util/NMS_v1_11_R1.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_12_R1.java b/src/me/TheBukor/SkStuff/util/NMS_v1_12_R1.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_13_R2.java b/src/me/TheBukor/SkStuff/util/NMS_v1_13_R2.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_14_R1.java b/src/me/TheBukor/SkStuff/util/NMS_v1_14_R1.java
old mode 100644
new mode 100755
index 0ef09a5..3d1a6b8
--- a/src/me/TheBukor/SkStuff/util/NMS_v1_14_R1.java
+++ b/src/me/TheBukor/SkStuff/util/NMS_v1_14_R1.java
@@ -47,7 +47,7 @@ public class NMS_v1_14_R1 implements NMSInterface {
cField = PathfinderGoalSelector.class.getDeclaredField("c");
cField.setAccessible(true);
dField.set(goalSelector, new LinkedHashSet<>());
- cField.set(targetSelector, new EnumMap<>(net.minecraft.server.v1_16_R2.PathfinderGoal.Type.class));
+ cField.set(targetSelector, new EnumMap<>(net.minecraft.server.v1_14_R1.PathfinderGoal.Type.class));
Field fField;
fField = PathfinderGoalSelector.class.getDeclaredField("f");
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_15_R1.java b/src/me/TheBukor/SkStuff/util/NMS_v1_15_R1.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_16_R2.java b/src/me/TheBukor/SkStuff/util/NMS_v1_16_R2.java
deleted file mode 100644
index 1bc5368..0000000
--- a/src/me/TheBukor/SkStuff/util/NMS_v1_16_R2.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package me.TheBukor.SkStuff.util;
-
-
-import net.minecraft.server.v1_16_R2.EntityInsentient;
-import net.minecraft.server.v1_16_R2.PathfinderGoal;
-import net.minecraft.server.v1_16_R2.PathfinderGoalSelector;
-import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.v1_16_R2.entity.CraftEntity;
-import org.bukkit.entity.Entity;
-import org.bukkit.entity.Mob;
-
-import java.util.LinkedHashSet;
-
-public class NMS_v1_16_R2 implements NMSInterface {
-
- @Override
- public void clearPathfinderGoals(Entity entity) {
- Mob e = (Mob) entity;
- Bukkit.getMobGoals().removeAllGoals(e);
-
- }
-
- @Override
- public void removePathfinderGoal(Object entity, Class> goalClass, boolean isTargetSelector) {
- if (entity instanceof EntityInsentient) {
- ((EntityInsentient) entity).setGoalTarget(null);
- if (isTargetSelector) {
- ((LinkedHashSet>) ReflectionUtils.getField("b", PathfinderGoalSelector.class, ((EntityInsentient) entity).targetSelector)).removeIf(goal -> ReflectionUtils.getField("a", goal.getClass(), goal).getClass() == goalClass);
- } else {
- ((LinkedHashSet>) ReflectionUtils.getField("b", PathfinderGoalSelector.class, ((EntityInsentient) entity).goalSelector)).removeIf(goal -> ReflectionUtils.getField("a", goal.getClass(), goal).getClass() == goalClass);
- }
- }
- }
-
- @Override
- public void addPathfinderGoal(Object entity, int priority, Object goal, boolean isTargetSelector) {
- if (entity instanceof EntityInsentient && goal instanceof PathfinderGoal) {
- if (isTargetSelector)
- ((EntityInsentient) entity).targetSelector.a(priority, (PathfinderGoal) goal);
- else
- ((EntityInsentient) entity).goalSelector.a(priority, (PathfinderGoal) goal);
- }
- }
-
-
- @Override
- public boolean getNoClip(Entity entity) {
- net.minecraft.server.v1_16_R2.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- return nmsEntity.noclip;
- }
-
- @Override
- public void setNoClip(Entity entity, boolean noclip) {
- net.minecraft.server.v1_16_R2.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- nmsEntity.noclip = noclip;
- }
-
- @Override
- public boolean getFireProof(Entity entity) {
- net.minecraft.server.v1_16_R2.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- return nmsEntity.isFireProof();
- }
-
- @Override
- public void setFireProof(Entity entity, boolean fireProof) {
- net.minecraft.server.v1_16_R2.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- ReflectionUtils.setField("fireProof", nmsEntity.getClass(), nmsEntity, fireProof);
- }
- public float getEntityStepLength(Entity entity) {
- net.minecraft.server.v1_16_R2.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- return nmsEntity.G;
- }
-
- @Override
- public void setEntityStepLength(Entity entity, float length) {
- net.minecraft.server.v1_16_R2.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- nmsEntity.G = length;
- }
-}
\ No newline at end of file
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_16_R3.java b/src/me/TheBukor/SkStuff/util/NMS_v1_16_R3.java
index b5df025..e0c7ada 100644
--- a/src/me/TheBukor/SkStuff/util/NMS_v1_16_R3.java
+++ b/src/me/TheBukor/SkStuff/util/NMS_v1_16_R3.java
@@ -13,67 +13,67 @@ import java.util.LinkedHashSet;
public class NMS_v1_16_R3 implements NMSInterface {
- @Override
- public void clearPathfinderGoals(Entity entity) {
- Mob e = (Mob) entity;
- Bukkit.getMobGoals().removeAllGoals(e);
+ @Override
+ public void clearPathfinderGoals(Entity entity) {
+ Mob e = (Mob) entity;
+ //Bukkit.getMobGoals().removeAllGoals(e);
- }
+ }
- @Override
- public void removePathfinderGoal(Object entity, Class> goalClass, boolean isTargetSelector) {
- if (entity instanceof EntityInsentient) {
- ((EntityInsentient) entity).setGoalTarget(null);
- if (isTargetSelector) {
- ((LinkedHashSet>) ReflectionUtils.getField("b", PathfinderGoalSelector.class, ((EntityInsentient) entity).targetSelector)).removeIf(goal -> ReflectionUtils.getField("a", goal.getClass(), goal).getClass() == goalClass);
- } else {
- ((LinkedHashSet>) ReflectionUtils.getField("b", PathfinderGoalSelector.class, ((EntityInsentient) entity).goalSelector)).removeIf(goal -> ReflectionUtils.getField("a", goal.getClass(), goal).getClass() == goalClass);
- }
- }
- }
+ @Override
+ public void removePathfinderGoal(Object entity, Class> goalClass, boolean isTargetSelector) {
+ if (entity instanceof EntityInsentient) {
+ ((EntityInsentient) entity).setGoalTarget(null);
+ if (isTargetSelector) {
+ ((LinkedHashSet>) ReflectionUtils.getField("b", PathfinderGoalSelector.class, ((EntityInsentient) entity).targetSelector)).removeIf(goal -> ReflectionUtils.getField("a", goal.getClass(), goal).getClass() == goalClass);
+ } else {
+ ((LinkedHashSet>) ReflectionUtils.getField("b", PathfinderGoalSelector.class, ((EntityInsentient) entity).goalSelector)).removeIf(goal -> ReflectionUtils.getField("a", goal.getClass(), goal).getClass() == goalClass);
+ }
+ }
+ }
- @Override
- public void addPathfinderGoal(Object entity, int priority, Object goal, boolean isTargetSelector) {
- if (entity instanceof EntityInsentient && goal instanceof PathfinderGoal) {
- if (isTargetSelector)
- ((EntityInsentient) entity).targetSelector.a(priority, (PathfinderGoal) goal);
- else
- ((EntityInsentient) entity).goalSelector.a(priority, (PathfinderGoal) goal);
- }
- }
+ @Override
+ public void addPathfinderGoal(Object entity, int priority, Object goal, boolean isTargetSelector) {
+ if (entity instanceof EntityInsentient && goal instanceof PathfinderGoal) {
+ if (isTargetSelector)
+ ((EntityInsentient) entity).targetSelector.a(priority, (PathfinderGoal) goal);
+ else
+ ((EntityInsentient) entity).goalSelector.a(priority, (PathfinderGoal) goal);
+ }
+ }
- @Override
- public boolean getNoClip(Entity entity) {
- net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- return nmsEntity.noclip;
- }
+ @Override
+ public boolean getNoClip(Entity entity) {
+ net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
+ return nmsEntity.noclip;
+ }
- @Override
- public void setNoClip(Entity entity, boolean noclip) {
- net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- nmsEntity.noclip = noclip;
- }
+ @Override
+ public void setNoClip(Entity entity, boolean noclip) {
+ net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
+ nmsEntity.noclip = noclip;
+ }
- @Override
- public boolean getFireProof(Entity entity) {
- net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- return nmsEntity.isFireProof();
- }
+ @Override
+ public boolean getFireProof(Entity entity) {
+ net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
+ return nmsEntity.isFireProof();
+ }
- @Override
- public void setFireProof(Entity entity, boolean fireProof) {
- net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- ReflectionUtils.setField("fireProof", nmsEntity.getClass(), nmsEntity, fireProof);
- }
- public float getEntityStepLength(Entity entity) {
- net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- return nmsEntity.G;
- }
+ @Override
+ public void setFireProof(Entity entity, boolean fireProof) {
+ net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
+ ReflectionUtils.setField("fireProof", nmsEntity.getClass(), nmsEntity, fireProof);
+ }
+ public float getEntityStepLength(Entity entity) {
+ net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
+ return nmsEntity.G;
+ }
- @Override
- public void setEntityStepLength(Entity entity, float length) {
- net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
- nmsEntity.G = length;
- }
+ @Override
+ public void setEntityStepLength(Entity entity, float length) {
+ net.minecraft.server.v1_16_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
+ nmsEntity.G = length;
+ }
}
\ No newline at end of file
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_8_R3.java b/src/me/TheBukor/SkStuff/util/NMS_v1_8_R3.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/NMS_v1_9_R2.java b/src/me/TheBukor/SkStuff/util/NMS_v1_9_R2.java
old mode 100644
new mode 100755
diff --git a/src/me/TheBukor/SkStuff/util/ReflectionUtils.java b/src/me/TheBukor/SkStuff/util/ReflectionUtils.java
old mode 100644
new mode 100755