mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Maximum level bug fixed
This commit is contained in:
parent
d4a30f90f6
commit
2ba1c15b69
@ -16,13 +16,14 @@ public class RFGKeepUpgrades implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onReforge(MMOItemReforgeEvent event) {
|
||||
if (!event.getOptions().shouldKeepUpgrades()) { return; }
|
||||
//RFG// MMOItems.log("§8Reforge §4EFG§7 Keeping Upgrades");
|
||||
final UpgradeData upgrade = ((UpgradeData) event.getOldMMOItem().getData(ItemStats.UPGRADE));
|
||||
final UpgradeData newOne = ((UpgradeData) event.getNewMMOItem().getData(ItemStats.UPGRADE));
|
||||
|
||||
UpgradeData upgrade = ((UpgradeData) event.getOldMMOItem().getData(ItemStats.UPGRADE));
|
||||
UpgradeData newOne = ((UpgradeData) event.getNewMMOItem().getData(ItemStats.UPGRADE));
|
||||
|
||||
if (upgrade == null || newOne == null) { return; }
|
||||
if (!event.getOptions().shouldKeepUpgrades()
|
||||
|| upgrade == null
|
||||
|| newOne == null
|
||||
|| newOne.getMaxUpgrades() <= 0)
|
||||
return;
|
||||
|
||||
//UPGRD//MMOItems.log(" \u00a7e* \u00a77Existing Upgrade Detected");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user