Add April jokes
Dieser Commit ist enthalten in:
Ursprung
0ddb33b06b
Commit
0ddae2abe4
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren