Paper/Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch
2021-02-21 20:55:01 +00:00

22 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 24 Dec 2020 12:43:39 -0800
Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index cccba4777b97c67dda79417a75742af2fabbc2ea..3091241f2619827298b2aa768d41c285059b529e 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -261,6 +261,10 @@ public class CraftEventFactory {
return BedEnterResult.TOO_FAR_AWAY;
case NOT_SAFE:
return BedEnterResult.NOT_SAFE;
+ // Paper start
+ case OBSTRUCTED:
+ return BedEnterResult.OBSTRUCTED;
+ // Paper end
default:
return BedEnterResult.OTHER_PROBLEM;
}