diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java index 31310033c..4def8555c 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java @@ -3,6 +3,7 @@ package mineplex.core.common.util; import java.lang.reflect.Field; import java.util.HashMap; import java.util.LinkedList; +import java.util.List; import net.minecraft.server.v1_7_R4.EntityBat; import net.minecraft.server.v1_7_R4.EntityCreature; @@ -41,6 +42,8 @@ public class UtilEnt private static Field _goalSelector; private static Field _targetSelector; private static Field _bsRestrictionGoal; + private static Field _pathfinderBList; + private static Field _pathfinderCList; public static HashMap GetEntityNames() { @@ -97,6 +100,18 @@ public class UtilEnt _targetSelector.setAccessible(true); } + if (_pathfinderBList == null) + { + _pathfinderBList = PathfinderGoalSelector.class.getDeclaredField("b"); + _pathfinderBList.setAccessible(true); + } + + if (_pathfinderCList == null) + { + _pathfinderCList = PathfinderGoalSelector.class.getDeclaredField("c"); + _pathfinderCList.setAccessible(true); + } + if (entity instanceof CraftCreature) { EntityCreature creature = ((CraftCreature)entity).getHandle(); @@ -116,13 +131,12 @@ public class UtilEnt creature.Vegetated = true; creature.Silent = mute; - PathfinderGoalSelector goalSelector = new PathfinderGoalSelector(((CraftWorld)entity.getWorld()).getHandle().methodProfiler); - - goalSelector.a(7, new PathfinderGoalLookAtPlayer(creature, EntityHuman.class, 6.0F)); - goalSelector.a(7, new PathfinderGoalRandomLookaround(creature)); - - _goalSelector.set(creature, goalSelector); - _targetSelector.set(creature, new PathfinderGoalSelector(((CraftWorld)entity.getWorld()).getHandle().methodProfiler)); + + ((List)_pathfinderBList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear(); + ((List)_pathfinderCList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear(); + + ((List)_pathfinderBList.get(((PathfinderGoalSelector)_targetSelector.get(creature)))).clear(); + ((List)_pathfinderCList.get(((PathfinderGoalSelector)_targetSelector.get(creature)))).clear(); } if (((CraftEntity)entity).getHandle() instanceof EntityBat) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitRaveSuit.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitRaveSuit.java index 7a5ecaa5b..265ad7952 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitRaveSuit.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitRaveSuit.java @@ -147,20 +147,4 @@ public class OutfitRaveSuit extends OutfitGadget stack.setItemMeta(meta); } } - - - //@EventHandler - public void debug(PlayerCommandPreprocessEvent event) - { - if (event.getMessage().contains("on")) - { - this.Enable(event.getPlayer()); - event.setCancelled(true); - } - if (event.getMessage().contains("off")) - { - this.Disable(event.getPlayer()); - event.setCancelled(true); - } - } } diff --git a/Plugins/Mineplex.Hub/.classpath b/Plugins/Mineplex.Hub/.classpath index 4397068af..f286df427 100644 --- a/Plugins/Mineplex.Hub/.classpath +++ b/Plugins/Mineplex.Hub/.classpath @@ -10,5 +10,7 @@ + + diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/notification/NotificationManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/notification/NotificationManager.java index 49d5cd4b3..d2dd03364 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/notification/NotificationManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/notification/NotificationManager.java @@ -1,6 +1,7 @@ package mineplex.hub.notification; import java.util.ArrayList; +import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -67,7 +68,7 @@ public class NotificationManager extends MiniPlugin notifications.addAll(notifier.getNotifications(player)); } - notifications.sort(COMPARATOR); + Collections.sort(notifications, COMPARATOR); return notifications; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Sleigh.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Sleigh.java index d74ac3928..86918d9e9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Sleigh.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Sleigh.java @@ -121,12 +121,6 @@ public class Sleigh SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 1, 3)); SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, 3)); - //Corners - SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), -2, -3)); - SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), 2, -3)); - SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), -2, 0)); - SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), 2, 0)); - //Santa SleighPart santa = new SleighPart(3, 0, 0, loc.clone(), 0, 1); santa.AddSanta();