diff options
author | Lulu13022002 <[email protected]> | 2024-08-14 21:26:38 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-14 21:26:38 +0200 |
commit | 11b4ac7c659ffb7e4790b0856b14117b6d532200 (patch) | |
tree | a10c77dfa5164c1cc82d641e8f88e62f1a8d60d0 | |
parent | 9ab644ed290542a9e537d8f529bc6898a3da2e7d (diff) | |
download | Paper-11b4ac7c659ffb7e4790b0856b14117b6d532200.tar.gz Paper-11b4ac7c659ffb7e4790b0856b14117b6d532200.zip |
Fix disableEndCredits world config (#11261)
20 files changed, 67 insertions, 67 deletions
diff --git a/patches/server/0041-Configurable-end-credits.patch b/patches/server/0041-Configurable-end-credits.patch index e3957bbc6c..65f5ee3bd5 100644 --- a/patches/server/0041-Configurable-end-credits.patch +++ b/patches/server/0041-Configurable-end-credits.patch @@ -4,15 +4,15 @@ Date: Wed, 16 Mar 2016 02:21:39 -0500 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 ee5188f3aa2ff71306f5af8046e8ddf919c8601b..decd0dd48d8b77126b184ee21ceaf6c387085946 100644 ---- a/src/main/java/net/minecraft/server/level/ServerPlayer.java -+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1162,6 +1162,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { - this.unRide(); - this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); - if (!this.wonGame) { -+ if (this.level().paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Option to disable end credits - this.wonGame = true; - this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, 0.0F)); - this.seenCredits = true; +diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java +index e2d6693da4abe6204c0ecb5e924a3903fa80ab7d..a9c7a74b38a57c118c1ad67a77ba6f2e5c05d91e 100644 +--- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java +@@ -71,6 +71,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { + if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) { + ServerPlayer entityplayer = (ServerPlayer) entity; + ++ if (world.paperConfig().misc.disableEndCredits) entityplayer.seenCredits = true; // Paper - Option to disable end credits + if (!entityplayer.seenCredits) { + entityplayer.showEndCredits(); + return; diff --git a/patches/server/0048-Use-null-Locale-by-default.patch b/patches/server/0048-Use-null-Locale-by-default.patch index 2daeb821c5..3fcadee5b5 100644 --- a/patches/server/0048-Use-null-Locale-by-default.patch +++ b/patches/server/0048-Use-null-Locale-by-default.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use null Locale by default diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index decd0dd48d8b77126b184ee21ceaf6c387085946..e61460a06708429738e0ed5f903a4226158aa334 100644 +index ee5188f3aa2ff71306f5af8046e8ddf919c8601b..13a069483db22f25008bf4081d4aa2b36a75bc68 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -237,7 +237,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @@ -26,7 +26,7 @@ index decd0dd48d8b77126b184ee21ceaf6c387085946..e61460a06708429738e0ed5f903a4226 this.lastSectionPos = SectionPos.of(0, 0, 0); this.chunkTrackingView = ChunkTrackingView.EMPTY; this.respawnDimension = Level.OVERWORLD; -@@ -2052,7 +2052,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2051,7 +2051,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); this.server.server.getPluginManager().callEvent(event); } diff --git a/patches/server/0120-Properly-fix-item-duplication-bug.patch b/patches/server/0120-Properly-fix-item-duplication-bug.patch index 2a12aa436f..95bf2bd4b5 100644 --- a/patches/server/0120-Properly-fix-item-duplication-bug.patch +++ b/patches/server/0120-Properly-fix-item-duplication-bug.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ed920ed90569b7b8886a09a1c3772fd7147d44f9..9b2861b7894a634ce60a2675ee25c949d6e63ea0 100644 +index 984dc7f7f7315b8a8cdb9744ef8454a330888ba7..f067b10e13f01e751fc4ebf088740c7d40afcb99 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2628,7 +2628,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2627,7 +2627,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @Override public boolean isImmobile() { diff --git a/patches/server/0122-PlayerTeleportEndGatewayEvent.patch b/patches/server/0122-PlayerTeleportEndGatewayEvent.patch index d7fec65674..69691d8630 100644 --- a/patches/server/0122-PlayerTeleportEndGatewayEvent.patch +++ b/patches/server/0122-PlayerTeleportEndGatewayEvent.patch @@ -7,10 +7,10 @@ Allows you to access the Gateway being used in a teleport event Fix the offset used for player teleportation diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 9b2861b7894a634ce60a2675ee25c949d6e63ea0..a049a54ee70839706787f8de661ca6e6b1f54071 100644 +index f067b10e13f01e751fc4ebf088740c7d40afcb99..e13692373d0efba9402c35ae5cce615dce0a5e1e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1193,11 +1193,22 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1192,11 +1192,22 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { ResourceKey<LevelStem> resourcekey = worldserver1.getTypeKey(); if (worldserver != null && worldserver.dimension() == worldserver1.dimension()) { // CraftBukkit diff --git a/patches/server/0208-InventoryCloseEvent-Reason-API.patch b/patches/server/0208-InventoryCloseEvent-Reason-API.patch index 080360b9f4..04cfe0f0de 100644 --- a/patches/server/0208-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0208-InventoryCloseEvent-Reason-API.patch @@ -29,7 +29,7 @@ index 1fac100819e59d00f50e530d3a4157b56d966dba..4f777c9d8c3052f68bc0465c8a7386b8 } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index db72318d822b876eb937f0f0f7f2b2139fb77df7..a3a1450949703851625bbb257e92b3be4d79a06a 100644 +index fb5130b6378554ccb23fb7992e408497ca093ff3..0dee94f1dd27a0d7e709367450c5ef7956e27217 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -705,7 +705,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @@ -50,7 +50,7 @@ index db72318d822b876eb937f0f0f7f2b2139fb77df7..a3a1450949703851625bbb257e92b3be } net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure -@@ -1592,7 +1592,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1591,7 +1591,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } // CraftBukkit end if (this.containerMenu != this.inventoryMenu) { @@ -59,7 +59,7 @@ index db72318d822b876eb937f0f0f7f2b2139fb77df7..a3a1450949703851625bbb257e92b3be } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1622,7 +1622,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1621,7 +1621,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @Override public void closeContainer() { @@ -165,7 +165,7 @@ index 2e02fc22a889c9c8010ae8bff1b59a13219ae014..703bb1bb42b1668c04824489fd2f3490 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 326f36726c124385145c469566c2089439b5dd0f..0b4c5a2604f61a34b5666a9a83a2e644449997fd 100644 +index 4e5dba1da323f12d77a36635c9227b1239856254..12c61db6d4b1284765f9bed3ae26131a118b318e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1273,7 +1273,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -178,7 +178,7 @@ index 326f36726c124385145c469566c2089439b5dd0f..0b4c5a2604f61a34b5666a9a83a2e644 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index e1b7bd5c23ba79b84ad257b7fb45e251da3978e5..ad271871b207b425ef8d599fe74a67d065d66686 100644 +index 9225746382bcecb0bab655a8232fecc09169225d..bf3995795295c3224db97e4d6809c0f5da6ce55c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1281,7 +1281,7 @@ public class CraftEventFactory { diff --git a/patches/server/0256-Call-player-spectator-target-events-and-improve-impl.patch b/patches/server/0256-Call-player-spectator-target-events-and-improve-impl.patch index 17c81b197d..b29358d325 100644 --- a/patches/server/0256-Call-player-spectator-target-events-and-improve-impl.patch +++ b/patches/server/0256-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf <[email protected]> diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ff3f70b8c266dc3b2ab374ffd6905ecbfe8510be..29dc317d43532399651719d45ca05b086043ae6b 100644 +index fa8640f961b93dc811296131dfda58faa1908add..15328d344a26f5c40011ee6ba0bc54dd5ab0b87b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2183,6 +2183,21 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2182,6 +2182,21 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.camera = (Entity) (entity == null ? this : entity); if (entity1 != this.camera) { diff --git a/patches/server/0260-Reset-players-airTicks-on-respawn.patch b/patches/server/0260-Reset-players-airTicks-on-respawn.patch index 1707fb452b..0669db4de0 100644 --- a/patches/server/0260-Reset-players-airTicks-on-respawn.patch +++ b/patches/server/0260-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 29dc317d43532399651719d45ca05b086043ae6b..1108fa6c7ac28304d104d4e5df2bdf4e9a6bd929 100644 +index 15328d344a26f5c40011ee6ba0bc54dd5ab0b87b..7cca5c778f9d20cfa6cb543c9afcf74779aaa355 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2704,6 +2704,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2703,6 +2703,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.setHealth(this.getMaxHealth()); this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset diff --git a/patches/server/0268-force-entity-dismount-during-teleportation.patch b/patches/server/0268-force-entity-dismount-during-teleportation.patch index 0bdcf9e117..a91a738571 100644 --- a/patches/server/0268-force-entity-dismount-during-teleportation.patch +++ b/patches/server/0268-force-entity-dismount-during-teleportation.patch @@ -20,10 +20,10 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 1108fa6c7ac28304d104d4e5df2bdf4e9a6bd929..b4947ee9615b1b2108046b9ab87b65b53dbb23f6 100644 +index 7cca5c778f9d20cfa6cb543c9afcf74779aaa355..c2571855ca6a8ecd144b8fbb97d601d1808e8d61 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2523,9 +2523,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2522,9 +2522,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @Override public void stopRiding() { @@ -106,7 +106,7 @@ index 7fd1a75ba0068ee3ca6c29a550a9a1b33c5cacc5..f330ddca00ed11bf76ae825820423b94 if (this.valid) { Bukkit.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 43eddcd8496ff2f089119f6632acfe1b56466c3d..e047911c7faa3cdcd3df8899857fcadf3eec3d89 100644 +index 689aaf4ceedc598fe71db726215cceae6cc97296..fad0445628499ac14cd9d8ab7f618c490885e798 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3619,9 +3619,15 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0273-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/patches/server/0273-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index c321bed5e2..a8477b1786 100644 --- a/patches/server/0273-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/patches/server/0273-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index dbdc6b4065acc363c128580fdffe9049259386c2..afed961e6714abc1a1709d12973cbfae40b950fa 100644 +index bd130d3a4d0cfe431be627c3f4d85bb394fe099b..ad2b8ea068469f2b0597c0e0436ad3c94dcb62ea 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1834,6 +1834,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1833,6 +1833,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { public void disconnect() { this.disconnected = true; this.ejectPassengers(); diff --git a/patches/server/0340-Prevent-opening-inventories-when-frozen.patch b/patches/server/0340-Prevent-opening-inventories-when-frozen.patch index c714d1fde8..1e3d68bf93 100644 --- a/patches/server/0340-Prevent-opening-inventories-when-frozen.patch +++ b/patches/server/0340-Prevent-opening-inventories-when-frozen.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 9b6887f40dea57d4b5e2f08d7645b1edfaa5b189..d164ae1b965310a260f79240b6e2fd4ddd7249f3 100644 +index f8d4bd18f98ed914e116d0cc4a80140e4e8d759f..7daa310dd5d3eb1befb9983ce85e0354771af71d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -710,7 +710,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @@ -17,7 +17,7 @@ index 9b6887f40dea57d4b5e2f08d7645b1edfaa5b189..d164ae1b965310a260f79240b6e2fd4d this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason this.containerMenu = this.inventoryMenu; } -@@ -1635,7 +1635,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1634,7 +1634,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } else { // CraftBukkit start this.containerMenu = container; diff --git a/patches/server/0342-Implement-Player-Client-Options-API.patch b/patches/server/0342-Implement-Player-Client-Options-API.patch index 978b47f364..e7bff21f02 100644 --- a/patches/server/0342-Implement-Player-Client-Options-API.patch +++ b/patches/server/0342-Implement-Player-Client-Options-API.patch @@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d164ae1b965310a260f79240b6e2fd4ddd7249f3..a794131746c6cfdcbeeb64b31fb122a38be085c1 100644 +index 7daa310dd5d3eb1befb9983ce85e0354771af71d..8938f90c53de8aef71aa70522a66a69edb467e73 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -359,7 +359,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @@ -99,7 +99,7 @@ index d164ae1b965310a260f79240b6e2fd4ddd7249f3..a794131746c6cfdcbeeb64b31fb122a3 this.object = null; // CraftBukkit start -@@ -2147,7 +2147,23 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2146,7 +2146,23 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } } @@ -123,7 +123,7 @@ index d164ae1b965310a260f79240b6e2fd4ddd7249f3..a794131746c6cfdcbeeb64b31fb122a3 // CraftBukkit start if (this.getMainArm() != clientOptions.mainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); -@@ -2158,6 +2174,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2157,6 +2173,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.server.server.getPluginManager().callEvent(event); } // CraftBukkit end @@ -136,7 +136,7 @@ index d164ae1b965310a260f79240b6e2fd4ddd7249f3..a794131746c6cfdcbeeb64b31fb122a3 this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // Paper this.requestedViewDistance = clientOptions.viewDistance(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d29107105b7bc56b50864777f32420d0c7f379dc..8c61e7a1681cbf4c2fd153d9cba5929bc853235a 100644 +index d0af4b838bd43ef2388e918ac14e7acec71b63ef..b9487ce9391413c4c596cc5450ed5c396347ec1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -653,6 +653,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0485-Reset-shield-blocking-on-dimension-change.patch b/patches/server/0485-Reset-shield-blocking-on-dimension-change.patch index fc78073d82..f0f37986b6 100644 --- a/patches/server/0485-Reset-shield-blocking-on-dimension-change.patch +++ b/patches/server/0485-Reset-shield-blocking-on-dimension-change.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset shield blocking on dimension change diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c973b003ea22a37e841b20ca8b9e2915264820cf..433102e21d18bbfc3cba9abf9f9a760a71d2ba74 100644 +index 2ea613f818403f8e8ece4b36891738139345cf89..fffd3ae6c4fc0b86057cd915bb4f0987f41a64d0 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1350,6 +1350,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1349,6 +1349,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.level().getCraftServer().getPluginManager().callEvent(changeEvent); // CraftBukkit end diff --git a/patches/server/0534-Expand-PlayerGameModeChangeEvent.patch b/patches/server/0534-Expand-PlayerGameModeChangeEvent.patch index e5d13e061d..e24fdaca27 100644 --- a/patches/server/0534-Expand-PlayerGameModeChangeEvent.patch +++ b/patches/server/0534-Expand-PlayerGameModeChangeEvent.patch @@ -45,10 +45,10 @@ index 7f09119bc7d661e08a960dd2bd46006efe752d3e..d1da3600dc07107309b20ebe6e7c0c4d } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 6b2c82d80bc673a74ae894f794eb50402b9cc30d..da783ccab230197a4258a2e8509ad893d5417c18 100644 +index 52a5274fb811870481a48bf0505769d7ac5df31f..42df8d45ceb963043cf6467b8fc47272ce0873da 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2085,10 +2085,18 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2084,10 +2084,18 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } public boolean setGameMode(GameType gameMode) { @@ -69,7 +69,7 @@ index 6b2c82d80bc673a74ae894f794eb50402b9cc30d..da783ccab230197a4258a2e8509ad893 } else { this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId())); if (gameMode == GameType.SPECTATOR) { -@@ -2104,7 +2112,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2103,7 +2111,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.onUpdateAbilities(); this.updateEffectVisibility(); @@ -78,7 +78,7 @@ index 6b2c82d80bc673a74ae894f794eb50402b9cc30d..da783ccab230197a4258a2e8509ad893 } } -@@ -2510,6 +2518,16 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2509,6 +2517,16 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } public void loadGameTypes(@Nullable CompoundTag nbt) { @@ -134,7 +134,7 @@ index 5de472df78940d1b8320f73d18b2edf3a796227e..073cf184a0e7af41048ae67a9b17b4cd } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4ed4a2f5f03790fab394429334881377c1b3ab60..e91200b8b1da00b4b13697e950433de661a4e419 100644 +index 7721d329e9949bf84f31792d4c06ab9e04ab4ade..75cb96d392eff322eb93894b5c2b5ad22c3fd261 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2727,7 +2727,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -147,7 +147,7 @@ index 4ed4a2f5f03790fab394429334881377c1b3ab60..e91200b8b1da00b4b13697e950433de6 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 963ae66acc25602e15134d30d3e496802b17dc41..3f603688b9ad895edc2bfc07093c42bc17a35b19 100644 +index 3bc62788d63e98eb9b2a2b381272b262040dcb5f..c9dc7c570e86f420cf8c6343c6ffbdbca427e7a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1654,7 +1654,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0559-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0559-Fix-PlayerDropItemEvent-using-wrong-item.patch index 75e9f5ab62..8f8228a1d4 100644 --- a/patches/server/0559-Fix-PlayerDropItemEvent-using-wrong-item.patch +++ b/patches/server/0559-Fix-PlayerDropItemEvent-using-wrong-item.patch @@ -31,10 +31,10 @@ index c81fd3e1108fb0a02f9240263404af2b968c8494..0d9de4c61c7b26a6ff37c12fde629161 } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index da783ccab230197a4258a2e8509ad893d5417c18..38d493b03c02bbfed297b7735590e799d26c07f7 100644 +index 42df8d45ceb963043cf6467b8fc47272ce0873da..f20019261a09f425137731f7a4b92e889b617334 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2487,7 +2487,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2486,7 +2486,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { if (flag1) { if (!itemstack1.isEmpty()) { diff --git a/patches/server/0566-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0566-Don-t-apply-cramming-damage-to-players.patch index c95ca38ef7..f23c0c584f 100644 --- a/patches/server/0566-Don-t-apply-cramming-damage-to-players.patch +++ b/patches/server/0566-Don-t-apply-cramming-damage-to-players.patch @@ -11,7 +11,7 @@ It does not make a lot of sense to damage players if they get crammed, For those who really want it a config option is provided. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 09e72aee16ceb7b300482fbaf28f856d4ed472d3..e9eec0e4e2e533e4ddc7f52a16a1b2b1ce21d6da 100644 +index 9982940af7d10ca7799e2c21ac994ea3afa0b805..d1b21afe48dbe1e53d4a046434336be580497165 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -95,6 +95,7 @@ import net.minecraft.util.Mth; @@ -22,7 +22,7 @@ index 09e72aee16ceb7b300482fbaf28f856d4ed472d3..e9eec0e4e2e533e4ddc7f52a16a1b2b1 import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; -@@ -1546,7 +1547,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1545,7 +1546,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @Override public boolean isInvulnerableTo(DamageSource damageSource) { diff --git a/patches/server/0573-Add-PlayerSetSpawnEvent.patch b/patches/server/0573-Add-PlayerSetSpawnEvent.patch index 75839ec637..4e745dc806 100644 --- a/patches/server/0573-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0573-Add-PlayerSetSpawnEvent.patch @@ -49,10 +49,10 @@ index a2d0699e8427b2262a2396495111125eccafbb66..15db9368227dbc29d07d74e85bd126b3 } } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e9eec0e4e2e533e4ddc7f52a16a1b2b1ce21d6da..db4bdce4eae9a91babe95c28cb0f6c96ab5f10df 100644 +index d1b21afe48dbe1e53d4a046434336be580497165..2dd10cada8d36ed5565481f3f5a5fba168ba9b26 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1423,7 +1423,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1422,7 +1422,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } else if (this.bedBlocked(blockposition, enumdirection)) { return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.OBSTRUCTED); } else { @@ -61,7 +61,7 @@ index e9eec0e4e2e533e4ddc7f52a16a1b2b1ce21d6da..db4bdce4eae9a91babe95c28cb0f6c96 if (this.level().isDay()) { return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.NOT_POSSIBLE_NOW); } else { -@@ -2400,44 +2400,50 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2399,44 +2399,50 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.setRespawnPosition(player.getRespawnDimension(), player.getRespawnPosition(), player.getRespawnAngle(), player.isRespawnForced(), false); } @@ -145,7 +145,7 @@ index e9eec0e4e2e533e4ddc7f52a16a1b2b1ce21d6da..db4bdce4eae9a91babe95c28cb0f6c96 } else { this.respawnPosition = null; this.respawnDimension = Level.OVERWORLD; -@@ -2445,6 +2451,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -2444,6 +2450,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.respawnForced = false; } @@ -187,7 +187,7 @@ index ba22ad1e4253477572d10d71db6db0ebc14d6755..94d067e9eeee73183de25165d8c97043 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6bc3209b6039ed3d33131e1c6bc56a47916be3ee..37f220976b1f1b0a423d7354e6730b6ad8096495 100644 +index 7fb6bfe2863d856f27da29a77026f4bc821c929c..2f9c5d6825795b6dc8074d04bec944f93ac71a5a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1413,9 +1413,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0598-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0598-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index eb56ff1385..22f86aa476 100644 --- a/patches/server/0598-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0598-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -28,10 +28,10 @@ index 778d3f3ea2247be5bd6edd382b872f6de5bc359c..de154106419d57a6b6c410fedc29cec1 } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index db4bdce4eae9a91babe95c28cb0f6c96ab5f10df..0d5870ef02467d88cfeccf5aa953fcbcdf43117f 100644 +index 2dd10cada8d36ed5565481f3f5a5fba168ba9b26..6648af4d8d795637fae444dc85803b399592fd7d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1716,6 +1716,18 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1715,6 +1715,18 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId)); this.doCloseContainer(); } diff --git a/patches/server/0713-Add-option-for-strict-advancement-dimension-checks.patch b/patches/server/0713-Add-option-for-strict-advancement-dimension-checks.patch index 238d672cce..488f84c884 100644 --- a/patches/server/0713-Add-option-for-strict-advancement-dimension-checks.patch +++ b/patches/server/0713-Add-option-for-strict-advancement-dimension-checks.patch @@ -24,10 +24,10 @@ index 01b8f7024fbc965bc6a7f97f79ba3dec964ef769..801823d003a8e28a13fe90db4604cd09 } else { BlockPos blockPos = BlockPos.containing(x, y, z); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e87c005cf0e82ce56ca99dd40c1dea161faeedda..10ad431d66fcf603f672611759fccb1e2e41cffe 100644 +index f31eb944465e9011d8aad398eb60bafb44203ad5..ad3896dd524acb573adffdfb38b13dd699539cef 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1388,6 +1388,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1387,6 +1387,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin); ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level()); diff --git a/patches/server/0786-Improve-PortalEvents.patch b/patches/server/0786-Improve-PortalEvents.patch index 53e3b1ff5f..888317113e 100644 --- a/patches/server/0786-Improve-PortalEvents.patch +++ b/patches/server/0786-Improve-PortalEvents.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7604aef2e03e7d688e7b6504283ed631488ec2d6..6868025551065e0c9418b9e1387579b6bd35923b 100644 +index 96dff63230e8cda1f5e548d914c119bd64b5ac33..7270b6fa96bae937663c0fea77887e21fbd0eb57 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1341,7 +1341,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1340,7 +1340,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } // CraftBukkit start Location enter = this.getBukkitEntity().getLocation(); @@ -54,7 +54,7 @@ index 11486419dd98a013c7387d3d73f322a95a18c574..3f5bb5c9ceb5b31fcc9ef0a7a6157e1e if (!world.isClientSide && tileentity instanceof TheEndGatewayBlockEntity) { diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java -index cff3e9869340f1ffb7093431cbe1ac5e67792a4e..6937d334b70791c094f6b752373225cfb64ee7ac 100644 +index 28fba1448309805fc3d687de6bc8454d2c85fcd3..a35a426cc7778a51523f26057b5d61b8a3e23d5d 100644 --- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java @@ -66,8 +66,9 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { @@ -68,7 +68,7 @@ index cff3e9869340f1ffb7093431cbe1ac5e67792a4e..6937d334b70791c094f6b752373225cf // CraftBukkit end if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -89,7 +90,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { +@@ -90,7 +91,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { ServerLevel worldserver1 = world.getServer().getLevel(resourcekey); if (worldserver1 == null) { diff --git a/patches/server/0879-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0879-Add-titleOverride-to-InventoryOpenEvent.patch index e9c3aa9d42..0d8a9544c7 100644 --- a/patches/server/0879-Add-titleOverride-to-InventoryOpenEvent.patch +++ b/patches/server/0879-Add-titleOverride-to-InventoryOpenEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add titleOverride to InventoryOpenEvent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index dc4a01f433bab7e8ecf6a156b748a0db784130e5..f56fc6bc4da573cd73c72e3c61a96c4f1eebeb94 100644 +index 530728cd4b258444f6efe064903b521f4b23cd04..b65d816bb9feb18ecf74e10e9728c302e5657587 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1657,12 +1657,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1656,12 +1656,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.nextContainerCounter(); AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this); @@ -27,7 +27,7 @@ index dc4a01f433bab7e8ecf6a156b748a0db784130e5..f56fc6bc4da573cd73c72e3c61a96c4f if (container == null && !cancelled) { // Let pre-cancelled events fall through // SPIGOT-5263 - close chest if cancelled if (factory instanceof Container) { -@@ -1684,7 +1689,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1683,7 +1688,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } else { // CraftBukkit start this.containerMenu = container; @@ -79,7 +79,7 @@ index 12ab8f7cde88cd6ce3ad474fe2843d5d30c3c0d7..c1bad887d1340ebc7c63fda3dceff929 if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen player.containerMenu = container; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3dae4bc26ac6de7ee07eeca7763e2078cb2b7101..a8365c67e28d530734b8527ce67d83decee41beb 100644 +index e5fa1ece90c38bb73bba5721e6f8d4ea240a1d6d..786b3c60086faee8d6ee23c862f3ad7ff4f3581e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1401,10 +1401,21 @@ public class CraftEventFactory { |