13
0
geforkt von Mirrors/Paper
Dieser Commit ist enthalten in:
Nassim Jahnke 2022-07-27 21:18:51 +02:00
Ursprung 734a43657a
Commit faafca851c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
54 geänderte Dateien mit 191 neuen und 230 gelöschten Zeilen

Datei anzeigen

@ -1148,7 +1148,7 @@ index 021a26a6b1c258deffc26c035ab52a4ea027d9a1..00d432bd395e7f7fb6ee24e371818d13
try {
int i = friendlyByteBuf.writerIndex();
diff --git a/src/main/java/net/minecraft/network/chat/Component.java b/src/main/java/net/minecraft/network/chat/Component.java
index d19b8ccc791c3f135603b950008136ae6d2f0bfb..bbfb98618a0b87406cc48465bdda15a0a4974b7e 100644
index 06736982f7625c1a532315afe94e5e0c45ec1331..e7d9e2d8c87ddf3658b1c2e0f2a3e98ef8080cec 100644
--- a/src/main/java/net/minecraft/network/chat/Component.java
+++ b/src/main/java/net/minecraft/network/chat/Component.java
@@ -1,6 +1,7 @@
@ -1159,7 +1159,7 @@ index d19b8ccc791c3f135603b950008136ae6d2f0bfb..bbfb98618a0b87406cc48465bdda15a0
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
@@ -200,6 +201,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
@@ -216,6 +217,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
GsonBuilder gsonbuilder = new GsonBuilder();
gsonbuilder.disableHtmlEscaping();
@ -1167,7 +1167,7 @@ index d19b8ccc791c3f135603b950008136ae6d2f0bfb..bbfb98618a0b87406cc48465bdda15a0
gsonbuilder.registerTypeHierarchyAdapter(Component.class, new Component.Serializer());
gsonbuilder.registerTypeHierarchyAdapter(Style.class, new Style.Serializer());
gsonbuilder.registerTypeAdapterFactory(new LowerCaseEnumTypeAdapterFactory());
@@ -375,6 +377,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
@@ -391,6 +393,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
}
public JsonElement serialize(Component ichatbasecomponent, Type type, JsonSerializationContext jsonserializationcontext) {
@ -1175,48 +1175,6 @@ index d19b8ccc791c3f135603b950008136ae6d2f0bfb..bbfb98618a0b87406cc48465bdda15a0
JsonObject jsonobject = new JsonObject();
if (!ichatbasecomponent.getStyle().isEmpty()) {
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerChatPacket.java
index fc2d39d93f88d71af503c20c497be7385ec312eb..285c9197bd716febb158464a1c791337e1d43995 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerChatPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerChatPacket.java
@@ -14,9 +14,20 @@ import net.minecraft.network.chat.PlayerChatMessage;
import net.minecraft.network.protocol.Packet;
import net.minecraft.util.Crypt;
-public record ClientboundPlayerChatPacket(Component signedContent, Optional<Component> unsignedContent, int typeId, ChatSender sender, Instant timeStamp, Crypt.SaltSignaturePair saltSignature) implements Packet<ClientGamePacketListener> {
+// Paper start
+public record ClientboundPlayerChatPacket(@org.jetbrains.annotations.Nullable net.kyori.adventure.text.Component adventure$message, Component signedContent, Optional<Component> unsignedContent, int typeId, ChatSender sender, Instant timeStamp, Crypt.SaltSignaturePair saltSignature) implements Packet<ClientGamePacketListener> {
private static final Duration MESSAGE_EXPIRES_AFTER = ServerboundChatPacket.MESSAGE_EXPIRES_AFTER.plus(Duration.ofMinutes(2L));
+ public ClientboundPlayerChatPacket(Component signedContent, Optional<Component> unsignedContent, int typeId, ChatSender sender, Instant timeStamp, Crypt.SaltSignaturePair saltSignature) {
+ this(null, signedContent, unsignedContent, typeId, sender, timeStamp, saltSignature);
+ }
+
+ @Deprecated // doesn't support signed messages
+ public ClientboundPlayerChatPacket(net.kyori.adventure.text.Component adventure$message, int typeId, ChatSender sender, Instant timeStamp) {
+ this(adventure$message, Component.empty(), Optional.empty(), typeId, sender, timeStamp, net.minecraft.util.Crypt.SaltSignaturePair.EMPTY);
+ }
+ // Paper end
+
public ClientboundPlayerChatPacket(FriendlyByteBuf buf) {
this(buf.readComponent(), buf.readOptional(FriendlyByteBuf::readComponent), buf.readVarInt(), new ChatSender(buf), buf.readInstant(), new Crypt.SaltSignaturePair(buf));
}
@@ -24,7 +35,15 @@ public record ClientboundPlayerChatPacket(Component signedContent, Optional<Comp
@Override
public void write(FriendlyByteBuf buf) {
buf.writeComponent(this.signedContent);
+ // Paper start
+ //TODO Proper API and writing signed contents
+ if (this.adventure$message != null) {
+ buf.writeBoolean(true);
+ buf.writeComponent(this.adventure$message);
+ } else {
buf.writeOptional(this.unsignedContent, FriendlyByteBuf::writeComponent);
+ }
+ // Paper end
buf.writeVarInt(this.typeId);
this.sender.write(buf);
buf.writeInstant(this.timeStamp);
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
index 02183c810f9968621b9b20c1f7b54258b620c507..32ef3edebe94a2014168b7e438752a80b2687e5f 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
@ -1290,24 +1248,24 @@ index 1fb62779527a228f748b49a4d2ddfc57ccb80cf8..bd808eb312ade7122973a47f4b965058
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
index 32b391d7c4c21813db204957286a11970267a3bd..cfcdb21f48f74ea1638907e966f06c4aee072d34 100644
index fd5cdc33c4cc8f24265b450621a13d3ab03644c2..b0052398d7ff954c2a7943ea4618d26f45d701da 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
@@ -9,16 +9,25 @@ import net.minecraft.network.chat.Component;
@@ -6,16 +6,25 @@ import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.Packet;
// Spigot start
-public record ClientboundSystemChatPacket(String content, int typeId) implements Packet<ClientGamePacketListener> {
+public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.adventure.text.Component adventure$content, @javax.annotation.Nullable String content, int typeId) implements Packet<ClientGamePacketListener> { // Paper - Adventure
-public record ClientboundSystemChatPacket(String content, boolean overlay) implements Packet<ClientGamePacketListener> {
+public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.adventure.text.Component adventure$content, @javax.annotation.Nullable String content, boolean overlay) implements Packet<ClientGamePacketListener> { // Paper - Adventure
public ClientboundSystemChatPacket(Component content, int typeId) {
- this(Component.Serializer.toJson(content), typeId);
+ this(null, Component.Serializer.toJson(content), typeId); // Paper - Adventure
public ClientboundSystemChatPacket(Component content, boolean overlay) {
- this(Component.Serializer.toJson(content), overlay);
+ this(null, Component.Serializer.toJson(content), overlay); // Paper - Adventure
}
public ClientboundSystemChatPacket(net.md_5.bungee.api.chat.BaseComponent[] content, int typeId) {
- this(net.md_5.bungee.chat.ComponentSerializer.toString(content), typeId);
+ this(null, net.md_5.bungee.chat.ComponentSerializer.toString(content), typeId); // Paper - Adventure
public ClientboundSystemChatPacket(net.md_5.bungee.api.chat.BaseComponent[] content, boolean overlay) {
- this(net.md_5.bungee.chat.ComponentSerializer.toString(content), overlay);
+ this(null, net.md_5.bungee.chat.ComponentSerializer.toString(content), overlay); // Paper - Adventure
}
// Spigot end
+ // Paper start
@ -1315,14 +1273,14 @@ index 32b391d7c4c21813db204957286a11970267a3bd..cfcdb21f48f74ea1638907e966f06c4a
+ com.google.common.base.Preconditions.checkArgument(!(adventure$content == null && content == null), "Component adventure$content and String (json) content cannot both be null");
+ }
+
+ public ClientboundSystemChatPacket(net.kyori.adventure.text.Component content, int typeId) {
+ this(content, null, typeId);
+ public ClientboundSystemChatPacket(net.kyori.adventure.text.Component content, boolean overlay) {
+ this(content, null, overlay);
+ }
+ // Paper end
public ClientboundSystemChatPacket(FriendlyByteBuf buf) {
this(buf.readComponent(), buf.readVarInt());
@@ -26,7 +35,15 @@ public record ClientboundSystemChatPacket(String content, int typeId) implements
this(buf.readComponent(), buf.readBoolean());
@@ -23,7 +32,15 @@ public record ClientboundSystemChatPacket(String content, boolean overlay) imple
@Override
public void write(FriendlyByteBuf buf) {
@ -1335,7 +1293,7 @@ index 32b391d7c4c21813db204957286a11970267a3bd..cfcdb21f48f74ea1638907e966f06c4a
+ throw new IllegalArgumentException("Must supply either adventure component or string json content");
+ }
+ // Paper end
buf.writeVarInt(this.typeId);
buf.writeBoolean(this.overlay);
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java
@ -1368,10 +1326,10 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490
buf.writeComponent(this.footer);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1ad7797dbef61f8e8011ae6db3089939a279071c..327a8f3806d4b3a42f0a7691d578725bf47742fa 100644
index 3aadba90ab32388b9e8ef96f182fa263c760f53b..acc5ce86ae8aa5ada21e6c97f7921caca4b0bd00 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -227,6 +227,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -229,6 +229,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean allowFlight;
@Nullable
private String motd;
@ -1399,10 +1357,10 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..327a8f3806d4b3a42f0a7691d578725b
public boolean previewsChat() {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d04f0819df55480fefa3ac5807658b05b3a6441a..59f918a7c2eb2cd9f3f63a6cb8285815affa5100 100644
index 4759a0eceeccf28b62cb8865b423235d47d07443..58aea845e8ce6e46e52fc3bdfa9c64153c32a750 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -153,6 +153,7 @@ import net.minecraft.world.scores.Score;
@@ -154,6 +154,7 @@ import net.minecraft.world.scores.Score;
import net.minecraft.world.scores.Scoreboard;
import net.minecraft.world.scores.Team;
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
@ -1410,7 +1368,7 @@ index d04f0819df55480fefa3ac5807658b05b3a6441a..59f918a7c2eb2cd9f3f63a6cb8285815
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.WeatherType;
@@ -229,6 +230,7 @@ public class ServerPlayer extends Player {
@@ -230,6 +231,7 @@ public class ServerPlayer extends Player {
// CraftBukkit start
public String displayName;
@ -1418,7 +1376,7 @@ index d04f0819df55480fefa3ac5807658b05b3a6441a..59f918a7c2eb2cd9f3f63a6cb8285815
public Component listName;
public org.bukkit.Location compassTarget;
public int newExp = 0;
@@ -311,6 +313,7 @@ public class ServerPlayer extends Player {
@@ -312,6 +314,7 @@ public class ServerPlayer extends Player {
// CraftBukkit start
this.displayName = this.getScoreboardName();
@ -1426,7 +1384,7 @@ index d04f0819df55480fefa3ac5807658b05b3a6441a..59f918a7c2eb2cd9f3f63a6cb8285815
this.bukkitPickUpLoot = true;
this.maxHealthCache = this.getMaxHealth();
}
@@ -787,22 +790,17 @@ public class ServerPlayer extends Player {
@@ -788,22 +791,17 @@ public class ServerPlayer extends Player {
String deathmessage = defaultMessage.getString();
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
@ -1451,9 +1409,9 @@ index d04f0819df55480fefa3ac5807658b05b3a6441a..59f918a7c2eb2cd9f3f63a6cb8285815
+ if (deathMessage != null && deathMessage != net.kyori.adventure.text.Component.empty() && flag) { // Paper - Adventure // TODO: allow plugins to override?
+ Component ichatbasecomponent = PaperAdventure.asVanilla(deathMessage); // Paper - Adventure
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getCombatTracker(), ichatbasecomponent), (future) -> {
if (!future.isSuccess()) {
@@ -1758,6 +1756,7 @@ public class ServerPlayer extends Player {
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getCombatTracker(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
boolean flag1 = true;
@@ -1751,6 +1749,7 @@ public class ServerPlayer extends Player {
}
public String locale = "en_us"; // CraftBukkit - add, lowercase
@ -1461,7 +1419,7 @@ index d04f0819df55480fefa3ac5807658b05b3a6441a..59f918a7c2eb2cd9f3f63a6cb8285815
public void updateOptions(ServerboundClientInformationPacket packet) {
// CraftBukkit start
if (getMainArm() != packet.mainHand()) {
@@ -1769,6 +1768,10 @@ public class ServerPlayer extends Player {
@@ -1762,6 +1761,10 @@ public class ServerPlayer extends Player {
this.server.server.getPluginManager().callEvent(event);
}
this.locale = packet.language;
@ -1473,10 +1431,10 @@ index d04f0819df55480fefa3ac5807658b05b3a6441a..59f918a7c2eb2cd9f3f63a6cb8285815
// CraftBukkit end
this.chatVisibility = packet.chatVisibility();
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad730221c7319cd 100644
index 13f996d163739f419b701854b5248a02edfc93c0..11e4dc3d8fbe48b5ec9d771a851f0ac69694e394 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -172,6 +172,8 @@ import org.apache.commons.lang3.StringUtils;
@@ -187,6 +187,8 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
// CraftBukkit start
@ -1484,8 +1442,8 @@ index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad73022
+import io.papermc.paper.adventure.PaperAdventure; // Paper
import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicInteger;
import net.minecraft.world.entity.animal.Bucketable;
@@ -413,21 +415,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
import net.minecraft.network.chat.OutgoingPlayerChatMessage;
@@ -441,14 +443,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return this.server.isSingleplayerOwner(this.player.getGameProfile());
}
@ -1509,7 +1467,19 @@ index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad73022
// CraftBukkit start - fire PlayerKickEvent
if (this.processedDisconnect) {
return;
@@ -457,7 +462,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Waitable waitable = new Waitable() {
@Override
protected Object evaluate() {
- ServerGamePacketListenerImpl.this.disconnect(s);
+ ServerGamePacketListenerImpl.this.disconnect(reason); // Paper - adventure
return null;
}
};
@@ -474,9 +479,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return;
}
- String leaveMessage = ChatFormatting.YELLOW + this.player.getScoreboardName() + " left the game.";
+ net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? this.player.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(this.player.getScoreboardName())); // Paper - Adventure
@ -1518,17 +1488,16 @@ index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad73022
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
@@ -439,8 +444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -488,7 +493,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
// Send the possibly modified leave message
- s = event.getReason();
- final Component ichatbasecomponent = CraftChatMessage.fromString(s, true)[0];
- final Component ichatbasecomponent = CraftChatMessage.fromString(event.getReason(), true)[0];
+ final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
// CraftBukkit end
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), (future) -> {
@@ -1720,9 +1724,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
@@ -1785,9 +1790,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
*/
this.player.disconnect();
@ -1538,12 +1507,12 @@ index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad73022
+ // Paper start - Adventure
+ net.kyori.adventure.text.Component quitMessage = this.server.getPlayerList().remove(this.player);
+ if ((quitMessage != null) && !quitMessage.equals(net.kyori.adventure.text.Component.empty())) {
+ this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), ChatType.SYSTEM);
+ this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
+ // Paper end
}
// CraftBukkit end
this.player.getTextFilter().leave();
@@ -1947,7 +1953,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2039,7 +2046,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
@ -1556,8 +1525,8 @@ index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad73022
+ } else if (false) { // Paper
Player player = this.getCraftPlayer();
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
this.cserver.getPluginManager().callEvent(event);
@@ -2861,30 +2872,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
@@ -3076,30 +3088,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return;
}
@ -1571,14 +1540,14 @@ index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad73022
+ List<net.kyori.adventure.text.Component> lines = new java.util.ArrayList<>();
for (int i = 0; i < signText.size(); ++i) {
FilteredText<Component> filteredtext = (signText.get(i)).map(Component::literal); // CraftBukkit - decompile error
FilteredText filteredtext = (FilteredText) signText.get(i);
if (this.player.isTextFilteringEnabled()) {
- lines[i] = ChatFormatting.stripFormatting(filteredtext.filteredOrElse(CommonComponents.EMPTY).getString());
+ lines.add(net.kyori.adventure.text.Component.text(filteredtext.filteredOrElse(CommonComponents.EMPTY).getString())); // Paper - adventure
- lines[i] = ChatFormatting.stripFormatting(filteredtext.filteredOrEmpty());
+ lines.add(net.kyori.adventure.text.Component.text(filteredtext.filteredOrEmpty())); // Paper - adventure
} else {
- lines[i] = ChatFormatting.stripFormatting(filteredtext.raw().getString());
+ lines.add(net.kyori.adventure.text.Component.text(filteredtext.raw().getString())); // Paper - adventure
- lines[i] = ChatFormatting.stripFormatting(filteredtext.raw());
+ lines.add(net.kyori.adventure.text.Component.text(filteredtext.raw())); // Paper - adventure
}
}
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);
@ -1596,10 +1565,10 @@ index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad73022
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index fc2910ee691da96591811e4c97987ebd2cb93ac3..ff8773f3671970bd759303f7a4bbc17d4df5a1de 100644
index fed3a8c5a23f3a7b279f209aaaab5f6ffa3f137c..5054c3208d1723a33a96d23edcbc9f1483b879e5 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -377,7 +377,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -379,7 +379,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) {
@ -1608,7 +1577,7 @@ index fc2910ee691da96591811e4c97987ebd2cb93ac3..ff8773f3671970bd759303f7a4bbc17d
}
Waitable<PlayerPreLoginEvent.Result> waitable = new Waitable<PlayerPreLoginEvent.Result>() {
@Override
@@ -388,12 +388,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -390,12 +390,12 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
ServerLoginPacketListenerImpl.this.server.processQueue.add(waitable);
if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
@ -1637,7 +1606,7 @@ index 3a587073dbe5e8a599d342c5f758d842b7b6cddb..a426adfba3fccf1815177e0b8065684c
@Override
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054efb108b8 100644
index ba6f4e9f74a524201390bd0e9106a6cf6afe0375..8a015bc9009fbd4877231777b1c6cdc4ae0124be 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -8,6 +8,7 @@ import com.mojang.logging.LogUtils;
@ -1648,15 +1617,7 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
import java.io.File;
import java.net.SocketAddress;
import java.nio.file.Path;
@@ -100,6 +101,7 @@ import net.minecraft.world.scores.Team;
import org.slf4j.Logger;
// CraftBukkit start
+import io.papermc.paper.adventure.PaperAdventure; // Paper
import com.google.common.base.Predicate;
import java.util.stream.Collectors;
import net.minecraft.server.dedicated.DedicatedServer;
@@ -262,7 +264,7 @@ public abstract class PlayerList {
@@ -264,7 +265,7 @@ public abstract class PlayerList {
}
// CraftBukkit start
ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
@ -1665,7 +1626,7 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
this.players.add(player);
@@ -276,19 +278,18 @@ public abstract class PlayerList {
@@ -278,16 +279,18 @@ public abstract class PlayerList {
// Ensure that player inventory is populated with its viewer
player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
@ -1681,16 +1642,13 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
+ final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
- if (joinMessage != null && joinMessage.length() > 0) {
- for (Component line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) {
- this.server.getPlayerList().broadcastSystemMessage(line, ChatType.SYSTEM);
- }
+ if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
+ joinMessage = PaperAdventure.asVanilla(jm); // Paper - Adventure
+ this.server.getPlayerList().broadcastSystemMessage(joinMessage, ChatType.SYSTEM); // Paper - Adventure
}
// CraftBukkit end
@@ -485,7 +486,7 @@ public abstract class PlayerList {
+ this.server.getPlayerList().broadcastSystemMessage(joinMessage, false); // Paper - Adventure
for (Component line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) {
this.server.getPlayerList().broadcastSystemMessage(line, false);
}
@@ -487,7 +490,7 @@ public abstract class PlayerList {
}
@ -1699,7 +1657,7 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
ServerLevel worldserver = entityplayer.getLevel();
entityplayer.awardStat(Stats.LEAVE_GAME);
@@ -496,7 +497,7 @@ public abstract class PlayerList {
@@ -498,7 +501,7 @@ public abstract class PlayerList {
entityplayer.closeContainer();
}
@ -1708,7 +1666,7 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
this.cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
@@ -549,7 +550,7 @@ public abstract class PlayerList {
@@ -551,7 +554,7 @@ public abstract class PlayerList {
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
// CraftBukkit end
@ -1717,7 +1675,7 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
}
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
@@ -595,10 +596,10 @@ public abstract class PlayerList {
@@ -597,10 +600,10 @@ public abstract class PlayerList {
}
// return chatmessage;
@ -1730,7 +1688,7 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -608,17 +609,17 @@ public abstract class PlayerList {
@@ -610,17 +613,17 @@ public abstract class PlayerList {
}
// return chatmessage;
@ -1751,7 +1709,7 @@ index 2fc5519020af0f18e93bf11cc0d33f65f1b23b55..9e0c61b63cc402c26ca1306313ca6054
return null;
}
return entity;
@@ -1126,7 +1127,7 @@ public abstract class PlayerList {
@@ -1128,7 +1131,7 @@ public abstract class PlayerList {
public void removeAll() {
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
@ -2525,7 +2483,7 @@ index 446fdca49a5a6999626a7ee3a1d5c168b15a09dd..f9863e138994f6c7a7975a852f106faa
public boolean isOp() {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b5842cc22df06d6d8d984d6378fcf791e9c8bfe3..6da824e20f960414d0a183943366cec5f8c693c0 100644
index cadafdfd3469b6f813f5e0add116640313fb6209..3fe120364ac61d40d6d8b16339e3086a3c0ac512 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -269,14 +269,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -2771,7 +2729,7 @@ index b5842cc22df06d6d8d984d6378fcf791e9c8bfe3..6da824e20f960414d0a183943366cec5
+ public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) {
+ if (getHandle().connection == null) return;
+ final net.minecraft.core.Registry<net.minecraft.network.chat.ChatType> chatTypeRegistry = this.getHandle().level.registryAccess().registryOrThrow(net.minecraft.core.Registry.CHAT_TYPE_REGISTRY);
+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(message, chatTypeRegistry.getId(chatTypeRegistry.get(net.minecraft.network.chat.ChatType.SYSTEM))));
+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(message, type == net.kyori.adventure.audience.MessageType.SYSTEM));
+ }
+
+ @Override
@ -3712,7 +3670,7 @@ index 78ea79b66cc9e90402ef5cdc2e5e04e0c74b1c26..4fede2161792ba3e7cdf0cc5a1f53318
boolean hadFormat = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 0d0a5b436ff68d49cf7a043127818bd474562b4b..43e31362a980a4f300864321224bdf3ca92110ff 100644
index 8c5165c449f740e51aad3f41405aaad1cfe5c657..a9a900f09b95d84b53adbe0405c322d36b6edad1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -69,6 +69,38 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -547,7 +547,7 @@ index 0000000000000000000000000000000000000000..ae60bd96b5284d54676d8e7e4dd5d170
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index e476f93547f386ded0174693a6218d793ccc450b..393e465b0bac55d407f2ec66d7b11ed0537c9641 100644
index 08ae7a96e93c0d8547f560b3f753804525621c6b..8f29bb843fc456384f7b4e216afca5018fb7f794 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -191,6 +191,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

Datei anzeigen

@ -690,7 +690,7 @@ index 0000000000000000000000000000000000000000..5a19e30a9b7e65a70f68a429b8ca741f
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 393e465b0bac55d407f2ec66d7b11ed0537c9641..408eff59b081ace53bf435947df17e2fe75bfd5e 100644
index 8f29bb843fc456384f7b4e216afca5018fb7f794..f4a6a6addbba65b3415320977048aeba0eadba63 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -192,6 +192,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

Datei anzeigen

@ -695,7 +695,7 @@ index 0000000000000000000000000000000000000000..0fda52841b5e1643efeda92106124998
+ }
+}
diff --git a/src/main/java/net/minecraft/commands/CommandFunction.java b/src/main/java/net/minecraft/commands/CommandFunction.java
index ca1a9884ab09fc7e575b1d30e2dd0aaff324fb73..b94038e2da0f986403c1ec9b27384344e2bb22f0 100644
index eb434d46add6960dba026a03ec3c582a4277bfbd..04adaa6f393be8c3dfa13f371e6bc51082d1d1be 100644
--- a/src/main/java/net/minecraft/commands/CommandFunction.java
+++ b/src/main/java/net/minecraft/commands/CommandFunction.java
@@ -16,6 +16,15 @@ import net.minecraft.server.ServerFunctionManager;
@ -729,10 +729,10 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c
} catch (Exception exception) {
if (listener.shouldPropagateHandlingExceptions()) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 327a8f3806d4b3a42f0a7691d578725bf47742fa..53b04533ea2a9783e281507e996804357946f7d5 100644
index acc5ce86ae8aa5ada21e6c97f7921caca4b0bd00..35df8fb2d2818df21fe3bd8832d9d81ce3a66233 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -175,7 +175,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
@@ -177,7 +177,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent;
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
@ -741,7 +741,7 @@ index 327a8f3806d4b3a42f0a7691d578725bf47742fa..53b04533ea2a9783e281507e99680435
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
@@ -852,6 +852,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -854,6 +854,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
MinecraftServer.LOGGER.info("Stopping server");
@ -916,7 +916,7 @@ index b7a06306614087dfab4d4dcf83797b5a92c376c5..00a50196f6a4768d84acfbbeec79a075
i = this.context.runTopCommand(function, source);
} finally {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 408eff59b081ace53bf435947df17e2fe75bfd5e..cd0365249dffc1704a349a5e419364bbf9e8543b 100644
index f4a6a6addbba65b3415320977048aeba0eadba63..c905602d23cdf3af1de7ab4419f11856b07da2ba 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -63,8 +63,9 @@ import org.apache.logging.log4j.Level;
@ -997,7 +997,7 @@ index 408eff59b081ace53bf435947df17e2fe75bfd5e..cd0365249dffc1704a349a5e419364bb
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 91fd4243416c41b1c2b0f0f1abc154064c164a25..e01d86c50e0227cfae91ba8022b763e51a10c5f5 100644
index 6304a5b78ab1f3ef2478c7e2c493ebd760b5508e..ca1e483819bffc948fab10f88563084aa75d1484 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,8 +1,10 @@
@ -1011,7 +1011,7 @@ index 91fd4243416c41b1c2b0f0f1abc154064c164a25..e01d86c50e0227cfae91ba8022b763e5
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
@@ -853,6 +855,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -854,6 +856,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel());
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
@ -1019,7 +1019,7 @@ index 91fd4243416c41b1c2b0f0f1abc154064c164a25..e01d86c50e0227cfae91ba8022b763e5
ChunkPos chunkcoordintpair = chunkHolder.getPos();
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
LevelChunk chunk;
@@ -877,6 +880,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -878,6 +881,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
return chunk;
@ -1027,7 +1027,7 @@ index 91fd4243416c41b1c2b0f0f1abc154064c164a25..e01d86c50e0227cfae91ba8022b763e5
});
}, (runnable) -> {
ProcessorHandle mailbox = this.mainThreadMailbox;
@@ -1429,6 +1433,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1430,6 +1434,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
@ -1035,7 +1035,7 @@ index 91fd4243416c41b1c2b0f0f1abc154064c164a25..e01d86c50e0227cfae91ba8022b763e5
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
@@ -1453,14 +1458,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1454,14 +1459,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.serverEntity.sendChanges();
}
}
@ -1146,7 +1146,7 @@ index 186a8f5895fedbaf27a7949d9bdbb1a9f2e36fbf..86acdd910eebb8beac4536942119c9e9
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedeec94ffb91 100644
index 95c3273d2379509cf6cd51a718f18b8697908932..1d4d60fa861b5e819c59f06168a096688d06e656 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,6 +1,8 @@
@ -1158,7 +1158,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
import com.google.common.collect.Lists;
import com.mojang.datafixers.DataFixer;
import com.mojang.datafixers.util.Pair;
@@ -156,7 +158,6 @@ import org.slf4j.Logger;
@@ -157,7 +159,6 @@ import org.slf4j.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.WeatherType;
@ -1166,7 +1166,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@@ -446,7 +447,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -447,7 +448,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.updateSkyBrightness();
this.tickTime();
gameprofilerfiller.popPush("tickPending");
@ -1175,7 +1175,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
if (!this.isDebug()) {
j = this.getGameTime();
gameprofilerfiller.push("blockTicks");
@@ -455,12 +456,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -456,12 +457,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.fluidTicks.tick(j, 65536, this::tickFluid);
gameprofilerfiller.pop();
}
@ -1193,7 +1193,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
gameprofilerfiller.popPush("blockEvents");
timings.doSounds.startTiming(); // Spigot
this.runBlockEvents();
@@ -627,6 +632,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -628,6 +633,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
gameprofilerfiller.popPush("tickBlocks");
@ -1201,7 +1201,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
if (randomTickSpeed > 0) {
LevelChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length;
@@ -659,6 +665,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -660,6 +666,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
@ -1209,7 +1209,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
gameprofilerfiller.pop();
}
@@ -893,14 +900,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -894,14 +901,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
public void tickNonPassenger(Entity entity) {
@ -1233,7 +1233,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
entity.setOldPosAndRot();
ProfilerFiller gameprofilerfiller = this.getProfiler();
@@ -919,7 +934,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -920,7 +935,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(entity, entity1);
}
@ -1242,7 +1242,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
}
@@ -961,6 +976,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -962,6 +977,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!savingDisabled) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1250,7 +1250,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
if (progressListener != null) {
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
}
@@ -970,7 +986,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -971,7 +987,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
progressListener.progressStage(Component.translatable("menu.savingChunks"));
}
@ -1262,18 +1262,18 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
this.entityManager.saveAll();
} else {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2e690a50420386690fa78d107ad730221c7319cd..70db08a398fb2461e9580ad2f75276f1a000fa06 100644
index 11e4dc3d8fbe48b5ec9d771a851f0ac69694e394..fda4d570ef04e91c4e6c29c52221c04937dc4fbc 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -311,7 +311,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
// CraftBukkit end
@@ -339,7 +339,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void tick() {
- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.startTiming(); // Spigot
if (this.ackBlockChangesUpTo > -1) {
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
this.ackBlockChangesUpTo = -1;
@@ -392,7 +391,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -420,7 +419,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
}
@ -1281,7 +1281,7 @@ index 2e690a50420386690fa78d107ad730221c7319cd..70db08a398fb2461e9580ad2f75276f1
this.chatPreviewThrottler.tick();
}
@@ -2022,7 +2020,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2146,7 +2144,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
private void handleCommand(String s) {
@ -1290,7 +1290,7 @@ index 2e690a50420386690fa78d107ad730221c7319cd..70db08a398fb2461e9580ad2f75276f1
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
@@ -2032,7 +2030,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2156,7 +2154,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.cserver.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -1299,7 +1299,7 @@ index 2e690a50420386690fa78d107ad730221c7319cd..70db08a398fb2461e9580ad2f75276f1
return;
}
@@ -2045,7 +2043,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2169,7 +2167,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@ -1309,7 +1309,7 @@ index 2e690a50420386690fa78d107ad730221c7319cd..70db08a398fb2461e9580ad2f75276f1
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9e0c61b63cc402c26ca1306313ca6054efb108b8..dbd53de61057eb9eb8be651abf9abcad18423ab1 100644
index 8a015bc9009fbd4877231777b1c6cdc4ae0124be..bffd4efcbe50609b134b2bf498dc393e7ef70850 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1,5 +1,6 @@
@ -1319,7 +1319,7 @@ index 9e0c61b63cc402c26ca1306313ca6054efb108b8..dbd53de61057eb9eb8be651abf9abcad
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1017,10 +1018,11 @@ public abstract class PlayerList {
@@ -1021,10 +1022,11 @@ public abstract class PlayerList {
}
public void saveAll() {
@ -1333,7 +1333,7 @@ index 9e0c61b63cc402c26ca1306313ca6054efb108b8..dbd53de61057eb9eb8be651abf9abcad
public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4ab6e75929ba34bcea6558ab51c8c551d6f70b02..358042454272243663de7f82a77c21c35714a62a 100644
index 331686c382fa88c0fd32056e2c68c3078341f4b7..47a05aa42739f4cfce828c0de42b4f1da467093e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -132,7 +132,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@ -1425,7 +1425,7 @@ index cdf8020194f2ec1fe7b65b22c8e1f5b1c23eaefa..2db27f5e3e3c1bb0502c055f78c4a81e
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 1f9701128aedb0343709866207f3044b890fe1be..3e1e2d9711c3c1b05406353f96d706c8abfe7a61 100644
index c4f91b80add5d79d999aa49c5da6dab094a24694..8221ec36a6453aea8a2249fde93ebc8fbd9d7e22 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -140,7 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1445,17 +1445,20 @@ index 1f9701128aedb0343709866207f3044b890fe1be..3e1e2d9711c3c1b05406353f96d706c8
super.tick();
this.updatingUsingItem();
this.updateSwimAmount();
@@ -2836,9 +2835,7 @@ public abstract class LivingEntity extends Entity {
@@ -2836,12 +2835,6 @@ public abstract class LivingEntity extends Entity {
}
}
- SpigotTimings.timerEntityBaseTick.stopTiming(); // Spigot
this.aiStep();
- SpigotTimings.timerEntityTickRest.startTiming(); // Spigot
- if (!this.isRemoved()) {
- SpigotTimings.timerEntityBaseTick.stopTiming(); // Spigot
- this.aiStep();
- SpigotTimings.timerEntityTickRest.startTiming(); // Spigot
- }
-
double d0 = this.getX() - this.xo;
double d1 = this.getZ() - this.zo;
float f = (float) (d0 * d0 + d1 * d1);
@@ -2918,8 +2915,6 @@ public abstract class LivingEntity extends Entity {
@@ -2921,8 +2914,6 @@ public abstract class LivingEntity extends Entity {
if (this.isSleeping()) {
this.setXRot(0.0F);
}
@ -1464,7 +1467,7 @@ index 1f9701128aedb0343709866207f3044b890fe1be..3e1e2d9711c3c1b05406353f96d706c8
}
public void detectEquipmentUpdates() {
@@ -3101,7 +3096,6 @@ public abstract class LivingEntity extends Entity {
@@ -3104,7 +3095,6 @@ public abstract class LivingEntity extends Entity {
this.setDeltaMovement(d4, d5, d6);
this.level.getProfiler().push("ai");
@ -1472,7 +1475,7 @@ index 1f9701128aedb0343709866207f3044b890fe1be..3e1e2d9711c3c1b05406353f96d706c8
if (this.isImmobile()) {
this.jumping = false;
this.xxa = 0.0F;
@@ -3111,7 +3105,6 @@ public abstract class LivingEntity extends Entity {
@@ -3114,7 +3104,6 @@ public abstract class LivingEntity extends Entity {
this.serverAiStep();
this.level.getProfiler().pop();
}
@ -1480,7 +1483,7 @@ index 1f9701128aedb0343709866207f3044b890fe1be..3e1e2d9711c3c1b05406353f96d706c8
this.level.getProfiler().pop();
this.level.getProfiler().push("jump");
@@ -3146,9 +3139,9 @@ public abstract class LivingEntity extends Entity {
@@ -3149,9 +3138,9 @@ public abstract class LivingEntity extends Entity {
this.updateFallFlying();
AABB axisalignedbb = this.getBoundingBox();
@ -1492,7 +1495,7 @@ index 1f9701128aedb0343709866207f3044b890fe1be..3e1e2d9711c3c1b05406353f96d706c8
this.level.getProfiler().pop();
this.level.getProfiler().push("freezing");
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
@@ -3177,9 +3170,7 @@ public abstract class LivingEntity extends Entity {
@@ -3180,9 +3169,7 @@ public abstract class LivingEntity extends Entity {
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
}
@ -1550,7 +1553,7 @@ index 0fa91ed5ed41c944f7398a88f9352742f34d4af5..39d64f3aeb998df5452699e098148d86
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 950c468cad2937cd9a077a8f7a3d227662576a9a..60c5d4c97a340120f49f51b3d1dc7e6f2a19a936 100644
index d0dca357cfd7e563fc7deb4f6048cf466605938f..4b3dc4648709abbdd6ac0972c298a64a875e5f6c 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -91,6 +91,15 @@ public class Block extends BlockBehaviour implements ItemLike {
@ -1839,12 +1842,12 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6da824e20f960414d0a183943366cec5f8c693c0..3d7ad34b9fefd2a3f064866c6a3464a9389005e1 100644
index 3fe120364ac61d40d6d8b16339e3086a3c0ac512..7a95748f52ef064af3173deedc229ec0b5f65cac 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2281,6 +2281,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2275,6 +2275,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, i));
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
}
+
+ // Paper start
@ -2035,7 +2038,7 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae
this.value = value;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 43e31362a980a4f300864321224bdf3ca92110ff..cf49ba1e6a8b7f62deefbbf2fc645034d5d27bef 100644
index a9a900f09b95d84b53adbe0405c322d36b6edad1..4f1945f854f4a022184ca4756b59d08b01693d6b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -217,6 +217,12 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 53b04533ea2a9783e281507e996804357946f7d5..722d9a37b2132a246dbb8e19d4e393be684e0f6f 100644
index 35df8fb2d2818df21fe3bd8832d9d81ce3a66233..c7660c2c9c5e1fb166ba6a3216f14e5fa934528d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1416,7 +1416,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

Datei anzeigen

@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..351159bbdb0c8045f4983f54dee34430
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index cf49ba1e6a8b7f62deefbbf2fc645034d5d27bef..8fc00b0ad230d9e7ae8dd73927b61116f73f7b4b 100644
index 4f1945f854f4a022184ca4756b59d08b01693d6b..e6ffdbeb55eaeb8c2ea7c01a5206242f54756f2b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -421,6 +421,11 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -201,7 +201,7 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index cd0365249dffc1704a349a5e419364bbf9e8543b..2f2e07094a362ea1f459da85eb9ef84945a6e206 100644
index c905602d23cdf3af1de7ab4419f11856b07da2ba..d70d97c65d5bdb47a17a226d65bad8ba1421b11b 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -194,6 +194,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

Datei anzeigen

@ -47,10 +47,10 @@ index 87f66fd33e404367d924137b2d8aac3b06937f43..2dcda3b03796655da443e1b3dd68c6f6
return false;
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index ec0c4767218f197306b179ed0a9c16a15551fa52..24456bbf2cd9f1878cf545e8d164ff524c321a4c 100644
index 0232baa005e2839317d7ac2d64c88fb93bc29e5e..08b0b7b9146f58c4eb263d5ce1fee1b08d43fafe 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -183,6 +183,9 @@ public abstract class Player extends LivingEntity {
@@ -184,6 +184,9 @@ public abstract class Player extends LivingEntity {
private Optional<GlobalPos> lastDeathLocation;
@Nullable
public FishingHook fishing;
@ -117,7 +117,7 @@ index 7c5918f84d2b8f9c778258b7e7d745105effb082..cfb286020b8ee87bad7edbda4cd0b999
for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3d7ad34b9fefd2a3f064866c6a3464a9389005e1..5d0d2ac00589da28d26d1efafdea9be22e341af4 100644
index 7a95748f52ef064af3173deedc229ec0b5f65cac..dc4b1772bb447d84592f2c49bb04efee4dfd4494 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1965,8 +1965,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 722d9a37b2132a246dbb8e19d4e393be684e0f6f..e4c7aa0b8c74b081dd77f81eb12693b8bcf457de 100644
index c7660c2c9c5e1fb166ba6a3216f14e5fa934528d..494ee4d6de47d10b2f9e4be393f1fe2603a72167 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -268,7 +268,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -270,7 +270,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -24,7 +24,7 @@ index 722d9a37b2132a246dbb8e19d4e393be684e0f6f..e4c7aa0b8c74b081dd77f81eb12693b8
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
@@ -277,7 +277,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -279,7 +279,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
@ -33,7 +33,7 @@ index 722d9a37b2132a246dbb8e19d4e393be684e0f6f..e4c7aa0b8c74b081dd77f81eb12693b8
public final double[] recentTps = new double[ 3 ];
// Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
@@ -962,6 +962,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -964,6 +964,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index 722d9a37b2132a246dbb8e19d4e393be684e0f6f..e4c7aa0b8c74b081dd77f81eb12693b8
// Spigot End
protected void runServer() {
@@ -978,26 +1029,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -981,26 +1032,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
@ -133,7 +133,7 @@ index 722d9a37b2132a246dbb8e19d4e393be684e0f6f..e4c7aa0b8c74b081dd77f81eb12693b8
tickSection = curTime;
}
// Spigot end
@@ -1007,7 +1065,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1010,7 +1068,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5d0d2ac00589da28d26d1efafdea9be22e341af4..131b7be8da627e3bb2024f1aeedf7d58a7571098 100644
index dc4b1772bb447d84592f2c49bb04efee4dfd4494..46abb31a5330662f46949466e01c404ba2922027 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1634,12 +1634,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index a14386502e9b3ccec23233db2ddfedeec94ffb91..bae0b45aba0b04a229f5e098d13a5e6383524e88 100644
index 1d4d60fa861b5e819c59f06168a096688d06e656..b41f00840c87e27898d247ccf275185736883411 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2108,6 +2108,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2109,6 +2109,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.valid = true; // CraftBukkit
@ -25,7 +25,7 @@ index a14386502e9b3ccec23233db2ddfedeec94ffb91..bae0b45aba0b04a229f5e098d13a5e63
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 358042454272243663de7f82a77c21c35714a62a..632945ac54a234b102e75d9558b00c1c8485b915 100644
index 47a05aa42739f4cfce828c0de42b4f1da467093e..a07aafad9f94b85a689568c1784727a8c5b0452b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -304,7 +304,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -56,7 +56,7 @@ index 358042454272243663de7f82a77c21c35714a62a..632945ac54a234b102e75d9558b00c1c
public float getBukkitYaw() {
return this.yRot;
}
@@ -1852,6 +1872,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1847,6 +1867,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.bukkitEntity.storeBukkitValues(nbt);
}
// CraftBukkit end
@ -72,7 +72,7 @@ index 358042454272243663de7f82a77c21c35714a62a..632945ac54a234b102e75d9558b00c1c
return nbt;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -1976,6 +2005,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1973,6 +2002,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// CraftBukkit end

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable top of nether void damage
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 632945ac54a234b102e75d9558b00c1c8485b915..3564492eef1cac204ca580795dc8bb1e5e3d510a 100644
index a07aafad9f94b85a689568c1784727a8c5b0452b..45aca8dde5b6f1a3aef907b1a74809e7f4aa66e4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -653,7 +653,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 59f918a7c2eb2cd9f3f63a6cb8285815affa5100..0853cd73209933d1fcbe9cb4c4c9e39bd4f68f1c 100644
index 58aea845e8ce6e46e52fc3bdfa9c64153c32a750..5ff3bf1c436fd69e6129e59c205f626df9d61e8d 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -990,6 +990,7 @@ public class ServerPlayer extends Player {
@@ -988,6 +988,7 @@ public class ServerPlayer extends Player {
this.unRide();
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.wonGame) {

Datei anzeigen

@ -10,7 +10,7 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e4c7aa0b8c74b081dd77f81eb12693b8bcf457de..cc6699b9806bfaeca7d6e3564974bdbd532e06bc 100644
index 494ee4d6de47d10b2f9e4be393f1fe2603a72167..40ea9d30c5d9a0936ba495adea4d96775bce2e06 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1395,6 +1395,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 3e1e2d9711c3c1b05406353f96d706c8abfe7a61..9cdf8a51268fdfefa6efc34a82d4fccb3593dc71 100644
index 8221ec36a6453aea8a2249fde93ebc8fbd9d7e22..c1c0757852c4925bcd1debe79a3946c972c4be70 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1399,6 +1399,7 @@ public abstract class LivingEntity extends Entity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index bae0b45aba0b04a229f5e098d13a5e6383524e88..64bad03c3be64d7542bb5952b248f755c71f64c0 100644
index b41f00840c87e27898d247ccf275185736883411..bd8a24a5a4c6640be570678af688470c47d92500 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -582,7 +582,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -583,7 +583,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.push("thunder");
BlockPos blockposition;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 64bad03c3be64d7542bb5952b248f755c71f64c0..28d6b8c5bebbbfb15ea76dea9e79e6b95978f15f 100644
index bd8a24a5a4c6640be570678af688470c47d92500..5d693946111a73e25fcbff2475a2f47a44066fbf 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -606,7 +606,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -607,7 +607,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
gameprofilerfiller.popPush("iceandsnow");

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0853cd73209933d1fcbe9cb4c4c9e39bd4f68f1c..c29d5fe41b6f452cd5180d241f488ba8a345cb76 100644
index 5ff3bf1c436fd69e6129e59c205f626df9d61e8d..a3410c8f89c4b7f68999aafb090555c7e7513316 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1756,7 +1756,7 @@ public class ServerPlayer extends Player {
@@ -1749,7 +1749,7 @@ public class ServerPlayer extends Player {
return s;
}
@ -17,7 +17,7 @@ index 0853cd73209933d1fcbe9cb4c4c9e39bd4f68f1c..c29d5fe41b6f452cd5180d241f488ba8
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
public void updateOptions(ServerboundClientInformationPacket packet) {
// CraftBukkit start
@@ -1764,9 +1764,10 @@ public class ServerPlayer extends Player {
@@ -1757,9 +1757,10 @@ public class ServerPlayer extends Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}
@ -30,7 +30,7 @@ index 0853cd73209933d1fcbe9cb4c4c9e39bd4f68f1c..c29d5fe41b6f452cd5180d241f488ba8
this.locale = packet.language;
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 131b7be8da627e3bb2024f1aeedf7d58a7571098..48c4b06c539708de08d5be5996499cf8d68364e5 100644
index 46abb31a5330662f46949466e01c404ba2922027..b6d03bdd161da73492fb947cc4ca4f6c1ba172f1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1965,8 +1965,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -7,10 +7,10 @@ I hope to look at this more in-depth soon. It appears doable.
However this should not block the update.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c29d5fe41b6f452cd5180d241f488ba8a345cb76..07ee153cbd0677c04d4d44276dc8f7e597e56c15 100644
index a3410c8f89c4b7f68999aafb090555c7e7513316..b6a19cd2cfd8acfac6dde77033bbb82ef20586d0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2243,4 +2243,6 @@ public class ServerPlayer extends Player {
@@ -2232,4 +2232,6 @@ public class ServerPlayer extends Player {
return (CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end
@ -60,7 +60,7 @@ index cf7762e76a2d35acdfc12627e9750fbec766d555..40d6b00fb40db167c6c80b6a3f79eb82
// Spigot start
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 48c4b06c539708de08d5be5996499cf8d68364e5..b63c2e2fb802a4f1c5447524474c61ffe18e640e 100644
index b6d03bdd161da73492fb947cc4ca4f6c1ba172f1..b73b202a3c68ba559b65245186a97025bda25134 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -402,6 +402,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable container update tick rate
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 07ee153cbd0677c04d4d44276dc8f7e597e56c15..02dd7ca5f7845803623488d7c7e84a2eb22b2d90 100644
index b6a19cd2cfd8acfac6dde77033bbb82ef20586d0..b117a98dea77755bee33f8a141f8df16b587beeb 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -227,6 +227,7 @@ public class ServerPlayer extends Player {
@@ -228,6 +228,7 @@ public class ServerPlayer extends Player {
private int containerCounter;
public int latency;
public boolean wonGame;
@ -16,7 +16,7 @@ index 07ee153cbd0677c04d4d44276dc8f7e597e56c15..02dd7ca5f7845803623488d7c7e84a2e
// CraftBukkit start
public String displayName;
@@ -599,7 +600,12 @@ public class ServerPlayer extends Player {
@@ -600,7 +601,12 @@ public class ServerPlayer extends Player {
--this.invulnerableTime;
}

Datei anzeigen

@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and
improve setPosition to use raw
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index dbd53de61057eb9eb8be651abf9abcad18423ab1..16e1d0b62e01551a54d60c81ca12708f51aceef9 100644
index bffd4efcbe50609b134b2bf498dc393e7ef70850..28c136fe37afeda1b43523a17a46a115f1dbf3f3 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -221,7 +221,7 @@ public abstract class PlayerList {
@@ -222,7 +222,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event
Player spawnPlayer = player.getBukkitEntity();
@ -21,7 +21,7 @@ index dbd53de61057eb9eb8be651abf9abcad18423ab1..16e1d0b62e01551a54d60c81ca12708f
this.cserver.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation();
@@ -229,7 +229,10 @@ public abstract class PlayerList {
@@ -230,7 +230,10 @@ public abstract class PlayerList {
player.spawnIn(worldserver1);
player.gameMode.setLevel((ServerLevel) player.level);

Datei anzeigen

@ -14,11 +14,11 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 70db08a398fb2461e9580ad2f75276f1a000fa06..4edfafdb3b38c27fb8a9c588c83ff0e6b67956ea 100644
index fda4d570ef04e91c4e6c29c52221c04937dc4fbc..e9999a52a0f54c47e973bc22fa91465e8e993b1c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1948,6 +1948,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}
@@ -2041,6 +2041,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
OutgoingPlayerChatMessage outgoing = OutgoingPlayerChatMessage.create(original);
if (!async && s.startsWith("/")) {
+ // Paper Start

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Ensure inv drag is in bounds
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 04874783a67dd8d9c2b2fd12e5f9d5447b8a2d7d..36d42b2a97168dfa525b55d8fa2f7a603b43340f 100644
index 333cbbf6f7761d619a1e41f9a08d7fcf0abf44f9..66261330157cef50dfabb7f92e9ece6dcd280951 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -416,7 +416,7 @@ public abstract class AbstractContainerMenu {

Datei anzeigen

@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b63c2e2fb802a4f1c5447524474c61ffe18e640e..4293d5d3f413c61ee2bbc611fa850603f6d12425 100644
index b73b202a3c68ba559b65245186a97025bda25134..383168bc9af2174cbe6a0c914d0dbbc8b9d3d156 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3564492eef1cac204ca580795dc8bb1e5e3d510a..7953111f8d00413b39a17d2b09b1b74b55c2ab63 100644
index 45aca8dde5b6f1a3aef907b1a74809e7f4aa66e4..d95f2f0757a339917ff8061ae3cf169bbed054bf 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2940,7 +2940,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2937,7 +2937,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
// CraftBukkit start

Datei anzeigen

@ -16,7 +16,7 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4293d5d3f413c61ee2bbc611fa850603f6d12425..00576a1d65b0e8f32af739c6f0383e2418360132 100644
index 383168bc9af2174cbe6a0c914d0dbbc8b9d3d156..797c6f7e055cc2579db5f20b393f8011bc62eadb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1038,7 +1038,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e01d86c50e0227cfae91ba8022b763e51a10c5f5..e1200e903e39c3e5cb023e1bd4fe104907c0c6eb 100644
index ca1e483819bffc948fab10f88563084aa75d1484..1c73599e37e9b830ff0ab9bcc9edc7b63daa6ca1 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -998,6 +998,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -999,6 +999,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return true;
} catch (Exception exception) {
ChunkMap.LOGGER.error("Failed to save chunk {},{}", new Object[]{chunkcoordintpair.x, chunkcoordintpair.z, exception});

Datei anzeigen

@ -6,21 +6,21 @@ Subject: [PATCH] Don't nest if we don't need to when cerealising text
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
index cfcdb21f48f74ea1638907e966f06c4aee072d34..365cf8486d690029a48b771a6186118a28eba7d4 100644
index b0052398d7ff954c2a7943ea4618d26f45d701da..50b691fd4086a9b049c83936abfee9ae0414837d 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
@@ -16,7 +16,7 @@ public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.a
@@ -13,7 +13,7 @@ public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.a
}
public ClientboundSystemChatPacket(net.md_5.bungee.api.chat.BaseComponent[] content, int typeId) {
- this(null, net.md_5.bungee.chat.ComponentSerializer.toString(content), typeId); // Paper - Adventure
+ this(null, improveBungeeComponentSerialization(content), typeId); // Paper - Adventure & don't nest if we don't need to so that we can preserve formatting
public ClientboundSystemChatPacket(net.md_5.bungee.api.chat.BaseComponent[] content, boolean overlay) {
- this(null, net.md_5.bungee.chat.ComponentSerializer.toString(content), overlay); // Paper - Adventure
+ this(null, improveBungeeComponentSerialization(content), overlay); // Paper - Adventure
}
// Spigot end
// Paper start
@@ -27,6 +27,14 @@ public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.a
public ClientboundSystemChatPacket(net.kyori.adventure.text.Component content, int typeId) {
this(content, null, typeId);
@@ -24,6 +24,14 @@ public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.a
public ClientboundSystemChatPacket(net.kyori.adventure.text.Component content, boolean overlay) {
this(content, null, overlay);
}
+
+ private static String improveBungeeComponentSerialization(net.md_5.bungee.api.chat.BaseComponent[] content) {

Datei anzeigen

@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 7953111f8d00413b39a17d2b09b1b74b55c2ab63..380b7a31bae4d63248f8473dcbb602f4abbd4dd8 100644
index d95f2f0757a339917ff8061ae3cf169bbed054bf..0f50355ea57101e71df6990c1e19c7b927f5c306 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2578,6 +2578,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2575,6 +2575,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Nullable
public Team getTeam() {
@ -23,7 +23,7 @@ index 7953111f8d00413b39a17d2b09b1b74b55c2ab63..380b7a31bae4d63248f8473dcbb602f4
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9cdf8a51268fdfefa6efc34a82d4fccb3593dc71..30198bf3d05da6e05cca08a8e5f39edc964cb356 100644
index c1c0757852c4925bcd1debe79a3946c972c4be70..d6e5f48fca5a965fc073ecca29ba5e24a4cd52f2 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -823,6 +823,7 @@ public abstract class LivingEntity extends Entity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4edfafdb3b38c27fb8a9c588c83ff0e6b67956ea..2266ddf2ed66dfc9f82facddcbe6fcc89e1c0267 100644
index e9999a52a0f54c47e973bc22fa91465e8e993b1c..02b5b4c3ae00354d105c5f7f47d01317f1097922 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1687,8 +1687,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -1753,8 +1753,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
}
@ -23,7 +23,7 @@ index 4edfafdb3b38c27fb8a9c588c83ff0e6b67956ea..2266ddf2ed66dfc9f82facddcbe6fcc8
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 00576a1d65b0e8f32af739c6f0383e2418360132..8ad19c44e4cfa39f81f8fc5e6a13e2649b6b0a3c 100644
index 797c6f7e055cc2579db5f20b393f8011bc62eadb..946f68af7d9b7f812675eeda02cc6ac37d839917 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -144,6 +144,7 @@ import org.bukkit.plugin.Plugin;