Updated dependancies

This commit is contained in:
ME1312 2023-02-22 16:36:40 -05:00
parent 8a5a0cdc4b
commit e02093ab2f
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
19 changed files with 75 additions and 73 deletions

View File

@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright (C) 2015-2022 ME1312
Copyright (C) 2015-2023 ME1312
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -28,7 +28,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiBase</artifactId>
<version>22w50c</version>
<version>23w08a</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -34,7 +34,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Server</artifactId>
<version>22w11c</version>
<version>23w08a</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -1,4 +1,4 @@
Manifest-Version: 1.0
Class-Path: libraries/GalaxiEngine.jar libraries/SubDataServer.jar libraries/BungeeCord.jar
Class-Path: libraries/GalaxiBase.jar libraries/SubDataServer.jar libraries/BungeeCord.jar
Main-Class: net.ME1312.SubServers.Bungee.Launch
Implementation-Title: SubServers.Bungee

View File

@ -74,9 +74,6 @@ public abstract class FileScanner {
literal = new StringBuilder();
}
switch (c) {
case '\\':
if (i.hasNext()) c = i.next();
literal.appendCodePoint(c);
case '[':
for (boolean escaped = false; i.hasNext() && (c != ']' || escaped); c = i.next()) {
if (c == '\\') escaped = !escaped;
@ -95,6 +92,8 @@ public abstract class FileScanner {
case '?':
rule.append("[^/]");
break;
case '\\':
if (i.hasNext()) c = i.next();
default:
literal.appendCodePoint(c);
break;

View File

@ -1,8 +1,8 @@
package net.ME1312.SubServers.Bungee.Network.Packet;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.SubData.Server.Protocol.PacketObjectIn;
import net.ME1312.SubData.Server.Protocol.PacketObjectOut;
import net.ME1312.SubData.Server.SubDataClient;
@ -82,7 +82,7 @@ public class PacketDisconnectPlayer implements PacketObjectIn<Integer>, PacketOb
if (requests.size() == 0) {
callback.accept(failures.value);
} else {
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
callback.accept(failures.value);
});
for (Map.Entry<Proxy, List<UUID>> entry : requests.entrySet()) {

View File

@ -1,9 +1,9 @@
package net.ME1312.SubServers.Bungee.Network.Packet;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.ContainedPair;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.SubData.Server.Protocol.PacketObjectIn;
import net.ME1312.SubData.Server.Protocol.PacketObjectOut;
import net.ME1312.SubData.Server.SubDataClient;
@ -101,7 +101,7 @@ public class PacketMessagePlayer implements PacketObjectIn<Integer>, PacketObjec
if (requests.size() == 0) {
callback.accept(failures.value);
} else {
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
callback.accept(failures.value);
});
List<String> legacy, raw;

View File

@ -1,8 +1,8 @@
package net.ME1312.SubServers.Bungee.Network.Packet;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.SubData.Server.Protocol.PacketObjectIn;
import net.ME1312.SubData.Server.Protocol.PacketObjectOut;
import net.ME1312.SubData.Server.SubDataClient;
@ -83,7 +83,7 @@ public class PacketTransferPlayer implements PacketObjectIn<Integer>, PacketObje
if (requests.size() == 0) {
callback.accept(failures.value);
} else {
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
callback.accept(failures.value);
});
for (Map.Entry<Proxy, List<UUID>> entry : requests.entrySet()) {

View File

@ -1,6 +1,5 @@
package net.ME1312.SubServers.Client.Bukkit.Graphic;
import net.ME1312.Galaxi.Library.Access;
import net.ME1312.Galaxi.Library.Container.ContainedPair;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Try;
@ -18,6 +17,8 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.util.*;
import java.util.PrimitiveIterator.OfInt;
import java.util.regex.Matcher;
@ -55,7 +56,7 @@ public abstract class UIRenderer {
if (plugin.api.getGameVersion().compareTo(new Version("1.13")) < 0) {
MAPI_1_13 = null;
} else {
MAPI_1_13 = Try.all.get(Access.shared.type(Material.class).method("getMaterial").parameters(String.class, boolean.class).returns(Material.class)::handle);
MAPI_1_13 = Try.all.get(() -> MethodHandles.publicLookup().findStatic(Material.class, "getMaterial", MethodType.methodType(Material.class, new Class[]{ String.class, boolean.class})));
}
// Detect Title API

View File

@ -1,11 +1,10 @@
package net.ME1312.SubServers.Client.Bukkit.Library;
import net.ME1312.Galaxi.Library.Access;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.ContainedPair;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Container.Pair;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.Galaxi.Library.Try;
import net.ME1312.Galaxi.Library.Util;
import net.ME1312.SubServers.Client.Bukkit.Event.*;
@ -22,6 +21,8 @@ import org.bukkit.event.Listener;
import org.bukkit.scheduler.BukkitTask;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.regex.Matcher;
@ -53,7 +54,7 @@ public final class Placeholders {
public void start() {
if (!init) {
init = true;
papi = Try.all.get(() -> Access.shared.type(Class.forName("me.clip.placeholderapi.PlaceholderAPI")).method(String.class, "setPlaceholders").parameters(OfflinePlayer.class, String.class).handle());
papi = Try.all.get(() -> MethodHandles.publicLookup().findStatic(Class.forName("me.clip.placeholderapi.PlaceholderAPI"), "setPlaceholders", MethodType.methodType(String.class, new Class[]{ OfflinePlayer.class, String.class })));
Bukkit.getPluginManager().registerEvents(cache.events, plugin);
Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, () -> {
if (task == null) {
@ -607,7 +608,7 @@ public final class Placeholders {
private void refresh(Runnable callback) {
if (SubAPI.getInstance().getSubDataNetwork()[0] != null) {
Container<Boolean> order = new Container<>(null);
AsyncConsolidator async = new AsyncConsolidator(() -> {
Merger async = new Merger(() -> {
try {
Map<String, SubServer> servers;
for (Host host : hosts.values()) {

View File

@ -1,12 +1,12 @@
package net.ME1312.SubServers.Client.Bukkit;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Config.YAMLSection;
import net.ME1312.Galaxi.Library.Container.ContainedPair;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Container.Pair;
import net.ME1312.Galaxi.Library.Container.Value;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.Galaxi.Library.Platform;
import net.ME1312.Galaxi.Library.Try;
import net.ME1312.Galaxi.Library.Util;
@ -350,7 +350,7 @@ public final class SubCommand extends Command {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Start.Running").replace("$int$", running.value.toString()));
if (success.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Start").replace("$int$", success.value.toString()));
});
@ -448,7 +448,7 @@ public final class SubCommand extends Command {
// Step 3: Receive command Responses
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Restart").replace("$int$", success.value.toString()));
});
Consumer<Pair<Integer, SubServer>> stopper = data -> {
@ -501,7 +501,7 @@ public final class SubCommand extends Command {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Stop.Not-Running").replace("$int$", running.value.toString()));
if (success.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Stop").replace("$int$", success.value.toString()));
});
@ -548,7 +548,7 @@ public final class SubCommand extends Command {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Terminate.Not-Running").replace("$int$", running.value.toString()));
if (success.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Terminate").replace("$int$", success.value.toString()));
});
@ -602,7 +602,7 @@ public final class SubCommand extends Command {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Command.Not-Running").replace("$int$", running.value.toString()));
if (success.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Command").replace("$int$", success.value.toString()));
});
@ -686,7 +686,7 @@ public final class SubCommand extends Command {
boolean ts = template == null;
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Update").replace("$int$", success.value.toString()));
});
for (SubServer server : select.subservers) {
@ -741,7 +741,7 @@ public final class SubCommand extends Command {
selectServers(sender, args, 1, true, "subservers.subserver.%.delete", select -> {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(plugin.api.getLang("SubServers", "Command.Delete").replace("$int$", success.value.toString()));
});
for (SubServer server : select.subservers) {
@ -964,7 +964,7 @@ public final class SubCommand extends Command {
};
// Step 2
AsyncConsolidator merge = new AsyncConsolidator(finished);
Merger merge = new Merger(finished);
for (boolean run = true; run && ic.value() < rargs.length; ic.value(ic.value() + 1)) {
String current = rargs[ic.value()];
last.value(current);
@ -1025,7 +1025,7 @@ public final class SubCommand extends Command {
if (current.equals(".")) {
plugin.api.getSubServer(plugin.api.getName(), self -> {
AsyncConsolidator merge2 = new AsyncConsolidator(merge::release);
Merger merge2 = new Merger(merge::release);
for (String name : self.getGroups()) {
merge2.reserve();
plugin.api.getGroup(name, group -> {

View File

@ -1,6 +1,5 @@
package net.ME1312.SubServers.Client.Bukkit;
import net.ME1312.Galaxi.Library.Access;
import net.ME1312.Galaxi.Library.Config.YAMLConfig;
import net.ME1312.Galaxi.Library.Config.YAMLSection;
import net.ME1312.Galaxi.Library.Container.Pair;
@ -30,6 +29,8 @@ import org.bukkit.plugin.messaging.Messenger;
import java.io.*;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.InvocationTargetException;
import java.net.InetAddress;
import java.net.URL;
@ -68,7 +69,7 @@ public final class SubPlugin extends JavaPlugin {
public SubPlugin() throws Throwable {
super();
Class<?> gson = Class.forName(((Try.all.get(() -> Class.forName("com.google.gson.Gson") != null, false)?"":"org.bukkit.craftbukkit.libs.")) + "com.google.gson.Gson");
this.gson = Access.shared.type(gson).method("fromJson").instance(gson.newInstance()).parameters(String.class, Class.class).returns(Object.class).handle();
this.gson = MethodHandles.publicLookup().findVirtual(gson, "fromJson", MethodType.methodType(Object.class, new Class[]{ String.class, Class.class })).bindTo(gson.newInstance());
version = Version.fromString(getDescription().getVersion());
subdata.put(0, null);
}

View File

@ -18,13 +18,13 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiBase</artifactId>
<version>22w50c</version>
<version>23w08a</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>22w11c</version>
<version>23w08a</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -1,11 +1,11 @@
package net.ME1312.SubServers.Client.Sponge;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.ContainedPair;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Container.Pair;
import net.ME1312.Galaxi.Library.Container.Value;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.Galaxi.Library.Platform;
import net.ME1312.Galaxi.Library.Try;
import net.ME1312.Galaxi.Library.Util;
@ -669,7 +669,7 @@ public final class SubCommand implements CommandExecutor {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Start.Running").replace("$int$", running.value.toString())));
if (success.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Start").replace("$int$", success.value.toString())));
});
@ -779,7 +779,7 @@ public final class SubCommand implements CommandExecutor {
// Step 3: Receive command Responses
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Restart").replace("$int$", success.value.toString())));
});
Consumer<Pair<Integer, SubServer>> stopper = data -> {
@ -844,7 +844,7 @@ public final class SubCommand implements CommandExecutor {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Stop.Not-Running").replace("$int$", running.value.toString())));
if (success.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Stop").replace("$int$", success.value.toString())));
});
@ -903,7 +903,7 @@ public final class SubCommand implements CommandExecutor {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Terminate.Not-Running").replace("$int$", running.value.toString())));
if (success.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Terminate").replace("$int$", success.value.toString())));
});
@ -964,7 +964,7 @@ public final class SubCommand implements CommandExecutor {
if (command.isPresent()) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Command.Not-Running").replace("$int$", running.value.toString())));
if (success.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Command").replace("$int$", success.value.toString())));
});
@ -1093,7 +1093,7 @@ public final class SubCommand implements CommandExecutor {
boolean ts = ft == null;
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Update").replace("$int$", success.value.toString())));
});
for (SubServer server : select.subservers) {
@ -1161,7 +1161,7 @@ public final class SubCommand implements CommandExecutor {
selectServers(sender, s.get(), true, "subservers.subserver.%.delete", select -> {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Delete").replace("$int$", success.value.toString())));
});
for (SubServer server : select.subservers) {
@ -1400,7 +1400,7 @@ public final class SubCommand implements CommandExecutor {
};
// Step 2
AsyncConsolidator merge = new AsyncConsolidator(finished);
Merger merge = new Merger(finished);
for (Value<Integer> ic = new Container<Integer>(0); ic.value() < selection.length; ic.value(ic.value() + 1)) {
String current = selection[ic.value()];
@ -1454,7 +1454,7 @@ public final class SubCommand implements CommandExecutor {
if (current.equals(".")) {
plugin.api.getSubServer(plugin.api.getName(), self -> {
AsyncConsolidator merge2 = new AsyncConsolidator(merge::release);
Merger merge2 = new Merger(merge::release);
for (String name : self.getGroups()) {
merge2.reserve();
plugin.api.getGroup(name, group -> {

View File

@ -30,13 +30,13 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>22w50c</version>
<version>23w08a</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUI</artifactId>
<version>22w50c</version>
<version>23w08a</version>
<scope>runtime</scope>
</dependency>
<dependency>

View File

@ -6,11 +6,11 @@ import net.ME1312.Galaxi.Command.CommandSender;
import net.ME1312.Galaxi.Command.CompletionHandler;
import net.ME1312.Galaxi.Engine.CommandParser;
import net.ME1312.Galaxi.Engine.GalaxiEngine;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Container.Pair;
import net.ME1312.Galaxi.Library.Container.Value;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.Galaxi.Library.Try;
import net.ME1312.Galaxi.Library.Version.Version;
import net.ME1312.SubData.Client.SubDataClient;
@ -458,7 +458,7 @@ public class SubCommand {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(running.value + " subserver"+((running.value == 1)?" was":"s were") + " already running");
if (success.value > 0) sender.sendMessage("Started " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
@ -573,7 +573,7 @@ public class SubCommand {
// Step 1-3: Restart Servers / Receive command Responses
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage("Restarting " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
for (SubServer server : select.subservers) {
@ -617,7 +617,7 @@ public class SubCommand {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(running.value + " subserver"+((running.value == 1)?" was":"s were") + " already offline");
if (success.value > 0) sender.sendMessage("Stopping " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
@ -661,7 +661,7 @@ public class SubCommand {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(running.value + " subserver"+((running.value == 1)?" was":"s were") + " already offline");
if (success.value > 0) sender.sendMessage("Terminated " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
@ -715,7 +715,7 @@ public class SubCommand {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(running.value + " server"+((running.value == 1)?" was":"s were") + " offline");
if (success.value > 0) sender.sendMessage("Sent command to " + success.value + " server"+((success.value == 1)?"":"s"));
});
@ -850,7 +850,7 @@ public class SubCommand {
boolean ts = template == null;
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage("Updating " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
for (SubServer server : select.subservers) {
@ -934,7 +934,7 @@ public class SubCommand {
selectServers(sender, args, 0, true, select -> {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage("Removing " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
for (SubServer server : select.subservers) {
@ -1037,7 +1037,7 @@ public class SubCommand {
};
// Step 2
AsyncConsolidator merge = new AsyncConsolidator(finished);
Merger merge = new Merger(finished);
for (boolean run = true; run && ic.value() < rargs.length; ic.value(ic.value() + 1)) {
String current = rargs[ic.value()];
last.value(current);

View File

@ -1,4 +1,4 @@
Manifest-Version: 1.0
Class-Path: libraries/GalaxiEngine.jar libraries/SubDataClient.jar libraries/BungeeCord.jar
Class-Path: libraries/GalaxiBase.jar libraries/SubDataClient.jar libraries/BungeeCord.jar
Main-Class: net.ME1312.SubServers.Sync.Launch
Implementation-Title: SubServers.Sync

View File

@ -1,11 +1,11 @@
package net.ME1312.SubServers.Sync;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.ContainedPair;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Container.Pair;
import net.ME1312.Galaxi.Library.Container.Value;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.Galaxi.Library.Platform;
import net.ME1312.Galaxi.Library.Try;
import net.ME1312.Galaxi.Library.Util;
@ -345,7 +345,7 @@ public final class SubCommand extends Command implements TabExecutor {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage("SubServers > " + running.value + " subserver"+((running.value == 1)?" was":"s were") + " already running");
if (success.value > 0) sender.sendMessage("SubServers > Started " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
@ -448,7 +448,7 @@ public final class SubCommand extends Command implements TabExecutor {
// Step 1-3: Restart Servers / Receive command Responses
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage("SubServers > Restarting " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
for (SubServer server : select.subservers) {
@ -481,7 +481,7 @@ public final class SubCommand extends Command implements TabExecutor {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage("SubServers > " + running.value + " subserver"+((running.value == 1)?" was":"s were") + " already offline");
if (success.value > 0) sender.sendMessage("SubServers > Stopping " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
@ -514,7 +514,7 @@ public final class SubCommand extends Command implements TabExecutor {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage("SubServers > " + running.value + " subserver"+((running.value == 1)?" was":"s were") + " already offline");
if (success.value > 0) sender.sendMessage("SubServers > Terminated " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
@ -554,7 +554,7 @@ public final class SubCommand extends Command implements TabExecutor {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage("SubServers > " + running.value + " server"+((running.value == 1)?" was":"s were") + " offline");
if (success.value > 0) sender.sendMessage("SubServers > Sent command to " + success.value + " server"+((success.value == 1)?"":"s"));
});
@ -634,7 +634,7 @@ public final class SubCommand extends Command implements TabExecutor {
boolean ts = template == null;
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage("SubServers > Updating " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
for (SubServer server : select.subservers) {
@ -689,7 +689,7 @@ public final class SubCommand extends Command implements TabExecutor {
selectServers(sender, args, 1, true, select -> {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage("SubServers > Removing " + success.value + " subserver"+((success.value == 1)?"":"s"));
});
for (SubServer server : select.subservers) {
@ -794,7 +794,7 @@ public final class SubCommand extends Command implements TabExecutor {
};
// Step 2
AsyncConsolidator merge = new AsyncConsolidator(finished);
Merger merge = new Merger(finished);
for (boolean run = true; run && ic.value() < rargs.length; ic.value(ic.value() + 1)) {
String current = rargs[ic.value()];
last.value(current);

View File

@ -1,11 +1,11 @@
package net.ME1312.SubServers.Velocity;
import net.ME1312.Galaxi.Library.AsyncConsolidator;
import net.ME1312.Galaxi.Library.Container.ContainedPair;
import net.ME1312.Galaxi.Library.Container.Container;
import net.ME1312.Galaxi.Library.Container.Pair;
import net.ME1312.Galaxi.Library.Container.Value;
import net.ME1312.Galaxi.Library.Map.ObjectMap;
import net.ME1312.Galaxi.Library.Merger;
import net.ME1312.Galaxi.Library.Platform;
import net.ME1312.Galaxi.Library.Try;
import net.ME1312.Galaxi.Library.Util;
@ -352,7 +352,7 @@ public final class SubCommand implements SimpleCommand {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(Component.text("SubServers > " + running.value + " subserver"+((running.value == 1)?" was":"s were") + " already running"));
if (success.value > 0) sender.sendMessage(Component.text("SubServers > Started " + success.value + " subserver"+((success.value == 1)?"":"s")));
});
@ -455,7 +455,7 @@ public final class SubCommand implements SimpleCommand {
// Step 1-3: Restart Servers / Receive command Responses
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(Component.text("SubServers > Restarting " + success.value + " subserver"+((success.value == 1)?"":"s")));
});
for (SubServer server : select.subservers) {
@ -488,7 +488,7 @@ public final class SubCommand implements SimpleCommand {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(Component.text("SubServers > " + running.value + " subserver"+((running.value == 1)?" was":"s were") + " already offline"));
if (success.value > 0) sender.sendMessage(Component.text("SubServers > Stopping " + success.value + " subserver"+((success.value == 1)?"":"s")));
});
@ -521,7 +521,7 @@ public final class SubCommand implements SimpleCommand {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(Component.text("SubServers > " + running.value + " subserver"+((running.value == 1)?" was":"s were") + " already offline"));
if (success.value > 0) sender.sendMessage(Component.text("SubServers > Terminated " + success.value + " subserver"+((success.value == 1)?"":"s")));
});
@ -561,7 +561,7 @@ public final class SubCommand implements SimpleCommand {
Container<Integer> success = new Container<Integer>(0);
Container<Integer> running = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (running.value > 0) sender.sendMessage(Component.text("SubServers > " + running.value + " server"+((running.value == 1)?" was":"s were") + " offline"));
if (success.value > 0) sender.sendMessage(Component.text("SubServers > Sent command to " + success.value + " server"+((success.value == 1)?"":"s")));
});
@ -641,7 +641,7 @@ public final class SubCommand implements SimpleCommand {
boolean ts = template == null;
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(Component.text("SubServers > Updating " + success.value + " subserver"+((success.value == 1)?"":"s")));
});
for (SubServer server : select.subservers) {
@ -696,7 +696,7 @@ public final class SubCommand implements SimpleCommand {
selectServers(sender, args, 1, true, select -> {
if (select.subservers.length > 0) {
Container<Integer> success = new Container<Integer>(0);
AsyncConsolidator merge = new AsyncConsolidator(() -> {
Merger merge = new Merger(() -> {
if (success.value > 0) sender.sendMessage(Component.text("SubServers > Removing " + success.value + " subserver"+((success.value == 1)?"":"s")));
});
for (SubServer server : select.subservers) {
@ -801,7 +801,7 @@ public final class SubCommand implements SimpleCommand {
};
// Step 2
AsyncConsolidator merge = new AsyncConsolidator(finished);
Merger merge = new Merger(finished);
for (boolean run = true; run && ic.value() < rargs.length; ic.value(ic.value() + 1)) {
String current = rargs[ic.value()];
last.value(current);