Updated to CraftBukkit 1.2-dev.

Updated to version 1.16.
Added Ocelot support.
Changed deprecated code.
This commit is contained in:
shansen 2012-03-02 15:42:56 +01:00
parent abd7744fe1
commit 242a279af2
5 changed files with 35 additions and 30 deletions

View File

@ -25,7 +25,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.1-R4-SNAPSHOT</version>
<version>1.2.2-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>

View File

@ -63,7 +63,7 @@ public class EggCatcher extends JavaPlugin {
public void CheckConfigurationFile() {
double configVersion = this.getConfig().getDouble("ConfigVersion", 0.0);
if (configVersion == 1.15) {
if (configVersion == 1.16) {
//
this.saveConfig();
} else {

View File

@ -18,37 +18,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package me.shansen.EggCatcher;
import org.bukkit.entity.CreatureType;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
public enum EggType {
PIG_ZOMBIE (CreatureType.PIG_ZOMBIE, 57, "PigZombie"),
MAGMA_CUBE (CreatureType.MAGMA_CUBE, 62, "MagmaCube"),
CAVE_SPIDER (CreatureType.CAVE_SPIDER, 59, "CaveSpider"),
MUSHROOM_COW (CreatureType.MUSHROOM_COW, 96, "MushroomCow"),
CREEPER (CreatureType.CREEPER, 50, "Creeper"),
SKELETON (CreatureType.SKELETON, 51, "Skeleton"),
SPIDER (CreatureType.SPIDER, 52, "Spider"),
ZOMBIE (CreatureType.ZOMBIE, 54, "Zombie"),
SLIME (CreatureType.SLIME, 55, "Slime"),
GHAST (CreatureType.GHAST, 56, "Ghast"),
ENDERMAN (CreatureType.ENDERMAN, 58, "Enderman"),
SILVERFISH (CreatureType.SILVERFISH, 60, "Silverfish"),
BLAZE (CreatureType.BLAZE, 61, "Blaze"),
PIG (CreatureType.PIG, 90, "Pig"),
SHEEP (CreatureType.SHEEP, 91, "Sheep"),
COW (CreatureType.COW, 92, "Cow"),
CHICKEN (CreatureType.CHICKEN, 93, "Chicken"),
SQUID (CreatureType.SQUID, 94, "Squid"),
WOLF (CreatureType.WOLF, 95, "Wolf"),
VILLAGER (CreatureType.VILLAGER, 120, "Villager");
PIG_ZOMBIE (EntityType.PIG_ZOMBIE, 57, "PigZombie"),
MAGMA_CUBE (EntityType.MAGMA_CUBE, 62, "MagmaCube"),
CAVE_SPIDER (EntityType.CAVE_SPIDER, 59, "CaveSpider"),
MUSHROOM_COW (EntityType.MUSHROOM_COW, 96, "MushroomCow"),
CREEPER (EntityType.CREEPER, 50, "Creeper"),
SKELETON (EntityType.SKELETON, 51, "Skeleton"),
SPIDER (EntityType.SPIDER, 52, "Spider"),
ZOMBIE (EntityType.ZOMBIE, 54, "Zombie"),
SLIME (EntityType.SLIME, 55, "Slime"),
GHAST (EntityType.GHAST, 56, "Ghast"),
ENDERMAN (EntityType.ENDERMAN, 58, "Enderman"),
SILVERFISH (EntityType.SILVERFISH, 60, "Silverfish"),
BLAZE (EntityType.BLAZE, 61, "Blaze"),
PIG (EntityType.PIG, 90, "Pig"),
SHEEP (EntityType.SHEEP, 91, "Sheep"),
COW (EntityType.COW, 92, "Cow"),
CHICKEN (EntityType.CHICKEN, 93, "Chicken"),
SQUID (EntityType.SQUID, 94, "Squid"),
WOLF (EntityType.WOLF, 95, "Wolf"),
VILLAGER (EntityType.VILLAGER, 120, "Villager"),
OCELOT (EntityType.OCELOT, 98, "Ocelot");
private final CreatureType creatureType;
private final EntityType entityType;
private final Integer creatureId;
private final String friendlyName;
EggType(CreatureType creatureType, Integer creatureId, String friendlyName){
this.creatureType = creatureType;
EggType(EntityType entityType, Integer creatureId, String friendlyName){
this.entityType = entityType;
this.creatureId = creatureId;
this.friendlyName = friendlyName;
}
@ -57,8 +58,8 @@ public enum EggType {
return this.creatureId.shortValue();
}
public CreatureType getCreatureType() {
return this.creatureType;
public EntityType getCreatureType() {
return this.entityType;
}
public String getFriendlyName() {

View File

@ -32,6 +32,7 @@ CatchChance:
Silverfish: 100.0
Blaze: 0.0
Villager: 100.0
Ocelot: 100.0
VaultCost:
Pig: 0.0
Sheep: 0.0
@ -53,6 +54,7 @@ VaultCost:
Silverfish: 0.0
Blaze: 0.0
Villager: 0.0
Ocelot: 0.0
ItemCost:
ItemId: 371
Amount:
@ -76,6 +78,7 @@ ItemCost:
Silverfish: 0
Blaze: 0
Villager: 0
Ocelot: 0
Messages:
PermissionFail: "You do not have permission to catch this mob!"
VaultFail: "It costs %s dollars to catch this mob!"
@ -84,4 +87,4 @@ Messages:
ItemCostSuccess: "You paid %s gold nugget(s) for catching this mob!"
CatchChanceFail: "You failed to catch this mob!"
CatchChanceSuccess: ""
ConfigVersion: 1.15
ConfigVersion: 1.16

View File

@ -1,5 +1,5 @@
name: EggCatcher
version: 1.15
version: 1.16
description: This plugin allows you to catch mobs in eggs.
author: shansen
@ -30,3 +30,4 @@ permissions:
eggcatcher.catch.blaze: true
eggcatcher.catch.magmacube: true
eggcatcher.catch.villager: true
eggcatcher.catch.ocelot: true