mirror of https://github.com/tomasff/BeesPlus.git
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();
|
Beehive beehive = (Beehive) clickedBlock.getState();
|
||||||
|
|
||||||
|
if (!player.hasPermission("beesplus.beehive.upgrade")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (beehive.getMaxEntities() >= maxPopulation) {
|
if (beehive.getMaxEntities() >= maxPopulation) {
|
||||||
Localization.sendMessage(player, Localization.BEEHIVE_UPGRADE_MAX);
|
Localization.sendMessage(player, Localization.BEEHIVE_UPGRADE_MAX);
|
||||||
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 2, 2);
|
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 2, 2);
|
||||||
|
|
|
@ -12,4 +12,6 @@ permissions:
|
||||||
default: op
|
default: op
|
||||||
beesplus.beehive.view:
|
beesplus.beehive.view:
|
||||||
default: op
|
default: op
|
||||||
|
beesplus.beehive.upgrade:
|
||||||
|
default: op
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue