+ Added permission so you could do all commands in-game. Closes #17.
This commit is contained in:
		@@ -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);
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user