Controllabe NPCs stop only on shift-left/right click now

This commit is contained in:
fullwall 2013-03-11 19:35:21 +08:00
parent bcb7672246
commit deba96875c
2 changed files with 1 additions and 2 deletions

View File

@ -120,7 +120,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (!npc.isSpawned() || !enabled)
if (!npc.isSpawned() || !enabled || !event.getPlayer().isSneaking())
return;
EntityPlayer handle = ((CraftPlayer) event.getPlayer()).getHandle();
Action performed = event.getAction();

View File

@ -71,7 +71,6 @@ public class Util {
new Random().nextBytes(seed);
return RNG_CONSTRUCTOR.newInstance(seed);
} catch (Exception e) {
e.printStackTrace();
return new Random();
}
}