Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
a132aafcbc
Commit
864c51c3d9
@ -247,7 +247,6 @@ public class BauCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void deleteWorld(ProxiedPlayer player, String world) {
|
private static void deleteWorld(ProxiedPlayer player, String world) {
|
||||||
Message.send("BAU_DELETE_DELETED", player);
|
|
||||||
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
||||||
for (Subserver subserver : Subserver.getServerList()) {
|
for (Subserver subserver : Subserver.getServerList()) {
|
||||||
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(player.getUniqueId())) {
|
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(player.getUniqueId())) {
|
||||||
@ -256,16 +255,20 @@ public class BauCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SubserverSystem.deleteFolder(Node.local, world);
|
SubserverSystem.deleteFolder(Node.local, world);
|
||||||
|
Message.send("BAU_DELETE_DELETED", player);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean stopBauserver(ProxiedPlayer p){
|
public static boolean stopBauserver(ProxiedPlayer p){
|
||||||
for (Subserver subserver : Subserver.getServerList()) {
|
for (Subserver subserver : Subserver.getServerList()) {
|
||||||
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(p.getUniqueId())) {
|
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(p.getUniqueId()) && !subserver.hasStarted()) {
|
||||||
if(!subserver.hasStarted()){
|
|
||||||
Message.send("BAU_START_ALREADY", p);
|
Message.send("BAU_START_ALREADY", p);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Subserver subserver : Subserver.getServerList()) {
|
||||||
|
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(p.getUniqueId())) {
|
||||||
subserver.stop();
|
subserver.stop();
|
||||||
try {
|
try {
|
||||||
Thread.sleep(200); // Wait until possible testarena-World has been deleted
|
Thread.sleep(200); // Wait until possible testarena-World has been deleted
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren