mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 00:10:32 +01:00
0cdce89d59
If a playerdata doesn't contain a valid, loaded world, reset to the main world spawn point
23 lines
948 B
Diff
23 lines
948 B
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 bf637aae0dcd701dd31568b3c84851349c4c5a0a..86b870e8316d2c27861c85ee5a8f7ddd857e8297 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1242,6 +1242,11 @@ public class ServerPlayer extends Player {
|
|
this.level().getCraftServer().getPluginManager().callEvent(changeEvent);
|
|
// CraftBukkit end
|
|
}
|
|
+ // Paper start
|
|
+ if (this.isBlocking()) {
|
|
+ this.stopUsingItem();
|
|
+ }
|
|
+ // Paper end
|
|
|
|
return this;
|
|
}
|