Make it so that "Nighty Night" only fires when people actually go to bed.
This commit is contained in:
parent
2723f962e1
commit
8a14e02404
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,9 @@ public class Bedsplode implements Listener {
|
|||
@EventHandler
|
||||
public void onSleep(PlayerBedEnterEvent event){
|
||||
Player player = event.getPlayer();
|
||||
player.sendMessage("[ButtonPresents] Nighty night " + player.getName().toLowerCase());
|
||||
if(event.getBedEnterResult() == PlayerBedEnterEvent.BedEnterResult.OK) {
|
||||
player.sendMessage("[ButtonPresents] Nighty night " + player.getName().toLowerCase());
|
||||
}
|
||||
if (!player.getName().toLowerCase().equalsIgnoreCase("alisolarflare")) return;
|
||||
if (event.getBed().getType() == Material.BLUE_BED) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue