Archiviert
1
0

Adding full 1.15 support

Dieser Commit ist enthalten in:
Lixfel 2020-02-16 19:27:15 +01:00
Ursprung b63d428de5
Commit c6f23876e3

Datei anzeigen

@ -30,6 +30,7 @@ public class BauCommand {
switch(command[1].toLowerCase()){
case "15":
case "1.15":
SubserverSystem.sendToBau15(p, p.getUniqueId());
break;
case "addmember":
@ -62,7 +63,7 @@ public class BauCommand {
break;
case "resetall":
case "delete":
delete(p);
delete(p, command);
break;
case "testarena":
case "test":
@ -111,6 +112,10 @@ public class BauCommand {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDu darfst dich nicht auf diese Welt teleportieren");
return;
}
if(command.length > 3 && command[3].equals("1.15"))
SubserverSystem.sendToBau15(p, worldOwner.getUuid());
else
SubserverSystem.sendToBauServer(p, worldOwner.getUuid());
}
@ -162,7 +167,26 @@ public class BauCommand {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDer Spieler wurde entfernt.");
}
private static void delete(ProxiedPlayer p){
private static void delete(ProxiedPlayer p, String[] command){
if(command.length > 2){
if(!command[2].equals("1.15")){
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§c Unbekannte Option: " + command[2]);
return;
}
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§aDeine Welt wird zurückgesetzt.");
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
for (Subserver subserver : Subserver.getServerList()) {
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(p.getUniqueId())) {
subserver.stop();
break;
}
}
SteamwarUser user = SteamwarUser.get(p.getUniqueId());
File directory = new File(BungeeCore.USERWORLDS15 + user.getId());
del(directory);
});
}else{
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§aDeine Welt wird zurückgesetzt.");
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
for (Subserver subserver : Subserver.getServerList()) {
@ -175,6 +199,7 @@ public class BauCommand {
del(directory);
});
}
}
private static void testarena(ProxiedPlayer p, String[] command){
FightCommand.createArena(p, "/bau testarena ", command, 2, (player, mode, map) -> ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {