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
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
if (!npc.isSpawned() || !enabled)
|
if (!npc.isSpawned() || !enabled || !event.getPlayer().isSneaking())
|
||||||
return;
|
return;
|
||||||
EntityPlayer handle = ((CraftPlayer) event.getPlayer()).getHandle();
|
EntityPlayer handle = ((CraftPlayer) event.getPlayer()).getHandle();
|
||||||
Action performed = event.getAction();
|
Action performed = event.getAction();
|
||||||
|
@ -71,7 +71,6 @@ public class Util {
|
|||||||
new Random().nextBytes(seed);
|
new Random().nextBytes(seed);
|
||||||
return RNG_CONSTRUCTOR.newInstance(seed);
|
return RNG_CONSTRUCTOR.newInstance(seed);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
|
||||||
return new Random();
|
return new Random();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user