Adds a missing permission check for /sgc info
This commit is contained in:
@@ -40,6 +40,11 @@ public class TabCommandInfo implements TabExecutor {
|
|||||||
commandSender.sendMessage("This command can only be used by a player");
|
commandSender.sendMessage("This command can only be used by a player");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!player.hasPermission("stargate.command.info")) {
|
||||||
|
player.sendMessage("Permission Denied");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Portal portal = PortalFinderHelper.findPortalByRaytrace(registryAPI, player, 15);
|
Portal portal = PortalFinderHelper.findPortalByRaytrace(registryAPI, player, 15);
|
||||||
if (portal == null) {
|
if (portal == null) {
|
||||||
commandSender.sendMessage("You need to look directly at a portal to get information about it");
|
commandSender.sendMessage("You need to look directly at a portal to get information about it");
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ commands:
|
|||||||
- sgc
|
- sgc
|
||||||
description: The root command for all added commands
|
description: The root command for all added commands
|
||||||
usage: |
|
usage: |
|
||||||
/<command> <config/dial>
|
/<command> <config/dial/visualizer/info>
|
||||||
/<command> config <config option> <new value>
|
/<command> config <config option> <new value>
|
||||||
/<command> dial <network name> <portal name>
|
/<command> dial <network name> <portal name>
|
||||||
/<command> visualizer <network name>
|
/<command> visualizer <network name>
|
||||||
|
|||||||
Reference in New Issue
Block a user