aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0010-Adventure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r--patches/server/0010-Adventure.patch46
1 files changed, 24 insertions, 22 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch
index aa725c31cf..f778dc3ba4 100644
--- a/patches/server/0010-Adventure.patch
+++ b/patches/server/0010-Adventure.patch
@@ -3081,10 +3081,10 @@ index b23480fab4a7cba922b36cb31d4f77f720bf3aac..7dd3dfd2ccc820d45849a89707239b7d
@Override
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87eca2f28a0 100644
+index 2e8e786407869b53cb4d7e4ec8f91fe0a3ad8e1a..5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -269,7 +269,7 @@ public abstract class PlayerList {
+@@ -270,7 +270,7 @@ public abstract class PlayerList {
}
// CraftBukkit start
ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
@@ -3093,7 +3093,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
ServerStatus serverping = this.server.getStatus();
-@@ -290,19 +290,18 @@ public abstract class PlayerList {
+@@ -291,19 +291,18 @@ public abstract class PlayerList {
// Ensure that player inventory is populated with its viewer
player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
@@ -3118,7 +3118,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
// CraftBukkit end
-@@ -500,7 +499,7 @@ public abstract class PlayerList {
+@@ -501,7 +500,7 @@ public abstract class PlayerList {
}
@@ -3127,7 +3127,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
ServerLevel worldserver = entityplayer.serverLevel();
entityplayer.awardStat(Stats.LEAVE_GAME);
-@@ -511,7 +510,7 @@ public abstract class PlayerList {
+@@ -512,7 +511,7 @@ public abstract class PlayerList {
entityplayer.closeContainer();
}
@@ -3136,7 +3136,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
this.cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
-@@ -564,7 +563,7 @@ public abstract class PlayerList {
+@@ -565,7 +564,7 @@ public abstract class PlayerList {
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
// CraftBukkit end
@@ -3145,7 +3145,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
-@@ -610,10 +609,10 @@ public abstract class PlayerList {
+@@ -611,11 +610,11 @@ public abstract class PlayerList {
}
// return chatmessage;
@@ -3154,11 +3154,13 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
} else if (!this.isWhiteListed(gameprofile)) {
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted");
- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot
+- } else if (this.ipBans.isBanned(socketaddress)) {
+ event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure
- } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
++ } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
-@@ -623,17 +622,17 @@ public abstract class PlayerList {
+ ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
+@@ -624,17 +623,17 @@ public abstract class PlayerList {
}
// return chatmessage;
@@ -3179,7 +3181,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
return null;
}
return entity;
-@@ -1153,7 +1152,7 @@ public abstract class PlayerList {
+@@ -1154,7 +1153,7 @@ public abstract class PlayerList {
public void removeAll() {
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
@@ -3188,7 +3190,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
// CraftBukkit end
-@@ -1194,24 +1193,43 @@ public abstract class PlayerList {
+@@ -1195,24 +1194,43 @@ public abstract class PlayerList {
}
public void broadcastChatMessage(PlayerChatMessage message, ServerPlayer sender, ChatType.Bound params) {
@@ -3235,7 +3237,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
if (flag1 && sender != null) {
-@@ -1220,7 +1238,7 @@ public abstract class PlayerList {
+@@ -1221,7 +1239,7 @@ public abstract class PlayerList {
}
@@ -3759,10 +3761,10 @@ index 459e134e96121e611dd864f66a3f2cb64dbaf61c..ecb6f846cdaa2e9f01853001b1626315
public String getCustomName() {
EnchantmentTableBlockEntity enchant = this.getSnapshot();
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-index 1791d435552b812856f38dc6d8a97182b1a8eb12..94caa0915e1a9ec1c46c7a0380db840901cc8063 100644
+index 87b415c4d7abb32afc74986ff3de4a75987d2a68..d1b335d7342aa85478daeb7801a999ccd4be7136 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-@@ -33,6 +33,23 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
+@@ -35,6 +35,23 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
this.back = new CraftSignSide(this.getSnapshot().getBackText());
}
@@ -3786,7 +3788,7 @@ index 1791d435552b812856f38dc6d8a97182b1a8eb12..94caa0915e1a9ec1c46c7a0380db8409
@Override
public String[] getLines() {
return this.front.getLines();
-@@ -132,6 +149,20 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
+@@ -155,6 +172,20 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
}
@@ -4054,10 +4056,10 @@ index 24052b8102061c6fbf01b3e9b2346ed9783787e6..f0f7fb977edb7e7009716429f007e44f
@Override
public boolean equals(Object other) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a58325fa3 100644
+index 7126d8cdeea5eb23176af6a97a99b33961749d71..e78a378f0de48cde3702774970e6cda241b8ddda 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -66,6 +66,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -67,6 +67,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private final EntityType entityType;
private EntityDamageEvent lastDamageEvent;
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
@@ -4065,7 +4067,7 @@ index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a
public CraftEntity(final CraftServer server, final Entity entity) {
this.server = server;
-@@ -522,6 +523,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -523,6 +524,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.getHandle().getVehicle().getBukkitEntity();
}
@@ -4098,7 +4100,7 @@ index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a
@Override
public void setCustomName(String name) {
// sane limit for name length
-@@ -618,6 +645,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -619,6 +646,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public String getName() {
return CraftChatMessage.fromComponent(this.getHandle().getName());
}
@@ -4702,10 +4704,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
@Override
public int getLineWidth() {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 249d271338a75c49ec9bc886d034af637618bc7b..da100f451238a093bcaad83343a79254d4aa31ce 100644
+index 2496f4462b35a7297dd9320c35f109d3c2a9867f..6571adf5285ab3f84513c2f5b32ff0523c2cccd6 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -904,7 +904,7 @@ public class CraftEventFactory {
+@@ -905,7 +905,7 @@ public class CraftEventFactory {
return event;
}
@@ -4714,7 +4716,7 @@ index 249d271338a75c49ec9bc886d034af637618bc7b..da100f451238a093bcaad83343a79254
CraftPlayer entity = victim.getBukkitEntity();
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
event.setKeepInventory(keepInventory);
-@@ -931,7 +931,7 @@ public class CraftEventFactory {
+@@ -932,7 +932,7 @@ public class CraftEventFactory {
* Server methods
*/
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {