Skip to content

Commit

Permalink
fixing #258
Browse files Browse the repository at this point in the history
  • Loading branch information
NEZNAMY committed Mar 11, 2021
1 parent d9ab1cf commit 60e59c2
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ public void execute(TabPlayer sender, String[] args) {
sender.toggleScoreboard(true);
}
TabPlayer p = sender;
if (args.length >= 2 && TAB.getInstance().getPlayer(args[1]) != null)
p = TAB.getInstance().getPlayer(args[1]);
if (args.length >= 2 && TAB.getInstance().getPlayer(args[1]) != null) {
if (sender.hasPermission("tab.togglescoreboard.other")) {
p = TAB.getInstance().getPlayer(args[1]);
} else {
sender.sendMessage(getTranslation("no_permission"), true);
return;
}
}
if (p.getOtherPluginScoreboard() != null) return; //not overriding other plugins
boolean silent = args.length >= 3 && args[2].equals("-s");
if (args.length >= 1) {
Expand Down

0 comments on commit 60e59c2

Please sign in to comment.