Archiviert
13
0

Add April jokes

Dieser Commit ist enthalten in:
yoyosource 2021-04-01 23:58:01 +02:00
Ursprung 0ddb33b06b
Commit 0ddae2abe4
4 geänderte Dateien mit 10 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -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));
}

Datei anzeigen

@ -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);
}

Datei anzeigen

@ -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);
}
}

Datei anzeigen

@ -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