Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
aa40bd1ec5
Commit
7f196f0801
@ -259,16 +259,22 @@ public class BauCommand extends BasicCommand {
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean stopBauserver(ProxiedPlayer p){
|
||||
private static boolean startingBau(ProxiedPlayer p) {
|
||||
for (Subserver subserver : Subserver.getServerList()) {
|
||||
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(p.getUniqueId()) && !subserver.hasStarted()) {
|
||||
Message.send("BAU_START_ALREADY", p);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean stopBauserver(ProxiedPlayer p){
|
||||
if(startingBau(p))
|
||||
return false;
|
||||
|
||||
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()) {
|
||||
subserver.stop();
|
||||
try {
|
||||
Thread.sleep(200); // Wait until possible testarena-World has been deleted
|
||||
@ -278,7 +284,8 @@ public class BauCommand extends BasicCommand {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
return !startingBau(p);
|
||||
}
|
||||
|
||||
private static void testarena(ProxiedPlayer p, String[] args){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren