fix GoldenChestEconomy attempting to register as GoldIsMoney on startup.

Start tagging some item methods as Deprecated.
This commit is contained in:
Nick Minkler 2014-01-02 14:47:26 -08:00
parent c860fb7321
commit c6ef520833
3 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,7 @@ public class Economy_GoldenChestEconomy implements Economy{
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin); Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
// Load Plugin in case it was loaded before // Load Plugin in case it was loaded before
if (economy == null) { if (economy == null) {
Plugin ec = plugin.getServer().getPluginManager().getPlugin("GoldIsMoney"); Plugin ec = plugin.getServer().getPluginManager().getPlugin("GoldenChestEconomy");
if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("me.igwb.GoldenChest.GoldenChestEconomy")) { if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("me.igwb.GoldenChest.GoldenChestEconomy")) {
economy = (GoldenChestEconomy) ec; economy = (GoldenChestEconomy) ec;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name)); log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));

View File

@ -51,6 +51,7 @@ public class ItemInfo {
return material.getMaxStackSize(); return material.getMaxStackSize();
} }
@Deprecated
public int getId() { public int getId() {
return material.getId(); return material.getId();
} }
@ -83,6 +84,7 @@ public class ItemInfo {
return new ItemStack(this.material, 1, subTypeId); return new ItemStack(this.material, 1, subTypeId);
} }
@SuppressWarnings("deprecation")
@Override @Override
public String toString() { public String toString() {
return String.format("%s[%d:%d]", name, material.getId(), subTypeId); return String.format("%s[%d:%d]", name, material.getId(), subTypeId);

View File

@ -625,10 +625,12 @@ public class Items {
items.add(new ItemInfo("Pufferfish", new String[][]{{"fish", "puff"}, {"fish", "blo"}, {"fish", "glob"}}, Material.RAW_FISH, (short) 3)); items.add(new ItemInfo("Pufferfish", new String[][]{{"fish", "puff"}, {"fish", "blo"}, {"fish", "glob"}}, Material.RAW_FISH, (short) 3));
} }
@Deprecated
public static ItemInfo itemById(int typeId) { public static ItemInfo itemById(int typeId) {
return itemByType(Material.getMaterial(typeId), (short) 0); return itemByType(Material.getMaterial(typeId), (short) 0);
} }
@Deprecated
public static ItemInfo itemById(int typeId, short subType) { public static ItemInfo itemById(int typeId, short subType) {
return itemByType(Material.getMaterial(typeId), subType); return itemByType(Material.getMaterial(typeId), subType);
} }