From 6a684c6f7544f38940b4264fda75ef4c021d6ad2 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:00:31 +0800 Subject: [PATCH] Update Paper --- gradle.properties | 2 +- .../0005-Force-peaceful-mode-switch.patch | 4 +- .../0004-Fix-trading-with-the-void.patch | 4 +- .../features/0006-Leaves-Fakeplayer.patch | 14 +++--- ...Add-isShrink-to-EntityResurrectEvent.patch | 4 +- .../features/0047-Creative-fly-no-clip.patch | 6 +-- ...050-Elytra-aeronautics-no-chunk-load.patch | 10 ++-- .../0053-No-block-update-command.patch | 4 +- .../0062-Optimize-sun-burn-tick.patch | 4 +- ...Skip-entity-move-if-movement-is-zero.patch | 6 +-- ...69-Fix-villagers-dont-release-memory.patch | 4 +- .../features/0071-Bow-infinity-fix.patch | 6 +-- .../features/0074-Replay-Mod-API.patch | 8 ++-- .../features/0090-Servux-Protocol.patch | 4 +- ...8-Fix-falling-block-s-block-location.patch | 4 +- .../features/0101-Configurable-MC-67.patch | 4 +- ...0112-Fix-EntityPortalExitEvent-logic.patch | 4 +- .../0115-Dont-save-Entity-tickCount.patch | 31 ------------- ...-GameEventListener-register-on-load.patch} | 0 .../minecraft/world/entity/Entity.java.patch | 8 ++-- .../features/0005-Leaves-Fakeplayer.patch | 16 +++---- .../0011-Force-peaceful-mode-switch.patch | 4 +- .../features/0015-Leaves-plugins.patch | 46 +++++++++---------- 23 files changed, 83 insertions(+), 114 deletions(-) delete mode 100644 leaves-server/minecraft-patches/features/0115-Dont-save-Entity-tickCount.patch rename leaves-server/minecraft-patches/features/{0116-Fix-Warden-GameEventListener-register-on-load.patch => 0115-Fix-Warden-GameEventListener-register-on-load.patch} (100%) diff --git a/gradle.properties b/gradle.properties index f4df9a3d..25205f01 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group=org.leavesmc.leaves version=1.21.4-R0.1-SNAPSHOT mcVersion=1.21.4 -paperRef=46f4fdaae3661941ac86f2157e625d907fdd8e81 +paperRef=8eb8e44ac32a99f53da7af50e800ac8831030580 preVersion=true org.gradle.jvmargs=-Xmx2G org.gradle.caching=true diff --git a/leaves-api/paper-patches/features/0005-Force-peaceful-mode-switch.patch b/leaves-api/paper-patches/features/0005-Force-peaceful-mode-switch.patch index 71ccc163..43817f44 100644 --- a/leaves-api/paper-patches/features/0005-Force-peaceful-mode-switch.patch +++ b/leaves-api/paper-patches/features/0005-Force-peaceful-mode-switch.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Force peaceful mode switch diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 2729f71ac5525b7669fb7cc8719a75e5ce8d1dfc..f150caee08d5069e9e92bb09040522513097cff5 100644 +index 015d852d5a0c01042a2153a6916d408660356c59..41c3c561d3d23136fbfa19c23d5e82ab1f2f06f3 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4323,6 +4323,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4346,6 +4346,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient void setSendViewDistance(int viewDistance); // Paper end - view distance api diff --git a/leaves-server/minecraft-patches/features/0004-Fix-trading-with-the-void.patch b/leaves-server/minecraft-patches/features/0004-Fix-trading-with-the-void.patch index dca99681..07b30670 100644 --- a/leaves-server/minecraft-patches/features/0004-Fix-trading-with-the-void.patch +++ b/leaves-server/minecraft-patches/features/0004-Fix-trading-with-the-void.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix trading with the void diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 67de67cf1e33672fe33fbb88aeb92e3a020a4ae5..a91136ca7b47b242f8e454f6472fd60712736754 100644 +index e6733c43d582c1c632ad0e6abc99e88e337c8911..ab826bb0da27116fec14179053b2aef7faddca1f 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -2675,11 +2675,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2677,11 +2677,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // Spigot end // Spigot start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message diff --git a/leaves-server/minecraft-patches/features/0006-Leaves-Fakeplayer.patch b/leaves-server/minecraft-patches/features/0006-Leaves-Fakeplayer.patch index 6e77881e..25a3b5a0 100644 --- a/leaves-server/minecraft-patches/features/0006-Leaves-Fakeplayer.patch +++ b/leaves-server/minecraft-patches/features/0006-Leaves-Fakeplayer.patch @@ -131,7 +131,7 @@ index b3f498558614243cf633dcd71e3c49c2c55e6e0f..36c0a690e7e9b301c5a3d63fae2c7cbe } } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index a91136ca7b47b242f8e454f6472fd60712736754..c91d6d24d44b3d718680771b2299f04724c15992 100644 +index ab826bb0da27116fec14179053b2aef7faddca1f..2793045ca4ffa91441dc9346bd3c497699617d02 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -215,6 +215,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -150,7 +150,7 @@ index a91136ca7b47b242f8e454f6472fd60712736754..c91d6d24d44b3d718680771b2299f047 } // Paper start -@@ -2204,6 +2206,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2206,6 +2208,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe return this.players; } @@ -163,7 +163,7 @@ index a91136ca7b47b242f8e454f6472fd60712736754..c91d6d24d44b3d718680771b2299f047 @Override public void onBlockStateChange(BlockPos pos, BlockState blockState, BlockState newState) { Optional> optional = PoiTypes.forState(blockState); -@@ -2618,6 +2626,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2620,6 +2628,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.add(serverPlayer); @@ -175,7 +175,7 @@ index a91136ca7b47b242f8e454f6472fd60712736754..c91d6d24d44b3d718680771b2299f047 ServerLevel.this.updateSleepingPlayerList(); } -@@ -2684,6 +2697,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2686,6 +2699,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ServerLevel.this.getChunkSource().removeEntity(entity); if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.remove(serverPlayer); @@ -338,10 +338,10 @@ index 99e82b35800ef5c1ed24967fe9194aa35d3e2f24..f7db21ff9ce35f4a3b80e1e36366a187 public boolean canBypassPlayerLimit(GameProfile profile) { diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 711e3da3626807d264730c66dd392e27492721e5..83d8bd3e6008a5253ab225a324a393dcddd38789 100644 +index 7f2f95a7dc4a7dc4340159dabb0743b101d55f3d..f0186607153bb1c498833f269eec041cb7db1e11 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1431,7 +1431,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1432,7 +1432,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper start - optimise collisions @@ -351,7 +351,7 @@ index 711e3da3626807d264730c66dd392e27492721e5..83d8bd3e6008a5253ab225a324a393dc final boolean yZero = movement.y == 0.0; final boolean zZero = movement.z == 0.0; diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index c996a547d4448f7e21f8d5ccfe7e0021ccb3c44c..b1c4ac288b71f622b30e896323a8b986aba8d04b 100644 +index a0813aa9ebf5b32375b1bc9f294d8fc34cc867fe..6fa522d6935c277f2fc35bb772aa7b18b4adf6e3 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java @@ -186,7 +186,7 @@ public abstract class Player extends LivingEntity { diff --git a/leaves-server/minecraft-patches/features/0009-Add-isShrink-to-EntityResurrectEvent.patch b/leaves-server/minecraft-patches/features/0009-Add-isShrink-to-EntityResurrectEvent.patch index e711d54f..5fb38ca0 100644 --- a/leaves-server/minecraft-patches/features/0009-Add-isShrink-to-EntityResurrectEvent.patch +++ b/leaves-server/minecraft-patches/features/0009-Add-isShrink-to-EntityResurrectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add isShrink to EntityResurrectEvent diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 239c443ddc9bacc08a39a8ef2ab17016a2480549..985a6428f91c5834f36b5cea632af83f50f49f2d 100644 +index d87e31572aa85bffc62dc017520dd408560f79b4..e34f50a5f488ab676622b6c922577009c3a7f4c8 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java @@ -1595,14 +1595,14 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -17,7 +17,7 @@ index 239c443ddc9bacc08a39a8ef2ab17016a2480549..985a6428f91c5834f36b5cea632af83f event.setCancelled(itemStack == null); this.level().getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { - // Set death protection to null as the event was cancelled. Prevent any attempt at ressurection. + // Set death protection to null as the event was cancelled. Prevent any attempt at resurrection. deathProtection = null; } else { - if (!itemInHand.isEmpty() && itemStack != null) { // Paper - only reduce item if actual totem was found diff --git a/leaves-server/minecraft-patches/features/0047-Creative-fly-no-clip.patch b/leaves-server/minecraft-patches/features/0047-Creative-fly-no-clip.patch index 1330c35c..53d71b75 100644 --- a/leaves-server/minecraft-patches/features/0047-Creative-fly-no-clip.patch +++ b/leaves-server/minecraft-patches/features/0047-Creative-fly-no-clip.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Creative fly no clip diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index f60336d17e4052551ee13d75c047f7b416b72ff4..7c6e0b0179f6c1381956915bd8993f8a75efd818 100644 +index 6fa522d6935c277f2fc35bb772aa7b18b4adf6e3..39fc3ea891947ddd102f992e7b6c62f9367849e7 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java @@ -262,8 +262,8 @@ public abstract class Player extends LivingEntity { @@ -37,7 +37,7 @@ index f60336d17e4052551ee13d75c047f7b416b72ff4..7c6e0b0179f6c1381956915bd8993f8a AABB aabb; if (this.isPassenger() && !this.getVehicle().isRemoved()) { aabb = this.getBoundingBox().minmax(this.getVehicle().getBoundingBox()).inflate(1.0, 0.0, 1.0); -@@ -2042,6 +2042,21 @@ public abstract class Player extends LivingEntity { +@@ -2044,6 +2044,21 @@ public abstract class Player extends LivingEntity { @Override public abstract boolean isSpectator(); @@ -99,7 +99,7 @@ index cc8781c0a357eebc2bff936b4e7be53cc316716d..f5264831b2dc1843b09599086f2bb586 MoverType.SHULKER_BOX, new Vec3( diff --git a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -index 1e6e940fca9d96ef410c7bf05524bd9b24db4a79..362007621cc03ccd4ce7b2c0f77680d25535d7b2 100644 +index ee2f8e8deb35059824b5730a1442f383dc79f01c..841167f3f168ff3129b17e176df476ed7b9aaaf5 100644 --- a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +++ b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java @@ -148,7 +148,7 @@ public class PistonMovingBlockEntity extends BlockEntity { diff --git a/leaves-server/minecraft-patches/features/0050-Elytra-aeronautics-no-chunk-load.patch b/leaves-server/minecraft-patches/features/0050-Elytra-aeronautics-no-chunk-load.patch index e039dbe9..8bace39e 100644 --- a/leaves-server/minecraft-patches/features/0050-Elytra-aeronautics-no-chunk-load.patch +++ b/leaves-server/minecraft-patches/features/0050-Elytra-aeronautics-no-chunk-load.patch @@ -27,7 +27,7 @@ index 36c0a690e7e9b301c5a3d63fae2c7cbe36ba6cdf..6b625fbd538e5a4073e86e22adfcd382 SectionPos lastSectionPos = player.getLastSectionPos(); diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1f8b1d6b72056ebd66bade417b10ce23b7e11b8a..24f2a1d295a02a8fdc1518f914549a980cd035c9 100644 +index 2b0b594f3d9b53574e2c13ad023a77fe497d50bb..a83f635e929e5a9dd9bbf12228d0f75993d66b32 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -547,7 +547,7 @@ public class ServerGamePacketListenerImpl @@ -40,10 +40,10 @@ index 1f8b1d6b72056ebd66bade417b10ce23b7e11b8a..24f2a1d295a02a8fdc1518f914549a98 !serverLevel.areChunksLoadedForMove(rootVehicle.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(rootVehicle.position()))) )) { diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index c34e32549813af3a5d6e3edc2a606613ca2abb8f..92f363180ed4d2a91da996de9e8adfa4f3b17e69 100644 +index e901c7cb5c47c0f48a9a666cba80a2af0847e44b..fa03945c0f6c3fba7cd9bbfb93d90d0719825adb 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1108,7 +1108,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1109,7 +1109,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return; } } @@ -58,7 +58,7 @@ index c34e32549813af3a5d6e3edc2a606613ca2abb8f..92f363180ed4d2a91da996de9e8adfa4 ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("move"); if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) { -@@ -2058,6 +2064,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2059,6 +2065,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.yo = y; this.zo = d1; this.setPos(d, y, d1); @@ -67,7 +67,7 @@ index c34e32549813af3a5d6e3edc2a606613ca2abb8f..92f363180ed4d2a91da996de9e8adfa4 } diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 1f72a78beee96d942b5f838c5de034c99c8fe98f..2cc72279fbe2b408ab3515da462701cc6ca6c257 100644 +index 39fc3ea891947ddd102f992e7b6c62f9367849e7..9a2ab505fda1c59df99ef384af5fb8bc5d1bf68c 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java @@ -200,6 +200,7 @@ public abstract class Player extends LivingEntity { diff --git a/leaves-server/minecraft-patches/features/0053-No-block-update-command.patch b/leaves-server/minecraft-patches/features/0053-No-block-update-command.patch index 818844d6..7c611c2b 100644 --- a/leaves-server/minecraft-patches/features/0053-No-block-update-command.patch +++ b/leaves-server/minecraft-patches/features/0053-No-block-update-command.patch @@ -5,10 +5,10 @@ Subject: [PATCH] No block update command diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 8c8b6c4c6fee9bb9279d02d6b7a47cb2e3f39d93..ed37ba4ca1303a0ce97e7a1fce1b29682276292b 100644 +index c7231836a61e7c8f1541c3b9ac90d82ae8217699..4bd76c64d2955e025442eb24e33f373baaf11911 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -2383,6 +2383,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2385,6 +2385,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public void blockUpdated(BlockPos pos, Block block) { diff --git a/leaves-server/minecraft-patches/features/0062-Optimize-sun-burn-tick.patch b/leaves-server/minecraft-patches/features/0062-Optimize-sun-burn-tick.patch index ec753283..21bbe99d 100644 --- a/leaves-server/minecraft-patches/features/0062-Optimize-sun-burn-tick.patch +++ b/leaves-server/minecraft-patches/features/0062-Optimize-sun-burn-tick.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize sun burn tick This patch is Powered by Gale(https://github.com/GaleMC/Gale) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 92f363180ed4d2a91da996de9e8adfa4f3b17e69..cbb3062d1bfd9d9695e0d72df3f91ad084e043c2 100644 +index fa03945c0f6c3fba7cd9bbfb93d90d0719825adb..8d96e314911d9985fad3d395f557aec3e04f7cff 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -2039,10 +2039,22 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2040,10 +2040,22 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @Deprecated public float getLightLevelDependentMagicValue() { diff --git a/leaves-server/minecraft-patches/features/0067-Skip-entity-move-if-movement-is-zero.patch b/leaves-server/minecraft-patches/features/0067-Skip-entity-move-if-movement-is-zero.patch index 4b741183..e86bcd5e 100644 --- a/leaves-server/minecraft-patches/features/0067-Skip-entity-move-if-movement-is-zero.patch +++ b/leaves-server/minecraft-patches/features/0067-Skip-entity-move-if-movement-is-zero.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Skip entity move if movement is zero This patch is Powered by Gale(https://github.com/GaleMC/Gale) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index cbb3062d1bfd9d9695e0d72df3f91ad084e043c2..12f37226992986fb633c36e651fc098e46937646 100644 +index 8d96e314911d9985fad3d395f557aec3e04f7cff..3409bdd246acf5105836d2eef7bfed54f2927e6d 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -235,6 +235,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -17,7 +17,7 @@ index cbb3062d1bfd9d9695e0d72df3f91ad084e043c2..12f37226992986fb633c36e651fc098e public boolean onGround; public boolean horizontalCollision; public boolean verticalCollision; -@@ -1085,6 +1086,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1086,6 +1087,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper end - detailed watchdog information public void move(MoverType type, Vec3 movement) { @@ -31,7 +31,7 @@ index cbb3062d1bfd9d9695e0d72df3f91ad084e043c2..12f37226992986fb633c36e651fc098e final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity // Paper start - detailed watchdog information ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main"); -@@ -4208,6 +4216,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4209,6 +4217,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public final void setBoundingBox(AABB bb) { diff --git a/leaves-server/minecraft-patches/features/0069-Fix-villagers-dont-release-memory.patch b/leaves-server/minecraft-patches/features/0069-Fix-villagers-dont-release-memory.patch index d550b4ef..0d9206f2 100644 --- a/leaves-server/minecraft-patches/features/0069-Fix-villagers-dont-release-memory.patch +++ b/leaves-server/minecraft-patches/features/0069-Fix-villagers-dont-release-memory.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix villagers dont release memory diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 12f37226992986fb633c36e651fc098e46937646..ab63de942e3a34a84666877a202c4a191391a28b 100644 +index 3409bdd246acf5105836d2eef7bfed54f2927e6d..65e916089fba9e2a3908dafa24634f6cc259e595 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -3837,7 +3837,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3838,7 +3838,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this; } diff --git a/leaves-server/minecraft-patches/features/0071-Bow-infinity-fix.patch b/leaves-server/minecraft-patches/features/0071-Bow-infinity-fix.patch index c15e40cb..37182852 100644 --- a/leaves-server/minecraft-patches/features/0071-Bow-infinity-fix.patch +++ b/leaves-server/minecraft-patches/features/0071-Bow-infinity-fix.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Bow infinity fix diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 94dab91807c828131d728374ae3c485d0f4272be..8736461dc3981419c63e0d738cc308d5913fa2c3 100644 +index 9a2ab505fda1c59df99ef384af5fb8bc5d1bf68c..29bc08bdb42e60553723f30d92706047f910b284 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -2270,7 +2270,7 @@ public abstract class Player extends LivingEntity { - } +@@ -2277,7 +2277,7 @@ public abstract class Player extends LivingEntity { } + if (anyEventCancelled.booleanValue() && !this.abilities.instabuild && this instanceof final ServerPlayer player) this.resyncUsingItem(player); // Paper - resync if no item matched the Predicate - return this.abilities.instabuild ? new ItemStack(Items.ARROW) : ItemStack.EMPTY; + return this.abilities.instabuild || (org.leavesmc.leaves.LeavesConfig.modify.bowInfinityFix && net.minecraft.world.item.enchantment.EnchantmentHelper.processAmmoUse((ServerLevel) this.level(), shootable, new ItemStack(Items.ARROW), 1) <= 0) ? new ItemStack(Items.ARROW) : ItemStack.EMPTY; // Leaves - infinity fix } diff --git a/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch b/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch index 779398d5..0bfcd339 100644 --- a/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch +++ b/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch @@ -120,10 +120,10 @@ index 5c0a04db38821dbb0cba2bb6f0787f113d167efd..cd153db93f709c3142942fac88ae3ca2 .filter(player -> !playerList.isOp(player.getGameProfile())) .map(player -> player.getGameProfile().getName()), diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 7763d4c818606ed034f28e050166fe8cae16cfb8..1deedd3fc28792fc368580973038c1824b15691d 100644 +index 4d5c0729675e9057bd94f00a006e067ea9d90116..c0ade1dbf40f308febfec005cab9556fe01f3402 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -2645,7 +2645,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2647,7 +2647,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.add(serverPlayer); // Leaves start - skip @@ -132,7 +132,7 @@ index 7763d4c818606ed034f28e050166fe8cae16cfb8..1deedd3fc28792fc368580973038c182 ServerLevel.this.realPlayers.add(serverPlayer); } // Leaves end - skip -@@ -2716,7 +2716,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2718,7 +2718,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.remove(serverPlayer); // Leaves start - skip @@ -142,7 +142,7 @@ index 7763d4c818606ed034f28e050166fe8cae16cfb8..1deedd3fc28792fc368580973038c182 } // Leaves end - skip diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 93eb9e2d4e44881181a07b12249c3812635fec14..846a96de92c74cfd3091c21d692cb8bdac60c4eb 100644 +index 36495470125150a5b3cdc9cacc576e87cbac25bc..da33a137ab2c7f1f9fb47cba4995bf727c364450 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java @@ -131,6 +131,7 @@ public abstract class PlayerList { diff --git a/leaves-server/minecraft-patches/features/0090-Servux-Protocol.patch b/leaves-server/minecraft-patches/features/0090-Servux-Protocol.patch index ca535cda..1bd23186 100644 --- a/leaves-server/minecraft-patches/features/0090-Servux-Protocol.patch +++ b/leaves-server/minecraft-patches/features/0090-Servux-Protocol.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Servux Protocol diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 1deedd3fc28792fc368580973038c1824b15691d..f25eca541f377ee7b908a900c6a1b50f02a41eef 100644 +index c0ade1dbf40f308febfec005cab9556fe01f3402..162c0d442ade80563472edf81b15ff17f8ca1ba5 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -2189,6 +2189,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2191,6 +2191,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } this.lastSpawnChunkRadius = i; diff --git a/leaves-server/minecraft-patches/features/0098-Fix-falling-block-s-block-location.patch b/leaves-server/minecraft-patches/features/0098-Fix-falling-block-s-block-location.patch index 9b565d7d..74818029 100644 --- a/leaves-server/minecraft-patches/features/0098-Fix-falling-block-s-block-location.patch +++ b/leaves-server/minecraft-patches/features/0098-Fix-falling-block-s-block-location.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix falling block's block location diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index ab63de942e3a34a84666877a202c4a191391a28b..1afedf53e6159a08371c1e8ee41f1dbe84a043ba 100644 +index 65e916089fba9e2a3908dafa24634f6cc259e595..ceca4c395358f27fea805dec558e10cd2989d891 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4828,6 +4828,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4829,6 +4829,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess int floor = Mth.floor(x); int floor1 = Mth.floor(y); int floor2 = Mth.floor(z); diff --git a/leaves-server/minecraft-patches/features/0101-Configurable-MC-67.patch b/leaves-server/minecraft-patches/features/0101-Configurable-MC-67.patch index 91969f26..9611e3bf 100644 --- a/leaves-server/minecraft-patches/features/0101-Configurable-MC-67.patch +++ b/leaves-server/minecraft-patches/features/0101-Configurable-MC-67.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable MC-67 diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 1afedf53e6159a08371c1e8ee41f1dbe84a043ba..6653e6b802785b040de1df686d93eef8ab6c0e6a 100644 +index ceca4c395358f27fea805dec558e10cd2989d891..ca599cbb240f9ae0a7d83cc13684e37e4bbeeb65 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -3987,6 +3987,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3988,6 +3988,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean canTeleport(Level fromLevel, Level toLevel) { diff --git a/leaves-server/minecraft-patches/features/0112-Fix-EntityPortalExitEvent-logic.patch b/leaves-server/minecraft-patches/features/0112-Fix-EntityPortalExitEvent-logic.patch index af3fc5cf..93182e4f 100644 --- a/leaves-server/minecraft-patches/features/0112-Fix-EntityPortalExitEvent-logic.patch +++ b/leaves-server/minecraft-patches/features/0112-Fix-EntityPortalExitEvent-logic.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix EntityPortalExitEvent logic diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 6653e6b802785b040de1df686d93eef8ab6c0e6a..caddf2c1dcaca7884dbdb6af8311c6bfb9a7aa60 100644 +index ca599cbb240f9ae0a7d83cc13684e37e4bbeeb65..4de7f2a2257c7071ecf1f06ab30cc6e31c5ce065 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -3789,19 +3789,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3790,19 +3790,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } if (this.portalProcess != null) { // if in a portal org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity = this.getBukkitEntity(); diff --git a/leaves-server/minecraft-patches/features/0115-Dont-save-Entity-tickCount.patch b/leaves-server/minecraft-patches/features/0115-Dont-save-Entity-tickCount.patch deleted file mode 100644 index 1d6b3b4e..00000000 --- a/leaves-server/minecraft-patches/features/0115-Dont-save-Entity-tickCount.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: violetc <58360096+s-yh-china@users.noreply.github.com> -Date: Fri, 7 Feb 2025 22:32:29 +0800 -Subject: [PATCH] Dont save Entity tickCount - -Storing just tickCount will only lead to incorrect entity behavior and will not bring any benefits. - -diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index caddf2c1dcaca7884dbdb6af8311c6bfb9a7aa60..14b09ee5d605ec8ff86165fdc0b7aeba310f833e 100644 ---- a/net/minecraft/world/entity/Entity.java -+++ b/net/minecraft/world/entity/Entity.java -@@ -2464,7 +2464,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - if (this.maxAirTicks != this.getDefaultMaxAirSupply()) { - compound.putInt("Bukkit.MaxAirSupply", this.getMaxAirSupply()); - } -- compound.putInt("Spigot.ticksLived", this.tickCount); - // CraftBukkit end - Component customName = this.getCustomName(); - if (customName != null) { -@@ -2637,11 +2636,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - throw new IllegalStateException("Entity has invalid rotation"); - } - // CraftBukkit start -- // Spigot start -- if (this instanceof net.minecraft.world.entity.LivingEntity) { -- this.tickCount = compound.getInt("Spigot.ticksLived"); -- } -- // Spigot end - this.persist = !compound.contains("Bukkit.persist") || compound.getBoolean("Bukkit.persist"); - this.visibleByDefault = !compound.contains("Bukkit.visibleByDefault") || compound.getBoolean("Bukkit.visibleByDefault"); - // SPIGOT-6907: re-implement LivingEntity#setMaximumAir() diff --git a/leaves-server/minecraft-patches/features/0116-Fix-Warden-GameEventListener-register-on-load.patch b/leaves-server/minecraft-patches/features/0115-Fix-Warden-GameEventListener-register-on-load.patch similarity index 100% rename from leaves-server/minecraft-patches/features/0116-Fix-Warden-GameEventListener-register-on-load.patch rename to leaves-server/minecraft-patches/features/0115-Fix-Warden-GameEventListener-register-on-load.patch diff --git a/leaves-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch b/leaves-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch index 4cb63e9a..f7bcdc23 100644 --- a/leaves-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch +++ b/leaves-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -346,6 +_,7 @@ +@@ -347,6 +_,7 @@ public void inactiveTick() { } // Paper end - EAR 2 @@ -8,7 +8,7 @@ public void setOrigin(@javax.annotation.Nonnull org.bukkit.Location location) { this.origin = location.toVector(); -@@ -2521,6 +_,7 @@ +@@ -2522,6 +_,7 @@ compound.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -16,7 +16,7 @@ return compound; } catch (Throwable var9) { CrashReport crashReport = CrashReport.forThrowable(var9, "Saving entity NBT"); -@@ -2670,6 +_,11 @@ +@@ -2671,6 +_,11 @@ freezeLocked = compound.getBoolean("Paper.FreezeLock"); } // Paper end @@ -28,7 +28,7 @@ } catch (Throwable var17) { CrashReport crashReport = CrashReport.forThrowable(var17, "Loading entity NBT"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded"); -@@ -5077,4 +_,9 @@ +@@ -5078,4 +_,9 @@ return ((ServerLevel) this.level).isPositionEntityTicking(this.blockPosition()); } // Paper end - Expose entity id counter diff --git a/leaves-server/paper-patches/features/0005-Leaves-Fakeplayer.patch b/leaves-server/paper-patches/features/0005-Leaves-Fakeplayer.patch index af50a4a2..b171cf3d 100644 --- a/leaves-server/paper-patches/features/0005-Leaves-Fakeplayer.patch +++ b/leaves-server/paper-patches/features/0005-Leaves-Fakeplayer.patch @@ -34,7 +34,7 @@ index adc6741e0e017660fbd39a62b69be1e67e0e143f..9bc40b07b8eebded4f748fd053b45571 if (nmsEntity.level() != this.getHandle().getLevel()) { nmsEntity = nmsEntity.teleport(new TeleportTransition(this.getHandle().getLevel(), nmsEntity, TeleportTransition.DO_NOTHING)); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 16fdeed9bb0d088cd811c83c93517c0e51a7e9c3..16ebf43a97bcf325d101e8d99cce35a21c7ccdeb 100644 +index cbceeef584569a83bc5333b589da56ec7f939576..aecee9c1ecd7c929033bf0764f26c50f41e03ba1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -315,6 +315,7 @@ public final class CraftServer implements Server { @@ -75,7 +75,7 @@ index 16fdeed9bb0d088cd811c83c93517c0e51a7e9c3..16ebf43a97bcf325d101e8d99cce35a2 + // Leaves end - Bot API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 600a0f423a83d9ecb0394faffc6b5ab79c69d6c6..2487ad1f7dd612c0e16d3229038fe58ce33d1a6a 100644 +index 1439d282167dc8a2e66f4896849153b810112988..f357e705290eda063ab659e05fea53fd8fe98a95 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -237,7 +237,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -87,7 +87,7 @@ index 600a0f423a83d9ecb0394faffc6b5ab79c69d6c6..2487ad1f7dd612c0e16d3229038fe58c } @Override -@@ -1268,9 +1268,9 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1241,9 +1241,9 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public List getPlayers() { @@ -99,7 +99,7 @@ index 600a0f423a83d9ecb0394faffc6b5ab79c69d6c6..2487ad1f7dd612c0e16d3229038fe58c HumanEntity bukkitEntity = human.getBukkitEntity(); if ((bukkitEntity != null) && (bukkitEntity instanceof Player)) { -@@ -1947,7 +1947,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1920,7 +1920,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public void playSound(final net.kyori.adventure.sound.Sound sound) { org.spigotmc.AsyncCatcher.catchOp("play sound"); // Paper final long seed = sound.seed().orElseGet(this.world.getRandom()::nextLong); @@ -108,7 +108,7 @@ index 600a0f423a83d9ecb0394faffc6b5ab79c69d6c6..2487ad1f7dd612c0e16d3229038fe58c player.connection.send(io.papermc.paper.adventure.PaperAdventure.asSoundPacket(sound, player.getX(), player.getY(), player.getZ(), seed, null)); } } -@@ -1975,7 +1975,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1948,7 +1948,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { org.spigotmc.AsyncCatcher.catchOp("play sound"); // Paper final long seed = sound.seed().orElseGet(this.getHandle().getRandom()::nextLong); if (emitter == net.kyori.adventure.sound.Sound.Emitter.self()) { @@ -117,7 +117,7 @@ index 600a0f423a83d9ecb0394faffc6b5ab79c69d6c6..2487ad1f7dd612c0e16d3229038fe58c player.connection.send(io.papermc.paper.adventure.PaperAdventure.asSoundPacket(sound, player, seed, null)); } } else if (emitter instanceof CraftEntity craftEntity) { -@@ -2205,7 +2205,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2178,7 +2178,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType()); } this.getHandle().sendParticlesSource( @@ -127,7 +127,7 @@ index 600a0f423a83d9ecb0394faffc6b5ab79c69d6c6..2487ad1f7dd612c0e16d3229038fe58c CraftParticle.createParticleParam(particle, data), // Particle force, diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index f8762064e0f377740688932c62145f7c789ea7ed..9131f13456e879bb2fee3fd5d77450df855011f2 100644 +index 1ee0ad266955e36b729ba31eb75aad9289acd8e4..2b441ba89c603903267db63c7515b0de2cbe09b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -98,6 +98,8 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -140,7 +140,7 @@ index f8762064e0f377740688932c62145f7c789ea7ed..9131f13456e879bb2fee3fd5d77450df if (entity instanceof EnderDragonPart complexPart) { if (complexPart.parentMob instanceof EnderDragon) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index fd4c1d67c134caf818f10bfd54831863c485f6a9..b09d208c62eb753c1b0598ccdfa080fa6f640c15 100644 +index 57c3f8531bf85b53af3a4aad6e9e369d5cff0ce3..8d85c78b2769be4269e8342138448edac631ce9f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1025,7 +1025,11 @@ public class CraftEventFactory { diff --git a/leaves-server/paper-patches/features/0011-Force-peaceful-mode-switch.patch b/leaves-server/paper-patches/features/0011-Force-peaceful-mode-switch.patch index 4d1cb954..4cb0aac2 100644 --- a/leaves-server/paper-patches/features/0011-Force-peaceful-mode-switch.patch +++ b/leaves-server/paper-patches/features/0011-Force-peaceful-mode-switch.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Force peaceful mode switch diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2487ad1f7dd612c0e16d3229038fe58ce33d1a6a..0667154dfec972961c679b8a963ec8a3b65c05a1 100644 +index f357e705290eda063ab659e05fea53fd8fe98a95..235429ca96d8079b91acb9c332bfe2dd48da61ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2404,6 +2404,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2377,6 +2377,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper - replace feature flag API diff --git a/leaves-server/paper-patches/features/0015-Leaves-plugins.patch b/leaves-server/paper-patches/features/0015-Leaves-plugins.patch index e6ea8584..2425bd3c 100644 --- a/leaves-server/paper-patches/features/0015-Leaves-plugins.patch +++ b/leaves-server/paper-patches/features/0015-Leaves-plugins.patch @@ -5,27 +5,19 @@ Subject: [PATCH] Leaves plugins diff --git a/src/main/java/io/papermc/paper/command/PaperPluginsCommand.java b/src/main/java/io/papermc/paper/command/PaperPluginsCommand.java -index f0fce4113fb07c64adbec029d177c236cbdcbae8..f3cb913f29e1aff46233af2f086d205a51ac582d 100644 +index 41c95f00b4b2bea6d31f85e268c33d7f6184823e..9f87a63ec3bd568b187a8358b6a364174fae5493 100644 --- a/src/main/java/io/papermc/paper/command/PaperPluginsCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperPluginsCommand.java -@@ -63,6 +63,7 @@ public class PaperPluginsCommand extends BukkitCommand { +@@ -172,6 +172,8 @@ public class PaperPluginsCommand extends BukkitCommand { - private static final Component LEGACY_PLUGIN_STAR = Component.text('*', TextColor.color(255, 212, 42)).hoverEvent(LEGACY_PLUGIN_INFO); - private static final Component INFO_ICON_START = Component.text("ℹ ", INFO_COLOR); -+ private static final Component LEAVES_HEADER = Component.text("Leaves Plugins:", TextColor.color(55, 209, 171)); // Leaves - leaves plugin - private static final Component PAPER_HEADER = Component.text("Paper Plugins:", TextColor.color(2, 136, 209)); - private static final Component BUKKIT_HEADER = Component.text("Bukkit Plugins:", TextColor.color(237, 129, 6)); - private static final Component PLUGIN_TICK = Component.text("- ", NamedTextColor.DARK_GRAY); -@@ -170,6 +171,8 @@ public class PaperPluginsCommand extends BukkitCommand { - - TreeMap> paperPlugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - TreeMap> spigotPlugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); + final TreeMap> paperPlugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); + final TreeMap> spigotPlugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); + // Leaves start - leaves plugin -+ TreeMap> leavesPlugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - ++ final TreeMap> leavesPlugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - for (PluginProvider provider : LaunchEntryPointHandler.INSTANCE.get(Entrypoint.PLUGIN).getRegisteredProviders()) { -@@ -178,14 +181,23 @@ public class PaperPluginsCommand extends BukkitCommand { + for (final PluginProvider provider : LaunchEntryPointHandler.INSTANCE.get(Entrypoint.PLUGIN).getRegisteredProviders()) { + final PluginMeta configuration = provider.getMeta(); +@@ -179,19 +181,30 @@ public class PaperPluginsCommand extends BukkitCommand { if (provider instanceof SpigotPluginProvider) { spigotPlugins.put(configuration.getDisplayName(), provider); } else if (provider instanceof PaperPluginParent.PaperServerPluginProvider) { @@ -35,22 +27,30 @@ index f0fce4113fb07c64adbec029d177c236cbdcbae8..f3cb913f29e1aff46233af2f086d205a } } -- Component infoMessage = Component.text("Server Plugins (%s):".formatted(paperPlugins.size() + spigotPlugins.size()), NamedTextColor.WHITE); -+ Component infoMessage = Component.text("Server Plugins (%s):".formatted(paperPlugins.size() + spigotPlugins.size() + leavesPlugins.size()), NamedTextColor.WHITE); - //.append(INFO_ICON_START.hoverEvent(SERVER_PLUGIN_INFO)); TODO: Add docs ++ final int sizeLeavesPlugins = leavesPlugins.size(); + final int sizePaperPlugins = paperPlugins.size(); + final int sizeSpigotPlugins = spigotPlugins.size(); +- final int sizePlugins = sizePaperPlugins + sizeSpigotPlugins; +- final boolean hasAllPluginTypes = (sizePaperPlugins > 0 && sizeSpigotPlugins > 0); ++ final int sizePlugins = sizePaperPlugins + sizeSpigotPlugins + sizeLeavesPlugins; ++ final boolean hasAllPluginTypes = (sizePaperPlugins > 0 && sizeSpigotPlugins > 0 && sizeLeavesPlugins > 0); + + final Component infoMessage = Component.text().append(INFO_ICON_SERVER_PLUGIN).append(Component.text("Server Plugins (%s):".formatted(sizePlugins), NamedTextColor.WHITE)).build(); sender.sendMessage(infoMessage); + + if (!leavesPlugins.isEmpty()) { -+ sender.sendMessage(LEAVES_HEADER); ++ sender.sendMessage(header("Leaves Plugins", 0x37D1AB, sizeLeavesPlugins, hasAllPluginTypes)); + } + -+ for (Component component : formatProviders(leavesPlugins)) { ++ for (final Component component : formatProviders(leavesPlugins)) { + sender.sendMessage(component); + } + // Leaves end - leaves plugin - ++ if (!paperPlugins.isEmpty()) { - sender.sendMessage(PAPER_HEADER); + sender.sendMessage(header("Paper Plugins", 0x0288D1, sizePaperPlugins, hasAllPluginTypes)); + } diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/LegacyPaperMeta.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/LegacyPaperMeta.java index 8cd649c977172f6b757d68565fcbb9eb8ae100a3..390625fbf54139b205a23b94d89a860fbb2c92d9 100644 --- a/src/main/java/io/papermc/paper/plugin/provider/configuration/LegacyPaperMeta.java