Skip to content

Commit

Permalink
Fix logical bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jyhsu2000 committed Nov 9, 2017
1 parent f1092c0 commit ee34437
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Utilities for Bukkit/Spigot plugin
<dependency>
<groupId>com.github.jyhsu2000</groupId>
<artifactId>PluginUtilities</artifactId>
<version>1.4.0</version>
<version>1.4.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- The Basics -->
<groupId>club.kid7</groupId>
<artifactId>PluginUtilities</artifactId>
<version>1.4.0</version>
<version>1.4.1</version>
<dependencies>
<!-- Bukkit API -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ public final boolean onCommand(CommandSender sender, Command command, String lab
//檢查權限
if (!hasPermission(sender)) {
sender.sendMessage(ChatColor.RED + "Lacking permission " + permission);
return true;
}
//限玩家執行
if (onlyFromPlayer && !(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + "This command can only be used by players in game");
return true;
}
//執行指令
return executeCommand(sender, command, label, args);
Expand Down

0 comments on commit ee34437

Please sign in to comment.