bugfixes
Dieser Commit ist enthalten in:
Ursprung
7a6b079b9d
Commit
f635b386f7
@ -6,11 +6,14 @@ import de.steamwar.lobby.utils.LobbyPlayer;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.EnderPearl;
|
import org.bukkit.entity.EnderPearl;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
|
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleExitEvent;
|
import org.bukkit.event.vehicle.VehicleExitEvent;
|
||||||
@ -61,5 +64,16 @@ public class EnderPearlListener implements Listener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void handleProjectileHit(ProjectileHitEvent event) {
|
||||||
|
Entity entity = event.getEntity();
|
||||||
|
if(entity.getType() != EntityType.ENDER_PEARL)
|
||||||
|
return;
|
||||||
|
if(!(entity.getPassenger() instanceof Player))
|
||||||
|
return;
|
||||||
|
Player player = (Player) entity;
|
||||||
|
player.teleport(event.getHitBlock().getLocation());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public class ShieldListener implements Listener {
|
|||||||
if(!entityPlayerLP.isShield())
|
if(!entityPlayerLP.isShield())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
world.playEffect(playerLocation, Effect.ENDER_SIGNAL, 1);
|
world.playEffect(entityPlayer.getLocation(), Effect.ENDER_SIGNAL, 1);
|
||||||
|
|
||||||
Location location = entityPlayer.getLocation();
|
Location location = entityPlayer.getLocation();
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren