Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@40adc23 Fix incorrect javadoc in JarLibrary (#9513)
PaperMC/Paper@c016e03 Fix unbreakable flint and steel consumed when igniting creepers (#9509)
PaperMC/Paper@b1334b5 Mark Player.sendSignChange as deprecated (#9382)
PaperMC/Paper@2f8d9db Pathfinder hasPath should check if path is done. (#9231)
PaperMC/Paper@46a36d3 Make ExperienceOrb entities call EntitySpawnEvent (#9197)
PaperMC/Paper@24d690f Fix hopper not marking source inv as changed (#9070)
PaperMC/Paper@383f0ed Remove sign ticking (#9478)
PaperMC/Paper@d8b8f61 Configurable Region Compression Format (#8505)
PaperMC/Paper@2c54b39 Don't support hex in book title and author (#9493)
PaperMC/Paper@e19177a Rewrote Amethyst logic to throw both BlockGrowEvent and BlockSpreadEvent (#9217)
PaperMC/Paper@4283054 Add player whitelist events (#9209)
PaperMC/Paper@aa93dcf feat: add minimessage tag resolvers overload to CommandSender#sendMessage (#9505)
PaperMC/Paper@b14979e Remove isRemoved skip on .discard() (#9520)
PaperMC/Paper@1837f6c Prevent entity removals if the entity slices is receiving status updates
PaperMC/Paper@a40e48f Add cause to PlayerOpenSignEvent (#9441)
PaperMC/Paper@7d1cc6d Add Translatable interface to MusicInstrument (#9538)
PaperMC/Paper@6c7e3c5 Clarify viewers set mutability in chat events (#9525)
PaperMC/Paper@f402f89 Bump net.kyori.ansi to 1.0.2 (#9546)
PaperMC/Paper@81619a6 Fix treasure map config default (#9572)
PaperMC/Paper@13c9d3c Bump net.kyori:ansi to 1.0.3 (#9575)
PaperMC/Paper@2c55dd8 Expand use of strict advancement dim check (#9545)
PaperMC/Paper@69a8013 Fix inventorycloseevent javadocs (#9533)
PaperMC/Paper@2fa8efc Updated Upstream (Bukkit/CraftBukkit) (#9485)
PaperMC/Paper@508a295 Only erase allay memory on non-item targets (#9570)
PaperMC/Paper@31358d5 API for updating recipes on clients (#6463)
PaperMC/Paper@8fe8ca6 Add clickable version on version command (#9347)
PaperMC/Paper@d6d2b6f Only capture actual tree growth (#6464)
  • Loading branch information
qixils committed Aug 7, 2023
1 parent 4a430b2 commit ce4157e
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = gg.projecteden.parchment
version = 1.20.1-R0.1-SNAPSHOT

mcVersion = 1.20.1
paperRef = c793bd93be69918d26ff53764a1fee2254cc1618
paperRef = d6d2b6f4e51b24867b609cf747ac6d8c6345c449
edenVersion = 2.2.8-SNAPSHOT

org.gradle.caching=true
Expand Down
18 changes: 9 additions & 9 deletions patches/api/0001-Add-Getter-interfaces.patch
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@ index 1bfe465b9aaeea7d3c871140145b7de1b8f1d93d..babaefd2441b3b3e3b11ac1db6e5dc95
+ // Parchment end
}
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
index 08ae501e97ae2a3f22b1994c9616fc7134cfc0c3..ad2c66f425546c6527417b2c5bc4a8d13e86c566 100644
index 9b84cb5abdf3db55cbc7ba19c8cd6955bf4fc5ec..c1410e5d4ec281f6712ab695e57b84757ca0ec82 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
* player that is stored on the disk and can, thus, be retrieved without the
* player needing to be online.
*/
Expand All @@ -464,7 +464,7 @@ index 08ae501e97ae2a3f22b1994c9616fc7134cfc0c3..ad2c66f425546c6527417b2c5bc4a8d1

/**
* Checks if this player is currently online
@@ -160,6 +160,13 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
@@ -190,6 +190,13 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
@Nullable
public Player getPlayer();

Expand Down Expand Up @@ -604,10 +604,10 @@ index 8b0d04d5b39ee817555a36adddc39b18fc6f0d02..1c87047de615a85ee20297295478770e
// Paper start
@Override
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 06b2b925de745850816d9ce0cf6316412c8d2b49..e688bc7290ad9da43b8ac05ce006851536867e4d 100644
index 14c92390aeaeee518f43778ccd5fc820fdc62689..aa99410a0bee71e68da90b596134632f3a6364fe 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -49,7 +49,17 @@ import org.jetbrains.annotations.Nullable;
@@ -51,7 +51,17 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a player, connected or not
*/
Expand Down Expand Up @@ -877,12 +877,12 @@ index 020739697a0b535cad0b15b574f77cdabbdfa3eb..ee4fd41e66852d5d2c62222c7b884473
private final Material itemType;
private final int itemAmount;
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
index 21ad8888c0e403bfc63518502577d651c02dda05..1c59335a8f0a40162190f6fb73ffbfef0cd795d8 100644
index 4db0a07db156c61867644f50c185e63b695e2462..eb6632e2e9d247bd54e02e3a134dfdbed9aeef39 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a player related inventory event
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull;
* on the next tick. Also be aware that this is not an exhaustive list, and
* other methods could potentially create issues as well.
*/
-public class InventoryCloseEvent extends InventoryEvent {
+public class InventoryCloseEvent extends InventoryEvent implements gg.projecteden.parchment.HasHumanEntity { // Parchment
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0007-Expose-MCUtil-Executors.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Expose MCUtil Executors


diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 6b72eccdcb6f75534a4267a1dd0a4cc2f39e917b..06af424f1af0ad35d7230bae9c92f0aa89a7ed33 100644
index 68206cf0178c26c0f528a1e14a5fb4e9ad410369..24fa398cc02f803fbb3222082130bf0b7bdd391f 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2002,6 +2002,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2053,6 +2053,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull
UnsafeValues getUnsafe();

Expand Down
4 changes: 2 additions & 2 deletions patches/api/0011-Add-Player-getHiddenEntities-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getHiddenEntities API


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e688bc7290ad9da43b8ac05ce006851536867e4d..2fdbaae18d42d4b5f83f37666ada5b5ac441a067 100644
index aa99410a0bee71e68da90b596134632f3a6364fe..4390fa4cc4616a13855d38cb5e09d60153368428 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1763,6 +1763,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1851,6 +1851,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ApiStatus.Experimental
public boolean canSee(@NotNull Entity entity);

Expand Down
4 changes: 2 additions & 2 deletions patches/api/0013-Expanded-Insomnia-API-methods.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Expanded Insomnia API methods


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 2fdbaae18d42d4b5f83f37666ada5b5ac441a067..28e6d5426c0b2e836295f129ed0fda7281d350bc 100644
index 4390fa4cc4616a13855d38cb5e09d60153368428..924dc2c48b77c5c74c6058c661699efeaf72a40d 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -59,6 +59,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -61,6 +61,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@Override
@NotNull Player getPlayer();
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0001-Build-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Build changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 57f2c414dbfe127c193002fbc8eeb22e94e9cb55..bf7205b6fd566ccaab8d30ad17fd4603b7d534c5 100644
index fb98936bb8a5488db75d676c5bcb4060597fbbf8..bd8ba07bdf9a07245ec3ed8ebaf97b7bc13bac30 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,5 @@
Expand Down Expand Up @@ -119,10 +119,10 @@ index 3238cbcba567b1242c77e41f6b6f19a8d157fb4e..deccd238278f003ead4d8973004b3965

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a05c1bc8874ef5e380544a6a344c848e37da49c4..a491abf0d3b62723395287ade3c81608686a6dd8 100644
index 54f27d91f941235a99e341ed84531ad7f0840728..429f492aa0802a0456487aa52c22ec6902079616 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
@@ -265,7 +265,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper

public final class CraftServer implements Server {
Expand All @@ -132,7 +132,7 @@ index a05c1bc8874ef5e380544a6a344c848e37da49c4..a491abf0d3b62723395287ade3c81608
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index daed278d1bcf84ee42749f24e311b22b70015d79..9430bb8ccf6479f8b42e23b4fb8992a6b5bde26c 100644
index 776b7fc26fe96b69be260bbd36efae147d988640..301dc61781a04ee697356bd82975ecf11217b82d 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -292,7 +292,7 @@ public class Main {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0003-Add-SoundEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ index 18aac3da3c88f33b1a71a5920a8daa27e9723913..1727c741664b981311b69fadc849ac6d

@Override
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 9d46536f80b5b3e6641fd377c02166a431edfd77..2abe06cb5de5ac63c31c1a120a3239aca07557f8 100644
index dc5fda83a66afbfeb7897fc20b4742899d8aca08..6a5c781cf14521659426cf30bd1c46cd65814df4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2328,7 +2328,20 @@ public class ServerPlayer extends Player {
Expand All @@ -163,7 +163,7 @@ index 9d46536f80b5b3e6641fd377c02166a431edfd77..2abe06cb5de5ac63c31c1a120a3239ac

@Override
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index fff7ad7a45f310783ac96b44575ad3db13d537fa..5bb09632231293bd3551cac7988651657e2b3783 100644
index 640e9bd618dc8286933318744c2064ede1fd9b5f..38eae743afa3c517c59bb1df83b1871d06165dbc 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -947,7 +947,7 @@ public abstract class PlayerList {
Expand Down Expand Up @@ -216,10 +216,10 @@ index f7399737548483905f3b5c08a03876b0da54b714..e668de87a5b58febf451fe4be79e4714
}

diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 9b9a9606e5be94b394606f2306e7b7a5ed781e1d..153c5e5c766022bd43b8a9204ecbc31f6915f09e 100644
index 26e1a9002d675245d4cf91e6682605314b078fb2..9d5b1851f719cb51a64f7aa904268867f1855d72 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2070,4 +2070,42 @@ public class CraftEventFactory {
@@ -2106,4 +2106,42 @@ public class CraftEventFactory {
return event;
}
// Paper end - add EntityFertilizeEggEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add origin location to EntityDamageByBlockEvent


diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 153c5e5c766022bd43b8a9204ecbc31f6915f09e..7b26e9feef965dd0b94658267f4ca8d3a51dceb8 100644
index 9d5b1851f719cb51a64f7aa904268867f1855d72..e2012fd752c3a5dcf604d7892bf3e01c354ce275 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -992,7 +992,7 @@ public class CraftEventFactory {
@@ -1021,7 +1021,7 @@ public class CraftEventFactory {
CraftEventFactory.entityDamage = null;
EntityDamageEvent event;
if (damager == null) {
Expand All @@ -17,7 +17,7 @@ index 153c5e5c766022bd43b8a9204ecbc31f6915f09e..7b26e9feef965dd0b94658267f4ca8d3
} else if (entity instanceof EnderDragon && /*PAIL FIXME ((EntityEnderDragon) entity).target == damager*/ false) {
event = new EntityDamageEvent(entity.getBukkitEntity(), DamageCause.ENTITY_EXPLOSION, modifiers, modifierFunctions);
} else {
@@ -1040,7 +1040,7 @@ public class CraftEventFactory {
@@ -1069,7 +1069,7 @@ public class CraftEventFactory {

return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API
} else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) {
Expand All @@ -26,7 +26,7 @@ index 153c5e5c766022bd43b8a9204ecbc31f6915f09e..7b26e9feef965dd0b94658267f4ca8d3
event.setCancelled(cancelled);
CraftEventFactory.callEvent(event);
if (!event.isCancelled()) {
@@ -1050,7 +1050,7 @@ public class CraftEventFactory {
@@ -1079,7 +1079,7 @@ public class CraftEventFactory {
}
return event;
} else if (source.is(DamageTypes.LAVA)) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0008-Expose-MCUtil-Executors.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Expose MCUtil Executors


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a491abf0d3b62723395287ade3c81608686a6dd8..16327a037afd90a0589cd87fb575bf8a49a53b86 100644
index 429f492aa0802a0456487aa52c22ec6902079616..a165f8f14b1e6feec49c349e26b91d76395f3cfa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -3077,4 +3077,16 @@ public final class CraftServer implements Server {
@@ -3115,4 +3115,16 @@ public final class CraftServer implements Server {
}

// Paper end
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0010-Add-BlockDropResourcesEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ index 9522e646529f3d849471931b4b3c0d133e7fcfc5..cbdcbfed03afbdf194243d4472e69a66
});
state.spawnAfterBreak((ServerLevel) world, pos, tool, true);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 7b26e9feef965dd0b94658267f4ca8d3a51dceb8..20d7d44288f65e0fd4312701e8e4c6099cb3683e 100644
index e2012fd752c3a5dcf604d7892bf3e01c354ce275..694158155deb70d0be219a03e2302535d32ef558 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2107,5 +2107,19 @@ public class CraftEventFactory {
@@ -2143,5 +2143,19 @@ public class CraftEventFactory {
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0015-Add-Player-getHiddenEntities-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getHiddenEntities API


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index dbdeb913e228651cadf5dbd7ec98afc738c80522..64862c4bd3ec5a1ca45da6cd491c7935b850947c 100644
index 5bbded65095dccfadaf7576fc41b5f62974878b4..ece3637304863c8441c153e06ea9934cc91ff961 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1940,6 +1940,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1972,6 +1972,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); // Paper
}
// Paper start
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0018-Expanded-Insomnia-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ Subject: [PATCH] Expanded Insomnia API


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 64862c4bd3ec5a1ca45da6cd491c7935b850947c..eca1f4adaaa4c77beae9591a9ef376b6e56ec3a6 100644
index ece3637304863c8441c153e06ea9934cc91ff961..af23e113aea3112b618d3fc9b0c9baf59a693025 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -79,6 +79,7 @@ import net.minecraft.server.network.ServerGamePacketListenerImpl;
@@ -81,6 +81,7 @@ import net.minecraft.server.network.ServerGamePacketListenerImpl;
import net.minecraft.server.players.UserWhiteListEntry;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.entity.Entity;
+import net.minecraft.world.entity.EntitySelector;
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
import net.minecraft.world.entity.ai.attributes.AttributeMap;
import net.minecraft.world.entity.ai.attributes.Attributes;
@@ -194,6 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -196,6 +197,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
private long lastSaveTime;
// Paper end
+ private boolean bypassesInsomnia = false; // Parchment - Insomnia api

public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
@@ -2060,6 +2062,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2092,6 +2094,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this;
}

Expand Down
10 changes: 5 additions & 5 deletions patches/server/0019-Add-spam-bypass-permission.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@ Subject: [PATCH] Add spam bypass permission


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 316740b2ba4c85828f544249c8cdd6fa1b525d3f..d4709622887c2a0c2aa750cf604ce7f122ed62f3 100644
index 75bd92e1d40588d3bc40fa7837943eec9f2062a6..66e5fc6e704ec3f859ed2172acef0a9e83fa39c2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -882,6 +882,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -884,6 +884,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async
// CraftBukkit start
+ if (!this.getCraftPlayer().hasPermission("spam.bypass")) { // Parchment - spam bypass
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - kick event cause
return;
@@ -892,6 +893,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -894,6 +895,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper
return;
}
+ } // Parchment - spam bypass
// Paper end
// CraftBukkit end
// Paper start - Don't suggest if tab-complete is disabled
@@ -2566,6 +2568,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2562,6 +2564,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic

// Spigot start - spam exclusions
private void detectRateSpam(String s) {
+ if (this.getCraftPlayer().hasPermission("spam.bypass")) return; // Parchment - spam bypass
// CraftBukkit start - replaced with thread safe throttle
boolean counted = true;
for ( String exclude : org.spigotmc.SpigotConfig.spamExclusions )
@@ -3295,10 +3298,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3294,10 +3297,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
// Paper start
if (!org.bukkit.Bukkit.isPrimaryThread()) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0023-Add-PreEntityShootBowEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ index 08d597db1a5345a343777a01427655e6bf2c926b..b923ea037a69628309167d16cc2a0ae7
entityarrow.setCritArrow(true);
}
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
index a433910fb4d0bd8d7b6b0d66c8fc88d62a0e4879..88d1f21fe361d3c37e6324281183c487d5299d51 100644
index eede02c3f125d230af537bb67bebed9b88f7d1b4..343c634b97f3ff5e8eda008121a661423a1810aa 100644
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
@@ -229,6 +229,11 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
@@ -225,6 +225,11 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {

private static void shootProjectile(Level world, LivingEntity shooter, InteractionHand hand, ItemStack crossbow, ItemStack projectile, float soundPitch, boolean creative, float speed, float divergence, float simulated) {
if (!world.isClientSide) {
Expand Down

0 comments on commit ce4157e

Please sign in to comment.