Moves permission nodes and command names to an enum to reduce redundancy
Also fixes some cases where tab completions are provided even if all arguments have been supplied
This commit is contained in:
@@ -3,6 +3,7 @@ package net.knarcraft.stargatecommand.command;
|
||||
import net.TheDgtl.Stargate.network.RegistryAPI;
|
||||
import net.TheDgtl.Stargate.network.portal.Portal;
|
||||
import net.TheDgtl.Stargate.network.portal.PortalFlag;
|
||||
import net.knarcraft.stargatecommand.property.StargateCommandCommand;
|
||||
import net.knarcraft.stargatecommand.util.PortalFinderHelper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -40,7 +41,7 @@ public class TabCommandInfo implements TabExecutor {
|
||||
commandSender.sendMessage("This command can only be used by a player");
|
||||
return true;
|
||||
}
|
||||
if (!player.hasPermission("stargate.command.info")) {
|
||||
if (!player.hasPermission(StargateCommandCommand.INFO.getPermissionNode())) {
|
||||
player.sendMessage("Permission Denied");
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user