Probably fixed ButtonChat#57
Haven't tested yet
This commit is contained in:
parent
e793571845
commit
ef0b9caa86
1 changed files with 5 additions and 2 deletions
|
@ -56,8 +56,11 @@ public class TBMCChatAPI {
|
||||||
for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values()) {
|
for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values()) {
|
||||||
if (cmd.GetCommandPath().startsWith(command + " ")) {
|
if (cmd.GetCommandPath().startsWith(command + " ")) {
|
||||||
int ind = cmd.GetCommandPath().indexOf(' ', command.length() + 2);
|
int ind = cmd.GetCommandPath().indexOf(' ', command.length() + 2);
|
||||||
if (ind >= 0)
|
if (ind >= 0) {
|
||||||
continue;
|
String newcmd = cmd.GetCommandPath().substring(0, ind);
|
||||||
|
if (!cmds.contains("/" + newcmd))
|
||||||
|
cmds.add("/" + newcmd);
|
||||||
|
}
|
||||||
if (cmd.GetPlayerOnly() && !(sender instanceof Player))
|
if (cmd.GetPlayerOnly() && !(sender instanceof Player))
|
||||||
continue;
|
continue;
|
||||||
if (cmd.GetModOnly() && !MainPlugin.permission.has(sender, "tbmc.admin"))
|
if (cmd.GetModOnly() && !MainPlugin.permission.has(sender, "tbmc.admin"))
|
||||||
|
|
Loading…
Reference in a new issue