mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-28 12:07:38 +01:00
Remove NPCVehicleExitEvent
This commit is contained in:
parent
57ead921a2
commit
2624eea3b1
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftBat;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.Bat;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class BatController extends MobEntityController {
|
||||
@ -136,14 +134,5 @@ public class BatController extends MobEntityController {
|
||||
public void setFlying(boolean flying) {
|
||||
a(flying);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftBlaze;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.Blaze;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class BlazeController extends MobEntityController {
|
||||
@ -123,14 +121,5 @@ public class BlazeController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCaveSpider;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.CaveSpider;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class CaveSpiderController extends MobEntityController {
|
||||
@ -131,14 +129,5 @@ public class CaveSpiderController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftChicken;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.Chicken;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class ChickenController extends MobEntityController {
|
||||
@ -120,14 +118,5 @@ public class ChickenController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCow;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.Cow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class CowController extends MobEntityController {
|
||||
@ -121,14 +119,5 @@ public class CowController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -17,7 +16,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCreeper;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class CreeperController extends MobEntityController {
|
||||
@ -133,14 +131,5 @@ public class CreeperController extends MobEntityController {
|
||||
public void setAllowPowered(boolean allowPowered) {
|
||||
this.allowPowered = allowPowered;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEnderDragon;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.EnderDragon;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class EnderDragonController extends MobEntityController {
|
||||
@ -144,14 +142,5 @@ public class EnderDragonController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEnderman;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.Enderman;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class EndermanController extends MobEntityController {
|
||||
@ -150,15 +148,6 @@ public class EndermanController extends MobEntityController {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
|
||||
private void updateAIWithMovement() {
|
||||
NMS.updateAI(this);
|
||||
// taken from EntityLiving update method
|
||||
|
@ -6,7 +6,6 @@ import java.util.List;
|
||||
|
||||
import net.citizensnpcs.Settings.Setting;
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
@ -42,7 +41,6 @@ import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.metadata.MetadataValue;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -228,14 +226,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
controllerMove.a(x, y, z, speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
|
||||
public void setShouldJump() {
|
||||
controllerJump.a();
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftGhast;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class GhastController extends MobEntityController {
|
||||
@ -107,15 +105,6 @@ public class GhastController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class GhastNPC extends CraftGhast implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftGiant;
|
||||
import org.bukkit.entity.Giant;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class GiantController extends MobEntityController {
|
||||
@ -109,15 +107,6 @@ public class GiantController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class GiantNPC extends CraftGiant implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -18,7 +17,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftHorse;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class HorseController extends MobEntityController {
|
||||
@ -122,15 +120,6 @@ public class HorseController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
|
||||
private void updateAIWithMovement() {
|
||||
NMS.updateAI(this);
|
||||
// taken from EntityLiving update method
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftIronGolem;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class IronGolemController extends MobEntityController {
|
||||
@ -106,15 +104,6 @@ public class IronGolemController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class IronGolemNPC extends CraftIronGolem implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftMagmaCube;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.MagmaCube;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -117,15 +115,6 @@ public class MagmaCubeController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class MagmaCubeNPC extends CraftMagmaCube implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftMushroomCow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.MushroomCow;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -107,15 +105,6 @@ public class MushroomCowController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class MushroomCowNPC extends CraftMushroomCow implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftOcelot;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Ocelot;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -107,15 +105,6 @@ public class OcelotController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class OcelotNPC extends CraftOcelot implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPig;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Pig;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -113,15 +111,6 @@ public class PigController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class PigNPC extends CraftPig implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPigZombie;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.PigZombie;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -117,15 +115,6 @@ public class PigZombieController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class PigZombieNPC extends CraftPigZombie implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSheep;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Sheep;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -107,15 +105,6 @@ public class SheepController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SheepNPC extends CraftSheep implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSilverfish;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Silverfish;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -116,15 +114,6 @@ public class SilverfishController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SilverfishNPC extends CraftSilverfish implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSkeleton;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -106,15 +104,6 @@ public class SkeletonController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SkeletonNPC extends CraftSkeleton implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSlime;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -118,15 +116,6 @@ public class SlimeController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SlimeNPC extends CraftSlime implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSnowman;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -106,15 +104,6 @@ public class SnowmanController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SnowmanNPC extends CraftSnowman implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSpider;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Spider;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -116,15 +114,6 @@ public class SpiderController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SpiderNPC extends CraftSpider implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSquid;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Squid;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -107,15 +105,6 @@ public class SquidController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SquidNPC extends CraftSquid implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -16,7 +15,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftVillager;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -122,15 +120,6 @@ public class VillagerController extends MobEntityController {
|
||||
public void setBlockTrades(boolean blocked) {
|
||||
this.blockTrades = blocked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class VillagerNPC extends CraftVillager implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftWitch;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Witch;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -106,15 +104,6 @@ public class WitchController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class WitchNPC extends CraftWitch implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftWither;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -118,15 +116,6 @@ public class WitherController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
|
||||
private void updateAIWithMovement() {
|
||||
NMS.updateAI(this);
|
||||
// taken from EntityLiving update method
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftWolf;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -107,15 +105,6 @@ public class WolfController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class WolfNPC extends CraftWolf implements NPCHolder {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.event.NPCVehicleExitEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.MobEntityController;
|
||||
@ -15,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftZombie;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -107,15 +105,6 @@ public class ZombieController extends MobEntityController {
|
||||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassengerOf(net.minecraft.server.v1_6_R2.Entity entity) {
|
||||
if (npc != null && entity == null && vehicle != null && vehicle.getBukkitEntity() instanceof LivingEntity) {
|
||||
Bukkit.getPluginManager().callEvent(
|
||||
new NPCVehicleExitEvent(npc, (LivingEntity) vehicle.getBukkitEntity()));
|
||||
}
|
||||
super.setPassengerOf(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ZombieNPC extends CraftZombie implements NPCHolder {
|
||||
|
@ -119,8 +119,9 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
||||
|
||||
public boolean mount(Player toMount) {
|
||||
Entity passenger = npc.getBukkitEntity().getPassenger();
|
||||
if (passenger != null && passenger != toMount)
|
||||
if (passenger != null && passenger != toMount) {
|
||||
return false;
|
||||
}
|
||||
enterOrLeaveVehicle(toMount);
|
||||
return true;
|
||||
}
|
||||
@ -196,8 +197,9 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
||||
@Override
|
||||
public boolean toggle() {
|
||||
enabled = !enabled;
|
||||
if (!enabled && getHandle().passenger != null)
|
||||
if (!enabled && getHandle().passenger != null) {
|
||||
getHandle().passenger.getBukkitEntity().leaveVehicle();
|
||||
}
|
||||
return enabled;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user