mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 11:37:42 +01:00
fix for new spigot mappings update, fixes #1806
This commit is contained in:
parent
7b2f08b372
commit
3dad7670c7
@ -130,8 +130,8 @@ public class BatController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new BatNPC(this);
|
NMSImpl.setBukkitEntity(this, new BatNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -121,8 +121,8 @@ public class BlazeController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new BlazeNPC(this);
|
NMSImpl.setBukkitEntity(this, new BlazeNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,8 @@ public class CatController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new CatNPC(this);
|
NMSImpl.setBukkitEntity(this, new CatNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -145,8 +145,8 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new CaveSpiderNPC(this);
|
NMSImpl.setBukkitEntity(this, new CaveSpiderNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -159,8 +159,8 @@ public class ChickenController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ChickenNPC(this);
|
NMSImpl.setBukkitEntity(this, new ChickenNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,9 @@ public class CodController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new CodNPC(this);
|
NMSImpl.setBukkitEntity(this, new CodNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,8 +158,8 @@ public class CowController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new CowNPC(this);
|
NMSImpl.setBukkitEntity(this, new CowNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,8 @@ public class CreeperController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new CreeperNPC(this);
|
NMSImpl.setBukkitEntity(this, new CreeperNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -146,8 +146,9 @@ public class DolphinController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new DolphinNPC(this);
|
NMSImpl.setBukkitEntity(this, new DolphinNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,8 +145,9 @@ public class DrownedController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new DrownedNPC(this);
|
NMSImpl.setBukkitEntity(this, new DrownedNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,8 +119,8 @@ public class EnderDragonController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EnderDragonNPC(this);
|
NMSImpl.setBukkitEntity(this, new EnderDragonNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -152,8 +152,8 @@ public class EndermanController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EndermanNPC(this);
|
NMSImpl.setBukkitEntity(this, new EndermanNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,8 @@ public class EndermiteController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EndermiteNPC(this);
|
NMSImpl.setBukkitEntity(this, new EndermiteNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -221,8 +221,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftPlayer getBukkitEntity() {
|
public CraftPlayer getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PlayerNPC(this);
|
NMSImpl.setBukkitEntity(this, new PlayerNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
@ -411,7 +411,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
if (updateCounter + 1 > Setting.PACKET_UPDATE_DELAY.asInt()) {
|
if (updateCounter + 1 > Setting.PACKET_UPDATE_DELAY.asInt()) {
|
||||||
updateEffects = true;
|
updateEffects = true;
|
||||||
}
|
}
|
||||||
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", bukkitEntity);
|
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", getBukkitEntity());
|
||||||
livingEntityBaseTick();
|
livingEntityBaseTick();
|
||||||
|
|
||||||
boolean navigating = npc.getNavigator().isNavigating();
|
boolean navigating = npc.getNavigator().isNavigating();
|
||||||
|
@ -132,8 +132,8 @@ public class EvokerController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EvokerNPC(this);
|
NMSImpl.setBukkitEntity(this, new EvokerNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,8 @@ public class FoxController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new FoxNPC(this);
|
NMSImpl.setBukkitEntity(this, new FoxNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -107,8 +107,8 @@ public class GhastController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new GhastNPC(this);
|
NMSImpl.setBukkitEntity(this, new GhastNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -130,8 +130,8 @@ public class GiantController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new GiantNPC(this);
|
NMSImpl.setBukkitEntity(this, new GiantNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -131,8 +131,8 @@ public class GuardianController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new GuardianNPC(this);
|
NMSImpl.setBukkitEntity(this, new GuardianNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -131,8 +131,8 @@ public class GuardianElderController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new GuardianElderNPC(this);
|
NMSImpl.setBukkitEntity(this, new GuardianElderNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -155,8 +155,8 @@ public class HorseController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new HorseNPC(this);
|
NMSImpl.setBukkitEntity(this, new HorseNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -155,8 +155,8 @@ public class HorseDonkeyController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new HorseDonkeyNPC(this);
|
NMSImpl.setBukkitEntity(this, new HorseDonkeyNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -155,8 +155,8 @@ public class HorseMuleController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new HorseMuleNPC(this);
|
NMSImpl.setBukkitEntity(this, new HorseMuleNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -156,8 +156,8 @@ public class HorseSkeletonController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new HorseSkeletonNPC(this);
|
NMSImpl.setBukkitEntity(this, new HorseSkeletonNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -156,8 +156,8 @@ public class HorseZombieController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new HorseZombieNPC(this);
|
NMSImpl.setBukkitEntity(this, new HorseZombieNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -132,8 +132,9 @@ public class IllusionerController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new IllusionerNPC(this);
|
NMSImpl.setBukkitEntity(this, new IllusionerNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,8 +130,8 @@ public class IronGolemController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new IronGolemNPC(this);
|
NMSImpl.setBukkitEntity(this, new IronGolemNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -155,8 +155,8 @@ public class LlamaController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new LlamaNPC(this);
|
NMSImpl.setBukkitEntity(this, new LlamaNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,8 @@ public class MagmaCubeController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new MagmaCubeNPC(this);
|
NMSImpl.setBukkitEntity(this, new MagmaCubeNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -145,8 +145,8 @@ public class MushroomCowController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new MushroomCowNPC(this);
|
NMSImpl.setBukkitEntity(this, new MushroomCowNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -151,8 +151,8 @@ public class OcelotController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new OcelotNPC(this);
|
NMSImpl.setBukkitEntity(this, new OcelotNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,8 @@ public class PandaController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PandaNPC(this);
|
NMSImpl.setBukkitEntity(this, new PandaNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -116,8 +116,8 @@ public class ParrotController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ParrotNPC(this);
|
NMSImpl.setBukkitEntity(this, new ParrotNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,9 @@ public class PhantomController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PhantomNPC(this);
|
NMSImpl.setBukkitEntity(this, new PhantomNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,8 +152,8 @@ public class PigController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PigNPC(this);
|
NMSImpl.setBukkitEntity(this, new PigNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -133,8 +133,8 @@ public class PigZombieController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PigZombieNPC(this);
|
NMSImpl.setBukkitEntity(this, new PigZombieNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,8 @@ public class PillagerController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PillagerNPC(this);
|
NMSImpl.setBukkitEntity(this, new PillagerNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -119,8 +119,8 @@ public class PolarBearController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PolarBearNPC(this);
|
NMSImpl.setBukkitEntity(this, new PolarBearNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -133,8 +133,9 @@ public class PufferFishController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PufferFishNPC(this);
|
NMSImpl.setBukkitEntity(this, new PufferFishNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,8 +147,8 @@ public class RabbitController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new RabbitNPC(this);
|
NMSImpl.setBukkitEntity(this, new RabbitNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,8 @@ public class RavagerController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new RavagerNPC(this);
|
NMSImpl.setBukkitEntity(this, new RavagerNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -133,8 +133,9 @@ public class SalmonController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SalmonNPC(this);
|
NMSImpl.setBukkitEntity(this, new SalmonNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,8 +144,8 @@ public class SheepController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SheepNPC(this);
|
NMSImpl.setBukkitEntity(this, new SheepNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -131,8 +131,9 @@ public class ShulkerController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ShulkerNPC(this);
|
NMSImpl.setBukkitEntity(this, new ShulkerNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,8 +129,9 @@ public class SilverfishController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SilverfishNPC(this);
|
NMSImpl.setBukkitEntity(this, new SilverfishNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class SkeletonController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SkeletonNPC(this);
|
NMSImpl.setBukkitEntity(this, new SkeletonNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class SkeletonStrayController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new StrayNPC(this);
|
NMSImpl.setBukkitEntity(this, new StrayNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class SkeletonWitherController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SkeletonWitherNPC(this);
|
NMSImpl.setBukkitEntity(this, new SkeletonWitherNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,8 +135,9 @@ public class SlimeController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SlimeNPC(this);
|
NMSImpl.setBukkitEntity(this, new SlimeNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,8 +130,9 @@ public class SnowmanController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SnowmanNPC(this);
|
NMSImpl.setBukkitEntity(this, new SnowmanNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class SpiderController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SpiderNPC(this);
|
NMSImpl.setBukkitEntity(this, new SpiderNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class SquidController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SquidNPC(this);
|
NMSImpl.setBukkitEntity(this, new SquidNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,8 +158,8 @@ public class TraderLlamaController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new TraderLlamaNPC(this);
|
NMSImpl.setBukkitEntity(this, new TraderLlamaNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -133,8 +133,9 @@ public class TropicalFishController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new TropicalFishNPC(this);
|
NMSImpl.setBukkitEntity(this, new TropicalFishNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,8 +135,9 @@ public class TurtleController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new TurtleNPC(this);
|
NMSImpl.setBukkitEntity(this, new TurtleNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,8 +108,9 @@ public class VexController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new VexNPC(this);
|
NMSImpl.setBukkitEntity(this, new VexNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,8 +176,9 @@ public class VillagerController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new VillagerNPC(this);
|
NMSImpl.setBukkitEntity(this, new VillagerNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,8 +145,9 @@ public class VindicatorController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new VindicatorNPC(this);
|
NMSImpl.setBukkitEntity(this, new VindicatorNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,8 +175,9 @@ public class WanderingTraderController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new WanderingTraderNPC(this);
|
NMSImpl.setBukkitEntity(this, new WanderingTraderNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class WitchController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new WitchNPC(this);
|
NMSImpl.setBukkitEntity(this, new WitchNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,8 +106,9 @@ public class WitherController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new WitherNPC(this);
|
NMSImpl.setBukkitEntity(this, new WitherNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,8 +147,9 @@ public class WolfController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new WolfNPC(this);
|
NMSImpl.setBukkitEntity(this, new WolfNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class ZombieController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ZombieNPC(this);
|
NMSImpl.setBukkitEntity(this, new ZombieNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class ZombieHuskController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ZombieHuskNPC(this);
|
NMSImpl.setBukkitEntity(this, new ZombieHuskNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,9 @@ public class ZombieVillagerController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ZombieVillagerNPC(this);
|
NMSImpl.setBukkitEntity(this, new ZombieVillagerNPC(this));
|
||||||
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftAreaEffectCloud;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftAreaEffectCloud;
|
||||||
@ -93,8 +94,8 @@ public class AreaEffectCloudController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new AreaEffectCloudNPC(this);
|
NMSImpl.setBukkitEntity(this, new AreaEffectCloudNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArmorStand;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArmorStand;
|
||||||
@ -110,8 +111,8 @@ public class ArmorStandController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ArmorStandNPC(this);
|
NMSImpl.setBukkitEntity(this, new ArmorStandNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,8 @@ public class BoatController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new BoatNPC(this);
|
NMSImpl.setBukkitEntity(this, new BoatNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,8 @@ public class DragonFireballController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new DragonFireballNPC(this);
|
NMSImpl.setBukkitEntity(this, new DragonFireballNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
@ -109,8 +110,8 @@ public class EggController extends AbstractEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EggNPC(this);
|
NMSImpl.setBukkitEntity(this, new EggNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderCrystal;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderCrystal;
|
||||||
@ -93,8 +94,8 @@ public class EnderCrystalController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EnderCrystalNPC(this);
|
NMSImpl.setBukkitEntity(this, new EnderCrystalNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderPearl;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderPearl;
|
||||||
@ -93,8 +94,8 @@ public class EnderPearlController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EnderPearlNPC(this);
|
NMSImpl.setBukkitEntity(this, new EnderPearlNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderSignal;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderSignal;
|
||||||
@ -93,8 +94,8 @@ public class EnderSignalController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EnderSignalNPC(this);
|
NMSImpl.setBukkitEntity(this, new EnderSignalNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -96,8 +97,8 @@ public class EvokerFangsController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new EvokerFangsNPC(this);
|
NMSImpl.setBukkitEntity(this, new EvokerFangsNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class ExperienceOrbController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ExperienceOrbNPC(this);
|
NMSImpl.setBukkitEntity(this, new ExperienceOrbNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -113,8 +113,8 @@ public class FallingBlockController extends AbstractEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new FallingBlockNPC(this);
|
NMSImpl.setBukkitEntity(this, new FallingBlockNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class FireworkController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new FireworkNPC(this);
|
NMSImpl.setBukkitEntity(this, new FireworkNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
|||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -93,8 +94,8 @@ public class FishingHookController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new FishingHookNPC(this);
|
NMSImpl.setBukkitEntity(this, new FishingHookNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -103,8 +104,8 @@ public class ItemController extends AbstractEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ItemNPC(this);
|
NMSImpl.setBukkitEntity(this, new ItemNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -95,8 +96,8 @@ public class ItemFrameController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ItemFrameNPC(this);
|
NMSImpl.setBukkitEntity(this, new ItemFrameNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -80,8 +80,8 @@ public class LargeFireballController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new LargeFireballNPC(this);
|
NMSImpl.setBukkitEntity(this, new LargeFireballNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class LeashController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new LeashNPC(this);
|
NMSImpl.setBukkitEntity(this, new LeashNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,8 @@ public class LlamaSpitController extends AbstractEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new LlamaSpitNPC(this);
|
NMSImpl.setBukkitEntity(this, new LlamaSpitNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ public class MinecartChestController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new MinecartChestNPC(this);
|
NMSImpl.setBukkitEntity(this, new MinecartChestNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ public class MinecartCommandController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new MinecartCommandNPC(this);
|
NMSImpl.setBukkitEntity(this, new MinecartCommandNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ public class MinecartFurnaceController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new MinecartFurnaceNPC(this);
|
NMSImpl.setBukkitEntity(this, new MinecartFurnaceNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ public class MinecartRideableController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new MinecartRideableNPC(this);
|
NMSImpl.setBukkitEntity(this, new MinecartRideableNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class PaintingController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new PaintingNPC(this);
|
NMSImpl.setBukkitEntity(this, new PaintingNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class ShulkerBulletController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ShulkerBulletNPC(this);
|
NMSImpl.setBukkitEntity(this, new ShulkerBulletNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class SmallFireballController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SmallFireballNPC(this);
|
NMSImpl.setBukkitEntity(this, new SmallFireballNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class SnowballController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SnowballNPC(this);
|
NMSImpl.setBukkitEntity(this, new SnowballNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArrow;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArrow;
|
||||||
@ -79,8 +80,8 @@ public class SpectralArrowController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new SpectralArrowNPC(this);
|
NMSImpl.setBukkitEntity(this, new SpectralArrowNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class TNTPrimedController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new TNTPrimedNPC(this);
|
NMSImpl.setBukkitEntity(this, new TNTPrimedNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class ThrownExpBottleController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ThrownExpBottleNPC(this);
|
NMSImpl.setBukkitEntity(this, new ThrownExpBottleNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -80,11 +81,11 @@ public class ThrownPotionController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
if (getItem() != null && getItem().getItem().equals(Items.LINGERING_POTION)) {
|
if (getItem() != null && getItem().getItem().equals(Items.LINGERING_POTION)) {
|
||||||
bukkitEntity = new LingeringThrownPotionNPC(this);
|
NMSImpl.setBukkitEntity(this, new LingeringThrownPotionNPC(this));
|
||||||
} else {
|
} else {
|
||||||
bukkitEntity = new SplashThrownPotionNPC(this);
|
NMSImpl.setBukkitEntity(this, new SplashThrownPotionNPC(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class ThrownTridentController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new ThrownTridentNPC(this);
|
NMSImpl.setBukkitEntity(this, new ThrownTridentNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArrow;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArrow;
|
||||||
@ -79,8 +80,8 @@ public class TippedArrowController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new TippedArrowNPC(this);
|
NMSImpl.setBukkitEntity(this, new TippedArrowNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||||
|
|
||||||
|
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||||
@ -79,8 +80,8 @@ public class WitherSkullController extends MobEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||||
bukkitEntity = new WitherSkullNPC(this);
|
NMSImpl.setBukkitEntity(this, new WitherSkullNPC(this));
|
||||||
}
|
}
|
||||||
return super.getBukkitEntity();
|
return super.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -1654,6 +1654,14 @@ public class NMSImpl implements NMSBridge {
|
|||||||
navigation.c();
|
navigation.c();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setBukkitEntity(Entity entity, CraftEntity bukkitEntity) {
|
||||||
|
try {
|
||||||
|
BUKKITENTITY_FIELD_SETTER.invoke(entity, bukkitEntity);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static final MethodHandle ADVANCEMENT_PLAYER_FIELD = NMS.getFinalSetter(EntityPlayer.class,
|
private static final MethodHandle ADVANCEMENT_PLAYER_FIELD = NMS.getFinalSetter(EntityPlayer.class,
|
||||||
"advancementDataPlayer");
|
"advancementDataPlayer");
|
||||||
private static final Set<EntityType> BAD_CONTROLLER_LOOK = EnumSet.of(EntityType.POLAR_BEAR, EntityType.SILVERFISH,
|
private static final Set<EntityType> BAD_CONTROLLER_LOOK = EnumSet.of(EntityType.POLAR_BEAR, EntityType.SILVERFISH,
|
||||||
@ -1688,6 +1696,7 @@ public class NMSImpl implements NMSBridge {
|
|||||||
private static final Random RANDOM = Util.getFastRandom();
|
private static final Random RANDOM = Util.getFastRandom();
|
||||||
private static final MethodHandle SIZE_FIELD_GETTER = NMS.getGetter(Entity.class, "size");
|
private static final MethodHandle SIZE_FIELD_GETTER = NMS.getGetter(Entity.class, "size");
|
||||||
private static final MethodHandle SIZE_FIELD_SETTER = NMS.getSetter(Entity.class, "size");
|
private static final MethodHandle SIZE_FIELD_SETTER = NMS.getSetter(Entity.class, "size");
|
||||||
|
private static final MethodHandle BUKKITENTITY_FIELD_SETTER = NMS.getSetter(Entity.class, "bukkitEntity");
|
||||||
private static Field SKULL_PROFILE_FIELD;
|
private static Field SKULL_PROFILE_FIELD;
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user