13
0

Remove Upside down Seats

Dieser Commit ist enthalten in:
Chaoscaot 2020-11-02 16:27:11 +01:00
Ursprung 38e59848f0
Commit 1ab54fec64

Datei anzeigen

@ -20,6 +20,8 @@
package de.steamwar.spectatesystem.listener;
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.Arrow;
import org.bukkit.entity.EntityType;
@ -41,6 +43,9 @@ public class PlayerSeatListener extends BasicListener {
if(event.getPlayer().getGameMode() != GameMode.ADVENTURE)
return;
if(((Stairs)event.getClickedBlock().getBlockData()).getHalf() != Bisected.Half.BOTTOM)
return;
if(event.getPlayer().isInsideVehicle())
event.getPlayer().getVehicle().remove();