SPIGOT-5297: PlayerBedLeaveEvent.getBed() returns player location

This commit is contained in:
md_5 committed 2019-08-30 18:34:24 +10:00
1 parent 8d4bc54183
commit 631eaeb09b
1 file changed
+1 -1
+1 -1
View File
@@ -379,7 +379,7 @@
+ Player player = (Player) this.getBukkitEntity();
+
+ org.bukkit.block.Block bed;
+ BlockPosition blockposition = this.getBed();
+ BlockPosition blockposition = optional.orElse(null);
+ if (blockposition != null) {
+ bed = this.world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ } else {