SubServers v2.12.1b

This commit is contained in:
ME1312 2017-08-16 19:29:02 -04:00
parent ac1df7a30a
commit ebe1ba0c4c
32 changed files with 1019 additions and 208 deletions

Binary file not shown.

Binary file not shown.

View File

@ -37,6 +37,7 @@
<li><a href="net/ME1312/SubServers/Bungee/Library/Exception/InvalidTemplateException.html" title="class in net.ME1312.SubServers.Bungee.Library.Exception" target="classFrame">InvalidTemplateException</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Bungee.Library" target="classFrame"><span class="interfaceName">JSONCallback</span></a></li>
<li><a href="net/ME1312/SubServers/Bungee/Launch.html" title="class in net.ME1312.SubServers.Bungee" target="classFrame">Launch</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library" target="classFrame">Metrics</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library" target="classFrame">NamedContainer</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketAuthorization.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet" target="classFrame">PacketAuthorization</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketCommandServer.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet" target="classFrame">PacketCommandServer</a></li>

View File

@ -37,6 +37,7 @@
<li><a href="net/ME1312/SubServers/Bungee/Library/Exception/InvalidTemplateException.html" title="class in net.ME1312.SubServers.Bungee.Library.Exception">InvalidTemplateException</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="interfaceName">JSONCallback</span></a></li>
<li><a href="net/ME1312/SubServers/Bungee/Launch.html" title="class in net.ME1312.SubServers.Bungee">Launch</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library">Metrics</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library">NamedContainer</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketAuthorization.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet">PacketAuthorization</a></li>
<li><a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketCommandServer.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet">PacketCommandServer</a></li>

View File

@ -70,6 +70,35 @@
<div class="header">
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#net.ME1312">net.ME1312.*</a></li>
</ul>
</div>
<div class="constantValuesContainer"><a name="net.ME1312">
<!-- -->
</a>
<h2 title="net.ME1312">net.ME1312.*</h2>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>net.ME1312.SubServers.Bungee.Library.<a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library">Metrics</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="net.ME1312.SubServers.Bungee.Library.Metrics.B_STATS_VERSION">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html#B_STATS_VERSION">B_STATS_VERSION</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">

View File

@ -237,6 +237,8 @@
</a>
<h2 class="title">B</h2>
<dl>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html#B_STATS_VERSION">B_STATS_VERSION</a></span> - Static variable in class net.ME1312.SubServers.Bungee.Library.<a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library">Metrics</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Network/SubDataServer.html#broadcastPacket-net.ME1312.SubServers.Bungee.Network.PacketOut-">broadcastPacket(PacketOut)</a></span> - Method in class net.ME1312.SubServers.Bungee.Network.<a href="net/ME1312/SubServers/Bungee/Network/SubDataServer.html" title="class in net.ME1312.SubServers.Bungee.Network">SubDataServer</a></dt>
<dd>
<div class="block">Broadcast a Packet to everything on the Network<br>
@ -1150,6 +1152,10 @@
<dd>
<div class="block">Gets the player that triggered the Event</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html#getPluginData--">getPluginData()</a></span> - Method in class net.ME1312.SubServers.Bungee.Library.<a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library">Metrics</a></dt>
<dd>
<div class="block">Gets the plugin specific data.</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Event/SubCreateEvent.html#getPort--">getPort()</a></span> - Method in class net.ME1312.SubServers.Bungee.Event.<a href="net/ME1312/SubServers/Bungee/Event/SubCreateEvent.html" title="class in net.ME1312.SubServers.Bungee.Event">SubCreateEvent</a></dt>
<dd>
<div class="block">Get the Port the Server will use</div>
@ -1770,6 +1776,10 @@
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Launch.html#Launch--">Launch()</a></span> - Constructor for class net.ME1312.SubServers.Bungee.<a href="net/ME1312/SubServers/Bungee/Launch.html" title="class in net.ME1312.SubServers.Bungee">Launch</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html#linkMetrics-java.lang.Object-">linkMetrics(Object)</a></span> - Static method in class net.ME1312.SubServers.Bungee.Library.<a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library">Metrics</a></dt>
<dd>
<div class="block">Links an other metrics class with this class.</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/External/ExternalSubLogger.html#log-java.lang.String-">log(String)</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.External.<a href="net/ME1312/SubServers/Bungee/Host/External/ExternalSubLogger.html" title="class in net.ME1312.SubServers.Bungee.Host.External">ExternalSubLogger</a></dt>
<dd>
<div class="block">Log a Message</div>
@ -1812,6 +1822,12 @@
<dd>
<div class="block">Launch SubServers/BungeeCord</div>
</dd>
<dt><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Metrics</span></a> - Class in <a href="net/ME1312/SubServers/Bungee/Library/package-summary.html">net.ME1312.SubServers.Bungee.Library</a></dt>
<dd>
<div class="block">bStats collects some data for plugin authors.</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Library/Metrics.html#Metrics-net.ME1312.SubServers.Bungee.SubPlugin-">Metrics(SubPlugin)</a></span> - Constructor for class net.ME1312.SubServers.Bungee.Library.<a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library">Metrics</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:N">
<!-- -->
@ -2230,6 +2246,14 @@
<dd>
<div class="block">Register PacketOut to the Network</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/External/ExternalSubCreator.html#reload--">reload()</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.External.<a href="net/ME1312/SubServers/Bungee/Host/External/ExternalSubCreator.html" title="class in net.ME1312.SubServers.Bungee.Host.External">ExternalSubCreator</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/Internal/InternalSubCreator.html#reload--">reload()</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.Internal.<a href="net/ME1312/SubServers/Bungee/Host/Internal/InternalSubCreator.html" title="class in net.ME1312.SubServers.Bungee.Host.Internal">InternalSubCreator</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/SubCreator.html#reload--">reload()</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.<a href="net/ME1312/SubServers/Bungee/Host/SubCreator.html" title="class in net.ME1312.SubServers.Bungee.Host">SubCreator</a></dt>
<dd>
<div class="block">Reload SubCreator</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Library/Config/YAMLConfig.html#reload--">reload()</a></span> - Method in class net.ME1312.SubServers.Bungee.Library.Config.<a href="net/ME1312/SubServers/Bungee/Library/Config/YAMLConfig.html" title="class in net.ME1312.SubServers.Bungee.Library.Config">YAMLConfig</a></dt>
<dd>
<div class="block">Reload Config Contents</div>

View File

@ -17,7 +17,7 @@
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10};
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@ -222,23 +222,29 @@ extends <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/External/ExternalSubCreator.html#reload--">reload</a></span>()</code>
<div class="block">Reload SubCreator</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/External/ExternalSubCreator.html#terminate--">terminate</a></span>()</code>
<div class="block">Terminate All SubCreator Instances on this host</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/External/ExternalSubCreator.html#terminate-java.lang.String-">terminate</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Terminate a SubCreator Instance</div>
</td>
</tr>
<tr id="i10" class="altColor">
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/External/ExternalSubCreator.html#waitFor--">waitFor</a></span>()</code>
<div class="block">Wait for All SubCreator Instances to Finish</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/External/ExternalSubCreator.html#waitFor-java.lang.String-">waitFor</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Wait for SubCreator to Finish</div>
@ -297,6 +303,21 @@ extends <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="reload--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reload</h4>
<pre>public&nbsp;void&nbsp;reload()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#reload--">SubCreator</a></code></span></div>
<div class="block">Reload SubCreator</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#reload--">reload</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html" title="class in net.ME1312.SubServers.Bungee.Host">SubCreator</a></code></dd>
</dl>
</li>
</ul>
<a name="create-java.util.UUID-java.lang.String-net.ME1312.SubServers.Bungee.Host.SubCreator.ServerTemplate-net.ME1312.SubServers.Bungee.Library.Version.Version-int-">
<!-- -->
</a>

View File

@ -17,7 +17,7 @@
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10};
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@ -222,23 +222,29 @@ extends <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Internal/InternalSubCreator.html#reload--">reload</a></span>()</code>
<div class="block">Reload SubCreator</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Internal/InternalSubCreator.html#terminate--">terminate</a></span>()</code>
<div class="block">Terminate All SubCreator Instances on this host</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Internal/InternalSubCreator.html#terminate-java.lang.String-">terminate</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Terminate a SubCreator Instance</div>
</td>
</tr>
<tr id="i10" class="altColor">
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Internal/InternalSubCreator.html#waitFor--">waitFor</a></span>()</code>
<div class="block">Wait for All SubCreator Instances to Finish</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Internal/InternalSubCreator.html#waitFor-java.lang.String-">waitFor</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Wait for SubCreator to Finish</div>
@ -297,6 +303,21 @@ extends <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="reload--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reload</h4>
<pre>public&nbsp;void&nbsp;reload()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#reload--">SubCreator</a></code></span></div>
<div class="block">Reload SubCreator</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#reload--">reload</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html" title="class in net.ME1312.SubServers.Bungee.Host">SubCreator</a></code></dd>
</dl>
</li>
</ul>
<a name="create-java.util.UUID-java.lang.String-net.ME1312.SubServers.Bungee.Host.SubCreator.ServerTemplate-net.ME1312.SubServers.Bungee.Library.Version.Version-int-">
<!-- -->
</a>

View File

@ -17,7 +17,7 @@
catch(err) {
}
//-->
var methods = {"i0":10,"i1":6,"i2":9,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":9,"i11":6,"i12":6,"i13":6,"i14":6};
var methods = {"i0":10,"i1":6,"i2":9,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":9,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@ -247,23 +247,29 @@ extends java.lang.Object</pre>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#reload--">reload</a></span>()</code>
<div class="block">Reload SubCreator</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#terminate--">terminate</a></span>()</code>
<div class="block">Terminate All SubCreator Instances on this host</div>
</td>
</tr>
<tr id="i12" class="altColor">
<tr id="i13" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#terminate-java.lang.String-">terminate</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Terminate a SubCreator Instance</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<tr id="i14" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#waitFor--">waitFor</a></span>()</code>
<div class="block">Wait for All SubCreator Instances to Finish</div>
</td>
</tr>
<tr id="i14" class="altColor">
<tr id="i15" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.html#waitFor-java.lang.String-">waitFor</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Wait for SubCreator to Finish</div>
@ -529,7 +535,7 @@ extends java.lang.Object</pre>
<a name="getTemplate-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<ul class="blockList">
<li class="blockList">
<h4>getTemplate</h4>
<pre>public abstract&nbsp;<a href="../../../../../net/ME1312/SubServers/Bungee/Host/SubCreator.ServerTemplate.html" title="class in net.ME1312.SubServers.Bungee.Host">SubCreator.ServerTemplate</a>&nbsp;getTemplate(java.lang.String&nbsp;name)</pre>
@ -542,6 +548,16 @@ extends java.lang.Object</pre>
</dl>
</li>
</ul>
<a name="reload--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reload</h4>
<pre>public abstract&nbsp;void&nbsp;reload()</pre>
<div class="block">Reload SubCreator</div>
</li>
</ul>
</li>
</ul>
</li>

View File

@ -48,7 +48,7 @@ var activeTableTab = "activeTableTab";
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/ExtraDataHandler.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?net/ME1312/SubServers/Bungee/Library/JSONCallback.html" target="_top">Frames</a></li>
@ -182,7 +182,7 @@ var activeTableTab = "activeTableTab";
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/ExtraDataHandler.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?net/ME1312/SubServers/Bungee/Library/JSONCallback.html" target="_top">Frames</a></li>

View File

@ -0,0 +1,340 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Metrics (SubServers.Bungee)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Metrics (SubServers.Bungee)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?net/ME1312/SubServers/Bungee/Library/Metrics.html" target="_top">Frames</a></li>
<li><a href="Metrics.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">net.ME1312.SubServers.Bungee.Library</div>
<h2 title="Class Metrics" class="title">Class Metrics</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>net.ME1312.SubServers.Bungee.Library.Metrics</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">Metrics</span>
extends java.lang.Object</pre>
<div class="block">bStats collects some data for plugin authors.
Check out https://bStats.org/ to learn more about bStats!</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html#B_STATS_VERSION">B_STATS_VERSION</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html#Metrics-net.ME1312.SubServers.Bungee.SubPlugin-">Metrics</a></span>(<a href="../../../../../net/ME1312/SubServers/Bungee/SubPlugin.html" title="class in net.ME1312.SubServers.Bungee">SubPlugin</a>&nbsp;plugin)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>com.google.gson.JsonObject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html#getPluginData--">getPluginData</a></span>()</code>
<div class="block">Gets the plugin specific data.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html#linkMetrics-java.lang.Object-">linkMetrics</a></span>(java.lang.Object&nbsp;metrics)</code>
<div class="block">Links an other metrics class with this class.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="B_STATS_VERSION">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>B_STATS_VERSION</h4>
<pre>public static final&nbsp;int B_STATS_VERSION</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#net.ME1312.SubServers.Bungee.Library.Metrics.B_STATS_VERSION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Metrics-net.ME1312.SubServers.Bungee.SubPlugin-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Metrics</h4>
<pre>public&nbsp;Metrics(<a href="../../../../../net/ME1312/SubServers/Bungee/SubPlugin.html" title="class in net.ME1312.SubServers.Bungee">SubPlugin</a>&nbsp;plugin)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="linkMetrics-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>linkMetrics</h4>
<pre>public static&nbsp;void&nbsp;linkMetrics(java.lang.Object&nbsp;metrics)</pre>
<div class="block">Links an other metrics class with this class.
This method is called using Reflection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>metrics</code> - An object of the metrics class to link.</dd>
</dl>
</li>
</ul>
<a name="getPluginData--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getPluginData</h4>
<pre>public&nbsp;com.google.gson.JsonObject&nbsp;getPluginData()</pre>
<div class="block">Gets the plugin specific data.
This method is called using Reflection.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The plugin specific data.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?net/ME1312/SubServers/Bungee/Library/Metrics.html" target="_top">Frames</a></li>
<li><a href="Metrics.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>

View File

@ -47,7 +47,7 @@ var activeTableTab = "activeTableTab";
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/SubEvent.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
@ -299,7 +299,7 @@ extends <a href="../../../../../net/ME1312/SubServers/Bungee/Library/Container.h
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../net/ME1312/SubServers/Bungee/Library/SubEvent.html" title="interface in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">

View File

@ -21,6 +21,7 @@
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="Container.html" title="class in net.ME1312.SubServers.Bungee.Library" target="classFrame">Container</a></li>
<li><a href="Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library" target="classFrame">Metrics</a></li>
<li><a href="NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library" target="classFrame">NamedContainer</a></li>
<li><a href="UniversalFile.html" title="class in net.ME1312.SubServers.Bungee.Library" target="classFrame">UniversalFile</a></li>
<li><a href="Util.html" title="class in net.ME1312.SubServers.Bungee.Library" target="classFrame">Util</a></li>

View File

@ -124,18 +124,24 @@
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library">Metrics</a></td>
<td class="colLast">
<div class="block">bStats collects some data for plugin authors.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Bungee.Library">NamedContainer</a>&lt;T,V&gt;</td>
<td class="colLast">
<div class="block">Named Container Class</div>
</td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/UniversalFile.html" title="class in net.ME1312.SubServers.Bungee.Library">UniversalFile</a></td>
<td class="colLast">
<div class="block">Universal File Class</div>
</td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Util.html" title="class in net.ME1312.SubServers.Bungee.Library">Util</a></td>
<td class="colLast">
<div class="block">SubServers Utility Class</div>

View File

@ -89,6 +89,7 @@
<li type="circle">net.ME1312.SubServers.Bungee.Library.<a href="../../../../../net/ME1312/SubServers/Bungee/Library/UniversalFile.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">UniversalFile</span></a></li>
</ul>
</li>
<li type="circle">net.ME1312.SubServers.Bungee.Library.<a href="../../../../../net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Metrics</span></a></li>
<li type="circle">net.ME1312.SubServers.Bungee.Library.<a href="../../../../../net/ME1312/SubServers/Bungee/Library/Util.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Util</span></a></li>
</ul>
</li>

View File

@ -142,6 +142,7 @@
</ul>
</li>
<li type="circle">net.ME1312.SubServers.Bungee.<a href="net/ME1312/SubServers/Bungee/Launch.html" title="class in net.ME1312.SubServers.Bungee"><span class="typeNameLink">Launch</span></a></li>
<li type="circle">net.ME1312.SubServers.Bungee.Library.<a href="net/ME1312/SubServers/Bungee/Library/Metrics.html" title="class in net.ME1312.SubServers.Bungee.Library"><span class="typeNameLink">Metrics</span></a></li>
<li type="circle">net.ME1312.SubServers.Bungee.Network.Packet.<a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketAuthorization.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet"><span class="typeNameLink">PacketAuthorization</span></a> (implements net.ME1312.SubServers.Bungee.Network.<a href="net/ME1312/SubServers/Bungee/Network/PacketIn.html" title="interface in net.ME1312.SubServers.Bungee.Network">PacketIn</a>, net.ME1312.SubServers.Bungee.Network.<a href="net/ME1312/SubServers/Bungee/Network/PacketOut.html" title="interface in net.ME1312.SubServers.Bungee.Network">PacketOut</a>)</li>
<li type="circle">net.ME1312.SubServers.Bungee.Network.Packet.<a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketCommandServer.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet"><span class="typeNameLink">PacketCommandServer</span></a> (implements net.ME1312.SubServers.Bungee.Network.<a href="net/ME1312/SubServers/Bungee/Network/PacketIn.html" title="interface in net.ME1312.SubServers.Bungee.Network">PacketIn</a>, net.ME1312.SubServers.Bungee.Network.<a href="net/ME1312/SubServers/Bungee/Network/PacketOut.html" title="interface in net.ME1312.SubServers.Bungee.Network">PacketOut</a>)</li>
<li type="circle">net.ME1312.SubServers.Bungee.Network.Packet.<a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketCreateServer.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet"><span class="typeNameLink">PacketCreateServer</span></a> (implements net.ME1312.SubServers.Bungee.Network.<a href="net/ME1312/SubServers/Bungee/Network/PacketIn.html" title="interface in net.ME1312.SubServers.Bungee.Network">PacketIn</a>, net.ME1312.SubServers.Bungee.Network.<a href="net/ME1312/SubServers/Bungee/Network/PacketOut.html" title="interface in net.ME1312.SubServers.Bungee.Network">PacketOut</a>)</li>

View File

@ -82,10 +82,6 @@
<dd>
<div class="block">Add an extra value to this Server</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Host/SubAPI.html#addListener-net.ME1312.SubServers.Host.API.SubPluginInfo-net.ME1312.SubServers.Host.Library.Event.Listener...-">addListener(SubPluginInfo, Listener...)</a></span> - Method in class net.ME1312.SubServers.Host.<a href="net/ME1312/SubServers/Host/SubAPI.html" title="class in net.ME1312.SubServers.Host">SubAPI</a></dt>
<dd>
<div class="block">Register SubEvent Listeners</div>
</dd>
<dt><a href="net/ME1312/SubServers/Host/Network/AES.html" title="class in net.ME1312.SubServers.Host.Network"><span class="typeNameLink">AES</span></a> - Class in <a href="net/ME1312/SubServers/Host/Network/package-summary.html">net.ME1312.SubServers.Host.Network</a></dt>
<dd>
<div class="block">A class to perform password-based AES encryption and decryption in CBC mode.</div>
@ -1731,7 +1727,7 @@
<dd>
<div class="block">Remove an extra value from this Server</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Host/SubAPI.html#removeListener-net.ME1312.SubServers.Host.API.SubPluginInfo-net.ME1312.SubServers.Host.Library.Event.Listener...-">removeListener(SubPluginInfo, Listener...)</a></span> - Method in class net.ME1312.SubServers.Host.<a href="net/ME1312/SubServers/Host/SubAPI.html" title="class in net.ME1312.SubServers.Host">SubAPI</a></dt>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Host/SubAPI.html#removeListener-net.ME1312.SubServers.Host.API.SubPluginInfo-java.lang.Object...-">removeListener(SubPluginInfo, Object...)</a></span> - Method in class net.ME1312.SubServers.Host.<a href="net/ME1312/SubServers/Host/SubAPI.html" title="class in net.ME1312.SubServers.Host">SubAPI</a></dt>
<dd>
<div class="block">Unregister SubEvent Listeners</div>
</dd>

View File

@ -98,7 +98,7 @@ public @interface <span class="memberNameLabel">EventHandler</span></pre>
Methods annotated by this and registered in SubAPI will be run when the event is called</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../net/ME1312/SubServers/Host/SubAPI.html#addListener-net.ME1312.SubServers.Host.API.SubPluginInfo-net.ME1312.SubServers.Host.Library.Event.Listener...-"><code>SubAPI.addListener(SubPluginInfo, Listener...)</code></a></dd>
<dd><a href="../../../../../../net/ME1312/SubServers/Host/SubAPI.html#addListener-net.ME1312.SubServers.Host.API.SubPluginInfo-java.lang.Object...-"><code>SubAPI.addListener(SubPluginInfo, Object...)</code></a></dd>
</dl>
</li>
</ul>

View File

@ -17,7 +17,7 @@
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":9,"i7":42,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10};
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":42,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@ -137,42 +137,35 @@ extends java.lang.Object</pre>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#addListener-net.ME1312.SubServers.Host.API.SubPluginInfo-net.ME1312.SubServers.Host.Library.Event.Listener...-">addListener</a></span>(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
<a href="../../../../net/ME1312/SubServers/Host/Library/Event/Listener.html" title="interface in net.ME1312.SubServers.Host.Library.Event">Listener</a>...&nbsp;listeners)</code>
<div class="block">Register SubEvent Listeners</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#cancelTask-java.util.UUID-">cancelTask</a></span>(java.util.UUID&nbsp;sid)</code>
<div class="block">Cancel a task</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#executeEvent-net.ME1312.SubServers.Host.Library.Event.Event-">executeEvent</a></span>(<a href="../../../../net/ME1312/SubServers/Host/Library/Event/Event.html" title="class in net.ME1312.SubServers.Host.Library.Event">Event</a>&nbsp;event)</code>
<div class="block">Run a SubEvent</div>
</td>
</tr>
<tr id="i4" class="altColor">
<tr id="i3" 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="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getAppVersion--">getAppVersion</a></span>()</code>
<div class="block">Gets the SubServers Version</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<tr id="i4" class="altColor">
<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="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getBetaVersion--">getBetaVersion</a></span>()</code>
<div class="block">Gets the SubServers Beta Version</div>
</td>
</tr>
<tr id="i6" class="altColor">
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../net/ME1312/SubServers/Host/SubAPI.html" title="class in net.ME1312.SubServers.Host">SubAPI</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getInstance--">getInstance</a></span>()</code>
<div class="block">Gets the SubAPI Methods</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Host/ExHost.html" title="class in net.ME1312.SubServers.Host">ExHost</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getInternals--">getInternals</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
@ -180,63 +173,63 @@ extends java.lang.Object</pre>
</div>
</td>
</tr>
<tr id="i8" class="altColor">
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getLang--">getLang</a></span>()</code>
<div class="block">Gets the SubServers Lang</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getLang-java.lang.String-">getLang</a></span>(java.lang.String&nbsp;key)</code>
<div class="block">Gets a value from the SubServers Lang</div>
</td>
</tr>
<tr id="i10" class="altColor">
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getPlugin-java.lang.String-">getPlugin</a></span>(java.lang.String&nbsp;plugin)</code>
<div class="block">Gets a Plugin</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<tr id="i10" class="altColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getPlugins--">getPlugins</a></span>()</code>
<div class="block">Get a map of the Plugins</div>
</td>
</tr>
<tr id="i12" class="altColor">
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Host/Library/UniversalFile.html" title="class in net.ME1312.SubServers.Host.Library">UniversalFile</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getRuntimeDirectory--">getRuntimeDirectory</a></span>()</code>
<div class="block">Gets the Runtime Directory</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Host/Network/SubDataClient.html" title="class in net.ME1312.SubServers.Host.Network">SubDataClient</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#getSubDataNetwork--">getSubDataNetwork</a></span>()</code>
<div class="block">Gets the SubData Network Manager</div>
</td>
</tr>
<tr id="i14" class="altColor">
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#removeCommand-java.lang.String...-">removeCommand</a></span>(java.lang.String...&nbsp;handles)</code>
<div class="block">Unregisters a Command</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#removeListener-net.ME1312.SubServers.Host.API.SubPluginInfo-net.ME1312.SubServers.Host.Library.Event.Listener...-">removeListener</a></span>(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
<a href="../../../../net/ME1312/SubServers/Host/Library/Event/Listener.html" title="interface in net.ME1312.SubServers.Host.Library.Event">Listener</a>...&nbsp;listeners)</code>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#removeListener-net.ME1312.SubServers.Host.API.SubPluginInfo-java.lang.Object...-">removeListener</a></span>(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
java.lang.Object...&nbsp;listeners)</code>
<div class="block">Unregister SubEvent Listeners</div>
</td>
</tr>
<tr id="i16" class="altColor">
<tr id="i15" class="rowColor">
<td class="colFirst"><code>java.util.UUID</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#schedule-net.ME1312.SubServers.Host.API.SubPluginInfo-java.lang.Runnable-">schedule</a></span>(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
java.lang.Runnable&nbsp;run)</code>
<div class="block">Schedule a task</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.util.UUID</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#schedule-net.ME1312.SubServers.Host.API.SubPluginInfo-java.lang.Runnable-long-">schedule</a></span>(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
java.lang.Runnable&nbsp;run,
@ -244,7 +237,7 @@ extends java.lang.Object</pre>
<div class="block">Schedule a task</div>
</td>
</tr>
<tr id="i18" class="altColor">
<tr id="i17" class="rowColor">
<td class="colFirst"><code>java.util.UUID</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#schedule-net.ME1312.SubServers.Host.API.SubPluginInfo-java.lang.Runnable-long-long-">schedule</a></span>(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
java.lang.Runnable&nbsp;run,
@ -253,7 +246,7 @@ extends java.lang.Object</pre>
<div class="block">Schedule a task</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<tr id="i18" class="altColor">
<td class="colFirst"><code>java.util.UUID</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Host/SubAPI.html#schedule-net.ME1312.SubServers.Host.API.SubTask-">schedule</a></span>(<a href="../../../../net/ME1312/SubServers/Host/API/SubTask.html" title="class in net.ME1312.SubServers.Host.API">SubTask</a>&nbsp;builder)</code>
<div class="block">Schedule a task</div>
@ -475,30 +468,14 @@ public&nbsp;<a href="../../../../net/ME1312/SubServers/Host/ExHost.html" title="
</dl>
</li>
</ul>
<a name="addListener-net.ME1312.SubServers.Host.API.SubPluginInfo-net.ME1312.SubServers.Host.Library.Event.Listener...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addListener</h4>
<pre>public&nbsp;void&nbsp;addListener(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
<a href="../../../../net/ME1312/SubServers/Host/Library/Event/Listener.html" title="interface in net.ME1312.SubServers.Host.Library.Event">Listener</a>...&nbsp;listeners)</pre>
<div class="block">Register SubEvent Listeners</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>plugin</code> - PluginInfo</dd>
<dd><code>listeners</code> - Listeners</dd>
</dl>
</li>
</ul>
<a name="removeListener-net.ME1312.SubServers.Host.API.SubPluginInfo-net.ME1312.SubServers.Host.Library.Event.Listener...-">
<a name="removeListener-net.ME1312.SubServers.Host.API.SubPluginInfo-java.lang.Object...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeListener</h4>
<pre>public&nbsp;void&nbsp;removeListener(<a href="../../../../net/ME1312/SubServers/Host/API/SubPluginInfo.html" title="class in net.ME1312.SubServers.Host.API">SubPluginInfo</a>&nbsp;plugin,
<a href="../../../../net/ME1312/SubServers/Host/Library/Event/Listener.html" title="interface in net.ME1312.SubServers.Host.Library.Event">Listener</a>...&nbsp;listeners)</pre>
java.lang.Object...&nbsp;listeners)</pre>
<div class="block">Unregister SubEvent Listeners</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>

View File

@ -1,5 +1,5 @@
Manifest-Version: 1.0
Class-Path: BungeeCord.jar
Main-Class: net.ME1312.SubServers.Bungee.Launch
Implementation-Version: 2.12.1a
Implementation-Version: 2.12.1b
Specification-Version: 0

View File

@ -55,9 +55,9 @@ public class ExternalHost extends Host implements ClientHandler {
this.name = name;
this.enabled = enabled;
this.address = address;
this.client = new NamedContainer<Boolean, Client>(false, null);
this.creator = new ExternalSubCreator(this, gitBash);
this.directory = directory;
this.client = new NamedContainer<Boolean, Client>(false, null);
this.queue = new LinkedList<PacketOut>();
this.clean = false;
}

View File

@ -9,6 +9,7 @@ import net.ME1312.SubServers.Bungee.Library.JSONCallback;
import net.ME1312.SubServers.Bungee.Library.UniversalFile;
import net.ME1312.SubServers.Bungee.Library.Util;
import net.ME1312.SubServers.Bungee.Library.Version.Version;
import net.ME1312.SubServers.Bungee.Network.Packet.PacketExConfigureHost;
import net.ME1312.SubServers.Bungee.Network.Packet.PacketExCreateServer;
import net.ME1312.SubServers.Bungee.SubAPI;
@ -35,7 +36,12 @@ public class ExternalSubCreator extends SubCreator {
this.host = host;
this.gitBash = gitBash;
this.thread = new TreeMap<String, ExternalSubLogger>();
reload();
}
@Override
public void reload() {
templates.clear();
if (new UniversalFile(host.plugin.dir, "SubServers:Templates").exists()) for (File file : new UniversalFile(host.plugin.dir, "SubServers:Templates").listFiles()) {
try {
if (file.isDirectory()) {
@ -49,6 +55,7 @@ public class ExternalSubCreator extends SubCreator {
e.printStackTrace();
}
}
if (host.client.name()) host.queue(new PacketExConfigureHost(host.plugin, host));
}
@Override

View File

@ -46,7 +46,12 @@ public class InternalSubCreator extends SubCreator {
this.host = host;
this.gitBash = gitBash;
this.thread = new TreeMap<String, NamedContainer<Thread, NamedContainer<InternalSubLogger, Process>>>();
reload();
}
@Override
public void reload() {
templates.clear();
if (new UniversalFile(host.plugin.dir, "SubServers:Templates").exists()) for (File file : new UniversalFile(host.plugin.dir, "SubServers:Templates").listFiles()) {
try {
if (file.isDirectory()) {

View File

@ -289,4 +289,9 @@ public abstract class SubCreator {
* @return Template
*/
public abstract ServerTemplate getTemplate(String name);
/**
* Reload SubCreator
*/
public abstract void reload();
}

View File

@ -0,0 +1,369 @@
package net.ME1312.SubServers.Bungee.Library;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import net.ME1312.SubServers.Bungee.SubPlugin;
import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration;
import javax.net.ssl.HttpsURLConnection;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.nio.file.Path;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.zip.GZIPOutputStream;
/**
* bStats collects some data for plugin authors.
*
* Check out https://bStats.org/ to learn more about bStats!
*/
public class Metrics {
static {
// You can use the property to disable the check in your test environment
if (System.getProperty("bstats.relocatecheck") == null || !System.getProperty("bstats.relocatecheck").equals("false")) {
// Maven's Relocate is clever and changes strings, too. So we have to use this little "trick" ... :D
final String defaultPackage = new String(
new byte[]{'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's', '.', 'b', 'u', 'n', 'g', 'e', 'e', 'c', 'o', 'r', 'd'});
final String examplePackage = new String(new byte[]{'y', 'o', 'u', 'r', '.', 'p', 'a', 'c', 'k', 'a', 'g', 'e'});
// We want to make sure nobody just copy & pastes the example and use the wrong package names
if (Metrics.class.getPackage().getName().equals(defaultPackage) || Metrics.class.getPackage().getName().equals(examplePackage)) {
throw new IllegalStateException("bStats Metrics class has not been relocated correctly!");
}
}
}
// The version of this bStats class
public static final int B_STATS_VERSION = 1;
// The url to which the data is sent
private static final String URL = "https://bStats.org/submitData/bungeecord";
// The plugin
private final SubPlugin plugin;
// Is bStats enabled on this server?
private boolean enabled;
// The uuid of the server
private String serverUUID;
// Should failed requests be logged?
private boolean logFailedRequests = false;
// A list with all known metrics class objects including this one
private static final List<Object> knownMetricsInstances = new ArrayList<>();
public Metrics(SubPlugin plugin) {
this.plugin = plugin;
try {
loadConfig();
} catch (IOException e) {
// Failed to load configuration
plugin.getLogger().log(Level.WARNING, "Failed to load bStats config!", e);
return;
}
// We are not allowed to send data about this server :(
if (!enabled) {
return;
}
Class<?> usedMetricsClass = getFirstBStatsClass();
if (usedMetricsClass == null) {
// Failed to get first metrics class
return;
}
if (usedMetricsClass == getClass()) {
// We are the first! :)
linkMetrics(this);
startSubmitting();
} else {
// We aren't the first so we link to the first metrics class
try {
usedMetricsClass.getMethod("linkMetrics", Object.class).invoke(null,this);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
if (logFailedRequests) {
plugin.getLogger().log(Level.WARNING, "Failed to link to first metrics class " + usedMetricsClass.getName() + "!", e);
}
}
}
}
/**
* Links an other metrics class with this class.
* This method is called using Reflection.
*
* @param metrics An object of the metrics class to link.
*/
public static void linkMetrics(Object metrics) {
knownMetricsInstances.add(metrics);
}
/**
* Gets the plugin specific data.
* This method is called using Reflection.
*
* @return The plugin specific data.
*/
public JsonObject getPluginData() {
JsonObject data = new JsonObject();
String pluginName = "SubServers 2";
String pluginVersion = plugin.version.toString();
data.addProperty("pluginName", pluginName);
data.addProperty("pluginVersion", pluginVersion);
JsonArray customCharts = new JsonArray();
data.add("customCharts", customCharts);
return data;
}
private void startSubmitting() {
new Timer().schedule( new TimerTask() {
@Override
public void run() {
// The data collection is async, as well as sending the data
// Bungeecord does not have a main thread, everything is async
submitData();
}
}, TimeUnit.MINUTES.toMillis(2), TimeUnit.MINUTES.toMillis(30));
// Submit the data every 30 minutes, first time after 2 minutes to give other plugins enough time to start
// WARNING: Changing the frequency has no effect but your plugin WILL be blocked/deleted!
// WARNING: Just don't do it!
}
/**
* Gets the server specific data.
*
* @return The server specific data.
*/
private JsonObject getServerData() {
// Minecraft specific data
int playerAmount = plugin.getOnlineCount();
playerAmount = playerAmount > 500 ? 500 : playerAmount;
int onlineMode = plugin.getConfig().isOnlineMode() ? 1 : 0;
String bungeecordVersion = plugin.getVersion();
int managedServers = plugin.getServers().size();
// OS/Java specific data
String javaVersion = System.getProperty("java.version");
String osName = System.getProperty("os.name");
String osArch = System.getProperty("os.arch");
String osVersion = System.getProperty("os.version");
int coreCount = Runtime.getRuntime().availableProcessors();
JsonObject data = new JsonObject();
data.addProperty("serverUUID", serverUUID);
data.addProperty("playerAmount", playerAmount);
data.addProperty("managedServers", managedServers);
data.addProperty("onlineMode", onlineMode);
data.addProperty("bungeecordVersion", bungeecordVersion);
data.addProperty("javaVersion", javaVersion);
data.addProperty("osName", osName);
data.addProperty("osArch", osArch);
data.addProperty("osVersion", osVersion);
data.addProperty("coreCount", coreCount);
return data;
}
/**
* Collects the data and sends it afterwards.
*/
private void submitData() {
final JsonObject data = getServerData();
final JsonArray pluginData = new JsonArray();
// Search for all other bStats Metrics classes to get their plugin data
for (Object metrics : knownMetricsInstances) {
try {
Object plugin = metrics.getClass().getMethod("getPluginData").invoke(metrics);
if (plugin instanceof JsonObject) {
pluginData.add((JsonObject) plugin);
}
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) { }
}
data.add("plugins", pluginData);
try {
// Send the data
sendData(data);
} catch (Exception e) {
// Something went wrong! :(
if (logFailedRequests) {
plugin.getLogger().log(Level.WARNING, "Could not submit plugin stats!", e);
}
}
}
/**
* Loads the bStats configuration.
*
* @throws IOException If something did not work :(
*/
private void loadConfig() throws IOException {
Path configPath = new File(plugin.dir, "plugins").toPath().resolve("bStats");
configPath.toFile().mkdirs();
File configFile = new File(configPath.toFile(), "config.yml");
if (!configFile.exists()) {
writeFile(configFile,
"#bStats collects some data for plugin authors like how many servers are using their plugins.",
"#To honor their work, you should not disable it.",
"#This has nearly no effect on the server performance!",
"#Check out https://bStats.org/ to learn more :)",
"enabled: true",
"serverUuid: \"" + UUID.randomUUID().toString() + "\"",
"logFailedRequests: false");
}
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(configFile);
// Load configuration
enabled = configuration.getBoolean("enabled", true);
serverUUID = configuration.getString("serverUuid");
logFailedRequests = configuration.getBoolean("logFailedRequests", false);
}
/**
* Gets the first bStat Metrics class.
*
* @return The first bStats metrics class.
*/
private Class<?> getFirstBStatsClass() {
Path configPath = new File(plugin.dir, "plugins").toPath().resolve("bStats");
configPath.toFile().mkdirs();
File tempFile = new File(configPath.toFile(), "temp.txt");
try {
String className = readFile(tempFile);
if (className != null) {
try {
// Let's check if a class with the given name exists.
return Class.forName(className);
} catch (ClassNotFoundException ignored) { }
}
writeFile(tempFile, getClass().getName());
return getClass();
} catch (IOException e) {
if (logFailedRequests) {
plugin.getLogger().log(Level.WARNING, "Failed to get first bStats class!", e);
}
return null;
}
}
/**
* Reads the first line of the file.
*
* @param file The file to read. Cannot be null.
* @return The first line of the file or <code>null</code> if the file does not exist or is empty.
* @throws IOException If something did not work :(
*/
private String readFile(File file) throws IOException {
if (!file.exists()) {
return null;
}
try (
FileReader fileReader = new FileReader(file);
BufferedReader bufferedReader = new BufferedReader(fileReader);
) {
return bufferedReader.readLine();
}
}
/**
* Writes a String to a file. It also adds a note for the user,
*
* @param file The file to write to. Cannot be null.
* @param lines The lines to write.
* @throws IOException If something did not work :(
*/
private void writeFile(File file, String... lines) throws IOException {
if (!file.exists()) {
file.createNewFile();
}
try (
FileWriter fileWriter = new FileWriter(file);
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter)
) {
for (String line : lines) {
bufferedWriter.write(line);
bufferedWriter.newLine();
}
}
}
/**
* Sends the data to the bStats server.
*
* @param data The data to send.
* @throws Exception If the request failed.
*/
private static void sendData(JsonObject data) throws Exception {
if (data == null) {
throw new IllegalArgumentException("Data cannot be null");
}
HttpsURLConnection connection = (HttpsURLConnection) new URL(URL).openConnection();
// Compress the data to save bandwidth
byte[] compressedData = compress(data.toString());
// Add headers
connection.setRequestMethod("POST");
connection.addRequestProperty("Accept", "application/json");
connection.addRequestProperty("Connection", "close");
connection.addRequestProperty("Content-Encoding", "gzip"); // We gzip our request
connection.addRequestProperty("Content-Length", String.valueOf(compressedData.length));
connection.setRequestProperty("Content-Type", "application/json"); // We send our data in JSON format
connection.setRequestProperty("User-Agent", "MC-Server/" + B_STATS_VERSION);
// Send data
connection.setDoOutput(true);
DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream());
outputStream.write(compressedData);
outputStream.flush();
outputStream.close();
connection.getInputStream().close(); // We don't care about the response - Just send our data :)
}
/**
* Gzips the given String.
*
* @param str The string to gzip.
* @return The gzipped String.
* @throws IOException If the compression failed.
*/
private static byte[] compress(final String str) throws IOException {
if (str == null) {
return null;
}
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
GZIPOutputStream gzip = new GZIPOutputStream(outputStream);
gzip.write(str.getBytes("UTF-8"));
gzip.close();
return outputStream.toByteArray();
}
}

View File

@ -46,6 +46,31 @@ public final class SubCommand extends Command implements TabExecutor {
sender.sendMessages(printHelp());
} else if (args[0].equalsIgnoreCase("version") || args[0].equalsIgnoreCase("ver")) {
sender.sendMessage("SubServers > SubServers.Bungee is running version " + plugin.version.toString() + ((plugin.bversion != null)?" BETA "+plugin.bversion.toString():""));
} else if (args[0].equalsIgnoreCase("reload")) {
if (args.length > 1) {
switch (args[1].toLowerCase()) {
case "all":
case "host":
case "hosts":
case "server":
case "servers":
plugin.getPluginManager().dispatchCommand(ConsoleCommandSender.getInstance(), "greload");
break;
case "creator":
case "creators":
case "template":
case "templates":
for (Host host : plugin.api.getHosts().values()) {
host.getCreator().reload();
}
sender.sendMessage("SubServers > SubCreator instances reloaded");
break;
default:
sender.sendMessage("SubServers > Unknown reload type: " + args[1]);
}
} else {
plugin.getPluginManager().dispatchCommand(ConsoleCommandSender.getInstance(), "greload");
}
} else if (args[0].equalsIgnoreCase("list")) {
List<String> hosts = new ArrayList<String>();
for (Host host : plugin.hosts.values()) {
@ -346,7 +371,8 @@ public final class SubCommand extends Command implements TabExecutor {
" Help: /sub help",
" List: /sub list",
" Version: /sub version",
" Server Status: /sub info <SubServer>",
" Reload: /sub reload [servers|creator]",
" Server Info: /sub info <SubServer>",
" Start Server: /sub start <SubServer>",
" Stop Server: /sub stop <SubServer>",
" Terminate Server: /sub kill <SubServer>",

View File

@ -8,6 +8,7 @@ import net.ME1312.SubServers.Bungee.Library.Exception.InvalidHostException;
import net.ME1312.SubServers.Bungee.Library.Exception.InvalidServerException;
import net.ME1312.SubServers.Bungee.Host.Host;
import net.ME1312.SubServers.Bungee.Host.SubServer;
import net.ME1312.SubServers.Bungee.Library.Metrics;
import net.ME1312.SubServers.Bungee.Library.NamedContainer;
import net.ME1312.SubServers.Bungee.Library.UniversalFile;
import net.ME1312.SubServers.Bungee.Library.Util;
@ -29,8 +30,6 @@ import java.nio.file.Files;
import java.text.DecimalFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
/**
* Main Plugin Class
@ -170,15 +169,15 @@ public final class SubPlugin extends BungeeCord implements Listener {
getPluginManager().registerCommand(null, new SubCommand(this, "subserver"));
getPluginManager().registerCommand(null, new SubCommand(this, "sub"));
System.out.println("SubServers > Loading BungeeCord Libraries...");
int i = 1, p = 1;
new Metrics(this);
System.out.println("SubServers > Pre-Parsing Config...");
for (String name : config.get().getSection("Servers").getKeys()) {
if (i >= 255) i = 0;
if (p >= 65535) p = 0;
i++;
p++;
legServers.put(name, new BungeeServerInfo(name, new InetSocketAddress(InetAddress.getByName(i + ".0.0.0"), p), "Some SubServer", false));
if (!config.get().getSection("Hosts").contains(config.get().getSection("Servers").getSection(name).getString("Host"))) throw new InvalidServerException("There is no host with this name: " + config.get().getSection("Servers").getSection(name).getString("Host"));
legServers.put(name, new BungeeServerInfo(name, new InetSocketAddress(InetAddress.getByName(config.get().getSection("Hosts").getSection(config.get().getSection("Servers").getSection(name).getString("Host")).getRawString("Address")), config.get().getSection("Servers").getSection(name).getInt("Port")), config.get().getSection("Servers").getSection(name).getColoredString("Motd", '&'), config.get().getSection("Servers").getSection(name).getBoolean("Restricted")));
}
System.out.println("SubServers > Loading BungeeCord Libraries...");
}
/**
@ -314,8 +313,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
public Map<String, ServerInfo> getServers() {
HashMap<String, ServerInfo> servers = new HashMap<String, ServerInfo>();
if (!running) {
servers.putAll(legServers);
servers.putAll(super.getServers());
servers.putAll(legServers);
} else {
for (ServerInfo server : exServers.values()) servers.put(server.getName(), server);
for (Host host : this.hosts.values()) {

View File

@ -7,13 +7,11 @@ import java.net.URLEncoder;
import java.util.*;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import javax.xml.parsers.DocumentBuilderFactory;
import jline.TerminalFactory;
import jline.console.ConsoleReader;
import jline.console.CursorBuffer;
import net.ME1312.SubServers.Host.Library.Util;
import org.fusesource.jansi.AnsiConsole;
import org.w3c.dom.NodeList;
@ -39,14 +37,14 @@ public final class Launch {
extractJar(getCodeSourceLocation(), tmpdir);
System.out.println(">> Extracted ~/" + getCodeSourceLocation().getName());
if (pldir.isDirectory() && pldir.listFiles().length > 0) {
for (File mod : Arrays.asList(pldir.listFiles())) {
for (File plugin : Arrays.asList(pldir.listFiles())) {
try {
boolean success = false;
if (getFileExtension(mod.getName()).equalsIgnoreCase("zip")) {
extractZip(mod, tmpdir);
if (getFileExtension(plugin.getName()).equalsIgnoreCase("zip")) {
Util.unzip(new FileInputStream(plugin), tmpdir);
success = true;
} else if (getFileExtension(mod.getName()).equalsIgnoreCase("jar")) {
extractJar(mod, tmpdir);
} else if (getFileExtension(plugin.getName()).equalsIgnoreCase("jar")) {
extractJar(plugin, tmpdir);
success = true;
}
if (new File(tmpdir, "package.xml").exists()) {
@ -58,9 +56,9 @@ public final class Launch {
}
new File(tmpdir, "package.xml").delete();
}
if (success) System.out.println(">> Extracted ~/plugins/" + mod.getName());
if (success) System.out.println(">> Extracted ~/plugins/" + plugin.getName());
} catch (Exception e) {
System.out.println(">> Couldn't extract ~/plugins/" + mod.getName());
System.out.println(">> Couldn't extract ~/plugins/" + plugin.getName());
e.printStackTrace();
}
}
@ -138,8 +136,8 @@ public final class Launch {
} catch (Exception e) {
e.printStackTrace();
}
stashLine(console);
AnsiConsole.systemUninstall();
System.out.println();
}
private static void extractJar(File jarFile, File dir) throws Exception {
@ -171,43 +169,6 @@ public final class Launch {
}
}
private static void extractZip(File zipFile, File dir) {
byte[] buffer = new byte[1024];
try {
ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile));
ZipEntry entry = zis.getNextEntry();
ArrayList<ZipEntry> entries = new ArrayList<ZipEntry>();
while (entry != null) {
entries.add(entry);
entry = zis.getNextEntry();
}
for (ZipEntry ze : entries) {
int len;
File newFile = new File(dir, ze.getName());
if (newFile.exists()) {
continue;
}
if (ze.isDirectory()) {
newFile.mkdirs();
continue;
}
if (!newFile.getParentFile().exists()) {
newFile.getParentFile().mkdirs();
}
FileOutputStream fos = new FileOutputStream(newFile);
while ((len = zis.read(buffer)) > 0) {
fos.write(buffer, 0, len);
}
fos.close();
}
zis.closeEntry();
zis.close();
}
catch (IOException ex) {
ex.printStackTrace();
}
}
private static void deleteDir(File f) {
if (f.isDirectory()) {
for (File c : f.listFiles()) {

View File

@ -11,7 +11,7 @@ import java.lang.annotation.Target;
* EventHandler Method Annotation<br>
* Methods annotated by this and registered in SubAPI will be run when the event is called
*
* @see net.ME1312.SubServers.Host.SubAPI#addListener(SubPluginInfo, Listener...)
* @see net.ME1312.SubServers.Host.SubAPI#addListener(SubPluginInfo, Object...)
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)

View File

@ -22,6 +22,7 @@ import java.util.Base64;
*/
public class PacketExConfigureHost implements PacketIn, PacketOut {
private ExHost host;
private boolean first = false;
private Logger log = null;
/**
@ -40,6 +41,7 @@ public class PacketExConfigureHost implements PacketIn, PacketOut {
@Override
public JSONObject generate() {
host.log.info.println("Downloading Host Settings...");
first = true;
return null;
}
@ -65,7 +67,8 @@ public class PacketExConfigureHost implements PacketIn, PacketOut {
host.log.error.println(e);
}
}
log.info.println("Host Settings Downloaded");
log.info.println(((first)?"":"New ") + "Host Settings Downloaded");
first = false;
}
@Override

View File

@ -79,17 +79,6 @@ public final class SubAPI {
return getPlugins().get(plugin.toLowerCase());
}
private UUID getFreeSID() {
UUID sid = null;
do {
UUID id = UUID.randomUUID();
if (!schedule.keySet().contains(id)) {
sid = id;
}
} while (sid == null);
return sid;
}
/**
* Registers a Command
*
@ -113,6 +102,17 @@ public final class SubAPI {
}
}
private UUID getFreeSID() {
UUID sid = null;
do {
UUID id = UUID.randomUUID();
if (!schedule.keySet().contains(id)) {
sid = id;
}
} while (sid == null);
return sid;
}
/**
* Schedule a task
*
@ -212,34 +212,34 @@ public final class SubAPI {
* @param plugin PluginInfo
* @param listeners Listeners
*/
public void addListener(SubPluginInfo plugin, Listener... listeners) {
for (Listener listener : listeners) addListener(plugin, (Object) listener);
}
@SuppressWarnings("unchecked")
void addListener(SubPluginInfo plugin, Object listener) {
if (Util.isNull(plugin, listener)) throw new NullPointerException();
for (Method method : Arrays.asList(listener.getClass().getMethods())) {
if (!method.isAnnotationPresent(EventHandler.class)) continue;
if (method.getParameterTypes().length == 1) {
if (Event.class.isAssignableFrom(method.getParameterTypes()[0])) {
HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>> events = (listeners.keySet().contains(method.getAnnotation(EventHandler.class).order()))?listeners.get(method.getAnnotation(EventHandler.class).order()):new LinkedHashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>>();
HashMap<SubPluginInfo, HashMap<Object, List<Method>>> plugins = (events.keySet().contains((Class<Event>) method.getParameterTypes()[0]))?events.get((Class<Event>) method.getParameterTypes()[0]):new LinkedHashMap<SubPluginInfo, HashMap<Object, List<Method>>>();
HashMap<Object, List<Method>> listeners = (plugins.keySet().contains(plugin))?plugins.get(plugin):new LinkedHashMap<Object, List<Method>>();
List<Method> methods = (listeners.keySet().contains(listener))?listeners.get(listener):new LinkedList<Method>();
methods.add(method);
listeners.put(listener, methods);
plugins.put(plugin, listeners);
events.put((Class<Event>) method.getParameterTypes()[0], plugins);
this.listeners.put(method.getAnnotation(EventHandler.class).order(), events);
} else {
this.host.log.error.println(
"Cannot register EventHandler in class \"" + listener.getClass().getCanonicalName() + "\" using method \"" + method.getName() + "\":",
"\"" + method.getParameterTypes()[0].getCanonicalName() + "\" is not a SubEvent");
void addListener(SubPluginInfo plugin, Object... listeners) {
for (Object listener : listeners) {
if (Util.isNull(plugin, listener)) throw new NullPointerException();
for (Method method : Arrays.asList(listener.getClass().getMethods())) {
if (!method.isAnnotationPresent(EventHandler.class)) {
if (method.getParameterTypes().length == 1) {
if (Event.class.isAssignableFrom(method.getParameterTypes()[0])) {
HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>> events = (this.listeners.keySet().contains(method.getAnnotation(EventHandler.class).order()))?this.listeners.get(method.getAnnotation(EventHandler.class).order()):new LinkedHashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>>();
HashMap<SubPluginInfo, HashMap<Object, List<Method>>> plugins = (events.keySet().contains((Class<Event>) method.getParameterTypes()[0]))?events.get((Class<Event>) method.getParameterTypes()[0]):new LinkedHashMap<SubPluginInfo, HashMap<Object, List<Method>>>();
HashMap<Object, List<Method>> objects = (plugins.keySet().contains(plugin))?plugins.get(plugin):new LinkedHashMap<Object, List<Method>>();
List<Method> methods = (objects.keySet().contains(listener))?objects.get(listener):new LinkedList<Method>();
methods.add(method);
objects.put(listener, methods);
plugins.put(plugin, objects);
events.put((Class<Event>) method.getParameterTypes()[0], plugins);
this.listeners.put(method.getAnnotation(EventHandler.class).order(), events);
} else {
this.host.log.error.println(
"Cannot register EventHandler in class \"" + listener.getClass().getCanonicalName() + "\" using method \"" + method.getName() + "\":",
"\"" + method.getParameterTypes()[0].getCanonicalName() + "\" is not an Event");
}
} else {
this.host.log.error.println(
"Cannot register EventHandler in class \"" + listener.getClass().getCanonicalName() + "\" using method \"" + method.getName() + "\":",
((method.getParameterTypes().length > 0) ? "Too many" : "No") + " parameters for SubEvent to execute");
}
}
} else {
this.host.log.error.println(
"Cannot register EventHandler in class \"" + listener.getClass().getCanonicalName() + "\" using method \"" + method.getName() + "\":",
((method.getParameterTypes().length > 0) ? "Too many" : "No") + " parameters for SubEvent to execute");
}
}
}
@ -250,22 +250,21 @@ public final class SubAPI {
* @param plugin PluginInfo
* @param listeners Listeners
*/
public void removeListener(SubPluginInfo plugin, Listener... listeners) {
for (Listener listener : listeners) removeListener(plugin, (Object) listener);
}
void removeListener(SubPluginInfo plugin, Object listener) {
if (Util.isNull(plugin, listener)) throw new NullPointerException();
TreeMap<Short, HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>>> map = new TreeMap<Short, HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>>>(listeners);
for (Short order : map.keySet()) {
for (Class<? extends Event> event : map.get(order).keySet()) {
if (map.get(order).get(event).keySet().contains(plugin) && map.get(order).get(event).get(plugin).keySet().contains(listener)) {
HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>> events = listeners.get(order);
HashMap<SubPluginInfo, HashMap<Object, List<Method>>> plugins = listeners.get(order).get(event);
HashMap<Object, List<Method>> listeners = this.listeners.get(order).get(event).get(plugin);
listeners.remove(listener);
plugins.put(plugin, listeners);
events.put(event, plugins);
this.listeners.put(order, events);
public void removeListener(SubPluginInfo plugin, Object... listeners) {
for (Object listener : listeners) {
if (Util.isNull(plugin, listener)) throw new NullPointerException();
TreeMap<Short, HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>>> map = new TreeMap<Short, HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>>>(this.listeners);
for (Short order : map.keySet()) {
for (Class<? extends Event> event : map.get(order).keySet()) {
if (map.get(order).get(event).keySet().contains(plugin) && map.get(order).get(event).get(plugin).keySet().contains(listener)) {
HashMap<Class<? extends Event>, HashMap<SubPluginInfo, HashMap<Object, List<Method>>>> events = this.listeners.get(order);
HashMap<SubPluginInfo, HashMap<Object, List<Method>>> plugins = this.listeners.get(order).get(event);
HashMap<Object, List<Method>> objects = this.listeners.get(order).get(event).get(plugin);
objects.remove(listener);
plugins.put(plugin, objects);
events.put(event, plugins);
this.listeners.put(order, events);
}
}
}
}
@ -279,27 +278,29 @@ public final class SubAPI {
public void executeEvent(Event event) {
if (Util.isNull(event)) throw new NullPointerException();
for (Short order : listeners.keySet()) {
if (!listeners.get(order).keySet().contains(event.getClass())) continue;
for (SubPluginInfo plugin : listeners.get(order).get(event.getClass()).keySet()) {
try {
Field pf = Event.class.getDeclaredField("plugin");
pf.setAccessible(true);
pf.set(event, plugin);
pf.setAccessible(false);
} catch (Exception e) {
this.host.log.error.println(e);
}
for (Object listener : listeners.get(order).get(event.getClass()).get(plugin).keySet()) {
for (Method method : listeners.get(order).get(event.getClass()).get(plugin).get(listener)) {
if (event instanceof Cancellable && ((Cancellable) event).isCancelled() && !method.getAnnotation(EventHandler.class).override()) continue;
try {
method.invoke(listener, event);
} catch (InvocationTargetException e) {
this.host.log.error.println("Event \"" + method.getName() + "(" + event.getClass().getTypeName() + ")\" in class \"" + listener.getClass().getCanonicalName() + "\" had an unhandled exception:");
this.host.log.error.println(e.getTargetException());
} catch (IllegalAccessException e) {
this.host.log.error.println("Cannot access method \"" + method.getName() + "\" in class \"" + listener.getClass().getCanonicalName() + "\"");
this.host.log.error.println(e);
if (!listeners.get(order).keySet().contains(event.getClass())) {
for (SubPluginInfo plugin : listeners.get(order).get(event.getClass()).keySet()) {
try {
Field pf = Event.class.getDeclaredField("plugin");
pf.setAccessible(true);
pf.set(event, plugin);
pf.setAccessible(false);
} catch (Exception e) {
this.host.log.error.println(e);
}
for (Object listener : listeners.get(order).get(event.getClass()).get(plugin).keySet()) {
for (Method method : listeners.get(order).get(event.getClass()).get(plugin).get(listener)) {
if (event instanceof Cancellable && ((Cancellable) event).isCancelled() && !method.getAnnotation(EventHandler.class).override()) {
try {
method.invoke(listener, event);
} catch (InvocationTargetException e) {
this.host.log.error.println("Event \"" + method.getName() + "(" + event.getClass().getTypeName() + ")\" in class \"" + listener.getClass().getCanonicalName() + "\" had an unhandled exception:");
this.host.log.error.println(e.getTargetException());
} catch (IllegalAccessException e) {
this.host.log.error.println("Cannot access method \"" + method.getName() + "\" in class \"" + listener.getClass().getCanonicalName() + "\"");
this.host.log.error.println(e);
}
}
}
}
}

View File

@ -102,7 +102,7 @@ public class SubCommand {
host.log.message.println("Usage: " + handle + " <SubServer>");
}
}
}.description("Gets information about a SubServer").help(
}.usage("<SubServer>").description("Gets information about a SubServer").help(
"This command will print a list of information about",
"the specified SubServer.",
"",