SPIGOT-4666: Force parameter in HumanEntity#sleep

Also moved the application of the force parameter inside EntityHuman, to
no longer allow bypassing of very essential checks.

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
CraftBukkit/Spigot
2019-03-13 04:48:19 +01:00
parent 6f19c56acd
commit 7a7e9aa31e
3 changed files with 50 additions and 32 deletions

View File

@@ -168,7 +168,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return false;
}
if (getHandle().a(blockposition) != EntityHuman.EnumBedResult.OK) {
if (getHandle().a(blockposition, force) != EntityHuman.EnumBedResult.OK) {
return false;
}