@@ -1,6 +1,5 @@
|
||||
package org.bukkit.craftbukkit.command;
|
||||
|
||||
import net.minecraft.SystemUtils;
|
||||
import net.minecraft.commands.CommandListenerWrapper;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
import net.minecraft.world.level.block.entity.TileEntity;
|
||||
@@ -30,7 +29,7 @@ public class CraftBlockCommandSender extends ServerCommandSender implements Bloc
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
for (IChatBaseComponent component : CraftChatMessage.fromString(message)) {
|
||||
block.source.sendMessage(component, SystemUtils.NIL_UUID);
|
||||
block.source.sendSystemMessage(component);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.bukkit.craftbukkit.command;
|
||||
|
||||
import net.minecraft.SystemUtils;
|
||||
import net.minecraft.network.chat.ChatComponentText;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
import net.minecraft.server.rcon.RemoteControlCommandListener;
|
||||
import org.bukkit.command.RemoteConsoleCommandSender;
|
||||
|
||||
@@ -15,7 +14,7 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
|
||||
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
listener.sendMessage(new ChatComponentText(message + "\n"), SystemUtils.NIL_UUID); // Send a newline after each message, to preserve formatting.
|
||||
listener.sendSystemMessage(IChatBaseComponent.literal(message + "\n")); // Send a newline after each message, to preserve formatting.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class VanillaCommandWrapper extends BukkitCommand {
|
||||
if (!testPermission(sender)) return true;
|
||||
|
||||
CommandListenerWrapper icommandlistener = getListener(sender);
|
||||
dispatcher.performCommand(icommandlistener, toDispatcher(args, getName()), toDispatcher(args, commandLabel), true);
|
||||
dispatcher.performPrefixedCommand(icommandlistener, toDispatcher(args, getName()), toDispatcher(args, commandLabel));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user