use of net.minecraft.server.v1_16_R3.EntityFishingHook in project Citizens2 by CitizensDev.
the class NMSImpl method removeHookIfNecessary.
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {
hook.hooked = null;
hook.die();
}
}
use of net.minecraft.server.v1_16_R3.EntityFishingHook in project Citizens2 by CitizensDev.
the class NMSImpl method removeHookIfNecessary.
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {
hook.hooked = null;
hook.die();
}
}
use of net.minecraft.server.v1_16_R3.EntityFishingHook in project Citizens2 by CitizensDev.
the class NMSImpl method removeHookIfNecessary.
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {
hook.hooked = null;
hook.die();
}
}
Aggregations