Update from Git Manager GUI
This commit is contained in:
@@ -12,7 +12,6 @@ import java.util.UUID;
|
||||
|
||||
public class BuildCommand implements CommandExecutor {
|
||||
|
||||
// Liste der Spieler im Baumodus
|
||||
private static final ArrayList<UUID> buildModePlayers = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
@@ -30,7 +29,16 @@ public class BuildCommand implements CommandExecutor {
|
||||
// BAUMODUS DEAKTIVIEREN
|
||||
buildModePlayers.remove(uuid);
|
||||
|
||||
// Gamemode zurücksetzen (aus Config)
|
||||
// Inventar leeren
|
||||
player.getInventory().clear();
|
||||
player.getInventory().setArmorContents(null);
|
||||
|
||||
// Lobby-Items über das Modul wiedergeben
|
||||
if (NexusLobby.getInstance().getItemsModule() != null) {
|
||||
NexusLobby.getInstance().getItemsModule().giveLobbyItems(player);
|
||||
}
|
||||
|
||||
// Gamemode zurücksetzen
|
||||
String defaultGmName = NexusLobby.getInstance().getConfig().getString("default-gamemode", "ADVENTURE");
|
||||
try {
|
||||
GameMode gm = GameMode.valueOf(defaultGmName.toUpperCase());
|
||||
@@ -43,6 +51,9 @@ public class BuildCommand implements CommandExecutor {
|
||||
} else {
|
||||
// BAUMODUS AKTIVIEREN
|
||||
buildModePlayers.add(uuid);
|
||||
|
||||
player.getInventory().clear();
|
||||
player.getInventory().setArmorContents(null);
|
||||
player.setGameMode(GameMode.CREATIVE);
|
||||
|
||||
player.sendMessage("§8» §6§lBuild §8| §7Baumodus §aaktiviert§7.");
|
||||
|
||||
Reference in New Issue
Block a user