Skip to content

Commit 464916e

Browse files
committed
Update CommandToolStats.java
1 parent a1c39df commit 464916e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/lol/hyper/toolstats/commands/CommandToolStats.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public CommandToolStats(ToolStats toolStats) {
4646

4747
@Override
4848
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
49+
if (!sender.hasPermission("toolstats.use")) {
50+
sender.sendMessage(ChatColor.RED + "You do not have permission for this command.");
51+
return true;
52+
}
4953
if (args.length == 0) {
5054
sender.sendMessage(ChatColor.GREEN + "ToolStats version " + toolStats.getDescription().getVersion() + ". Created by hyperdefined.");
5155
}

0 commit comments

Comments
 (0)