mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Update for CB changes
This commit is contained in:
parent
f78154321a
commit
4831a4e95b
@ -48,7 +48,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginLoadOrder;
|
||||
|
@ -25,13 +25,13 @@ import net.citizensnpcs.trait.CurrentLocation;
|
||||
import net.citizensnpcs.util.Messages;
|
||||
import net.citizensnpcs.util.Messaging;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.v1_4_5.EntityPlayer;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
@ -416,7 +416,7 @@ public class Metrics {
|
||||
}
|
||||
|
||||
// Begin hitting the server with glorious data
|
||||
taskId = plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() {
|
||||
taskId = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {
|
||||
|
||||
private boolean firstPost = true;
|
||||
|
||||
@ -453,7 +453,7 @@ public class Metrics {
|
||||
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}, 0, PING_INTERVAL * 1200);
|
||||
}, 0, PING_INTERVAL * 1200).getTaskId();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ import java.util.Map;
|
||||
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.minecraft.server.Block;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.Block;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftWorld;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import net.citizensnpcs.util.Messages;
|
||||
import net.citizensnpcs.util.Messaging;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -212,6 +212,7 @@ public abstract class CitizensNPC extends AbstractNPC {
|
||||
// Modify NPC using traits after the entity has been created
|
||||
for (Trait trait : traits.values())
|
||||
trait.onSpawn();
|
||||
getBukkitEntity().setRemoveWhenFarAway(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ import net.citizensnpcs.npc.entity.CitizensWolfNPC;
|
||||
import net.citizensnpcs.npc.entity.CitizensZombieNPC;
|
||||
import net.citizensnpcs.util.ByIdArray;
|
||||
|
||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
@ -153,7 +153,7 @@ public class CitizensNPCRegistry implements NPCRegistry {
|
||||
return null;
|
||||
if (entity instanceof NPCHolder)
|
||||
return ((NPCHolder) entity).getNPC();
|
||||
net.minecraft.server.Entity handle = ((CraftEntity) entity).getHandle();
|
||||
net.minecraft.server.v1_4_5.Entity handle = ((CraftEntity) entity).getHandle();
|
||||
return handle instanceof NPCHolder ? ((NPCHolder) handle).getNPC() : null;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
|
||||
this.npc = npc;
|
||||
Location location = npc.getBukkitEntity().getEyeLocation();
|
||||
plan = (Path) ASTAR.runFully(new VectorGoal(dest), new VectorNode(location, new ChunkBlockSource(
|
||||
location, params.range()), params.examiners()), 10000);
|
||||
location, params.range()), params.examiners()), (int) (params.range() * 10));
|
||||
if (plan == null || plan.isComplete())
|
||||
setCancelReason(CancelReason.STUCK);
|
||||
else
|
||||
|
@ -17,7 +17,7 @@ import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.api.util.DataKey;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
|
@ -4,8 +4,8 @@ import net.citizensnpcs.api.ai.NavigatorParameters;
|
||||
import net.citizensnpcs.api.ai.TargetType;
|
||||
import net.citizensnpcs.api.ai.event.CancelReason;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.Navigation;
|
||||
import net.minecraft.server.v1_4_5.EntityPlayer;
|
||||
import net.minecraft.server.v1_4_5.Navigation;
|
||||
|
||||
import org.bukkit.Location;
|
||||
|
||||
|
@ -8,12 +8,12 @@ import net.citizensnpcs.api.ai.event.CancelReason;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.PlayerAnimation;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.Navigation;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.EntityPlayer;
|
||||
import net.minecraft.server.v1_4_5.Navigation;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftLivingEntity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityBat;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityBat;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftBat;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftBat;
|
||||
import org.bukkit.entity.Bat;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -53,7 +53,6 @@ public class CitizensBatNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
f(false);
|
||||
}
|
||||
}
|
||||
@ -69,7 +68,7 @@ public class CitizensBatNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityBlaze;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityBlaze;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftBlaze;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftBlaze;
|
||||
import org.bukkit.entity.Blaze;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -54,7 +54,7 @@ public class CitizensBlazeNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ public class CitizensBlazeNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityCaveSpider;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityCaveSpider;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftCaveSpider;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftCaveSpider;
|
||||
import org.bukkit.entity.CaveSpider;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -53,7 +53,7 @@ public class CitizensCaveSpiderNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ public class CitizensCaveSpiderNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityChicken;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityChicken;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftChicken;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftChicken;
|
||||
import org.bukkit.entity.Chicken;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -53,7 +53,7 @@ public class CitizensChickenNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ public class CitizensChickenNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityCow;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityCow;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftCow;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftCow;
|
||||
import org.bukkit.entity.Cow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -54,7 +54,7 @@ public class CitizensCowNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class CitizensCowNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,13 +7,13 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityCreeper;
|
||||
import net.minecraft.server.EntityLightning;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityCreeper;
|
||||
import net.minecraft.server.v1_4_5.EntityLightning;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftCreeper;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftCreeper;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -55,7 +55,7 @@ public class CitizensCreeperNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ public class CitizensCreeperNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityEnderDragon;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityEnderDragon;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftEnderDragon;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftEnderDragon;
|
||||
import org.bukkit.entity.EnderDragon;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -54,7 +54,7 @@ public class CitizensEnderDragonNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ public class CitizensEnderDragonNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -11,13 +11,13 @@ import net.citizensnpcs.util.Messages;
|
||||
import net.citizensnpcs.util.Messaging;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityEnderman;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityEnderman;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftEnderman;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftEnderman;
|
||||
import org.bukkit.entity.Enderman;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -87,7 +87,7 @@ public class CitizensEndermanNPC extends CitizensMobNPC implements Equipable {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ public class CitizensEndermanNPC extends CitizensMobNPC implements Equipable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityGhast;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityGhast;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftGhast;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftGhast;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensGhastNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public class CitizensGhastNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityGiantZombie;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityGiantZombie;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftGiant;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftGiant;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Giant;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensGiantNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public class CitizensGiantNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -10,14 +10,14 @@ import net.citizensnpcs.util.Messaging;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.StringHelper;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.ItemInWorldManager;
|
||||
import net.minecraft.server.WorldServer;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.ItemInWorldManager;
|
||||
import net.minecraft.server.v1_4_5.WorldServer;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftWorld;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityIronGolem;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityIronGolem;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftIronGolem;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftIronGolem;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,6 @@ public class CitizensIronGolemNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +51,7 @@ public class CitizensIronGolemNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityMagmaCube;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityMagmaCube;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftMagmaCube;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftMagmaCube;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.MagmaCube;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -41,7 +41,7 @@ public class CitizensMagmaCubeNPC extends CitizensMobNPC {
|
||||
if (npc != null) {
|
||||
setSize(3);
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ public class CitizensMagmaCubeNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityMushroomCow;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityMushroomCow;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftMushroomCow;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftMushroomCow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.MushroomCow;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensMushroomCowNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class CitizensMushroomCowNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityOcelot;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityOcelot;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftOcelot;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftOcelot;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Ocelot;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensOcelotNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class CitizensOcelotNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -11,14 +11,14 @@ import net.citizensnpcs.util.Messages;
|
||||
import net.citizensnpcs.util.Messaging;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityLightning;
|
||||
import net.minecraft.server.EntityPig;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityLightning;
|
||||
import net.minecraft.server.v1_4_5.EntityPig;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftPig;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftPig;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Pig;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -64,7 +64,7 @@ public class CitizensPigNPC extends CitizensMobNPC implements Equipable {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class CitizensPigNPC extends CitizensMobNPC implements Equipable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityPigZombie;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityPigZombie;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftPigZombie;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftPigZombie;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.PigZombie;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensPigZombieNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ public class CitizensPigZombieNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -12,14 +12,14 @@ import net.citizensnpcs.util.Messages;
|
||||
import net.citizensnpcs.util.Messaging;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntitySheep;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntitySheep;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftSheep;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftSheep;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Sheep;
|
||||
@ -69,7 +69,7 @@ public class CitizensSheepNPC extends CitizensMobNPC implements Equipable {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ public class CitizensSheepNPC extends CitizensMobNPC implements Equipable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntitySilverfish;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntitySilverfish;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftSilverfish;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftSilverfish;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Silverfish;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensSilverfishNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ public class CitizensSilverfishNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntitySkeleton;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntitySkeleton;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftSkeleton;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftSkeleton;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensSkeletonNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class CitizensSkeletonNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntitySlime;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntitySlime;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftSlime;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftSlime;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -41,7 +41,7 @@ public class CitizensSlimeNPC extends CitizensMobNPC {
|
||||
if (npc != null) {
|
||||
setSize(3);
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ public class CitizensSlimeNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntitySnowman;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntitySnowman;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftSnowman;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftSnowman;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensSnowmanNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class CitizensSnowmanNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntitySpider;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntitySpider;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftSpider;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftSpider;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Spider;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -39,7 +39,7 @@ public class CitizensSpiderNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ public class CitizensSpiderNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntitySquid;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntitySquid;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftSquid;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftSquid;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Squid;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensSquidNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public class CitizensSquidNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,13 +7,13 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityHuman;
|
||||
import net.minecraft.server.EntityVillager;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityHuman;
|
||||
import net.minecraft.server.v1_4_5.EntityVillager;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftVillager;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftVillager;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -41,7 +41,7 @@ public class CitizensVillagerNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ public class CitizensVillagerNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityWitch;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityWitch;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftWitch;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftWitch;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Witch;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -39,7 +39,7 @@ public class CitizensWitchNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ public class CitizensWitchNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityWither;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityWither;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftWither;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftWither;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -39,7 +39,7 @@ public class CitizensWitherNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ public class CitizensWitherNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityWolf;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityWolf;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftWolf;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftWolf;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensWolfNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class CitizensWolfNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -7,12 +7,12 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityZombie;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityZombie;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftZombie;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftZombie;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +40,7 @@ public class CitizensZombieNPC extends CitizensMobNPC {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
NMS.setPersistent(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class CitizensZombieNPC extends CitizensMobNPC {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
|
@ -13,26 +13,26 @@ import net.citizensnpcs.npc.network.EmptyNetworkManager;
|
||||
import net.citizensnpcs.npc.network.EmptySocket;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.EnumGamemode;
|
||||
import net.minecraft.server.ItemInWorldManager;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.Navigation;
|
||||
import net.minecraft.server.NetHandler;
|
||||
import net.minecraft.server.NetworkManager;
|
||||
import net.minecraft.server.Packet5EntityEquipment;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.EntityPlayer;
|
||||
import net.minecraft.server.v1_4_5.EnumGamemode;
|
||||
import net.minecraft.server.v1_4_5.ItemInWorldManager;
|
||||
import net.minecraft.server.v1_4_5.MinecraftServer;
|
||||
import net.minecraft.server.v1_4_5.Navigation;
|
||||
import net.minecraft.server.v1_4_5.NetHandler;
|
||||
import net.minecraft.server.v1_4_5.NetworkManager;
|
||||
import net.minecraft.server.v1_4_5.Packet5EntityEquipment;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftPlayer;
|
||||
import org.bukkit.metadata.MetadataValue;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
private final CitizensNPC npc;
|
||||
private final net.minecraft.server.ItemStack[] previousEquipment = { null, null, null, null, null };
|
||||
private final net.minecraft.server.v1_4_5.ItemStack[] previousEquipment = { null, null, null, null, null };
|
||||
|
||||
public EntityHumanNPC(MinecraftServer minecraftServer, World world, String string,
|
||||
ItemInWorldManager itemInWorldManager, NPC npc) {
|
||||
@ -50,7 +50,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.Entity entity) {
|
||||
public void collide(net.minecraft.server.v1_4_5.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
@ -172,8 +172,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
|
||||
private void updateEquipment() {
|
||||
for (int i = 0; i < previousEquipment.length; i++) {
|
||||
net.minecraft.server.ItemStack previous = previousEquipment[i];
|
||||
net.minecraft.server.ItemStack current = getEquipment(i);
|
||||
net.minecraft.server.v1_4_5.ItemStack previous = previousEquipment[i];
|
||||
net.minecraft.server.v1_4_5.ItemStack current = getEquipment(i);
|
||||
if (previous != current) {
|
||||
Util.sendPacketNearby(getBukkitEntity().getLocation(), new Packet5EntityEquipment(id, i,
|
||||
current));
|
||||
|
@ -1,21 +1,21 @@
|
||||
package net.citizensnpcs.npc.network;
|
||||
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.NetServerHandler;
|
||||
import net.minecraft.server.NetworkManager;
|
||||
import net.minecraft.server.Packet;
|
||||
import net.minecraft.server.Packet102WindowClick;
|
||||
import net.minecraft.server.Packet106Transaction;
|
||||
import net.minecraft.server.Packet10Flying;
|
||||
import net.minecraft.server.Packet130UpdateSign;
|
||||
import net.minecraft.server.Packet14BlockDig;
|
||||
import net.minecraft.server.Packet15Place;
|
||||
import net.minecraft.server.Packet16BlockItemSwitch;
|
||||
import net.minecraft.server.Packet255KickDisconnect;
|
||||
import net.minecraft.server.Packet28EntityVelocity;
|
||||
import net.minecraft.server.Packet3Chat;
|
||||
import net.minecraft.server.Packet51MapChunk;
|
||||
import net.minecraft.server.v1_4_5.EntityPlayer;
|
||||
import net.minecraft.server.v1_4_5.MinecraftServer;
|
||||
import net.minecraft.server.v1_4_5.NetServerHandler;
|
||||
import net.minecraft.server.v1_4_5.NetworkManager;
|
||||
import net.minecraft.server.v1_4_5.Packet;
|
||||
import net.minecraft.server.v1_4_5.Packet102WindowClick;
|
||||
import net.minecraft.server.v1_4_5.Packet106Transaction;
|
||||
import net.minecraft.server.v1_4_5.Packet10Flying;
|
||||
import net.minecraft.server.v1_4_5.Packet130UpdateSign;
|
||||
import net.minecraft.server.v1_4_5.Packet14BlockDig;
|
||||
import net.minecraft.server.v1_4_5.Packet15Place;
|
||||
import net.minecraft.server.v1_4_5.Packet16BlockItemSwitch;
|
||||
import net.minecraft.server.v1_4_5.Packet255KickDisconnect;
|
||||
import net.minecraft.server.v1_4_5.Packet28EntityVelocity;
|
||||
import net.minecraft.server.v1_4_5.Packet3Chat;
|
||||
import net.minecraft.server.v1_4_5.Packet51MapChunk;
|
||||
|
||||
public class EmptyNetHandler extends NetServerHandler {
|
||||
public EmptyNetHandler(MinecraftServer minecraftServer, NetworkManager networkManager,
|
||||
|
@ -5,9 +5,9 @@ import java.net.Socket;
|
||||
import java.security.PrivateKey;
|
||||
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.minecraft.server.NetHandler;
|
||||
import net.minecraft.server.NetworkManager;
|
||||
import net.minecraft.server.Packet;
|
||||
import net.minecraft.server.v1_4_5.NetHandler;
|
||||
import net.minecraft.server.v1_4_5.NetworkManager;
|
||||
import net.minecraft.server.v1_4_5.Packet;
|
||||
|
||||
public class EmptyNetworkManager extends NetworkManager {
|
||||
|
||||
|
@ -12,11 +12,11 @@ import net.citizensnpcs.api.util.DataKey;
|
||||
import net.citizensnpcs.command.CommandConfigurable;
|
||||
import net.citizensnpcs.command.CommandContext;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.EntityPlayer;
|
||||
|
||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -3,7 +3,7 @@ package net.citizensnpcs.trait;
|
||||
import net.citizensnpcs.api.persistence.Persist;
|
||||
import net.citizensnpcs.api.trait.Trait;
|
||||
|
||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftEntity;
|
||||
|
||||
public class Gravity extends Trait implements Toggleable {
|
||||
@Persist
|
||||
@ -21,7 +21,7 @@ public class Gravity extends Trait implements Toggleable {
|
||||
public void run() {
|
||||
if (!npc.isSpawned() || !enabled)
|
||||
return;
|
||||
net.minecraft.server.Entity entity = ((CraftEntity) npc.getBukkitEntity()).getHandle();
|
||||
net.minecraft.server.v1_4_5.Entity entity = ((CraftEntity) npc.getBukkitEntity()).getHandle();
|
||||
entity.motY = Math.max(0, entity.motY);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package net.citizensnpcs.trait.waypoint;
|
||||
|
||||
import net.minecraft.server.DamageSource;
|
||||
import net.minecraft.server.EntityEnderCrystal;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.DamageSource;
|
||||
import net.minecraft.server.v1_4_5.EntityEnderCrystal;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
public class EntityEnderCrystalMarker extends EntityEnderCrystal {
|
||||
public EntityEnderCrystalMarker(World world) {
|
||||
|
@ -9,26 +9,26 @@ import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.minecraft.server.ControllerLook;
|
||||
import net.minecraft.server.DamageSource;
|
||||
import net.minecraft.server.EnchantmentManager;
|
||||
import net.minecraft.server.Entity;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.EntityMonster;
|
||||
import net.minecraft.server.EntityTypes;
|
||||
import net.minecraft.server.MathHelper;
|
||||
import net.minecraft.server.MobEffectList;
|
||||
import net.minecraft.server.Navigation;
|
||||
import net.minecraft.server.NetworkManager;
|
||||
import net.minecraft.server.Packet;
|
||||
import net.minecraft.server.PathfinderGoalSelector;
|
||||
import net.minecraft.server.World;
|
||||
import net.minecraft.server.v1_4_5.ControllerLook;
|
||||
import net.minecraft.server.v1_4_5.DamageSource;
|
||||
import net.minecraft.server.v1_4_5.EnchantmentManager;
|
||||
import net.minecraft.server.v1_4_5.Entity;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.EntityMonster;
|
||||
import net.minecraft.server.v1_4_5.EntityTypes;
|
||||
import net.minecraft.server.v1_4_5.MathHelper;
|
||||
import net.minecraft.server.v1_4_5.MobEffectList;
|
||||
import net.minecraft.server.v1_4_5.Navigation;
|
||||
import net.minecraft.server.v1_4_5.NetworkManager;
|
||||
import net.minecraft.server.v1_4_5.Packet;
|
||||
import net.minecraft.server.v1_4_5.PathfinderGoalSelector;
|
||||
import net.minecraft.server.v1_4_5.World;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftPlayer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -54,7 +54,6 @@ public class NMS {
|
||||
private static final Map<EntityType, Float> MOVEMENT_SPEEDS = Maps.newEnumMap(EntityType.class);
|
||||
private static Field NAVIGATION_WORLD_FIELD;
|
||||
private static Field PATHFINDING_RANGE;
|
||||
private static Field PERSISTENT_FIELD;
|
||||
private static final Random RANDOM = Util.getFastRandom();
|
||||
private static Set<Integer> SLAB_MATERIALS = Sets.newHashSet();
|
||||
private static Field SPEED_FIELD;
|
||||
@ -221,16 +220,6 @@ public class NMS {
|
||||
}
|
||||
}
|
||||
|
||||
public static void setPersistent(EntityLiving entity) {
|
||||
if (PERSISTENT_FIELD == null)
|
||||
return;
|
||||
try {
|
||||
PERSISTENT_FIELD.set(entity, true);
|
||||
} catch (Exception e) {
|
||||
Messaging.logTr(Messages.ERROR_SETTING_ENTITY_PERSISTENT, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static org.bukkit.entity.Entity spawnCustomEntity(org.bukkit.World world, Location at,
|
||||
Class<? extends Entity> clazz, EntityType type) {
|
||||
World handle = ((CraftWorld) world).getHandle();
|
||||
@ -324,7 +313,6 @@ public class NMS {
|
||||
NAVIGATION_WORLD_FIELD = getField(Navigation.class, "b");
|
||||
PATHFINDING_RANGE = getField(Navigation.class, "e");
|
||||
GOAL_FIELD = getField(PathfinderGoalSelector.class, "a");
|
||||
PERSISTENT_FIELD = getField(EntityLiving.class, "persistent");
|
||||
|
||||
try {
|
||||
Field field = getField(EntityTypes.class, "d");
|
||||
|
@ -1,12 +1,12 @@
|
||||
package net.citizensnpcs.util;
|
||||
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.Packet;
|
||||
import net.minecraft.server.Packet17EntityLocationAction;
|
||||
import net.minecraft.server.Packet18ArmAnimation;
|
||||
import net.minecraft.server.Packet40EntityMetadata;
|
||||
import net.minecraft.server.v1_4_5.EntityPlayer;
|
||||
import net.minecraft.server.v1_4_5.Packet;
|
||||
import net.minecraft.server.v1_4_5.Packet17EntityLocationAction;
|
||||
import net.minecraft.server.v1_4_5.Packet18ArmAnimation;
|
||||
import net.minecraft.server.v1_4_5.Packet40EntityMetadata;
|
||||
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public enum PlayerAnimation {
|
||||
|
@ -5,15 +5,15 @@ import java.util.Random;
|
||||
import net.citizensnpcs.api.event.NPCCollisionEvent;
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.Packet;
|
||||
import net.minecraft.server.v1_4_5.EntityLiving;
|
||||
import net.minecraft.server.v1_4_5.Packet;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.v1_4_5.entity.CraftLivingEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -32,7 +32,7 @@ public class Util {
|
||||
NMS.look(handle, yaw, pitch);
|
||||
}
|
||||
|
||||
public static void callCollisionEvent(NPC npc, net.minecraft.server.Entity entity) {
|
||||
public static void callCollisionEvent(NPC npc, net.minecraft.server.v1_4_5.Entity entity) {
|
||||
if (NPCCollisionEvent.getHandlerList().getRegisteredListeners().length > 0)
|
||||
Bukkit.getPluginManager().callEvent(new NPCCollisionEvent(npc, entity.getBukkitEntity()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user