mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Added a check when using an upgradeable to check if the template exists.
This commit is contained in:
parent
a241949c55
commit
5719442144
@ -72,6 +72,11 @@ public class UpgradeData implements StatData, RandomStatData {
|
||||
}
|
||||
|
||||
public void upgrade(MMOItem mmoitem) {
|
||||
if(!MMOItems.plugin.getUpgrades().hasTemplate(template)) {
|
||||
MMOItems.plugin.getLogger().warning("Couldn't find upgrade template '" + template + "'. Does it exist?");
|
||||
return;
|
||||
}
|
||||
|
||||
// change display name
|
||||
String suffix = new ColorParse('&', MMOItems.plugin.getConfig().getString("item-upgrading.name-suffix")).toChatColor();
|
||||
if (MMOItems.plugin.getConfig().getBoolean("item-upgrading.display-in-name"))
|
||||
|
Loading…
Reference in New Issue
Block a user