G
galaone
Unregistriert
Crash Log bitte einfügenOk: Hier bekommst du einen Teil des Codes:
Map.java im Package de.Nico.timegames.voting
Code:package de.Nico.timegames.voting; import java.util.ArrayList; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; import org.omg.CORBA.portable.ValueOutputStream; import de.Nico.timegames.Global; public class Map { List<Location> loclist = new ArrayList<Location>(); String name; public int vote; public Map(String name, List<Location> loclist){ this.loclist = loclist; this.name = name; vote = 0; } public String getName(){ return name; } public void addVote(){ vote++; } public void spawnPlayers(){ int i = 0; for(Player all : Bukkit.getOnlinePlayers()){ all.teleport(loclist.get(i)); //Zeile 34 Global.locs.put(all.getName(), loclist.get(i)); i++; } } }
Hier ist der Fehler in Zeile 34
und Lobby.Jave in de.Nico.timegames.countdown
Code:package de.Nico.timegames.countdown; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import de.Nico.timegames.Global; import de.Nico.timegames.Main; import de.Nico.timegames.game.GameState; import de.Nico.timegames.stats.Stats_Reader.Stats_Data; import de.Nico.timegames.stats.Stats_Reader.Stats_Writer; import de.Nico.timegames.utils.BossHealth; import de.Nico.timegames.voting.Voting_Settings; public class Lobby { public static int LobbyCounter = 120; public static void startLobby(){ Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getInstance(), new Runnable() { @SuppressWarnings("deprecation") public void run() { if(Main.status == GameState.LOBBY){ if(Bukkit.getOnlinePlayers().length >= 2){ if(LobbyCounter == 120 || LobbyCounter == 90 || LobbyCounter == 60 || LobbyCounter == 30 || LobbyCounter == 15 || LobbyCounter == 10 || LobbyCounter == 5 || LobbyCounter == 4 || LobbyCounter == 3 || LobbyCounter == 2 || LobbyCounter == 1){ Bukkit.broadcastMessage(Main.pr+"§aDas Spiel Startet in §c"+LobbyCounter+" §aSekunden."); } for(Player all : Bukkit.getOnlinePlayers()){ all.setLevel(LobbyCounter); all.setExp(0); double b = LobbyCounter; BossHealth.displayText(all, "§3TimeGames §e| §aLobby §b"+LobbyCounter, b/120); } if(LobbyCounter == 12){ Global.voting = false; Voting_Settings.endVote(); Bukkit.broadcastMessage(Main.pr+"Die Map "+Global.winMap.getName()+" hat das Voting mit "+Global.winMap.vote+" Stimmen gewonnen."); } if(LobbyCounter == 0){ Main.status = GameState.WARMUP; Bukkit.broadcastMessage(Main.pr+"§6Das Spiel hat begonnen."); WarmUp.startWarmUp(); Global.winMap.spawnPlayers(); for(Player all : Bukkit.getOnlinePlayers()){ all.getInventory().clear(); all.getInventory().setHelmet(null); all.getInventory().setChestplate(null); all.getInventory().setLeggings(null); all.getInventory().setBoots(null); all.setFoodLevel(20); all.setHealth(20D); all.setLevel(0); all.setExp(0); Global.alive.add(all.getName()); if(Main.sql == true){ Stats_Writer.addStats(Stats_Data.SpieleGespielt, all.getName(), 1); } } } LobbyCounter--; }else{ for(Player all : Bukkit.getOnlinePlayers()){ all.setLevel(LobbyCounter); all.setExp(0); BossHealth.displayText(all, "§3TimeGames §e| §aLobby §cWarte...", 1); } LobbyCounter = 120; } } } }, 0L, 20L); } }
Solltest du mehr brauchen schreib einfach.![]()