mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Misc changes
This commit is contained in:
parent
6eb82f27bc
commit
08a7d6d176
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,4 +2,4 @@ Manifest-Version: 1.0
|
|||||||
Class-Path: BungeeCord.jar Waterfall.jar
|
Class-Path: BungeeCord.jar Waterfall.jar
|
||||||
Main-Class: net.ME1312.SubServers.Bungee.Launch
|
Main-Class: net.ME1312.SubServers.Bungee.Launch
|
||||||
Implementation-Title: SubServers.Bungee
|
Implementation-Title: SubServers.Bungee
|
||||||
Specification-Title: 18w29bf
|
Specification-Title: 18w29bn
|
||||||
|
@ -105,7 +105,7 @@ public class InternalSubCreator extends SubCreator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (spversion == null)
|
if (spversion == null)
|
||||||
throw new InvalidServerException("Cannot find sponge version for Minecraft " + version.toString());
|
throw new InvalidServerException("Cannot find Sponge version for Minecraft " + version.toString());
|
||||||
System.out.println(name + File.separator + "Creator > Found \"spongeforge-" + spversion.toString() + '"');
|
System.out.println(name + File.separator + "Creator > Found \"spongeforge-" + spversion.toString() + '"');
|
||||||
|
|
||||||
NodeList mcfnodeList = forgexml.getElementsByTagName("version");
|
NodeList mcfnodeList = forgexml.getElementsByTagName("version");
|
||||||
@ -119,7 +119,7 @@ public class InternalSubCreator extends SubCreator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mcfversion == null)
|
if (mcfversion == null)
|
||||||
throw new InvalidServerException("Cannot find forge version for Sponge " + spversion.toString());
|
throw new InvalidServerException("Cannot find Forge version for Sponge " + spversion.toString());
|
||||||
System.out.println(name + File.separator + "Creator > Found \"forge-" + mcfversion.toString() + '"');
|
System.out.println(name + File.separator + "Creator > Found \"forge-" + mcfversion.toString() + '"');
|
||||||
|
|
||||||
version = new Version(mcfversion.toString() + " " + spversion.toString());
|
version = new Version(mcfversion.toString() + " " + spversion.toString());
|
||||||
|
@ -61,7 +61,7 @@ public final class Launch {
|
|||||||
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version") + ',');
|
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version") + ',');
|
||||||
System.out.println("Java " + System.getProperty("java.version") + ",");
|
System.out.println("Java " + System.getProperty("java.version") + ",");
|
||||||
System.out.println("BungeeCord" + ((patched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
System.out.println("BungeeCord" + ((patched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
||||||
System.out.println("SubServers.Bungee v" + SubPlugin.version.toExtendedString() + ((build)?" [" + SubPlugin.class.getPackage().getSpecificationTitle() + ']':""));
|
System.out.println("SubServers.Bungee v" + SubPlugin.version.toExtendedString() + ((build)?" (" + SubPlugin.class.getPackage().getSpecificationTitle() + ')':""));
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
} else {
|
} else {
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
@ -104,6 +104,7 @@ public final class Launch {
|
|||||||
if (!Util.isException(() -> proprietary.set(Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole") != null)) && proprietary.get()) {
|
if (!Util.isException(() -> proprietary.set(Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole") != null)) && proprietary.get()) {
|
||||||
Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole").getMethod("readCommands").invoke(null);
|
Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole").getMethod("readCommands").invoke(null);
|
||||||
} else {
|
} else {
|
||||||
|
plugin.canSudo = true;
|
||||||
String line;
|
String line;
|
||||||
while (plugin.isRunning && (line = plugin.getConsoleReader().readLine(">")) != null) {
|
while (plugin.isRunning && (line = plugin.getConsoleReader().readLine(">")) != null) {
|
||||||
if (plugin.sudo == null) {
|
if (plugin.sudo == null) {
|
||||||
|
@ -189,7 +189,8 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String
|
* @return Unparsed String
|
||||||
*/
|
*/
|
||||||
public String asRawString() {
|
public String asRawString() {
|
||||||
return (String) obj;
|
if (obj != null) return obj.toString();
|
||||||
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -198,7 +199,13 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String List
|
* @return Unparsed String List
|
||||||
*/
|
*/
|
||||||
public List<String> asRawStringList() {
|
public List<String> asRawStringList() {
|
||||||
return (List<String>) obj;
|
if (obj != null) {
|
||||||
|
List<String> values = new ArrayList<String>();
|
||||||
|
for (Object value : (List<?>) obj) {
|
||||||
|
values.add(value.toString());
|
||||||
|
}
|
||||||
|
return values;
|
||||||
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -207,7 +214,7 @@ public class YAMLValue {
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String asString() {
|
public String asString() {
|
||||||
if (obj != null) return Util.unescapeJavaString((String) obj);
|
if (obj != null) return Util.unescapeJavaString(asRawString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +226,7 @@ public class YAMLValue {
|
|||||||
public List<String> asStringList() {
|
public List<String> asStringList() {
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asRawStringList()) {
|
||||||
values.add(Util.unescapeJavaString(value));
|
values.add(Util.unescapeJavaString(value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
@ -234,7 +241,7 @@ public class YAMLValue {
|
|||||||
*/
|
*/
|
||||||
public String asColoredString(char color) {
|
public String asColoredString(char color) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
if (obj != null) return ChatColor.translateAlternateColorCodes(color, Util.unescapeJavaString((String) obj));
|
if (obj != null) return ChatColor.translateAlternateColorCodes(color, asString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,8 +255,8 @@ public class YAMLValue {
|
|||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asStringList()) {
|
||||||
values.add(ChatColor.translateAlternateColorCodes(color, Util.unescapeJavaString(value)));
|
values.add(ChatColor.translateAlternateColorCodes(color, value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
} else return null;
|
} else return null;
|
||||||
|
@ -14,7 +14,7 @@ Hosts:
|
|||||||
Display: 'Default'
|
Display: 'Default'
|
||||||
Driver: 'BUILT-IN'
|
Driver: 'BUILT-IN'
|
||||||
Address: '127.0.0.1'
|
Address: '127.0.0.1'
|
||||||
Directory: './'
|
Directory: './SubServers/Servers'
|
||||||
Git-Bash: '%ProgramFiles%\Git'
|
Git-Bash: '%ProgramFiles%\Git'
|
||||||
|
|
||||||
Servers:
|
Servers:
|
||||||
|
@ -80,7 +80,7 @@ public final class SubCommand extends CommandX {
|
|||||||
sender.sendMessage(" " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',');
|
sender.sendMessage(" " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',');
|
||||||
sender.sendMessage(" Java " + System.getProperty("java.version") + ',');
|
sender.sendMessage(" Java " + System.getProperty("java.version") + ',');
|
||||||
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isPatched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isPatched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
||||||
sender.sendMessage(" SubServers.Bungee v" + SubPlugin.version.toExtendedString() + ((build)?" [" + SubPlugin.class.getPackage().getSpecificationTitle() + ']':""));
|
sender.sendMessage(" SubServers.Bungee v" + SubPlugin.version.toExtendedString() + ((build)?" (" + SubPlugin.class.getPackage().getSpecificationTitle() + ')':""));
|
||||||
sender.sendMessage("");
|
sender.sendMessage("");
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
|
@ -62,7 +62,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
|||||||
public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"undefined":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"undefined":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
||||||
|
|
||||||
public boolean redis = false;
|
public boolean redis = false;
|
||||||
public boolean canSudo = true;
|
public boolean canSudo = false;
|
||||||
public final boolean isPatched;
|
public final boolean isPatched;
|
||||||
public long resetDate = 0;
|
public long resetDate = 0;
|
||||||
private boolean running = false;
|
private boolean running = false;
|
||||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
|||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Implementation-Title: SubServers.Client.Bukkit
|
Implementation-Title: SubServers.Client.Bukkit
|
||||||
Specification-Title: 18w29bf
|
Specification-Title: 18w29bn
|
||||||
|
@ -192,7 +192,8 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String
|
* @return Unparsed String
|
||||||
*/
|
*/
|
||||||
public String asRawString() {
|
public String asRawString() {
|
||||||
return (String) obj;
|
if (obj != null) return obj.toString();
|
||||||
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -201,7 +202,13 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String List
|
* @return Unparsed String List
|
||||||
*/
|
*/
|
||||||
public List<String> asRawStringList() {
|
public List<String> asRawStringList() {
|
||||||
return (List<String>) obj;
|
if (obj != null) {
|
||||||
|
List<String> values = new ArrayList<String>();
|
||||||
|
for (Object value : (List<?>) obj) {
|
||||||
|
values.add(value.toString());
|
||||||
|
}
|
||||||
|
return values;
|
||||||
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -210,7 +217,7 @@ public class YAMLValue {
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String asString() {
|
public String asString() {
|
||||||
if (obj != null) return Util.unescapeJavaString((String) obj);
|
if (obj != null) return Util.unescapeJavaString(asRawString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +229,7 @@ public class YAMLValue {
|
|||||||
public List<String> asStringList() {
|
public List<String> asStringList() {
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asRawStringList()) {
|
||||||
values.add(Util.unescapeJavaString(value));
|
values.add(Util.unescapeJavaString(value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
@ -237,7 +244,7 @@ public class YAMLValue {
|
|||||||
*/
|
*/
|
||||||
public String asColoredString(char color) {
|
public String asColoredString(char color) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
if (obj != null) return ChatColor.translateAlternateColorCodes(color, Util.unescapeJavaString((String) obj));
|
if (obj != null) return ChatColor.translateAlternateColorCodes(color, asString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,8 +258,8 @@ public class YAMLValue {
|
|||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asStringList()) {
|
||||||
values.add(ChatColor.translateAlternateColorCodes(color, Util.unescapeJavaString(value)));
|
values.add(ChatColor.translateAlternateColorCodes(color, value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
} else return null;
|
} else return null;
|
||||||
|
@ -62,7 +62,7 @@ public final class SubCommand implements CommandExecutor {
|
|||||||
sender.sendMessage(ChatColor.WHITE + " " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ChatColor.RESET + ',');
|
sender.sendMessage(ChatColor.WHITE + " " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ChatColor.RESET + ',');
|
||||||
sender.sendMessage(ChatColor.WHITE + " Java " + System.getProperty("java.version") + ChatColor.RESET + ',');
|
sender.sendMessage(ChatColor.WHITE + " Java " + System.getProperty("java.version") + ChatColor.RESET + ',');
|
||||||
sender.sendMessage(ChatColor.WHITE + " " + Bukkit.getName() + ' ' + Bukkit.getVersion() + ChatColor.RESET + ',');
|
sender.sendMessage(ChatColor.WHITE + " " + Bukkit.getName() + ' ' + Bukkit.getVersion() + ChatColor.RESET + ',');
|
||||||
sender.sendMessage(ChatColor.WHITE + " SubServers.Client.Bukkit v" + plugin.version.toExtendedString() + ((build)?" [" + SubPlugin.class.getPackage().getSpecificationTitle() + ']':""));
|
sender.sendMessage(ChatColor.WHITE + " SubServers.Client.Bukkit v" + plugin.version.toExtendedString() + ((build)?" (" + SubPlugin.class.getPackage().getSpecificationTitle() + ')':""));
|
||||||
sender.sendMessage("");
|
sender.sendMessage("");
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||||
try {
|
try {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Implementation-Title: SubServers.Client
|
Implementation-Title: SubServers.Client
|
||||||
Specification-Title: 18w29bf
|
Specification-Title: 18w29bn
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<foreground color="-14144467"/>
|
<foreground color="-14144467"/>
|
||||||
<horizontalScrollBarPolicy value="31"/>
|
<horizontalScrollBarPolicy value="31"/>
|
||||||
<verticalScrollBarPolicy value="22"/>
|
<verticalScrollBarPolicy value="20"/>
|
||||||
</properties>
|
</properties>
|
||||||
<border type="none">
|
<border type="none">
|
||||||
<font/>
|
<font/>
|
||||||
|
@ -59,6 +59,7 @@ public final class ConsoleWindow implements SubLogFilter {
|
|||||||
HTMLEditorKit kit = (HTMLEditorKit) log.getEditorKit();
|
HTMLEditorKit kit = (HTMLEditorKit) log.getEditorKit();
|
||||||
HTMLDocument doc = (HTMLDocument) log.getDocument();
|
HTMLDocument doc = (HTMLDocument) log.getDocument();
|
||||||
kit.insertHTML(doc, doc.getLength() - 2, new String(stream.toByteArray(), "UTF-8"), 0, 0, null);
|
kit.insertHTML(doc, doc.getLength() - 2, new String(stream.toByteArray(), "UTF-8"), 0, 0, null);
|
||||||
|
hScroll();
|
||||||
} catch (BadLocationException e) {
|
} catch (BadLocationException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -265,6 +266,7 @@ public final class ConsoleWindow implements SubLogFilter {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
vScroll.setBorder(BorderFactory.createEmptyBorder());
|
vScroll.setBorder(BorderFactory.createEmptyBorder());
|
||||||
|
hScroll.setVisible(false);
|
||||||
new SmartScroller(vScroll, SmartScroller.VERTICAL, SmartScroller.END);
|
new SmartScroller(vScroll, SmartScroller.VERTICAL, SmartScroller.END);
|
||||||
log.setContentType("text/html");
|
log.setContentType("text/html");
|
||||||
log.setEditorKit(new HTMLEditorKit());
|
log.setEditorKit(new HTMLEditorKit());
|
||||||
@ -417,7 +419,7 @@ public final class ConsoleWindow implements SubLogFilter {
|
|||||||
} else {
|
} else {
|
||||||
input.setVisible(false);
|
input.setVisible(false);
|
||||||
hScroll.setVisible(false);
|
hScroll.setVisible(false);
|
||||||
vScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
vScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.registerFilter(this);
|
logger.registerFilter(this);
|
||||||
@ -430,6 +432,7 @@ public final class ConsoleWindow implements SubLogFilter {
|
|||||||
hScroll.setMaximum(vScroll.getHorizontalScrollBar().getMaximum());
|
hScroll.setMaximum(vScroll.getHorizontalScrollBar().getMaximum());
|
||||||
hScroll.setMinimum(vScroll.getHorizontalScrollBar().getMinimum());
|
hScroll.setMinimum(vScroll.getHorizontalScrollBar().getMinimum());
|
||||||
hScroll.setVisibleAmount(vScroll.getHorizontalScrollBar().getVisibleAmount());
|
hScroll.setVisibleAmount(vScroll.getHorizontalScrollBar().getVisibleAmount());
|
||||||
|
hScroll.setVisible(input.isVisible() && hScroll.getVisibleAmount() < hScroll.getMaximum());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadContent() {
|
private void loadContent() {
|
||||||
@ -460,7 +463,6 @@ public final class ConsoleWindow implements SubLogFilter {
|
|||||||
|
|
||||||
public void log(Date date, String message) {
|
public void log(Date date, String message) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
stream.write(('\u00A0' + new SimpleDateFormat("hh:mm:ss").format(date) + ' ' + ((ansi)?message:message.replaceAll("\u001B\\[[;\\d]*m", "")) + "\u00A0\n").getBytes("UTF-8"));
|
stream.write(('\u00A0' + new SimpleDateFormat("hh:mm:ss").format(date) + ' ' + ((ansi)?message:message.replaceAll("\u001B\\[[;\\d]*m", "")) + "\u00A0\n").getBytes("UTF-8"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Main-Class: net.ME1312.SubServers.Host.ExHost
|
Main-Class: net.ME1312.SubServers.Host.ExHost
|
||||||
Implementation-Title: SubServers.Host
|
Implementation-Title: SubServers.Host
|
||||||
Specification-Title: 18w29bf
|
Specification-Title: 18w29bn
|
||||||
|
@ -88,7 +88,7 @@ public final class ExHost {
|
|||||||
System.out.println("");
|
System.out.println("");
|
||||||
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version") + ',');
|
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version") + ',');
|
||||||
System.out.println("Java " + System.getProperty("java.version") + ",");
|
System.out.println("Java " + System.getProperty("java.version") + ",");
|
||||||
System.out.println("SubServers.Host v" + version.toExtendedString() + ((build)?" [" + ExHost.class.getPackage().getSpecificationTitle() + ']':""));
|
System.out.println("SubServers.Host v" + version.toExtendedString() + ((build)?" (" + ExHost.class.getPackage().getSpecificationTitle() + ')':""));
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
} else {
|
} else {
|
||||||
new ExHost(options);
|
new ExHost(options);
|
||||||
|
@ -229,7 +229,7 @@ public class SubCreator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (spversion == null)
|
if (spversion == null)
|
||||||
throw new InvalidServerException("Cannot find sponge version for Minecraft " + version.toString());
|
throw new InvalidServerException("Cannot find Sponge version for Minecraft " + version.toString());
|
||||||
thread.name().logger.info.println("Found \"spongeforge-" + spversion.toString() + '"');
|
thread.name().logger.info.println("Found \"spongeforge-" + spversion.toString() + '"');
|
||||||
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Found \"spongeforge-" + spversion.toString() + '"'));
|
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Found \"spongeforge-" + spversion.toString() + '"'));
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ public class SubCreator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mcfversion == null)
|
if (mcfversion == null)
|
||||||
throw new InvalidServerException("Cannot find forge version for Sponge " + spversion.toString());
|
throw new InvalidServerException("Cannot find Forge version for Sponge " + spversion.toString());
|
||||||
thread.name().logger.info.println("Found \"forge-" + mcfversion.toString() + '"');
|
thread.name().logger.info.println("Found \"forge-" + mcfversion.toString() + '"');
|
||||||
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Found \"forge-" + mcfversion.toString() + '"'));
|
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Found \"forge-" + mcfversion.toString() + '"'));
|
||||||
|
|
||||||
|
@ -192,7 +192,8 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String
|
* @return Unparsed String
|
||||||
*/
|
*/
|
||||||
public String asRawString() {
|
public String asRawString() {
|
||||||
return (String) obj;
|
if (obj != null) return obj.toString();
|
||||||
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -201,7 +202,13 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String List
|
* @return Unparsed String List
|
||||||
*/
|
*/
|
||||||
public List<String> asRawStringList() {
|
public List<String> asRawStringList() {
|
||||||
return (List<String>) obj;
|
if (obj != null) {
|
||||||
|
List<String> values = new ArrayList<String>();
|
||||||
|
for (Object value : (List<?>) obj) {
|
||||||
|
values.add(value.toString());
|
||||||
|
}
|
||||||
|
return values;
|
||||||
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -210,7 +217,7 @@ public class YAMLValue {
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String asString() {
|
public String asString() {
|
||||||
if (obj != null) return Util.unescapeJavaString((String) obj);
|
if (obj != null) return Util.unescapeJavaString(asRawString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +229,7 @@ public class YAMLValue {
|
|||||||
public List<String> asStringList() {
|
public List<String> asStringList() {
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asRawStringList()) {
|
||||||
values.add(Util.unescapeJavaString(value));
|
values.add(Util.unescapeJavaString(value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
@ -237,7 +244,7 @@ public class YAMLValue {
|
|||||||
*/
|
*/
|
||||||
public String asColoredString(char color) {
|
public String asColoredString(char color) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
if (obj != null) return TextColor.parseColor(color, Util.unescapeJavaString((String) obj));
|
if (obj != null) return TextColor.parseColor(color, asString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,8 +258,8 @@ public class YAMLValue {
|
|||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asStringList()) {
|
||||||
values.add(TextColor.parseColor(color, Util.unescapeJavaString(value)));
|
values.add(TextColor.parseColor(color, value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
} else return null;
|
} else return null;
|
||||||
|
@ -43,7 +43,7 @@ public class SubCommand {
|
|||||||
"These are the platforms and versions that are running " + ((args.length == 0)?"SubServers.Host":host.api.plugins.get(args[0].toLowerCase()).getName()) +":",
|
"These are the platforms and versions that are running " + ((args.length == 0)?"SubServers.Host":host.api.plugins.get(args[0].toLowerCase()).getName()) +":",
|
||||||
" " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',',
|
" " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',',
|
||||||
" Java " + System.getProperty("java.version") + ',',
|
" Java " + System.getProperty("java.version") + ',',
|
||||||
" SubServers.Host v" + host.version.toExtendedString() + ((build)?" [" + ExHost.class.getPackage().getSpecificationTitle() + ']':"") + ((args.length == 0)?"":","));
|
" SubServers.Host v" + host.version.toExtendedString() + ((build)?" (" + ExHost.class.getPackage().getSpecificationTitle() + ')':"") + ((args.length == 0)?"":","));
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
host.log.message.println("");
|
host.log.message.println("");
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
|
Binary file not shown.
@ -2,4 +2,4 @@ Manifest-Version: 1.0
|
|||||||
Class-Path: BungeeCord.jar Waterfall.jar
|
Class-Path: BungeeCord.jar Waterfall.jar
|
||||||
Main-Class: net.ME1312.SubServers.Sync.Launch
|
Main-Class: net.ME1312.SubServers.Sync.Launch
|
||||||
Implementation-Title: SubServers.Sync
|
Implementation-Title: SubServers.Sync
|
||||||
Specification-Title: 18w29bf
|
Specification-Title: 18w29bn
|
||||||
|
@ -61,7 +61,7 @@ public final class Launch {
|
|||||||
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version") + ',');
|
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version") + ',');
|
||||||
System.out.println("Java " + System.getProperty("java.version") + ",");
|
System.out.println("Java " + System.getProperty("java.version") + ",");
|
||||||
System.out.println("BungeeCord" + ((patched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
System.out.println("BungeeCord" + ((patched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
||||||
System.out.println("SubServers.Sync v" + SubPlugin.version.toExtendedString() + ((build)?" [" + SubPlugin.class.getPackage().getSpecificationTitle() + ']':""));
|
System.out.println("SubServers.Sync v" + SubPlugin.version.toExtendedString() + ((build)?" (" + SubPlugin.class.getPackage().getSpecificationTitle() + ')':""));
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
} else {
|
} else {
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
|
@ -192,7 +192,8 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String
|
* @return Unparsed String
|
||||||
*/
|
*/
|
||||||
public String asRawString() {
|
public String asRawString() {
|
||||||
return (String) obj;
|
if (obj != null) return obj.toString();
|
||||||
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -201,7 +202,13 @@ public class YAMLValue {
|
|||||||
* @return Unparsed String List
|
* @return Unparsed String List
|
||||||
*/
|
*/
|
||||||
public List<String> asRawStringList() {
|
public List<String> asRawStringList() {
|
||||||
return (List<String>) obj;
|
if (obj != null) {
|
||||||
|
List<String> values = new ArrayList<String>();
|
||||||
|
for (Object value : (List<?>) obj) {
|
||||||
|
values.add(value.toString());
|
||||||
|
}
|
||||||
|
return values;
|
||||||
|
} else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -210,7 +217,7 @@ public class YAMLValue {
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String asString() {
|
public String asString() {
|
||||||
if (obj != null) return Util.unescapeJavaString((String) obj);
|
if (obj != null) return Util.unescapeJavaString(asRawString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +229,7 @@ public class YAMLValue {
|
|||||||
public List<String> asStringList() {
|
public List<String> asStringList() {
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asRawStringList()) {
|
||||||
values.add(Util.unescapeJavaString(value));
|
values.add(Util.unescapeJavaString(value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
@ -237,7 +244,7 @@ public class YAMLValue {
|
|||||||
*/
|
*/
|
||||||
public String asColoredString(char color) {
|
public String asColoredString(char color) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
if (obj != null) return ChatColor.translateAlternateColorCodes(color, Util.unescapeJavaString((String) obj));
|
if (obj != null) return ChatColor.translateAlternateColorCodes(color, asString());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,8 +258,8 @@ public class YAMLValue {
|
|||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
if (Util.isNull(color)) throw new NullPointerException();
|
if (Util.isNull(color)) throw new NullPointerException();
|
||||||
List<String> values = new ArrayList<String>();
|
List<String> values = new ArrayList<String>();
|
||||||
for (String value : (List<String>) obj) {
|
for (String value : asStringList()) {
|
||||||
values.add(ChatColor.translateAlternateColorCodes(color, Util.unescapeJavaString(value)));
|
values.add(ChatColor.translateAlternateColorCodes(color, value));
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
} else return null;
|
} else return null;
|
||||||
|
@ -80,7 +80,7 @@ public final class SubCommand extends CommandX {
|
|||||||
sender.sendMessage(" " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',');
|
sender.sendMessage(" " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',');
|
||||||
sender.sendMessage(" Java " + System.getProperty("java.version") + ',');
|
sender.sendMessage(" Java " + System.getProperty("java.version") + ',');
|
||||||
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isPatched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isPatched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
|
||||||
sender.sendMessage(" SubServers.Sync v" + SubPlugin.version.toExtendedString() + ((build)?" [" + SubPlugin.class.getPackage().getSpecificationTitle() + ']':""));
|
sender.sendMessage(" SubServers.Sync v" + SubPlugin.version.toExtendedString() + ((build)?" (" + SubPlugin.class.getPackage().getSpecificationTitle() + ')':""));
|
||||||
sender.sendMessage("");
|
sender.sendMessage("");
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user