mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 11:38:26 +01:00
Fix?
This commit is contained in:
parent
1b3d81f019
commit
47c5775a95
@ -115,9 +115,7 @@ public class EventListen implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onEntityTarget(EntityTargetEvent event) {
|
||||
if (!npcRegistry.isNPC(event.getEntity()) || !(event.getTarget() instanceof Player))
|
||||
return;
|
||||
|
||||
if (npcRegistry.isNPC(event.getEntity()) && event.getTarget() instanceof Player) {
|
||||
NPC npc = npcRegistry.getNPC(event.getEntity());
|
||||
Player player = (Player) event.getTarget();
|
||||
|
||||
@ -125,6 +123,7 @@ public class EventListen implements Listener {
|
||||
NPCRightClickEvent rightClickEvent = new NPCRightClickEvent(npc, player);
|
||||
Bukkit.getPluginManager().callEvent(rightClickEvent);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Player events
|
||||
|
@ -110,6 +110,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
getControllerMove().c();
|
||||
getControllerLook().a();
|
||||
getControllerJump().b();
|
||||
e(npc.getNavigator().getDefaultParameters().speed());
|
||||
|
||||
// taken from EntityLiving update method
|
||||
if (bu) {
|
||||
|
@ -72,7 +72,7 @@ public class Controllable extends Trait implements Toggleable {
|
||||
boolean onGround = handle.onGround;
|
||||
handle.motX += handle.passenger.motX * (onGround ? GROUND_SPEED : AIR_SPEED);
|
||||
handle.motZ += handle.passenger.motZ * (onGround ? GROUND_SPEED : AIR_SPEED);
|
||||
handle.e(npc.getNavigator().getSpeed());
|
||||
handle.e(npc.getNavigator().getDefaultParameters().speed());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user