Skip to content

Commit

Permalink
allow console + rcon
Browse files Browse the repository at this point in the history
  • Loading branch information
Netherwhal committed Mar 10, 2024
1 parent ee5b196 commit 9bb5a27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9bb5a27

Please sign in to comment.