Upstream Paper
This commit is contained in:
@@ -1319,12 +1319,16 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public EntityHuman.EnumBedResult a(BlockPosition blockposition, boolean force) {
|
||||
EnumDirection enumdirection = (EnumDirection) this.world.getType(blockposition).get(BlockFacingHorizontal.FACING);
|
||||
EntityHuman.EnumBedResult bedResult = force ? EnumBedResult.OK : this.getBedResult(blockposition, enumdirection);
|
||||
EntityHuman.EnumBedResult bedResult = this.getBedResult(blockposition, enumdirection);
|
||||
|
||||
if (bedResult == EntityHuman.EnumBedResult.OTHER_PROBLEM) {
|
||||
return bedResult; // return immediately if the result is not bypassable by plugins
|
||||
}
|
||||
|
||||
if (force) {
|
||||
bedResult = EnumBedResult.OK;
|
||||
}
|
||||
|
||||
if (this.getBukkitEntity() instanceof Player) {
|
||||
bedResult = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerBedEnterEvent(this, blockposition, bedResult);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user