Skip to content

Commit

Permalink
fix 'npc sleep' without a bed
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 25, 2020
1 parent 6f39161 commit 694968a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -73,7 +73,7 @@ public class PlayerClicksInInventoryScriptEvent extends BukkitScriptEvent implem
// player clicks in inventory
// player (<click type>) clicks (<item>) in <inventory>
//
// @Regex ^on player( [^\s]+)? clicks [^\s]+( in [^\s]+)?$
// @Regex ^on player( [^\s]+)? clicks( [^\s]+)? in [^\s]+$
//
// @Group Player
//
Expand Down
Expand Up @@ -50,6 +50,9 @@ public void internalSleepNow() {
if (bedLocation.getBlock().getBlockData() instanceof Bed) {
((Player) npc.getEntity()).sleep(bedLocation.clone(), true);
}
else {
PlayerAnimation.SLEEP.play((Player) npc.getEntity());
}
}
sleeping = true;
}
Expand Down

0 comments on commit 694968a

Please sign in to comment.