diff --git a/src/de/steamwar/lobby/LobbySystem.java b/src/de/steamwar/lobby/LobbySystem.java index 91743df..e035935 100644 --- a/src/de/steamwar/lobby/LobbySystem.java +++ b/src/de/steamwar/lobby/LobbySystem.java @@ -52,7 +52,6 @@ public class LobbySystem extends JavaPlugin { config = new Config(getConfig()); new PlayerSpawn(); new DoubleJumpListener(); - new ElytraListener(); new ParticleListener(); new InventoryInteraction(); new WorldInteraction(); diff --git a/src/de/steamwar/lobby/listener/ElytraListener.java b/src/de/steamwar/lobby/listener/ElytraListener.java deleted file mode 100644 index dac82f2..0000000 --- a/src/de/steamwar/lobby/listener/ElytraListener.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.lobby.listener; - -import de.steamwar.lobby.util.LobbyPlayer; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.event.player.PlayerMoveEvent; - -public class ElytraListener extends BasicListener { - - @EventHandler(priority = EventPriority.HIGHEST) - public void handlePlayerInteract(PlayerInteractEvent event) { - Player player = event.getPlayer(); - LobbyPlayer lobbyPlayer = LobbyPlayer.getLobbyPlayer(player); - - /*if (event.getMaterial() != LobbyInventory.ELYTRA_READY) return; - - if(!lobbyPlayer.isFlyingElytra()) { - player.getInventory().setChestplate(new ItemStack(Material.ELYTRA)); - player.setGliding(true); - player.teleport(new Location(Bukkit.getWorlds().get(0),player.getLocation().getX(),player.getLocation().getY() + 4, player.getLocation().getZ(), player.getLocation().getYaw(), player.getLocation().getPitch())); - player.setGliding(true); - lobbyPlayer.setFlyingElytra(true); - LobbyInventory.givePlayerLobbyItems(player); - }*/ - } - - @EventHandler - public void onMove(PlayerMoveEvent event) { - /*Player player = event.getPlayer(); - LobbyPlayer lobbyPlayer = LobbyPlayer.getLobbyPlayer(player); - - if(lobbyPlayer.isFlyingElytra() && player.isOnGround()) { - lobbyPlayer.setFlyingElytra(false); - player.getInventory().clear(); - LobbyInventory.givePlayerLobbyItems(player); - }*/ - } -} diff --git a/src/de/steamwar/lobby/listener/InventoryInteraction.java b/src/de/steamwar/lobby/listener/InventoryInteraction.java index 8f3eb89..616eb5d 100644 --- a/src/de/steamwar/lobby/listener/InventoryInteraction.java +++ b/src/de/steamwar/lobby/listener/InventoryInteraction.java @@ -38,7 +38,8 @@ public class InventoryInteraction extends BasicListener { event.getItem().setAmount(2); return; } - event.setCancelled(true); + if(!DebugCommand.debugging(event.getPlayer())) + event.setCancelled(true); } @EventHandler diff --git a/src/de/steamwar/lobby/listener/PlayerSpawn.java b/src/de/steamwar/lobby/listener/PlayerSpawn.java index 278ed8b..fc928bd 100644 --- a/src/de/steamwar/lobby/listener/PlayerSpawn.java +++ b/src/de/steamwar/lobby/listener/PlayerSpawn.java @@ -60,7 +60,7 @@ public class PlayerSpawn extends BasicListener { inventory.setItem(EquipmentSlot.CHEST, ELYTRA); - player.getInventory().setItem(4, new ItemBuilder(Material.FIREWORK_ROCKET, 1).setDisplayName("§5Rakete").build()); + player.getInventory().setItem(3, new ItemBuilder(Material.FIREWORK_ROCKET, 1).setDisplayName("§5Rakete").build()); player.getInventory().setItem(5, PARTICLE); }