diff --git a/src/de/steamwar/lobby/LobbySystem.java b/src/de/steamwar/lobby/LobbySystem.java index 1bdab28..776e702 100644 --- a/src/de/steamwar/lobby/LobbySystem.java +++ b/src/de/steamwar/lobby/LobbySystem.java @@ -22,6 +22,7 @@ package de.steamwar.lobby; import de.steamwar.lobby.commands.FlyCommand; import de.steamwar.lobby.listener.*; import org.bukkit.Bukkit; +import org.bukkit.GameRule; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; @@ -44,6 +45,8 @@ public class LobbySystem extends JavaPlugin { pm.registerEvents(new EnderPearlListener(), instance); getCommand("fly").setExecutor(new FlyCommand()); + + Bukkit.getWorlds().forEach(world -> world.setGameRule(GameRule.DO_TILE_DROPS, true)); } diff --git a/src/de/steamwar/lobby/listener/PlayerConnectionListener.java b/src/de/steamwar/lobby/listener/PlayerConnectionListener.java index ab66243..9da8007 100644 --- a/src/de/steamwar/lobby/listener/PlayerConnectionListener.java +++ b/src/de/steamwar/lobby/listener/PlayerConnectionListener.java @@ -44,9 +44,9 @@ public class PlayerConnectionListener implements Listener { LobbyPlayer.getLobbyPlayer(player.getUniqueId()); //initialisiert einen neuen LP falls nicht vorhanden player.teleport(new Location(Bukkit.getWorlds().get(0), Config.SpawnX, Config.SpawnY, Config.SpawnZ, Config.Yaw, Config.Pitch)); - player.getInventory().clear(); + // player.getInventory().clear(); LobbyInventory.givePlayerLobbyItems(player); - player.setGameMode(GameMode.ADVENTURE); + player.setGameMode(GameMode.SURVIVAL); player.setHealth(20); player.setFoodLevel(20); } diff --git a/src/de/steamwar/lobby/listener/PlayerInventoryListener.java b/src/de/steamwar/lobby/listener/PlayerInventoryListener.java index 49b3512..22762ad 100644 --- a/src/de/steamwar/lobby/listener/PlayerInventoryListener.java +++ b/src/de/steamwar/lobby/listener/PlayerInventoryListener.java @@ -31,23 +31,22 @@ public class PlayerInventoryListener implements Listener { @EventHandler public void handlePlayerDropItem(PlayerDropItemEvent event) { - event.setCancelled(true); + // event.setCancelled(true); } @EventHandler public void handlePlayerPickupItem(PlayerPickupItemEvent event) { - event.setCancelled(true); + // event.setCancelled(true); } @EventHandler(priority = EventPriority.LOWEST) public void handleInventoryClick(InventoryClickEvent event) { - event.setCancelled(true); + // event.setCancelled(true); } @EventHandler public void handlePlayerSwapHandItemsEvent(PlayerSwapHandItemsEvent event) { - event.setCancelled(true); + // event.setCancelled(true); } - } diff --git a/src/de/steamwar/lobby/listener/PlayerWorldInteractionListener.java b/src/de/steamwar/lobby/listener/PlayerWorldInteractionListener.java index 29ecc26..9864121 100644 --- a/src/de/steamwar/lobby/listener/PlayerWorldInteractionListener.java +++ b/src/de/steamwar/lobby/listener/PlayerWorldInteractionListener.java @@ -32,7 +32,7 @@ public class PlayerWorldInteractionListener implements Listener { @EventHandler(priority = EventPriority.LOW) public void handlePlayerInteract(PlayerInteractEvent event) { - event.setCancelled(true); + // event.setCancelled(true); } @EventHandler