geforkt von SteamWar/BungeeCore
Merge branch 'standard1.15'
Dieser Commit ist enthalten in:
Commit
42234d579c
@ -24,11 +24,26 @@ public class BauCommand {
|
|||||||
BungeeCore.log(p, e.getMessage());
|
BungeeCore.log(p, e.getMessage());
|
||||||
|
|
||||||
if(command.length == 1){
|
if(command.length == 1){
|
||||||
|
if(bau15(p, command, 1))
|
||||||
|
SubserverSystem.sendToBau15(p, p.getUniqueId());
|
||||||
|
else
|
||||||
SubserverSystem.sendToBauServer(p, p.getUniqueId());
|
SubserverSystem.sendToBauServer(p, p.getUniqueId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(command[1].toLowerCase()){
|
switch(command[1].toLowerCase()){
|
||||||
|
case "ws":
|
||||||
|
case "warship":
|
||||||
|
case "wg":
|
||||||
|
case "wargear":
|
||||||
|
case "12":
|
||||||
|
case "1.12":
|
||||||
|
SubserverSystem.sendToBauServer(p, p.getUniqueId());
|
||||||
|
break;
|
||||||
|
case "as":
|
||||||
|
case "airship":
|
||||||
|
case "mwg":
|
||||||
|
case "miniwargear":
|
||||||
case "15":
|
case "15":
|
||||||
case "1.15":
|
case "1.15":
|
||||||
SubserverSystem.sendToBau15(p, p.getUniqueId());
|
SubserverSystem.sendToBau15(p, p.getUniqueId());
|
||||||
@ -113,12 +128,36 @@ public class BauCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(command.length > 3 && command[3].equals("1.15"))
|
if(bau15(p, command, 3))
|
||||||
SubserverSystem.sendToBau15(p, worldOwner.getUuid());
|
SubserverSystem.sendToBau15(p, worldOwner.getUuid());
|
||||||
else
|
else
|
||||||
SubserverSystem.sendToBauServer(p, worldOwner.getUuid());
|
SubserverSystem.sendToBauServer(p, worldOwner.getUuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean bau15(ProxiedPlayer p, String[] args, int pos){
|
||||||
|
if(args.length <= pos)
|
||||||
|
return p.getPendingConnection().getVersion() > 340; // Version > 1.12.2
|
||||||
|
|
||||||
|
switch(args[pos].toLowerCase()){
|
||||||
|
case "ws":
|
||||||
|
case "warship":
|
||||||
|
case "wg":
|
||||||
|
case "wargear":
|
||||||
|
case "12":
|
||||||
|
case "1.12":
|
||||||
|
return false;
|
||||||
|
case "as":
|
||||||
|
case "airship":
|
||||||
|
case "mwg":
|
||||||
|
case "miniwargear":
|
||||||
|
case "15":
|
||||||
|
case "1.15":
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return p.getPendingConnection().getVersion() > 340; // Version > 1.12.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void togglebuild(ProxiedPlayer p, String[] command){
|
private static void togglebuild(ProxiedPlayer p, String[] command){
|
||||||
BauweltMember target = toggle(p, command, "togglebuild");
|
BauweltMember target = toggle(p, command, "togglebuild");
|
||||||
if(target == null)
|
if(target == null)
|
||||||
@ -168,12 +207,7 @@ public class BauCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void delete(ProxiedPlayer p, String[] command){
|
private static void delete(ProxiedPlayer p, String[] command){
|
||||||
if(command.length > 2){
|
if(bau15(p, command, 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.");
|
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§aDeine Welt wird zurückgesetzt.");
|
||||||
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
||||||
for (Subserver subserver : Subserver.getServerList()) {
|
for (Subserver subserver : Subserver.getServerList()) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren