mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2025-01-06 18:47:44 +01:00
Added MC Barrel Permission #222
This commit is contained in:
parent
44310e0e36
commit
e847672b81
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user