Dieser Commit ist enthalten in:
Ursprung
a4afc5fe88
Commit
9fde17cb71
@ -36,9 +36,9 @@ import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
public class PlayerSpawn extends BasicListener {
|
||||
|
||||
public static final int FIREWORK_SLOT = 3;
|
||||
public static final int FIREWORK_SLOT = 2;
|
||||
public static final ItemStack FIREWORK = new ItemBuilder(Material.FIREWORK_ROCKET, 1).setDisplayName("§5Rakete").build();
|
||||
public static final int PARTICLE_SLOT = 5;
|
||||
public static final int PARTICLE_SLOT = 6;
|
||||
public static final int NETHER_STAR_SLOT = 4;
|
||||
public static final ItemStack PARTICLE = new ItemBuilder(Material.NAME_TAG).setDisplayName("§6Partikel").setUnbreakable(true).removeAllAttributes().build();
|
||||
private static final ItemStack ELYTRA = new ItemBuilder(Material.ELYTRA).setDisplayName("§5Elytra").setUnbreakable(true).removeAllAttributes().build();
|
||||
|
@ -1,19 +1,31 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.lobby.listener;
|
||||
|
||||
import de.steamwar.inventory.SWInventory;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import de.steamwar.inventory.SWListInv;
|
||||
import de.steamwar.lobby.Config;
|
||||
import de.steamwar.lobby.particle.SpecialParticle;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
@ -29,6 +41,8 @@ public class TeleporterListener extends BasicListener{
|
||||
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 map = new Location(world,2337,38,1424);
|
||||
private static final Location bau = new Location(world,1951,66,1337);
|
||||
private static final Location arenen = new Location(world,2255,21,1448);
|
||||
|
||||
static {
|
||||
inventory = createInventory();
|
||||
@ -56,13 +70,22 @@ public class TeleporterListener extends BasicListener{
|
||||
player.teleport(team);
|
||||
}else if(item.getType() == Material.MAP) {
|
||||
player.teleport(map);
|
||||
}else if(item.getType() == Material.WOODEN_AXE) {
|
||||
player.teleport(bau);
|
||||
}else if(item.getType() == Material.CLOCK) {
|
||||
player.teleport(arenen);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static Inventory createInventory() {
|
||||
Inventory inv = Bukkit.createInventory(null, InventoryType.HOPPER, "§6Teleporter");
|
||||
|
||||
ItemStack item = new ItemStack(Material.WOODEN_AXE, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§eBaubereich");
|
||||
item.setItemMeta(meta);
|
||||
inv.setItem(0, item);
|
||||
|
||||
ItemStack item1 = new ItemStack(Material.MAGMA_CREAM, 1);
|
||||
ItemMeta meta1 = item1.getItemMeta();
|
||||
meta1.setDisplayName("§eSpawn");
|
||||
@ -81,6 +104,12 @@ public class TeleporterListener extends BasicListener{
|
||||
item3.setItemMeta(meta3);
|
||||
inv.setItem(3, item3);
|
||||
|
||||
ItemStack item4 = new ItemStack(Material.CLOCK, 1);
|
||||
ItemMeta meta4 = item4.getItemMeta();
|
||||
meta4.setDisplayName("§eArenen");
|
||||
item4.setItemMeta(meta4);
|
||||
inv.setItem(4, item4);
|
||||
|
||||
return inv;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren