From ddc5874fe92d99685ef2f203ee968ac2090e4a5a Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 18 Aug 2020 17:48:07 +0200 Subject: [PATCH] It works Signed-off-by: Lixfel --- .../fightsystem/listener/SleepListener.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/SleepListener.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/SleepListener.java index 8b7ff93..00f53c0 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/SleepListener.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/SleepListener.java @@ -1,19 +1,19 @@ -package de.steamwar.fightsystem.listener; - -import java.util.EnumSet; - -import org.bukkit.block.Block; -import org.bukkit.event.EventHandler; -import org.bukkit.event.player.PlayerBedEnterEvent; - -import de.steamwar.fightsystem.states.FightState; - -public class SleepListener extends BasicListener{ - public SleepListener() {super(EnumSet.allOf(FightState.class));} - @EventHandler - public void onSleep(PlayerBedEnterEvent e) { - e.setCancelled(true); - //Block b=e.getBed(); - //b.getWorld().createExplosion(b.getLocation(),4.0F); //4==tnt => dosnt have any advantage in WS (noFire,sameStrength,moreInvSpace,selfDamage) - } +package de.steamwar.fightsystem.listener; + +import de.steamwar.fightsystem.states.FightState; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerBedEnterEvent; + +import java.util.EnumSet; + +public class SleepListener extends BasicListener{ + + public SleepListener() { + super(EnumSet.allOf(FightState.class)); + } + + @EventHandler + public void onSleep(PlayerBedEnterEvent e) { + e.setCancelled(true); + } } \ No newline at end of file