mirror of
https://github.com/tomasff/BeesPlus.git
synced 2024-11-15 22:55:35 +01:00
Add permission to use upgrades
This commit is contained in:
parent
635d4bed77
commit
8e78219e2d
@ -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);
|
||||
|
@ -12,4 +12,6 @@ permissions:
|
||||
default: op
|
||||
beesplus.beehive.view:
|
||||
default: op
|
||||
beesplus.beehive.upgrade:
|
||||
default: op
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user