mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-31 12:31:35 +01:00
parent
c85d772e1b
commit
767508fb87
@ -738,6 +738,9 @@ public class EssentialsPlayerListener implements Listener, FakeAccessor {
|
|||||||
switch (event.getAction()) {
|
switch (event.getAction()) {
|
||||||
case RIGHT_CLICK_BLOCK:
|
case RIGHT_CLICK_BLOCK:
|
||||||
if (!event.isCancelled() && MaterialUtil.isBed(event.getClickedBlock().getType()) && ess.getSettings().getUpdateBedAtDaytime()) {
|
if (!event.isCancelled() && MaterialUtil.isBed(event.getClickedBlock().getType()) && ess.getSettings().getUpdateBedAtDaytime()) {
|
||||||
|
if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_13_2_R01) && ((org.bukkit.block.data.type.Bed) event.getClickedBlock().getBlockData()).isOccupied()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
final User player = ess.getUser(event.getPlayer());
|
final User player = ess.getUser(event.getPlayer());
|
||||||
if (player.isAuthorized("essentials.sethome.bed") && player.getWorld().getEnvironment().equals(World.Environment.NORMAL)) {
|
if (player.isAuthorized("essentials.sethome.bed") && player.getWorld().getEnvironment().equals(World.Environment.NORMAL)) {
|
||||||
player.getBase().setBedSpawnLocation(event.getClickedBlock().getLocation());
|
player.getBase().setBedSpawnLocation(event.getClickedBlock().getLocation());
|
||||||
|
Loading…
Reference in New Issue
Block a user