Skip to content

Commit

Permalink
Fix bad getBukkitEntity if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 3, 2016
1 parent e68e9ad commit 9329c66
Show file tree
Hide file tree
Showing 146 changed files with 179 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new BatNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new BlazeNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new CaveSpiderNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new ChickenNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new CowNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new CreeperNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new EnderDragonNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new EndermanNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new EndermiteNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new GhastNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new GiantNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new GuardianNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new HorseNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new IronGolemNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new MagmaCubeNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new MushroomCowNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new OcelotNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new PigNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new PigZombieNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new PolarBearNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new RabbitNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new SheepNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new ShulkerNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new SilverfishNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new SkeletonNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new SlimeNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new SnowmanNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new SpiderNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new SquidNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new VillagerNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new WitchNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new WitherNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new WolfNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected SoundEffect G() {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
if (npc != null && !(bukkitEntity instanceof NPCHolder))
bukkitEntity = new ZombieNPC(this);
return super.getBukkitEntity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new AreaEffectCloudNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new ArmorStandNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new BoatNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new DragonFireballNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new EggNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new EnderCrystalNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new EnderPearlNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new EnderSignalNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new ExperienceOrbNPC(this);
}
return super.getBukkitEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void g(double x, double y, double z) {

@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null) {
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
bukkitEntity = new FallingBlockNPC(this);
}
return super.getBukkitEntity();
Expand Down
Loading

0 comments on commit 9329c66

Please sign in to comment.