Add permission to use upgrades

This commit is contained in:
Tomás F 2020-07-03 20:39:10 +01:00
parent 635d4bed77
commit 8e78219e2d
2 changed files with 6 additions and 0 deletions

View File

@ -103,6 +103,10 @@ public class BeeHiveUpgrade extends CustomItem implements Listener {
Beehive beehive = (Beehive) clickedBlock.getState();
if (!player.hasPermission("beesplus.beehive.upgrade")) {
return;
}
if (beehive.getMaxEntities() >= maxPopulation) {
Localization.sendMessage(player, Localization.BEEHIVE_UPGRADE_MAX);
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 2, 2);

View File

@ -12,4 +12,6 @@ permissions:
default: op
beesplus.beehive.view:
default: op
beesplus.beehive.upgrade:
default: op