Fix Seat problem
Dieser Commit ist enthalten in:
Ursprung
618390def1
Commit
f9966c3377
@ -20,6 +20,8 @@
|
||||
package de.steamwar.spectatesystem.listener;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.type.Stairs;
|
||||
import org.bukkit.entity.AbstractArrow;
|
||||
@ -49,7 +51,11 @@ public class PlayerSeatListener extends BasicListener {
|
||||
if(event.getPlayer().isInsideVehicle())
|
||||
event.getPlayer().getVehicle().remove();
|
||||
|
||||
Arrow arrow = (Arrow) event.getPlayer().getWorld().spawnEntity(event.getClickedBlock().getLocation().add(0.5, 0, 0.5), EntityType.ARROW);
|
||||
Location location = event.getClickedBlock().getLocation();
|
||||
if (location.getWorld().getBlockAt(location.getBlockX(), location.getBlockY() + 1, location.getBlockZ()).getType() == Material.AIR)
|
||||
return;
|
||||
|
||||
Arrow arrow = (Arrow) event.getPlayer().getWorld().spawnEntity(location.add(0.5, 0, 0.5), EntityType.ARROW);
|
||||
arrow.setGravity(false);
|
||||
arrow.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED);
|
||||
arrow.addPassenger(event.getPlayer());
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren