mirror of https://github.com/MilkBowl/Vault.git
fix GoldenChestEconomy attempting to register as GoldIsMoney on startup.
Start tagging some item methods as Deprecated.
This commit is contained in:
parent
c860fb7321
commit
c6ef520833
|
@ -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));
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue