diff --git a/README b/README index 08cb1782c..56be3358d 100644 --- a/README +++ b/README @@ -4,6 +4,7 @@ Citizens is an NPC plugin for the Bukkit API. It was first released on March 5, provides an API itself, which developers can use to create their own NPC characters. Compatible With: +-Bukkit 1.2.2-R1 -CitizensAPI 2.0 --Bukkit 1.1-R5 --CraftBukkit 1.1-R5 \ No newline at end of file +-CraftBukkit 1.2.2-R1 +-Minecraft 1.2.2 \ No newline at end of file diff --git a/build.xml b/build.xml index 7a983149c..00f5d601d 100644 --- a/build.xml +++ b/build.xml @@ -16,8 +16,8 @@ - - + + diff --git a/lib/bukkit-1.1-R5-SNAPSHOT.jar b/lib/bukkit-1.2.2-R0-SNAPSHOT.jar similarity index 87% rename from lib/bukkit-1.1-R5-SNAPSHOT.jar rename to lib/bukkit-1.2.2-R0-SNAPSHOT.jar index 3cbadeec8..abfbb08d7 100644 Binary files a/lib/bukkit-1.1-R5-SNAPSHOT.jar and b/lib/bukkit-1.2.2-R0-SNAPSHOT.jar differ diff --git a/lib/craftbukkit-1.1-R5-SNAPSHOT.jar b/lib/craftbukkit-1.2.2-R0-SNAPSHOT.jar similarity index 83% rename from lib/craftbukkit-1.1-R5-SNAPSHOT.jar rename to lib/craftbukkit-1.2.2-R0-SNAPSHOT.jar index 46ddffe0b..469931143 100644 Binary files a/lib/craftbukkit-1.1-R5-SNAPSHOT.jar and b/lib/craftbukkit-1.2.2-R0-SNAPSHOT.jar differ diff --git a/src/main/java/net/citizensnpcs/Citizens.java b/src/main/java/net/citizensnpcs/Citizens.java index 271b23765..34db352eb 100644 --- a/src/main/java/net/citizensnpcs/Citizens.java +++ b/src/main/java/net/citizensnpcs/Citizens.java @@ -55,7 +55,7 @@ import org.bukkit.plugin.java.JavaPlugin; import com.google.common.collect.Iterators; public class Citizens extends JavaPlugin { - private static final String COMPATIBLE_MC_VERSION = "1.1"; + private static final String COMPATIBLE_MC_VERSION = "1.2.2"; private volatile CitizensNPCManager npcManager; private final InstanceFactory characterManager = DefaultInstanceFactory.create(); diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensBlazeNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensBlazeNPC.java index c0f9be134..cc15dc291 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensBlazeNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensBlazeNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityBlaze; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensCaveSpiderNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensCaveSpiderNPC.java index 2eddac6f5..7ba79eb0a 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensCaveSpiderNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensCaveSpiderNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityCaveSpider; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensChickenNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensChickenNPC.java index 2d583be4b..75872722d 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensChickenNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensChickenNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityChicken; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensCowNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensCowNPC.java index 5e6cdf763..65af354f4 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensCowNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensCowNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityCow; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensCreeperNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensCreeperNPC.java index dc3448dae..6c9eb8eaf 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensCreeperNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensCreeperNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityCreeper; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensEnderDragonNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensEnderDragonNPC.java index fd6208ea7..e415ff30a 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensEnderDragonNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensEnderDragonNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityEnderDragon; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensEndermanNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensEndermanNPC.java index 941e918ac..d05f987a8 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensEndermanNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensEndermanNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityEnderman; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensGhastNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensGhastNPC.java index a533cafb0..e2caef222 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensGhastNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensGhastNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityGhast; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensGiantNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensGiantNPC.java index 7ab2c1d1b..2ed7b5d8e 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensGiantNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensGiantNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityGiantZombie; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensIronGolemNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensIronGolemNPC.java new file mode 100644 index 000000000..2f8b113b3 --- /dev/null +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensIronGolemNPC.java @@ -0,0 +1,32 @@ +package net.citizensnpcs.npc.entity; + +import net.citizensnpcs.npc.CitizensMobNPC; +import net.citizensnpcs.npc.CitizensNPCManager; + +import net.minecraft.server.EntityIronGolem; +import net.minecraft.server.World; + +//import org.bukkit.entity.IronGolem; + +public class CitizensIronGolemNPC extends CitizensMobNPC { + + public CitizensIronGolemNPC(CitizensNPCManager manager, int id, String name) { + super(manager, id, name, EntityIronGolemNPC.class); + } + + /*@Override + public IronGolem getBukkitEntity() { + return (IronGolem) getHandle().getBukkitEntity(); + }*/ + + public static class EntityIronGolemNPC extends EntityIronGolem { + + public EntityIronGolemNPC(World world) { + super(world); + } + + @Override + public void d_() { + } + } +} \ No newline at end of file diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensMagmaCubeNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensMagmaCubeNPC.java index fc5ececca..5a1808c59 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensMagmaCubeNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensMagmaCubeNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityMagmaCube; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensMushroomCowNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensMushroomCowNPC.java index 8daf5ec01..2b662ade9 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensMushroomCowNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensMushroomCowNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityMushroomCow; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensOcelotNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensOcelotNPC.java new file mode 100644 index 000000000..8d7733e78 --- /dev/null +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensOcelotNPC.java @@ -0,0 +1,32 @@ +package net.citizensnpcs.npc.entity; + +import net.citizensnpcs.npc.CitizensMobNPC; +import net.citizensnpcs.npc.CitizensNPCManager; + +import net.minecraft.server.EntityOcelot; +import net.minecraft.server.World; + +//import org.bukkit.entity.Ocelot; + +public class CitizensOcelotNPC extends CitizensMobNPC { + + public CitizensOcelotNPC(CitizensNPCManager manager, int id, String name) { + super(manager, id, name, EntityOcelotNPC.class); + } + + /*@Override + public Ocelot getBukkitEntity() { + return (Ocelot) getHandle().getBukkitEntity(); + }*/ + + public static class EntityOcelotNPC extends EntityOcelot { + + public EntityOcelotNPC(World world) { + super(world); + } + + @Override + public void d_() { + } + } +} \ No newline at end of file diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensPigNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensPigNPC.java index 4911bba42..988aafcae 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensPigNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensPigNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityPig; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensPigZombieNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensPigZombieNPC.java index 5b8a2672f..f6cf65f3c 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensPigZombieNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensPigZombieNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityPigZombie; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensSheepNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensSheepNPC.java index 5c14201fd..cb497f525 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensSheepNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensSheepNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntitySheep; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensSilverfishNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensSilverfishNPC.java index 6c4bb385b..12eba1333 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensSilverfishNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensSilverfishNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntitySilverfish; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensSkeletonNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensSkeletonNPC.java index 9ee35e266..7ed461bdd 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensSkeletonNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensSkeletonNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntitySkeleton; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensSlimeNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensSlimeNPC.java index 819c49785..c6aa39fba 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensSlimeNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensSlimeNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntitySlime; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensSnowmanNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensSnowmanNPC.java index 6c23ee97d..d16866449 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensSnowmanNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensSnowmanNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntitySnowman; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensSpiderNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensSpiderNPC.java index db6012ec1..052b386e5 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensSpiderNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensSpiderNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntitySpider; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensSquidNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensSquidNPC.java index df98685db..797db1413 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensSquidNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensSquidNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntitySquid; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java index 8835608bc..021b64607 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityVillager; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensWolfNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensWolfNPC.java index 991db66dd..f52be7e15 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensWolfNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensWolfNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityWolf; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensZombieNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensZombieNPC.java index 427cac385..cf824e146 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensZombieNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensZombieNPC.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity; import net.citizensnpcs.npc.CitizensMobNPC; import net.citizensnpcs.npc.CitizensNPCManager; + import net.minecraft.server.EntityZombie; import net.minecraft.server.World; diff --git a/src/main/java/net/citizensnpcs/util/NPCBuilder.java b/src/main/java/net/citizensnpcs/util/NPCBuilder.java index b6700dc9e..8d84bca1a 100644 --- a/src/main/java/net/citizensnpcs/util/NPCBuilder.java +++ b/src/main/java/net/citizensnpcs/util/NPCBuilder.java @@ -15,8 +15,10 @@ import net.citizensnpcs.npc.entity.CitizensEndermanNPC; import net.citizensnpcs.npc.entity.CitizensGhastNPC; import net.citizensnpcs.npc.entity.CitizensGiantNPC; import net.citizensnpcs.npc.entity.CitizensHumanNPC; +import net.citizensnpcs.npc.entity.CitizensIronGolemNPC; import net.citizensnpcs.npc.entity.CitizensMagmaCubeNPC; import net.citizensnpcs.npc.entity.CitizensMushroomCowNPC; +import net.citizensnpcs.npc.entity.CitizensOcelotNPC; import net.citizensnpcs.npc.entity.CitizensPigNPC; import net.citizensnpcs.npc.entity.CitizensPigZombieNPC; import net.citizensnpcs.npc.entity.CitizensSheepNPC; @@ -45,8 +47,10 @@ public class NPCBuilder { types.put(EntityType.ENDERMAN, CitizensEndermanNPC.class); types.put(EntityType.GHAST, CitizensGhastNPC.class); types.put(EntityType.GIANT, CitizensGiantNPC.class); + // types.put(EntityType.IRON_GOLEM, CitizensIronGolemNPC.class); types.put(EntityType.MAGMA_CUBE, CitizensMagmaCubeNPC.class); types.put(EntityType.MUSHROOM_COW, CitizensMushroomCowNPC.class); + // types.put(EntityType.OCELOT, CitizensOcelotNPC.class); types.put(EntityType.PIG, CitizensPigNPC.class); types.put(EntityType.PIG_ZOMBIE, CitizensPigZombieNPC.class); types.put(EntityType.SHEEP, CitizensSheepNPC.class);