Update to Minecraft 1.19

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-06-08 02:00:00 +10:00
parent 91d9aa9a89
commit 25f3b50f6b
332 changed files with 3628 additions and 2559 deletions

View File

@@ -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);
}
}

View File

@@ -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

View File

@@ -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;
}