13
0
geforkt von Mirrors/Paper

SPIGOT-977: Use vanilla's handling for command messages for vanilla commands

Fixes gamerules that control the output of those messages
Dieser Commit ist enthalten in:
Thinkofdeath 2015-07-08 23:19:21 +01:00
Ursprung 7742e12aff
Commit f27339caf8

Datei anzeigen

@ -97,9 +97,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
chatmessage.getChatModifier().setColor(EnumChatFormat.RED); chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage); icommandlistener.sendMessage(chatmessage);
} catch (CommandException commandexception) { } catch (CommandException commandexception) {
ChatMessage chatmessage = new ChatMessage(commandexception.getMessage(), commandexception.getArgs()); CommandAbstract.a(icommandlistener, vanillaCommand, 1, commandexception.getMessage(), commandexception.getArgs());
chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage);
} finally { } finally {
lastSender = oldSender; lastSender = oldSender;
} }
@ -120,9 +118,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
chatmessage1.getChatModifier().setColor(EnumChatFormat.RED); chatmessage1.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage1); icommandlistener.sendMessage(chatmessage1);
} catch (CommandException commandexception) { } catch (CommandException commandexception) {
ChatMessage chatmessage2 = new ChatMessage(commandexception.getMessage(), commandexception.getArgs()); CommandAbstract.a(icommandlistener, vanillaCommand, 1, commandexception.getMessage(), commandexception.getArgs());
chatmessage2.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage2);
} catch (Throwable throwable) { } catch (Throwable throwable) {
ChatMessage chatmessage3 = new ChatMessage("commands.generic.exception", new Object[0]); ChatMessage chatmessage3 = new ChatMessage("commands.generic.exception", new Object[0]);
chatmessage3.getChatModifier().setColor(EnumChatFormat.RED); chatmessage3.getChatModifier().setColor(EnumChatFormat.RED);