Dieser Commit ist enthalten in:
Ursprung
eed250ce95
Commit
5776d56039
@ -24,10 +24,9 @@ package de.steamwar.misslewars.listener.special;
|
|||||||
import de.steamwar.misslewars.Config;
|
import de.steamwar.misslewars.Config;
|
||||||
import de.steamwar.misslewars.FightState;
|
import de.steamwar.misslewars.FightState;
|
||||||
import de.steamwar.misslewars.listener.BasicListener;
|
import de.steamwar.misslewars.listener.BasicListener;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.TNTPrimed;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
@ -38,12 +37,9 @@ public class SpaceListener extends BasicListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onExplosionPrime(ExplosionPrimeEvent event) {
|
public void onEntitySpawn(EntitySpawnEvent event) {
|
||||||
if (!Config.Space) return;
|
if (!Config.Space) return;
|
||||||
Entity entity = event.getEntity();
|
if (event.getEntity() instanceof Player) return;
|
||||||
if (entity instanceof TNTPrimed) {
|
event.getEntity().setGravity(false);
|
||||||
TNTPrimed tnt = (TNTPrimed) entity;
|
|
||||||
tnt.setGravity(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren