Update2.0 #22
@ -26,6 +26,7 @@ import org.bukkit.configuration.file.FileConfiguration;
|
|||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class Config {
|
public class Config {
|
||||||
@ -50,7 +51,8 @@ public class Config {
|
|||||||
|
|
||||||
public static final double MissileChance;
|
public static final double MissileChance;
|
||||||
|
|
||||||
private static final int EventKampfID;
|
public static final UUID BlueLeader;
|
||||||
|
public static final UUID RedLeader;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
File configfile = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "config.yml");
|
File configfile = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "config.yml");
|
||||||
@ -86,11 +88,20 @@ public class Config {
|
|||||||
BluePortalZ = blue.getInt("PortalZ");
|
BluePortalZ = blue.getInt("PortalZ");
|
||||||
BlueSpawn = new Location(Bukkit.getWorlds().get(0), blue.getDouble("SpawnX"), blue.getDouble("SpawnY"), blue.getDouble("SpawnZ"), (float)blue.getDouble("SpawnYaw"), (float)blue.getDouble("SpawnPitch"));
|
BlueSpawn = new Location(Bukkit.getWorlds().get(0), blue.getDouble("SpawnX"), blue.getDouble("SpawnY"), blue.getDouble("SpawnZ"), (float)blue.getDouble("SpawnYaw"), (float)blue.getDouble("SpawnPitch"));
|
||||||
|
|
||||||
EventKampfID = Integer.parseInt(System.getProperty("fightID", "0"));
|
String blueLeader = System.getProperty("blueLeader", null);
|
||||||
|
String redLeader = System.getProperty("redLeader", null);
|
||||||
|
|||||||
|
if(blueLeader != null)
|
||||||
|
BlueLeader = UUID.fromString(blueLeader);
|
||||||
|
else
|
||||||
|
BlueLeader = null;
|
||||||
|
if(redLeader != null)
|
||||||
|
RedLeader = UUID.fromString(redLeader);
|
||||||
|
else
|
||||||
|
RedLeader = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean test() {
|
public boolean isChallenge() {
|
||||||
return EventKampfID == -1;
|
return BlueLeader != null && RedLeader != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -118,8 +118,6 @@ public class MWTeam {
|
|||||||
p.setDisplayName(color + p.getName());
|
p.setDisplayName(color + p.getName());
|
||||||
if (MissileWars.getFightState() == FightState.WAITING && !enemy().players.isEmpty())
|
if (MissileWars.getFightState() == FightState.WAITING && !enemy().players.isEmpty())
|
||||||
MissileWars.startRound();
|
MissileWars.startRound();
|
||||||
if (!Config.test())
|
|
||||||
Bukkit.getScheduler().runTaskLater(MissileWars.getPlugin(), () -> new TablistNamePacket(SteamwarUser.get(p.getUniqueId()).getId(), color + p.getName()).send(p), 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void leave(Player p) {
|
public void leave(Player p) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
In den derzeit geplanten änderungen zum Server System sollten wir eher weg von System Arguementen
Gut wie soll ich es sonst lösen, so ist es im FightSystem!
Da ist dann leider auch eine Änderung im BungeeCore und FightSystem nötig, da brauchen wir noch überhaupt ein Konzept, wie wir dann solche Argumente überhaupt auf den Server bekommen. Evtl. indem wir Configs anpassbar machen. Ich denke aber nicht, dass wir da hier jetzt schon mit dem Umbau beginnen sollten.