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

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-08-30 18:34:24 +10:00
parent cfd992a9d4
commit 5757652da1

View File

@@ -379,7 +379,7 @@
+ Player player = (Player) this.getBukkitEntity(); + Player player = (Player) this.getBukkitEntity();
+ +
+ org.bukkit.block.Block bed; + org.bukkit.block.Block bed;
+ BlockPosition blockposition = this.getBed(); + BlockPosition blockposition = optional.orElse(null);
+ if (blockposition != null) { + if (blockposition != null) {
+ bed = this.world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); + bed = this.world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ } else { + } else {