Dieser Commit ist enthalten in:
Ursprung
ca956564eb
Commit
00e1e929ee
@ -25,6 +25,7 @@ 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.Player;
|
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.EntitySpawnEvent;
|
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
@ -43,7 +44,9 @@ public class SpaceListener extends BasicListener {
|
|||||||
if (event.getEntity() instanceof Player) return;
|
if (event.getEntity() instanceof Player) return;
|
||||||
event.getEntity().setGravity(false);
|
event.getEntity().setGravity(false);
|
||||||
Vector vector = event.getEntity().getVelocity();
|
Vector vector = event.getEntity().getVelocity();
|
||||||
|
if (event.getEntity() instanceof TNTPrimed) {
|
||||||
vector.setY(0);
|
vector.setY(0);
|
||||||
|
}
|
||||||
event.getEntity().setVelocity(vector);
|
event.getEntity().setVelocity(vector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren