Dieser Commit ist enthalten in:
Ursprung
d336893196
Commit
04a2d60fae
@ -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();
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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);
|
||||
}*/
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren