Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
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:
Ursprung
7742e12aff
Commit
f27339caf8
@ -97,9 +97,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
|
||||
chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
|
||||
icommandlistener.sendMessage(chatmessage);
|
||||
} catch (CommandException commandexception) {
|
||||
ChatMessage chatmessage = new ChatMessage(commandexception.getMessage(), commandexception.getArgs());
|
||||
chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
|
||||
icommandlistener.sendMessage(chatmessage);
|
||||
CommandAbstract.a(icommandlistener, vanillaCommand, 1, commandexception.getMessage(), commandexception.getArgs());
|
||||
} finally {
|
||||
lastSender = oldSender;
|
||||
}
|
||||
@ -120,9 +118,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
|
||||
chatmessage1.getChatModifier().setColor(EnumChatFormat.RED);
|
||||
icommandlistener.sendMessage(chatmessage1);
|
||||
} catch (CommandException commandexception) {
|
||||
ChatMessage chatmessage2 = new ChatMessage(commandexception.getMessage(), commandexception.getArgs());
|
||||
chatmessage2.getChatModifier().setColor(EnumChatFormat.RED);
|
||||
icommandlistener.sendMessage(chatmessage2);
|
||||
CommandAbstract.a(icommandlistener, vanillaCommand, 1, commandexception.getMessage(), commandexception.getArgs());
|
||||
} catch (Throwable throwable) {
|
||||
ChatMessage chatmessage3 = new ChatMessage("commands.generic.exception", new Object[0]);
|
||||
chatmessage3.getChatModifier().setColor(EnumChatFormat.RED);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren