mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 03:09:03 +00:00
Added MC Barrel Permission #222
This commit is contained in:
@@ -92,10 +92,13 @@ permissions:
|
||||
children:
|
||||
brewery.openbarrel.small: true
|
||||
brewery.openbarrel.big: true
|
||||
brewery.openbarrel.mc: true
|
||||
brewery.openbarrel.small:
|
||||
description: Allow to open small Barrels
|
||||
brewery.openbarrel.big:
|
||||
description: Allow to open big Barrels
|
||||
brewery.openbarrel.mc:
|
||||
description: Allow to open Minecraft Barrels
|
||||
|
||||
# -- Cauldron --
|
||||
brewery.cauldron.time:
|
||||
|
||||
@@ -51,6 +51,13 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (P.use1_14 && type == Material.BARREL) {
|
||||
if (!player.hasPermission("brewery.openbarrel.mc")) {
|
||||
event.setCancelled(true);
|
||||
P.p.msg(player, P.p.languageReader.get("Error_NoPermissions"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Do not process Off Hand for Barrel interaction
|
||||
if (P.use1_9 && event.getHand() != EquipmentSlot.HAND) {
|
||||
|
||||
Reference in New Issue
Block a user