diff --git a/src/main/java/net/simplyvanilla/simplynicks/commands/TeamCommandExecutor.java b/src/main/java/net/simplyvanilla/simplynicks/commands/TeamCommandExecutor.java index 1b9388f..56ff70e 100644 --- a/src/main/java/net/simplyvanilla/simplynicks/commands/TeamCommandExecutor.java +++ b/src/main/java/net/simplyvanilla/simplynicks/commands/TeamCommandExecutor.java @@ -3,9 +3,7 @@ import net.simplyvanilla.simplynicks.SimplyNicks; import net.simplyvanilla.simplynicks.database.TeamMySQL; import org.bukkit.OfflinePlayer; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; +import org.bukkit.command.*; import org.jetbrains.annotations.NotNull; import java.util.Locale; @@ -20,8 +18,12 @@ public TeamCommandExecutor(SimplyNicks plugin) { } @Override - public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { - if (!sender.hasPermission("simplynicks.team")) { + public boolean onCommand( + @NotNull CommandSender sender, + @NotNull Command command, + @NotNull String label, + @NotNull String[] args) { + if (!(sender instanceof ConsoleCommandSender) && !(sender instanceof RemoteConsoleCommandSender)) { return false; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index e704aa8..4e9f5f5 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -51,5 +51,5 @@ permissions: default: op simplynicks.team: - description: allows access to the team command + description: whether the player can access the team commands default: false