SteamWar/FightSystem
Archiviert
13
1

Sleep Preventer #178

Manuell gemergt
Lixfel hat 3 Commits von Insomnia nach master 2020-08-18 17:49:46 +02:00 zusammengeführt
Nur Änderungen aus Commit ddc5874fe9 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -1,19 +1,19 @@
package de.steamwar.fightsystem.listener; package de.steamwar.fightsystem.listener;
import java.util.EnumSet; import de.steamwar.fightsystem.states.FightState;
import org.bukkit.block.Block;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerBedEnterEvent; import org.bukkit.event.player.PlayerBedEnterEvent;
import de.steamwar.fightsystem.states.FightState; import java.util.EnumSet;
public class SleepListener extends BasicListener{ public class SleepListener extends BasicListener{
public SleepListener() {super(EnumSet.allOf(FightState.class));}
public SleepListener() {
super(EnumSet.allOf(FightState.class));
}
@EventHandler @EventHandler
public void onSleep(PlayerBedEnterEvent e) { public void onSleep(PlayerBedEnterEvent e) {
e.setCancelled(true); 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)
} }
} }