Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
This commit is contained in:
parent
b21eb4d9a4
commit
89d51d5f29
673 changed files with 157 additions and 189 deletions
29
patches/server/0828-Add-Sneaking-API-for-Entities.patch
Normal file
29
patches/server/0828-Add-Sneaking-API-for-Entities.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: dawon <dawon@dawon.eu>
|
||||
Date: Wed, 19 Oct 2022 23:31:53 +0200
|
||||
Subject: [PATCH] Add Sneaking API for Entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index b7fceba1c7138a5c1d78bf058c9f2d32dbc1d292..69dc7d9cc9ebd681d842099e2de521fd11ff5242 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -872,6 +872,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return Pose.values()[this.getHandle().getPose().ordinal()];
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void setSneaking(boolean sneak) {
|
||||
+ this.getHandle().setShiftKeyDown(sneak);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isSneaking() {
|
||||
+ return this.getHandle().isShiftKeyDown();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public SpawnCategory getSpawnCategory() {
|
||||
return CraftSpawnCategory.toBukkit(this.getHandle().getType().getCategory());
|
Loading…
Add table
Add a link
Reference in a new issue