mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 00:10:32 +01:00
89d51d5f29
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.
23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Yive <admin@yive.me>
|
|
Date: Sun, 24 Jan 2021 08:55:19 -0800
|
|
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 6e62c5037a69468e7b4c8115a6623d48538de307..8c65b05e66372cf3c92f823d72e94c18fe77622b 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1198,6 +1198,11 @@ public class ServerPlayer extends Player {
|
|
this.level().getCraftServer().getPluginManager().callEvent(changeEvent);
|
|
// CraftBukkit end
|
|
}
|
|
+ // Paper start - Reset shield blocking on dimension change
|
|
+ if (this.isBlocking()) {
|
|
+ this.stopUsingItem();
|
|
+ }
|
|
+ // Paper end - Reset shield blocking on dimension change
|
|
|
|
return this;
|
|
}
|