Adds a missing permission check for /sgc info

This commit is contained in:
2022-05-31 23:11:11 +02:00
parent ea27afad11
commit 66d37cddcb
2 changed files with 6 additions and 1 deletions

View File

@@ -40,6 +40,11 @@ public class TabCommandInfo implements TabExecutor {
commandSender.sendMessage("This command can only be used by a player");
return true;
}
if (!player.hasPermission("stargate.command.info")) {
player.sendMessage("Permission Denied");
return true;
}
Portal portal = PortalFinderHelper.findPortalByRaytrace(registryAPI, player, 15);
if (portal == null) {
commandSender.sendMessage("You need to look directly at a portal to get information about it");

View File

@@ -11,7 +11,7 @@ commands:
- sgc
description: The root command for all added commands
usage: |
/<command> <config/dial>
/<command> <config/dial/visualizer/info>
/<command> config <config option> <new value>
/<command> dial <network name> <portal name>
/<command> visualizer <network name>