Update2.0 #22
7
pom.xml
7
pom.xml
@ -53,5 +53,12 @@
|
||||
<scope>system</scope>
|
||||
<systemPath>${main.basedir}/lib/WorldEdit-1.15.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>SpigotCore</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${main.basedir}/lib/SpigotCore.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -50,6 +50,8 @@ public class Config {
|
||||
|
||||
public static final double MissileChance;
|
||||
|
||||
private static final int EventKampfID;
|
||||
|
||||
static {
|
||||
File configfile = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "config.yml");
|
||||
if (!configfile.exists()) {
|
||||
@ -83,5 +85,12 @@ public class Config {
|
||||
assert blue != null;
|
||||
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"));
|
||||
|
||||
EventKampfID = Integer.parseInt(System.getProperty("fightID", "0"));
|
||||
}
|
||||
|
||||
public static boolean test() {
|
||||
|
||||
return EventKampfID == -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,10 +19,9 @@
|
||||
|
||||
package de.steamwar.misslewars;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import de.steamwar.comms.packets.TablistNamePacket;
|
||||
Chaoscaot
hat
Unused Import Unused Import
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
@ -95,7 +94,7 @@ public class MWTeam {
|
||||
}
|
||||
|
||||
public void teamScoreboard(Objective objective) {
|
||||
players.forEach(p -> objective.getScore(getPrefix() + p.getName()).setScore(1));
|
||||
players.forEach(p -> objective.getScore(getColorCode() + p.getName()).setScore(1));
|
||||
}
|
||||
|
||||
public int size() {
|
||||
@ -119,6 +118,8 @@ public class MWTeam {
|
||||
p.setDisplayName(color + p.getName());
|
||||
if (MissileWars.getFightState() == FightState.WAITING && !enemy().players.isEmpty())
|
||||
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) {
|
||||
@ -137,7 +138,7 @@ public class MWTeam {
|
||||
return MissileWars.getRedTeam();
|
||||
}
|
||||
|
||||
public String getPrefix(){
|
||||
public String getColorCode(){
|
||||
return "§" + color.getChar();
|
||||
}
|
||||
|
||||
|
@ -28,11 +28,14 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class DeathListener extends BasicListener {
|
||||
|
||||
private static Vector ZERO = new Vector(0, 0, 0);
|
||||
Chaoscaot
hat
Könnte Final sein Könnte Final sein
|
||||
|
||||
public DeathListener() {
|
||||
super(EnumSet.allOf(FightState.class));
|
||||
}
|
||||
@ -52,6 +55,7 @@ public class DeathListener extends BasicListener {
|
||||
return;
|
||||
|
||||
e.setRespawnLocation(team.getSpawn());
|
||||
e.getPlayer().setVelocity(ZERO);
|
||||
new SpawnPlatformCreator(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.