Fix Seat problem #7
@ -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.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.Bisected;
|
import org.bukkit.block.data.Bisected;
|
||||||
import org.bukkit.block.data.type.Stairs;
|
import org.bukkit.block.data.type.Stairs;
|
||||||
import org.bukkit.entity.AbstractArrow;
|
import org.bukkit.entity.AbstractArrow;
|
||||||
@ -48,6 +50,9 @@ public class PlayerSeatListener extends BasicListener {
|
|||||||
|
|
||||||
if(event.getPlayer().isInsideVehicle())
|
if(event.getPlayer().isInsideVehicle())
|
||||||
event.getPlayer().getVehicle().remove();
|
event.getPlayer().getVehicle().remove();
|
||||||
|
|
||||||
|
if (event.getClickedBlock().getRelative(0, 1, 0).getType() != Material.AIR)
|
||||||
|
return;
|
||||||
|
|
||||||
Arrow arrow = (Arrow) event.getPlayer().getWorld().spawnEntity(event.getClickedBlock().getLocation().add(0.5, 0, 0.5), EntityType.ARROW);
|
Arrow arrow = (Arrow) event.getPlayer().getWorld().spawnEntity(event.getClickedBlock().getLocation().add(0.5, 0, 0.5), EntityType.ARROW);
|
||||||
arrow.setGravity(false);
|
arrow.setGravity(false);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren