From 917411fd80bb82d61b09965d87a878d58ca0b3a5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 2 Jan 2019 22:58:07 +1100 Subject: [PATCH] Remove redundant BlockPosition creation from sleep API --- .../java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index 030c4d235a..e5f782e6f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -162,7 +162,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { Preconditions.checkArgument(location != null, "Location == null"); Preconditions.checkArgument(location.getWorld().equals(getWorld()), "Cannot sleep across worlds"); - BlockPosition blockposition = new BlockPosition(new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ())); + BlockPosition blockposition = new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()); IBlockData iblockdata = getHandle().world.getType(blockposition); if (!(iblockdata.getBlock() instanceof BlockBed)) { return false;