mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Merge pull request #3890 from OverCrave/master
Fix adminchat returning too early if send by the console
This commit is contained in:
commit
c509daff9f
@ -55,14 +55,13 @@ public abstract class ChatCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CommandUtils.shouldEnableToggle(args[0])) {
|
if (CommandUtils.shouldEnableToggle(args[0])) {
|
||||||
if (CommandUtils.noConsoleUsage(sender)) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
enableChatMode(UserManager.getPlayer(sender.getName()), sender);
|
enableChatMode(UserManager.getPlayer(sender.getName()), sender);
|
||||||
return true;
|
return true;
|
||||||
@ -72,6 +71,9 @@ public abstract class ChatCommand implements TabExecutor {
|
|||||||
if (CommandUtils.noConsoleUsage(sender)) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
disableChatMode(UserManager.getPlayer(sender.getName()), sender);
|
disableChatMode(UserManager.getPlayer(sender.getName()), sender);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user