WarGear release modifications
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
232c6571fb
Commit
05c45cb6a2
@ -34,8 +34,6 @@ public class BauCommand {
|
||||
switch(command[1].toLowerCase()){
|
||||
case "ws":
|
||||
case "warship":
|
||||
case "wg":
|
||||
case "wargear":
|
||||
case "12":
|
||||
case "1.12":
|
||||
SubserverSystem.sendToBauServer(p, p.getUniqueId());
|
||||
@ -44,6 +42,8 @@ public class BauCommand {
|
||||
case "airship":
|
||||
case "mwg":
|
||||
case "miniwargear":
|
||||
case "wg":
|
||||
case "wargear":
|
||||
case "15":
|
||||
case "1.15":
|
||||
SubserverSystem.sendToBau15(p, p.getUniqueId());
|
||||
|
@ -24,7 +24,7 @@ public class CheckCommand extends BasicCommand {
|
||||
private static Map<SchematicType, List<String>> checkQuestions = new HashMap<>();
|
||||
private static Map<SchematicType, List<String>> ranks = new HashMap<>();
|
||||
|
||||
private static Map<ProxiedPlayer, CheckSession> currentCheckers = new HashMap<>();
|
||||
private static Map<UUID, CheckSession> currentCheckers = new HashMap<>();
|
||||
private static Map<Integer, CheckSession> currentSchems = new HashMap<>();
|
||||
|
||||
public static void loadCheckQuestions(Configuration config){
|
||||
@ -40,7 +40,7 @@ public class CheckCommand extends BasicCommand {
|
||||
}
|
||||
|
||||
public static boolean isChecking(ProxiedPlayer player){
|
||||
return currentCheckers.containsKey(player);
|
||||
return currentCheckers.containsKey(player.getUniqueId());
|
||||
}
|
||||
|
||||
public CheckCommand() {
|
||||
@ -118,7 +118,7 @@ public class CheckCommand extends BasicCommand {
|
||||
}
|
||||
|
||||
private void schematic(ProxiedPlayer player, String schemID){
|
||||
if(currentCheckers.containsKey(player)){
|
||||
if(isChecking(player)){
|
||||
BungeeCore.send(player, "§cDu prüfst schon eine Schematic!");
|
||||
return;
|
||||
}
|
||||
@ -136,7 +136,7 @@ public class CheckCommand extends BasicCommand {
|
||||
}
|
||||
|
||||
private static boolean notChecking(ProxiedPlayer player){
|
||||
if(!currentCheckers.containsKey(player)){
|
||||
if(!isChecking(player)){
|
||||
BungeeCore.send(player, "§cDu prüfst derzeit nicht.");
|
||||
return true;
|
||||
}
|
||||
@ -157,7 +157,7 @@ public class CheckCommand extends BasicCommand {
|
||||
}
|
||||
}
|
||||
|
||||
currentCheckers.get(player).next(rank);
|
||||
currentCheckers.get(player.getUniqueId()).next(rank);
|
||||
}
|
||||
|
||||
public static void abort(ProxiedPlayer player){
|
||||
@ -165,7 +165,7 @@ public class CheckCommand extends BasicCommand {
|
||||
return;
|
||||
|
||||
BungeeCore.send(player, "§aDer Prüfvorgang wurde abgebrochen!");
|
||||
currentCheckers.get(player).abort();
|
||||
currentCheckers.get(player.getUniqueId()).abort();
|
||||
}
|
||||
|
||||
private void decline(ProxiedPlayer player, String[] args){
|
||||
@ -181,7 +181,7 @@ public class CheckCommand extends BasicCommand {
|
||||
for (int i = 1; i < args.length; i++)
|
||||
message.append(args[i]).append(" ");
|
||||
|
||||
currentCheckers.get(player).decline(message.toString());
|
||||
currentCheckers.get(player.getUniqueId()).decline(message.toString());
|
||||
}
|
||||
|
||||
private void help(CommandSender sender){
|
||||
@ -214,7 +214,7 @@ public class CheckCommand extends BasicCommand {
|
||||
|
||||
ArenaMode mode = ArenaMode.getByCheckSchemType(schematic.getSchemType().toDB());
|
||||
SubserverSystem.sendToTestServer(checker, mode, FightCommand.getMap(checker, mode, "Random"), schematic.getSchemID());
|
||||
currentCheckers.put(checker, this);
|
||||
currentCheckers.put(checker.getUniqueId(), this);
|
||||
currentSchems.put(schematic.getSchemID(), this);
|
||||
next(0);
|
||||
});
|
||||
@ -236,7 +236,7 @@ public class CheckCommand extends BasicCommand {
|
||||
next = new TextComponent();
|
||||
List<String> r = ranks.get(schematic.getSchemType());
|
||||
for(int i = 0; i < r.size(); i++)
|
||||
BungeeCore.send(checker, "Rang " + i + ": " + r.get(i), "§aMit diesem Rang freigeben", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check allow " + i));
|
||||
BungeeCore.send(checker, "§aRang " + (i+1) + ": " + r.get(i), "§aMit diesem Rang freigeben", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check allow " + (i+1)));
|
||||
}else{
|
||||
next = new TextComponent("accept ");
|
||||
next.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check allow"));
|
||||
@ -253,7 +253,7 @@ public class CheckCommand extends BasicCommand {
|
||||
|
||||
private void accept(int rank){
|
||||
if(ranks.containsKey(schematic.getSchemType())){
|
||||
if(rank < 0 || ranks.get(schematic.getSchemType()).size() >= rank){
|
||||
if(rank <= 0 || ranks.get(schematic.getSchemType()).size() > rank){
|
||||
BungeeCore.send(checker, "§cUnbekannter Schematic-Rang");
|
||||
return;
|
||||
}
|
||||
@ -280,7 +280,7 @@ public class CheckCommand extends BasicCommand {
|
||||
}
|
||||
|
||||
private void abort(){
|
||||
currentCheckers.remove(checker);
|
||||
currentCheckers.remove(checker.getUniqueId());
|
||||
currentSchems.remove(schematic.getSchemID());
|
||||
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
||||
for (Subserver subserver : Subserver.getServerList()) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren