mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
36f34f01c0
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots 3abebc9f #492: Let Tameable extend Animals rather than Entity 941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent 4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME CraftBukkit Changes:933e9094
#664: Add methods to get/set ItemStacks in EquipmentSlots18722312
#662: Expose ItemStack and hand used in PlayerShearEntityEvent
41 lines
2.3 KiB
Diff
41 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 30 Apr 2018 17:15:26 -0400
|
|
Subject: [PATCH] Block Enderpearl Travel Exploit
|
|
|
|
Players are able to use alt accounts and enderpearls to travel
|
|
long distances utilizing the pearls in unloaded chunks and loading
|
|
the chunk later when convenient.
|
|
|
|
This disables that by not saving the thrower when the chunk is unloaded.
|
|
|
|
This is mainly useful for survival servers that do not allow freeform teleporting.
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 171c8e3031cf4bf4da062663089cc0cb4552fab6..9c52e31f4cf1e64a37c65c021da219fc26dda137 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -361,4 +361,10 @@ public class PaperWorldConfig {
|
|
private void disableSprintInterruptionOnAttack() {
|
|
disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
|
|
}
|
|
+
|
|
+ public boolean disableEnderpearlExploit = true;
|
|
+ private void disableEnderpearlExploit() {
|
|
+ disableEnderpearlExploit = getBoolean("game-mechanics.disable-unloaded-chunk-enderpearl-exploit", disableEnderpearlExploit);
|
|
+ log("Disable Unloaded Chunk Enderpearl Exploit: " + (disableEnderpearlExploit ? "enabled" : "disabled"));
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
|
|
index 724b78b5d2d7f4ce8de31c763d2d95b986c1b7f6..9eed1dce3e48683b751ebbaac0487a046354622e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
|
|
@@ -201,6 +201,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
|
if (nbttagcompound.hasKeyOfType("owner", 10)) {
|
|
this.shooterId = GameProfileSerializer.b(nbttagcompound.getCompound("owner"));
|
|
}
|
|
+ if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooterId = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit
|
|
|
|
}
|
|
|