Remove Upside down Seats
Dieser Commit ist enthalten in:
Ursprung
38e59848f0
Commit
1ab54fec64
@ -20,6 +20,8 @@
|
|||||||
package de.steamwar.spectatesystem.listener;
|
package de.steamwar.spectatesystem.listener;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.block.data.Bisected;
|
||||||
|
import org.bukkit.block.data.type.Stairs;
|
||||||
import org.bukkit.entity.AbstractArrow;
|
import org.bukkit.entity.AbstractArrow;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
@ -41,6 +43,9 @@ public class PlayerSeatListener extends BasicListener {
|
|||||||
if(event.getPlayer().getGameMode() != GameMode.ADVENTURE)
|
if(event.getPlayer().getGameMode() != GameMode.ADVENTURE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(((Stairs)event.getClickedBlock().getBlockData()).getHalf() != Bisected.Half.BOTTOM)
|
||||||
|
return;
|
||||||
|
|
||||||
if(event.getPlayer().isInsideVehicle())
|
if(event.getPlayer().isInsideVehicle())
|
||||||
event.getPlayer().getVehicle().remove();
|
event.getPlayer().getVehicle().remove();
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren