mirror of
https://github.com/tomasff/BeesPlus.git
synced 2025-01-09 09:18:01 +01:00
Extract upgrade to separate method
This commit is contained in:
parent
1abf7570bf
commit
0fb9f945f4
@ -103,6 +103,12 @@ public class BeeHiveUpgrade implements CustomItem, Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
upgradeBeehive(player, beehive, handItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeBeehive(Player player, Beehive beehive, ItemStack handItem) {
|
||||
if (beehive.getMaxEntities() >= maxPopulation) {
|
||||
Localization.sendMessage(player, Localization.BEEHIVE_UPGRADE_MAX);
|
||||
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 2, 2);
|
||||
@ -122,5 +128,3 @@ public class BeeHiveUpgrade implements CustomItem, Listener {
|
||||
player.getInventory().removeItem(upgradeAmountRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user