Update to 1.8

This commit is contained in:
Nicolas Shreiner 2014-12-13 18:30:33 -05:00
parent 78a330ba83
commit fbfb29b663
10 changed files with 66 additions and 39 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -75,12 +75,14 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.2-R0.1-SNAPSHOT</version>
<version>1.8-R0.1-SNAPSHOT</version>
<systemPath>${project.basedir}/lib/bukkit-1.8-R0.1-SNAPSHOT.jar</systemPath>
<scope>system</scope>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId>
<version>1.2.27</version>
<version>1.4.2</version>
</dependency>
<dependency>
<groupId>org.mcstats.bukkit</groupId>

View File

@ -25,8 +25,6 @@ import org.bukkit.entity.Egg;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import org.mcstats.Metrics;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@ -40,9 +38,6 @@ public class EggCatcher extends JavaPlugin {
public void onEnable() {
this.CheckConfigurationFile();
if (this.getConfig().getBoolean("CheckForUpdates")) {
this.CheckUpdate();
}
PluginManager pm = this.getServer().getPluginManager();
@ -59,15 +54,6 @@ public class EggCatcher extends JavaPlugin {
economy = economyProvider.getProvider();
}
}
try {
Metrics metrics = new Metrics(this);
metrics.start();
} catch (IOException e) {
}
}
public void CheckUpdate() {
Updater updater = new Updater(this, 35664, this.getFile(), Updater.UpdateType.DEFAULT, false);
}
public void CheckConfigurationFile() {

View File

@ -45,8 +45,15 @@ public enum EggType {
OCELOT(EntityType.OCELOT, 98, "Ocelot"),
BAT(EntityType.BAT, 65, "Bat"),
WITCH(EntityType.WITCH, 66, "Witch"),
HORSE(EntityType.HORSE, 100, "Horse");
HORSE(EntityType.HORSE, 100, "Horse"),
ENDERMITE(EntityType.ENDERMITE, 67, "Endermite"),
ENDERDRAGON(EntityType.ENDER_DRAGON, 63, "EnderDragon"),
RABBIT(EntityType.RABBIT, 101, "Rabbit"),
GUARDIAN(EntityType.GUARDIAN, 68, "Guardian"),
SNOWMAN(EntityType.SNOWMAN, 97, "Snowman"),
IRON_GOLEM(EntityType.IRON_GOLEM, 99, "VillagerGolem"),
WITHER(EntityType.WITHER, 64, "WitherBoss"),
GIANT(EntityType.GIANT, 53, "Giant");
private final EntityType entityType;

View File

@ -82,7 +82,8 @@ public class EggCatcherEntityListener implements Listener {
this.vaultTargetBankAccount = this.config.getString("VaultTargetBankAccount", "");
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
@SuppressWarnings("deprecation")
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onEntityHitByEgg(EntityDamageEvent event) {
EntityDamageByEntityEvent damageEvent = null;
Egg egg = null;
@ -216,8 +217,7 @@ public class EggCatcherEntityListener implements Listener {
int itemId = config.getInt("ItemCost.ItemId", 266);
int itemData = config.getInt("ItemCost.ItemData", 0);
int itemAmount = config.getInt("ItemCost.Amount." + eggType.getFriendlyName(), 0);
@SuppressWarnings("deprecation")
ItemStack itemStack = new ItemStack(itemId, itemAmount, (short) itemData);
ItemStack itemStack = new ItemStack(itemId, itemAmount, (short) itemData);
if (player.getInventory().containsAtLeast(itemStack, itemStack.getAmount())) {
player.sendMessage(String.format(config.getString("Messages.ItemCostSuccess"),
String.valueOf(itemAmount)));

View File

@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package me.shansen.EggCatcher.listeners;
import me.shansen.EggCatcher.EggCatcher;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerEggThrowEvent;

View File

@ -4,12 +4,12 @@ LooseEggOnFail: true
UseVaultCost: false
UseItemCost: false
UseHealthPercentage: false
ExplosionEffect: true
SmokeEffect: false
ExplosionEffect: false
SmokeEffect: true
NonPlayerCatching: false
PreventCatchingBabyAnimals: true
PreventCatchingTamedAnimals: true
PreventCatchingShearedSheeps: true
PreventCatchingBabyAnimals: false
PreventCatchingTamedAnimals: false
PreventCatchingShearedSheeps: false
SpawnChickenOnSuccess: false
SpawnChickenOnFail: true
VaultTargetBankAccount: ""
@ -21,23 +21,31 @@ CatchChance:
Chicken: 100.0
Squid: 100.0
Wolf: 100.0
Creeper: 0.0
Creeper: 100.0
Skeleton: 100.0
CaveSpider: 100.0
Spider: 100.0
PigZombie: 100.0
Zombie: 100.0
MagmaCube: 100.0
Slime: 100.0
Ghast: 0.0
Enderman: 100.0
Silverfish: 100.0
Blaze: 0.0
Villager: 100.0
MagmaCube: 50.0
Slime: 50.0
Ghast: 40.0
Enderman: 40.0
Silverfish: 40.0
Blaze: 35.0
Villager: 35.0
Ocelot: 100.0
Witch: 100.0
Bat: 100.0
Witch: 35.0
Bat: 40.0
Horse: 100.0
EnderDragon: 10.0
Endermite: 40.0
Rabbit: 100.0
Guardian: 10.0
Snowman: 40.0
VillagerGolem: 40.0
WitherBoss: 10.0
Giant: 10.0
VaultCost:
Pig: 0.0
Sheep: 0.0
@ -63,6 +71,14 @@ VaultCost:
Witch: 0.0
Bat: 0.0
Horse: 0.0
EnderDragon: 0.0
Endermite: 0.0
Rabbit: 0.0
Guardian: 0.0
Snowman: 0.0
VillagerGolem: 0.0
WitherBoss: 0.0
Giant: 0.0
ItemCost:
ItemId: 371
ItemData: 0
@ -91,6 +107,14 @@ ItemCost:
Witch: 0
Bat: 0
Horse: 0
EnderDragon: 0
Endermite: 0
Rabbit: 0
Guardian: 0
Snowman: 0
VillagerGolem: 0
WitherBoss: 0
Giant: 0
HealthPercentage:
Pig: 100.0
Sheep: 100.0
@ -116,6 +140,14 @@ HealthPercentage:
Witch: 100.0
Bat: 100.0
Horse: 100.0
EnderDragon: 100.0
Endermite: 100.0
Rabbit: 100.0
Guardian: 100.0
Snowman: 100.0
VillagerGolem: 100.0
WitherBoss: 100.0
Giant: 100.0
Messages:
PermissionFail: "You do not have permission to catch this mob!"
VaultFail: "It costs %s dollars to catch this mob!"
@ -125,5 +157,4 @@ Messages:
CatchChanceFail: "You failed to catch this mob!"
CatchChanceSuccess: ""
HealthPercentageFail: "The mob has more than %s percent health left and cannot be caught!"
ConfigVersion: 2.00
CheckForUpdates: true
ConfigVersion: 2.00

View File

@ -1,5 +1,5 @@
name: EggCatcher
version: 2.1.1
version: 2.1.2
description: This plugin allows you to catch mobs in eggs.
author: shansen