mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-27 13:15:33 +01:00
Controllabe NPCs stop only on shift-left/right click now
This commit is contained in:
parent
bcb7672246
commit
deba96875c
@ -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();
|
||||
|
@ -71,7 +71,6 @@ public class Util {
|
||||
new Random().nextBytes(seed);
|
||||
return RNG_CONSTRUCTOR.newInstance(seed);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new Random();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user