MOdified method signature

This commit is contained in:
fullwall 2023-09-20 21:52:53 +08:00
parent fe0d058160
commit c994315060
13 changed files with 25 additions and 38 deletions

View File

@ -36,7 +36,6 @@ import net.citizensnpcs.api.jnbt.CompoundTag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.util.BoundingBox;
import net.citizensnpcs.api.util.EntityDim;
import net.citizensnpcs.npc.ai.MCNavigationStrategy.MCNavigator;
@ -156,7 +155,7 @@ public interface NMSBridge {
public void removeFromWorld(org.bukkit.entity.Entity entity);
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity);
public void removeHookIfNecessary(FishHook entity);
public void replaceTrackerEntry(Entity entity);

View File

@ -94,7 +94,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1045,11 +1044,11 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {

View File

@ -94,7 +94,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1103,11 +1102,11 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {

View File

@ -94,7 +94,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1115,11 +1114,11 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {

View File

@ -95,7 +95,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1152,11 +1151,11 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {

View File

@ -93,7 +93,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1177,11 +1176,11 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {

View File

@ -93,7 +93,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1194,11 +1193,11 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {

View File

@ -95,7 +95,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1218,7 +1217,7 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
if (FISHING_HOOK_HOOKED == null)
return;
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
@ -1230,7 +1229,7 @@ public class NMSImpl implements NMSBridge {
}
if (hooked == null)
return;
NPC npc = npcRegistry.getNPC(hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {

View File

@ -92,7 +92,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1218,12 +1217,12 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
FishingHook hook = (FishingHook) NMSImpl.getHandle(entity);
Entity hooked = hook.getHookedIn();
if (hooked == null)
return;
NPC npc = npcRegistry.getNPC(hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hooked.getBukkitEntity());
if (npc != null && npc.isProtected()) {
hook.hookedIn = null;
hook.getBukkitEntity().remove();

View File

@ -93,7 +93,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1226,12 +1225,12 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
FishingHook hook = (FishingHook) NMSImpl.getHandle(entity);
Entity hooked = hook.getHookedIn();
if (hooked == null)
return;
NPC npc = npcRegistry.getNPC(hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hooked.getBukkitEntity());
if (npc != null && npc.isProtected()) {
hook.hookedIn = null;
hook.getBukkitEntity().remove();

View File

@ -98,7 +98,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1326,12 +1325,12 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
FishingHook hook = (FishingHook) getHandle(entity);
Entity hooked = hook.getHookedIn();
if (hooked == null)
return;
NPC npc = npcRegistry.getNPC(hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hooked.getBukkitEntity());
if (npc != null && npc.isProtected()) {
hook.hookedIn = null;
hook.getBukkitEntity().remove();

View File

@ -97,7 +97,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitInfo;
import net.citizensnpcs.api.util.BoundingBox;
@ -1327,12 +1326,12 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
FishingHook hook = (FishingHook) getHandle(entity);
Entity hooked = hook.getHookedIn();
if (hooked == null)
return;
NPC npc = npcRegistry.getNPC(hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hooked.getBukkitEntity());
if (npc != null && npc.isProtected()) {
hook.hookedIn = null;
hook.getBukkitEntity().remove();

View File

@ -91,7 +91,6 @@ import net.citizensnpcs.api.jnbt.Tag;
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.util.BoundingBox;
import net.citizensnpcs.api.util.EntityDim;
import net.citizensnpcs.api.util.Messaging;
@ -976,11 +975,11 @@ public class NMSImpl implements NMSBridge {
}
@Override
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity) {
public void removeHookIfNecessary(FishHook entity) {
EntityFishingHook hook = (EntityFishingHook) NMSImpl.getHandle(entity);
if (hook.hooked == null)
return;
NPC npc = npcRegistry.getNPC(hook.hooked.getBukkitEntity());
NPC npc = CitizensAPI.getNPCRegistry().getNPC(hook.hooked.getBukkitEntity());
if (npc == null)
return;
if (npc.isProtected()) {