Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -1,7 +1,7 @@
--- a/net/minecraft/server/commands/CommandList.java
+++ b/net/minecraft/server/commands/CommandList.java
@@ -37,6 +37,12 @@
private static int a(CommandListenerWrapper commandlistenerwrapper, Function<EntityPlayer, IChatBaseComponent> function) {
private static int format(CommandListenerWrapper commandlistenerwrapper, Function<EntityPlayer, IChatBaseComponent> function) {
PlayerList playerlist = commandlistenerwrapper.getServer().getPlayerList();
List<EntityPlayer> list = playerlist.getPlayers();
+ // CraftBukkit start
@@ -10,6 +10,6 @@
+ list = list.stream().filter((ep) -> sender.canSee(ep.getBukkitEntity())).collect(java.util.stream.Collectors.toList());
+ }
+ // CraftBukkit end
IChatBaseComponent ichatbasecomponent = ChatComponentUtils.b(list, function);
IChatBaseComponent ichatbasecomponent = ChatComponentUtils.formatList(list, function);
commandlistenerwrapper.sendMessage(new ChatMessage("commands.list.players", new Object[]{list.size(), playerlist.getMaxPlayers(), ichatbasecomponent}), false);
commandlistenerwrapper.sendSuccess(new ChatMessage("commands.list.players", new Object[]{list.size(), playerlist.getMaxPlayers(), ichatbasecomponent}), false);