Dieser Commit ist enthalten in:
Ursprung
07187d6e8a
Commit
653a07aef1
@ -21,10 +21,7 @@ package de.steamwar.lobby.listener;
|
|||||||
|
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.inventory.SWInventory;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.*;
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
@ -35,10 +32,10 @@ public class TeleporterListener extends BasicListener {
|
|||||||
private static final World world = Bukkit.getWorlds().get(0);
|
private static final World world = Bukkit.getWorlds().get(0);
|
||||||
|
|
||||||
private static final Location spawn = world.getSpawnLocation().clone().add(0.5, 0, 0.5);
|
private static final Location spawn = world.getSpawnLocation().clone().add(0.5, 0, 0.5);
|
||||||
private static final Location team = new Location(world,1524,55,1440);
|
private static final Location team = new Location(world,1524.5,55,1440.5);
|
||||||
private static final Location map = new Location(world,2337,38,1424);
|
private static final Location map = new Location(world,2336.5,38,1423.5);
|
||||||
private static final Location bau = new Location(world,1951,66,1337);
|
private static final Location bau = new Location(world,1951,66,1337, -38, -5);
|
||||||
private static final Location arenen = new Location(world,2255,21,1450);
|
private static final Location arenen = new Location(world,2255.5,21,1450.5);
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void handlePlayerInteract(PlayerInteractEvent event) {
|
public void handlePlayerInteract(PlayerInteractEvent event) {
|
||||||
@ -68,6 +65,7 @@ public class TeleporterListener extends BasicListener {
|
|||||||
|
|
||||||
private void teleport(Location location, Player player) {
|
private void teleport(Location location, Player player) {
|
||||||
player.teleport(location);
|
player.teleport(location);
|
||||||
|
player.playSound(location, Sound.BLOCK_ENCHANTMENT_TABLE_USE, 0.25f, 1.0f);
|
||||||
Portals.getStack(player).clear();
|
Portals.getStack(player).clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren