mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-26 02:57:39 +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
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new BatNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new BatNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -176,4 +176,4 @@ public class BatController extends MobEntityController {
|
||||
setAsleep(flying);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -121,8 +121,8 @@ public class BlazeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new BlazeNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new BlazeNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -167,4 +167,4 @@ public class BlazeController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -158,8 +158,8 @@ public class CatController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new CatNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new CatNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -214,4 +214,4 @@ public class CatController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,8 +145,8 @@ public class CaveSpiderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new CaveSpiderNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new CaveSpiderNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -212,4 +212,4 @@ public class CaveSpiderController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,8 +159,8 @@ public class ChickenController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ChickenNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ChickenNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
@ -147,8 +147,9 @@ public class CodController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new CodNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new CodNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -205,4 +206,4 @@ public class CodController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -158,8 +158,8 @@ public class CowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new CowNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new CowNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -214,4 +214,4 @@ public class CowController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,8 +147,8 @@ public class CreeperController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new CreeperNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new CreeperNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -223,4 +223,4 @@ public class CreeperController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,8 +146,9 @@ public class DolphinController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new DolphinNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new DolphinNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -201,4 +202,4 @@ public class DolphinController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,8 +145,9 @@ public class DrownedController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new DrownedNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new DrownedNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -200,4 +201,4 @@ public class DrownedController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EnderDragonNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EnderDragonNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
@ -152,8 +152,8 @@ public class EndermanController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EndermanNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EndermanNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -217,4 +217,4 @@ public class EndermanController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ public class EndermiteController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EndermiteNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EndermiteNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -208,4 +208,4 @@ public class EndermiteController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,8 +221,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
|
||||
@Override
|
||||
public CraftPlayer getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new PlayerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PlayerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -411,7 +411,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
if (updateCounter + 1 > Setting.PACKET_UPDATE_DELAY.asInt()) {
|
||||
updateEffects = true;
|
||||
}
|
||||
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", bukkitEntity);
|
||||
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", getBukkitEntity());
|
||||
livingEntityBaseTick();
|
||||
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
|
@ -132,8 +132,8 @@ public class EvokerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EvokerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EvokerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -202,4 +202,4 @@ public class EvokerController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ public class FoxController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new FoxNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new FoxNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
@ -107,8 +107,8 @@ public class GhastController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new GhastNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new GhastNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -173,4 +173,4 @@ public class GhastController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,8 +130,8 @@ public class GiantController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new GiantNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new GiantNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -209,4 +209,4 @@ public class GiantController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,8 @@ public class GuardianController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new GuardianNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new GuardianNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
@ -131,8 +131,8 @@ public class GuardianElderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new GuardianElderNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new GuardianElderNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
@ -155,8 +155,8 @@ public class HorseController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new HorseNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new HorseNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -226,4 +226,4 @@ public class HorseController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,8 +155,8 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new HorseDonkeyNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new HorseDonkeyNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -226,4 +226,4 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,8 +155,8 @@ public class HorseMuleController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new HorseMuleNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new HorseMuleNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -226,4 +226,4 @@ public class HorseMuleController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,8 +156,8 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new HorseSkeletonNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new HorseSkeletonNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -227,4 +227,4 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,8 +156,8 @@ public class HorseZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new HorseZombieNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new HorseZombieNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -227,4 +227,4 @@ public class HorseZombieController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,8 +132,9 @@ public class IllusionerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new IllusionerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new IllusionerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -201,4 +202,4 @@ public class IllusionerController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,8 +130,8 @@ public class IronGolemController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new IronGolemNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new IronGolemNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -209,4 +209,4 @@ public class IronGolemController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,8 +155,8 @@ public class LlamaController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new LlamaNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new LlamaNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -227,4 +227,4 @@ public class LlamaController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,8 +134,8 @@ public class MagmaCubeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new MagmaCubeNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new MagmaCubeNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -220,4 +220,4 @@ public class MagmaCubeController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,8 +145,8 @@ public class MushroomCowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new MushroomCowNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new MushroomCowNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -214,4 +214,4 @@ public class MushroomCowController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,8 +151,8 @@ public class OcelotController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new OcelotNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new OcelotNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -221,4 +221,4 @@ public class OcelotController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ public class PandaController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new PandaNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PandaNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -214,4 +214,4 @@ public class PandaController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,8 +116,8 @@ public class ParrotController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ParrotNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ParrotNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -180,4 +180,4 @@ public class ParrotController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,9 @@ public class PhantomController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new PhantomNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PhantomNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -152,8 +152,8 @@ public class PigController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new PigNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PigNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -229,4 +229,4 @@ public class PigController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,8 +133,8 @@ public class PigZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new PigZombieNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PigZombieNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -203,4 +203,4 @@ public class PigZombieController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -158,8 +158,8 @@ public class PillagerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new PillagerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PillagerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -214,4 +214,4 @@ public class PillagerController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ public class PolarBearController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new PolarBearNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PolarBearNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -181,4 +181,4 @@ public class PolarBearController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,8 +133,9 @@ public class PufferFishController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new PufferFishNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PufferFishNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -147,8 +147,8 @@ public class RabbitController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new RabbitNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new RabbitNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
@ -158,8 +158,8 @@ public class RavagerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new RavagerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new RavagerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -214,4 +214,4 @@ public class RavagerController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,8 +133,9 @@ public class SalmonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SalmonNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SalmonNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -205,4 +206,4 @@ public class SalmonController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ public class SheepController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new SheepNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SheepNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -213,4 +213,4 @@ public class SheepController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class ShulkerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new ShulkerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ShulkerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -129,8 +129,9 @@ public class SilverfishController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SilverfishNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SilverfishNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -206,4 +207,4 @@ public class SilverfishController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class SkeletonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SkeletonNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SkeletonNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -209,4 +210,4 @@ public class SkeletonController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new StrayNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new StrayNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -209,4 +210,4 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SkeletonWitherNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SkeletonWitherNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -209,4 +210,4 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -135,8 +135,9 @@ public class SlimeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SlimeNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SlimeNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -220,4 +221,4 @@ public class SlimeController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,8 +130,9 @@ public class SnowmanController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SnowmanNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SnowmanNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -131,8 +131,9 @@ public class SpiderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SpiderNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SpiderNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -209,4 +210,4 @@ public class SpiderController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class SquidController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new SquidNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SquidNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -201,4 +202,4 @@ public class SquidController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -158,8 +158,8 @@ public class TraderLlamaController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new TraderLlamaNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new TraderLlamaNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -238,4 +238,4 @@ public class TraderLlamaController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,8 +133,9 @@ public class TropicalFishController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new TropicalFishNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new TropicalFishNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -205,4 +206,4 @@ public class TropicalFishController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -135,8 +135,9 @@ public class TurtleController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new TurtleNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new TurtleNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -108,8 +108,9 @@ public class VexController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new VexNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new VexNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -169,4 +170,4 @@ public class VexController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -176,8 +176,9 @@ public class VillagerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new VillagerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new VillagerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -268,4 +269,4 @@ public class VillagerController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,8 +145,9 @@ public class VindicatorController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new VindicatorNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new VindicatorNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -214,4 +215,4 @@ public class VindicatorController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -175,8 +175,9 @@ public class WanderingTraderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new WanderingTraderNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new WanderingTraderNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -267,4 +268,4 @@ public class WanderingTraderController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class WitchController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new WitchNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new WitchNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -106,8 +106,9 @@ public class WitherController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new WitherNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new WitherNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -172,4 +173,4 @@ public class WitherController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,8 +147,9 @@ public class WolfController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new WolfNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new WolfNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -226,4 +227,4 @@ public class WolfController extends MobEntityController {
|
||||
getHandle().setSitting(sitting);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class ZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new ZombieNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ZombieNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -200,4 +201,4 @@ public class ZombieController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class ZombieHuskController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new ZombieHuskNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ZombieHuskNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -200,4 +201,4 @@ public class ZombieHuskController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,8 +131,9 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder))
|
||||
bukkitEntity = new ZombieVillagerNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ZombieVillagerNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -200,4 +201,4 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftAreaEffectCloud;
|
||||
@ -93,8 +94,8 @@ public class AreaEffectCloudController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new AreaEffectCloudNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new AreaEffectCloudNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class AreaEffectCloudController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArmorStand;
|
||||
@ -110,8 +111,8 @@ public class ArmorStandController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ArmorStandNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ArmorStandNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -129,4 +130,4 @@ public class ArmorStandController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,8 +94,8 @@ public class BoatController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new BoatNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new BoatNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -123,4 +123,4 @@ public class BoatController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,8 +94,8 @@ public class DragonFireballController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new DragonFireballNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new DragonFireballNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -126,4 +126,4 @@ public class DragonFireballController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.Location;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||
@ -109,8 +110,8 @@ public class EggController extends AbstractEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EggNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EggNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -132,4 +133,4 @@ public class EggController extends AbstractEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderCrystal;
|
||||
@ -93,8 +94,8 @@ public class EnderCrystalController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EnderCrystalNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EnderCrystalNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class EnderCrystalController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderPearl;
|
||||
@ -93,8 +94,8 @@ public class EnderPearlController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EnderPearlNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EnderPearlNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -116,4 +117,4 @@ public class EnderPearlController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEnderSignal;
|
||||
@ -93,8 +94,8 @@ public class EnderSignalController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EnderSignalNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EnderSignalNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class EnderSignalController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -96,8 +97,8 @@ public class EvokerFangsController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new EvokerFangsNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new EvokerFangsNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -129,4 +130,4 @@ public class EvokerFangsController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class ExperienceOrbController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ExperienceOrbNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ExperienceOrbNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class ExperienceOrbController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,8 +113,8 @@ public class FallingBlockController extends AbstractEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new FallingBlockNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new FallingBlockNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -174,4 +174,4 @@ public class FallingBlockController extends AbstractEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class FireworkController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new FireworkNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new FireworkNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class FireworkController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -93,8 +94,8 @@ public class FishingHookController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new FishingHookNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new FishingHookNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -147,4 +148,4 @@ public class FishingHookController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -103,8 +104,8 @@ public class ItemController extends AbstractEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ItemNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ItemNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -153,4 +154,4 @@ public class ItemController extends AbstractEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -95,8 +96,8 @@ public class ItemFrameController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ItemFrameNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ItemFrameNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -150,4 +151,4 @@ public class ItemFrameController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ public class LargeFireballController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new LargeFireballNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new LargeFireballNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -126,4 +126,4 @@ public class LargeFireballController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class LeashController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new LeashNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new LeashNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -118,4 +119,4 @@ public class LeashController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,8 +99,8 @@ public class LlamaSpitController extends AbstractEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new LlamaSpitNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new LlamaSpitNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -136,4 +136,4 @@ public class LlamaSpitController extends AbstractEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,8 +88,8 @@ public class MinecartChestController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new MinecartChestNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new MinecartChestNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -123,4 +123,4 @@ public class MinecartChestController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,8 +88,8 @@ public class MinecartCommandController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new MinecartCommandNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new MinecartCommandNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -122,4 +122,4 @@ public class MinecartCommandController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,8 +88,8 @@ public class MinecartFurnaceController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new MinecartFurnaceNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new MinecartFurnaceNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -122,4 +122,4 @@ public class MinecartFurnaceController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,8 +88,8 @@ public class MinecartRideableController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new MinecartRideableNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new MinecartRideableNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -122,4 +122,4 @@ public class MinecartRideableController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class PaintingController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new PaintingNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new PaintingNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -118,4 +119,4 @@ public class PaintingController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class ShulkerBulletController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ShulkerBulletNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ShulkerBulletNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class ShulkerBulletController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class SmallFireballController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new SmallFireballNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SmallFireballNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -116,4 +117,4 @@ public class SmallFireballController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class SnowballController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new SnowballNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SnowballNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class SnowballController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArrow;
|
||||
@ -79,8 +80,8 @@ public class SpectralArrowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new SpectralArrowNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new SpectralArrowNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class SpectralArrowController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class TNTPrimedController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new TNTPrimedNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new TNTPrimedNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class TNTPrimedController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class ThrownExpBottleController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ThrownExpBottleNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ThrownExpBottleNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -116,4 +117,4 @@ public class ThrownExpBottleController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -80,11 +81,11 @@ public class ThrownPotionController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
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)) {
|
||||
bukkitEntity = new LingeringThrownPotionNPC(this);
|
||||
NMSImpl.setBukkitEntity(this, new LingeringThrownPotionNPC(this));
|
||||
} else {
|
||||
bukkitEntity = new SplashThrownPotionNPC(this);
|
||||
NMSImpl.setBukkitEntity(this, new SplashThrownPotionNPC(this));
|
||||
}
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
@ -132,4 +133,4 @@ public class ThrownPotionController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class ThrownTridentController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new ThrownTridentNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new ThrownTridentNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class ThrownTridentController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftArrow;
|
||||
@ -79,8 +80,8 @@ public class TippedArrowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new TippedArrowNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new TippedArrowNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class TippedArrowController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.craftbukkit.v1_14_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity;
|
||||
@ -79,8 +80,8 @@ public class WitherSkullController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
bukkitEntity = new WitherSkullNPC(this);
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
NMSImpl.setBukkitEntity(this, new WitherSkullNPC(this));
|
||||
}
|
||||
return super.getBukkitEntity();
|
||||
}
|
||||
@ -113,4 +114,4 @@ public class WitherSkullController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1654,6 +1654,14 @@ public class NMSImpl implements NMSBridge {
|
||||
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,
|
||||
"advancementDataPlayer");
|
||||
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 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 BUKKITENTITY_FIELD_SETTER = NMS.getSetter(Entity.class, "bukkitEntity");
|
||||
private static Field SKULL_PROFILE_FIELD;
|
||||
static {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user