Added some new Permissions

This commit is contained in:
Sn0wStorm
2014-05-07 02:37:28 +02:00
parent 31385edce5
commit e1f10b6be1
7 changed files with 171 additions and 23 deletions
+8
View File
@@ -89,6 +89,10 @@ public class BCauldron {
public static boolean fill(Player player, Block block) {
BCauldron bcauldron = get(block);
if (bcauldron != null) {
if (!player.hasPermission("brewery.cauldron.fill")) {
P.p.msg(player, P.p.languageReader.get("Perms_NoCauldronFill"));
return true;
}
ItemStack potion = bcauldron.ingredients.cook(bcauldron.state);
if (potion != null) {
// Bukkit Bug, inventory not updating while in event so this
@@ -115,6 +119,10 @@ public class BCauldron {
// prints the current cooking time to the player
public static void printTime(Player player, Block block) {
if (!player.hasPermission("brewery.cauldron.time")) {
P.p.msg(player, P.p.languageReader.get("Error_NoPermissions"));
return;
}
BCauldron bcauldron = get(block);
if (bcauldron != null) {
if (bcauldron.state > 1) {