From 1ab54fec6416377669a53e2f89f4ceed7af18d3f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 2 Nov 2020 16:27:11 +0100 Subject: [PATCH] Remove Upside down Seats --- .../steamwar/spectatesystem/listener/PlayerSeatListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java b/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java index e6d107e..cf30126 100644 --- a/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java +++ b/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java @@ -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();