Print the fuller version list for debugging in /sub version

This commit is contained in:
ME1312 2018-06-09 12:19:25 -04:00
parent 9f2618778f
commit 2cabdf85ab
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
34 changed files with 77 additions and 55 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +0,0 @@
### App Info:
**App Name:**
<br>**App Version:**
<br>**Minecraft Version:**
### Issue:
*(Write what you're creating this issue for here. If it is an error, provide the full message and steps to replicate it)*

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2484,7 +2484,7 @@ the order they are declared.</div>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Host/ExHost.html#version">version</a></span> - Variable in class net.ME1312.SubServers.Host.<a href="net/ME1312/SubServers/Host/ExHost.html" title="class in net.ME1312.SubServers.Host">ExHost</a></dt>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Host/ExHost.html#version">version</a></span> - Static variable in class net.ME1312.SubServers.Host.<a href="net/ME1312/SubServers/Host/ExHost.html" title="class in net.ME1312.SubServers.Host">ExHost</a></dt>
<dd>&nbsp;</dd>
<dt><a href="net/ME1312/SubServers/Host/Library/Version/Version.html" title="class in net.ME1312.SubServers.Host.Library.Version"><span class="typeNameLink">Version</span></a> - Class in <a href="net/ME1312/SubServers/Host/Library/Version/package-summary.html">net.ME1312.SubServers.Host.Library.Version</a></dt>
<dd>

View File

@ -165,7 +165,7 @@ extends java.lang.Object</pre>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/ExHost.html#templates">templates</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Host/Library/Version/Version.html" title="class in net.ME1312.SubServers.Host.Library.Version">Version</a></code></td>
<td class="colFirst"><code>static <a href="../../../../net/ME1312/SubServers/Host/Library/Version/Version.html" title="class in net.ME1312.SubServers.Host.Library.Version">Version</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/ExHost.html#version">version</a></span></code>&nbsp;</td>
</tr>
</table>
@ -308,7 +308,7 @@ extends java.lang.Object</pre>
<ul class="blockListLast">
<li class="blockList">
<h4>version</h4>
<pre>public final&nbsp;<a href="../../../../net/ME1312/SubServers/Host/Library/Version/Version.html" title="class in net.ME1312.SubServers.Host.Library.Version">Version</a> version</pre>
<pre>public static final&nbsp;<a href="../../../../net/ME1312/SubServers/Host/Library/Version/Version.html" title="class in net.ME1312.SubServers.Host.Library.Version">Version</a> version</pre>
</li>
</ul>
</li>

Binary file not shown.

View File

@ -238,7 +238,7 @@ implements net.md_5.bungee.api.plugin.Listener</pre>
boolean&nbsp;isSubServer)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Sync/SubPlugin.html#redis-java.lang.String-net.ME1312.SubServers.Sync.Library.NamedContainer...-">redis</a></span>(java.lang.String&nbsp;method,
<a href="../../../../net/ME1312/SubServers/Sync/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Sync.Library">NamedContainer</a>&lt;java.lang.Class&lt;?&gt;,?&gt;...&nbsp;args)</code>
<div class="block">Reference a RedisBungee method via reflection</div>
@ -426,15 +426,13 @@ implements net.md_5.bungee.api.plugin.Listener</pre>
<ul class="blockList">
<li class="blockList">
<h4>redis</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;java.lang.Object&nbsp;redis(java.lang.String&nbsp;method,
<a href="../../../../net/ME1312/SubServers/Sync/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Sync.Library">NamedContainer</a>&lt;java.lang.Class&lt;?&gt;,?&gt;...&nbsp;args)
throws java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException</pre>
<pre>public&nbsp;java.lang.Object&nbsp;redis(java.lang.String&nbsp;method,
<a href="../../../../net/ME1312/SubServers/Sync/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Sync.Library">NamedContainer</a>&lt;java.lang.Class&lt;?&gt;,?&gt;...&nbsp;args)
throws java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException</pre>
<div class="block">Reference a RedisBungee method via reflection</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - Class Type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>method</code> - Method to reference</dd>
<dd><code>args</code> - Method arguments</dd>

Binary file not shown.

View File

@ -2,4 +2,4 @@ Manifest-Version: 1.0
Class-Path: BungeeCord.jar Waterfall.jar
Main-Class: net.ME1312.SubServers.Bungee.Launch
Implementation-Title: SubServers.Bungee
Specification-Title: 18w22a
Specification-Title: 18w23a

View File

@ -47,10 +47,10 @@ public final class Launch {
joptsimple.OptionSet options = parser.parse(args);
if(options.has("version") || options.has("v")) {
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("BungeeCord" + ((patched)?" (Patched) ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ",");
System.out.println("SubServers.Bungee v" + SubPlugin.version.toExtendedString());
System.out.println("BungeeCord" + ((patched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');
System.out.println("SubServers.Sync v" + SubPlugin.version.toExtendedString());
System.out.println("");
} else {
System.out.println("");

View File

@ -30,7 +30,7 @@ Lang:
'Command.Help.SubServer.Stop': ' &7Stop Server:&f $str$'
'Command.Help.SubServer.Terminate': ' &7Terminate Server:&f $str$'
'Command.Help.SubServer.Command': ' &7Command Server:&f $str$'
'Command.Version': '&7SubServers &8&l\u00BB&7 $name$ is running version &f$str$'
'Command.Version': '&7SubServers &8&l\u00BB&7 These are the platforms and versions that are running &f$str$&7:'
'Command.Version.Outdated': '&7$name$ &f$str$ &7is available. You are $int$ version(s) behind.'
'Command.Version.Latest': '&7You are on the latest version.'
'Command.List.Group-Header': '&7SubServers &8&l\u00BB&7 Group/Server List:'

View File

@ -66,7 +66,12 @@ public final class SubCommand extends CommandX {
if (args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("?")) {
sender.sendMessages(printHelp());
} else if (args[0].equalsIgnoreCase("version") || args[0].equalsIgnoreCase("ver")) {
sender.sendMessage("SubServers > SubServers.Bungee is running version " + plugin.version.toExtendedString());
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Bungee:");
sender.sendMessage(" " + System.getProperty("os.name") + ' ' + System.getProperty("os.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(" SubServers.Bungee v" + SubPlugin.version.toExtendedString());
sender.sendMessage("");
new Thread(() -> {
try {
Document updxml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(Util.readAll(new BufferedReader(new InputStreamReader(new URL("https://src.me1312.net/maven/net/ME1312/SubServers/SubServers.Bungee/maven-metadata.xml").openStream(), Charset.forName("UTF-8")))))));

View File

@ -58,10 +58,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
public final SubAPI api = new SubAPI(this);
public SubDataServer subdata = null;
public SubServer sudo = null;
//public static final Version version = new Version("2.13a");
//public static final Version version = new Version(new Version("2.13a"), VersionType.BETA, 1); // TODO Beta Version Setting
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 4), VersionType.SNAPSHOT,
(SubPlugin.class.getPackage().getSpecificationTitle() == null)?"0":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Beta Version Setting */
//public static final Version version = Version.fromString("2.13a/pr4");
public static final Version version = new Version(Version.fromString("2.13a/pr4"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
public boolean redis = false;
public boolean canSudo = true;

Binary file not shown.

View File

@ -1,3 +1,3 @@
Manifest-Version: 1.0
Implementation-Title: SubServers.Client.Bukkit
Specification-Title: 18w22a
Specification-Title: 18w23a

View File

@ -48,7 +48,12 @@ public final class SubCommand implements CommandExecutor {
if (args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("?")) {
sender.sendMessage(printHelp(label));
} else if (args[0].equalsIgnoreCase("version") || args[0].equalsIgnoreCase("ver")) {
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Version").replace("$name$", "SubServers.Client.Bukkit").replace("$str$", plugin.version.toExtendedString()));
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Version").replace("$str$", "SubServers.Client.Bukkit"));
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 + " " + Bukkit.getName() + ' ' + Bukkit.getVersion() + ChatColor.RESET + ',');
sender.sendMessage(ChatColor.WHITE + " SubServers.Client.Bukkit v" + plugin.version.toExtendedString());
sender.sendMessage("");
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
try {
Document updxml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(Util.readAll(new BufferedReader(new InputStreamReader(new URL("https://src.me1312.net/maven/net/ME1312/SubServers/SubServers.Client.Bukkit/maven-metadata.xml").openStream(), Charset.forName("UTF-8")))))));

View File

@ -46,10 +46,8 @@ public final class SubPlugin extends JavaPlugin {
public SubPlugin() {
super();
//version = new Version(getDescription().getVersion());
//version = new Version(new Version(getDescription().getVersion()), VersionType.BETA, 1); // TODO Beta Version Setting
version = new Version(new Version(new Version(getDescription().getVersion()), VersionType.PRE_RELEASE, 4), VersionType.SNAPSHOT,
(SubPlugin.class.getPackage().getSpecificationTitle() == null)?"0":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Beta Version Setting */
//version = Version.fromString(getDescription().getVersion());
version = new Version(Version.fromString(getDescription().getVersion()), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
}
/**

View File

@ -1,6 +1,6 @@
name: 'SubServers-Client-Bukkit'
main: 'net.ME1312.SubServers.Client.Bukkit.SubPlugin'
version: '2.13a'
version: '2.13a/pr4'
authors: [ME1312]
softdepend: [Vault, TitleManager]
website: 'http://www.ME1312.net/'

View File

@ -22,6 +22,12 @@
<version>1.16</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId>
<version>5.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>

Binary file not shown.

View File

@ -1,4 +1,4 @@
Manifest-Version: 1.0
Main-Class: net.ME1312.SubServers.Host.ExHost
Implementation-Title: SubServers.Host
Specification-Title: 18w22a
Specification-Title: 18w23a

View File

@ -52,10 +52,8 @@ public final class ExHost {
public SubDataClient subdata = null;
public final SubAPI api = new SubAPI(this);
//public final Version version = new Version("2.13a");
//public final Version version = new Version(new Version("2.13a"), VersionType.BETA, 1); // TODO Beta Version Setting
public final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 4), VersionType.SNAPSHOT,
(ExHost.class.getPackage().getSpecificationTitle() == null)?"0":ExHost.class.getPackage().getSpecificationTitle()); // TODO Beta Version Setting */
//public static final Version version = Version.fromString("2.13a/pr4");
public static final Version version = new Version(Version.fromString("2.13a/pr4"), VersionType.SNAPSHOT, (ExHost.class.getPackage().getSpecificationTitle() == null)?"?":ExHost.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
private ConsoleReader jline;
private boolean running = false;
@ -69,7 +67,21 @@ public final class ExHost {
*/
public static void main(String[] args) throws Exception {
if (System.getProperty("RM.subservers", "true").equalsIgnoreCase("true")) {
new ExHost(args);
joptsimple.OptionParser parser = new joptsimple.OptionParser();
parser.allowsUnrecognizedOptions();
parser.accepts("v");
parser.accepts("version");
parser.accepts("noconsole");
joptsimple.OptionSet options = parser.parse(args);
if(options.has("version") || options.has("v")) {
System.out.println("");
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version") + ',');
System.out.println("Java " + System.getProperty("java.version") + ",");
System.out.println("SubServers.Host v" + version.toExtendedString());
System.out.println("");
} else {
new ExHost(options);
}
} else {
System.out.println(">> SubServers code has been disallowed to work on this machine");
System.out.println(">> Check with your provider for more information");
@ -77,7 +89,7 @@ public final class ExHost {
}
}
private ExHost(String[] args) {
private ExHost(joptsimple.OptionSet options) {
try {
JarFile jarFile = new JarFile(new File(ExHost.class.getProtectionDomain().getCodeSource().getLocation().toURI()));
Enumeration<JarEntry> entries = jarFile.entries();
@ -401,7 +413,9 @@ public final class ExHost {
}
}, 0, TimeUnit.DAYS.toMillis(2));
loop();
if (!options.has("noconsole")) {
loop();
}
} catch (Exception e) {
log.error.println(e);
forcequit(1);

View File

@ -30,9 +30,11 @@ public class SubCommand {
public void command(String handle, String[] args) {
if (args.length == 0) {
host.log.message.println(
System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',',
"Java " + System.getProperty("java.version") + ',',
"SubServers.Host v" + host.version.toExtendedString());
"These are the platforms and versions that are running SubServers.Host:",
" " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ',',
" Java " + System.getProperty("java.version") + ',',
" SubServers.Host v" + host.version.toExtendedString(),
"");
new Thread(() -> {
try {
Document updxml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(Util.readAll(new BufferedReader(new InputStreamReader(new URL("https://src.me1312.net/maven/net/ME1312/SubServers/SubServers.Host/maven-metadata.xml").openStream(), Charset.forName("UTF-8")))))));

Binary file not shown.

View File

@ -2,4 +2,4 @@ Manifest-Version: 1.0
Class-Path: BungeeCord.jar Waterfall.jar
Main-Class: net.ME1312.SubServers.Sync.Launch
Implementation-Title: SubServers.Sync
Specification-Title: 18w22a
Specification-Title: 18w23a

View File

@ -47,9 +47,9 @@ public final class Launch {
joptsimple.OptionSet options = parser.parse(args);
if(options.has("version") || options.has("v")) {
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("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());
System.out.println("");
} else {

View File

@ -66,7 +66,12 @@ public final class SubCommand extends CommandX {
if (args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("?")) {
sender.sendMessages(printHelp());
} else if (args[0].equalsIgnoreCase("version") || args[0].equalsIgnoreCase("ver")) {
sender.sendMessage("SubServers > SubServers.Sync is running version " + plugin.version.toExtendedString());
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Sync:");
sender.sendMessage(" " + System.getProperty("os.name") + ' ' + System.getProperty("os.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(" SubServers.Sync v" + SubPlugin.version.toExtendedString());
sender.sendMessage("");
new Thread(() -> {
try {
Document updxml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(Util.readAll(new BufferedReader(new InputStreamReader(new URL("https://src.me1312.net/maven/net/ME1312/SubServers/SubServers.Sync/maven-metadata.xml").openStream(), Charset.forName("UTF-8")))))));

View File

@ -48,10 +48,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
public boolean redis = false;
public final SubAPI api = new SubAPI(this);
public SubDataClient subdata = null;
//public static final Version version = new Version("2.13a");
//public static final Version version = new Version(new Version("2.13a"), VersionType.BETA, 1); // TODO Beta Version Setting
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 4), VersionType.SNAPSHOT,
(SubPlugin.class.getPackage().getSpecificationTitle() == null)?"0":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Beta Version Setting */
//public static final Version version = Version.fromString("2.13a/pr4");
public static final Version version = new Version(Version.fromString("2.13a/pr4"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
public final boolean isPatched;
public long lastReload = -1;
@ -159,11 +157,10 @@ public final class SubPlugin extends BungeeCord implements Listener {
*
* @param method Method to reference
* @param args Method arguments
* @param <T> Class Type
* @return Method Response
*/
@SuppressWarnings("unchecked")
public <T> Object redis(String method, NamedContainer<Class<?>, ?>... args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
public Object redis(String method, NamedContainer<Class<?>, ?>... args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
if (redis) {
Object api = getPluginManager().getPlugin("RedisBungee").getClass().getMethod("getApi").invoke(null);
Class<?>[] classargs = new Class<?>[args.length];