+ Added permission so you could do all commands in-game. Closes #17.

This commit is contained in:
Steffion 2013-10-05 21:43:24 +02:00
parent fc48dc2fae
commit 24d64cd76e
2 changed files with 9 additions and 1 deletions

View File

@ -2,8 +2,10 @@ package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.W;
import nl.Steffion.BlockHunt.Managers.MessageM;
import nl.Steffion.BlockHunt.Managers.PermissionsM;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -38,6 +40,11 @@ public class OnPlayerCommandPreprocessEvent implements Listener {
}
}
if (PermissionsM
.hasPerm(player, Permissions.allcommands, false)) {
return;
}
MessageM.sendFMessage(player, ConfigC.warning_unableToCommand);
event.setCancelled(true);
}

View File

@ -35,7 +35,8 @@ public class PermissionsC {
setwarp (main + "setwarp", PType.MODERATOR),
signcreate (main + "signcreate", PType.MODERATOR),
remove (main + "remove", PType.ADMIN),
tokens (main + "tokens", PType.ADMIN);
tokens (main + "tokens", PType.ADMIN),
allcommands (main + "allcommands", PType.OP);
public String perm;
public PType type;