Add Server Grouping

This commit is contained in:
ME1312 2017-08-26 01:19:59 -04:00
parent 53d57cada9
commit ba09bab93a
50 changed files with 1151 additions and 324 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -84,6 +84,10 @@
<dd>
<div class="block">Add an extra value to this Server</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/Server.html#addGroup-java.lang.String-">addGroup(String)</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.<a href="net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a></dt>
<dd>
<div class="block">Add this Server to a Group</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/SubAPI.html#addHost-java.lang.String-java.lang.String-boolean-java.net.InetAddress-java.lang.String-java.lang.String-">addHost(String, String, boolean, InetAddress, String, String)</a></span> - Method in class net.ME1312.SubServers.Bungee.<a href="net/ME1312/SubServers/Bungee/SubAPI.html" title="class in net.ME1312.SubServers.Bungee">SubAPI</a></dt>
<dd>
<div class="block">Add a Host to the Network</div>
@ -924,6 +928,18 @@
<dd>
<div class="block">Gets the Recommended Minecraft Version</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/SubAPI.html#getGroup-java.lang.String-">getGroup(String)</a></span> - Method in class net.ME1312.SubServers.Bungee.<a href="net/ME1312/SubServers/Bungee/SubAPI.html" title="class in net.ME1312.SubServers.Bungee">SubAPI</a></dt>
<dd>
<div class="block">Gets a Server Group</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/Server.html#getGroups--">getGroups()</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.<a href="net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a></dt>
<dd>
<div class="block">Get this Server's Groups</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/SubAPI.html#getGroups--">getGroups()</a></span> - Method in class net.ME1312.SubServers.Bungee.<a href="net/ME1312/SubServers/Bungee/SubAPI.html" title="class in net.ME1312.SubServers.Bungee">SubAPI</a></dt>
<dd>
<div class="block">Gets the Server Groups</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/External/ExternalSubLogger.html#getHandler--">getHandler()</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>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/Internal/InternalSubLogger.html#getHandler--">getHandler()</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.Internal.<a href="net/ME1312/SubServers/Bungee/Host/Internal/InternalSubLogger.html" title="class in net.ME1312.SubServers.Bungee.Host.Internal">InternalSubLogger</a></dt>
@ -1510,6 +1526,8 @@
<dd>
<div class="block">Gets the SubServers Version</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/SubPlugin.html#groups">groups</a></span> - Variable in class net.ME1312.SubServers.Bungee.<a href="net/ME1312/SubServers/Bungee/SubPlugin.html" title="class in net.ME1312.SubServers.Bungee">SubPlugin</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:H">
<!-- -->
@ -2068,7 +2086,7 @@
<dd>
<div class="block">New PacketDownloadServerList (In)</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-net.ME1312.SubServers.Bungee.SubPlugin-java.lang.String-java.lang.String-">PacketDownloadServerList(SubPlugin, String, String)</a></span> - Constructor for class net.ME1312.SubServers.Bungee.Network.Packet.<a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketDownloadServerList.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet">PacketDownloadServerList</a></dt>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-net.ME1312.SubServers.Bungee.SubPlugin-java.lang.String-java.lang.String-java.lang.String-">PacketDownloadServerList(SubPlugin, String, String, String)</a></span> - Constructor for class net.ME1312.SubServers.Bungee.Network.Packet.<a href="net/ME1312/SubServers/Bungee/Network/Packet/PacketDownloadServerList.html" title="class in net.ME1312.SubServers.Bungee.Network.Packet">PacketDownloadServerList</a></dt>
<dd>
<div class="block">New PacketDownloadServerList (Out)</div>
</dd>
@ -2344,6 +2362,10 @@
<dd>
<div class="block">Remove an extra value from this Server</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/Host/Server.html#removeGroup-java.lang.String-">removeGroup(String)</a></span> - Method in class net.ME1312.SubServers.Bungee.Host.<a href="net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a></dt>
<dd>
<div class="block">Remove this Server from a Group</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Bungee/SubAPI.html#removeHost-java.lang.String-">removeHost(String)</a></span> - Method in class net.ME1312.SubServers.Bungee.<a href="net/ME1312/SubServers/Bungee/SubAPI.html" title="class in net.ME1312.SubServers.Bungee">SubAPI</a></dt>
<dd>
<div class="block">Remove a Host from the Network</div>

View File

@ -345,7 +345,7 @@ extends <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubServer.h
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;net.ME1312.SubServers.Bungee.Host.<a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a></h3>
<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addExtra-java.lang.String-java.lang.Object-">addExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getDisplayName--">getDisplayName</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra--">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra-java.lang.String-">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getMotd--">getMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getSubData--">getSubData</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#hasExtra-java.lang.String-">hasExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isHidden--">isHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isRestricted--">isRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeExtra-java.lang.String-">removeExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setHidden-boolean-">setHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setMotd-java.lang.String-">setMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setRestricted-boolean-">setRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setSubData-net.ME1312.SubServers.Bungee.Network.Client-">setSubData</a></code></li>
<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addExtra-java.lang.String-java.lang.Object-">addExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addGroup-java.lang.String-">addGroup</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getDisplayName--">getDisplayName</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra--">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra-java.lang.String-">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getGroups--">getGroups</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getMotd--">getMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getSubData--">getSubData</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#hasExtra-java.lang.String-">hasExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isHidden--">isHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isRestricted--">isRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeExtra-java.lang.String-">removeExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeGroup-java.lang.String-">removeGroup</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setHidden-boolean-">setHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setMotd-java.lang.String-">setMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setRestricted-boolean-">setRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setSubData-net.ME1312.SubServers.Bungee.Network.Client-">setSubData</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.net.md_5.bungee.BungeeServerInfo">

View File

@ -347,7 +347,7 @@ extends <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/SubServer.h
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;net.ME1312.SubServers.Bungee.Host.<a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a></h3>
<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addExtra-java.lang.String-java.lang.Object-">addExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getDisplayName--">getDisplayName</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra--">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra-java.lang.String-">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getMotd--">getMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getSubData--">getSubData</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#hasExtra-java.lang.String-">hasExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isHidden--">isHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isRestricted--">isRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeExtra-java.lang.String-">removeExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setHidden-boolean-">setHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setMotd-java.lang.String-">setMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setRestricted-boolean-">setRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setSubData-net.ME1312.SubServers.Bungee.Network.Client-">setSubData</a></code></li>
<code><a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addExtra-java.lang.String-java.lang.Object-">addExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addGroup-java.lang.String-">addGroup</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getDisplayName--">getDisplayName</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra--">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra-java.lang.String-">getExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getGroups--">getGroups</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getMotd--">getMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getSubData--">getSubData</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#hasExtra-java.lang.String-">hasExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isHidden--">isHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isRestricted--">isRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeExtra-java.lang.String-">removeExtra</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeGroup-java.lang.String-">removeGroup</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setHidden-boolean-">setHidden</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setMotd-java.lang.String-">setMotd</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setRestricted-boolean-">setRestricted</a>, <a href="../../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setSubData-net.ME1312.SubServers.Bungee.Network.Client-">setSubData</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.net.md_5.bungee.BungeeServerInfo">

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,"i12":10,"i13":10,"i14":10,"i15":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,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@ -171,90 +171,108 @@ implements <a href="../../../../../net/ME1312/SubServers/Bungee/Network/ClientHa
</td>
</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/Bungee/Host/Server.html#addGroup-java.lang.String-">addGroup</a></span>(java.lang.String&nbsp;value)</code>
<div class="block">Add this Server to a Group</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getDisplayName--">getDisplayName</a></span>()</code>
<div class="block">Get the Display Name of this Server</div>
</td>
</tr>
<tr id="i2" class="altColor">
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Config/YAMLSection.html" title="class in net.ME1312.SubServers.Bungee.Library.Config">YAMLSection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra--">getExtra</a></span>()</code>
<div class="block">Get the extra value section</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../net/ME1312/SubServers/Bungee/Library/Config/YAMLValue.html" title="class in net.ME1312.SubServers.Bungee.Library.Config">YAMLValue</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra-java.lang.String-">getExtra</a></span>(java.lang.String&nbsp;handle)</code>
<div class="block">Get an extra value</div>
</td>
</tr>
<tr id="i4" class="altColor">
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getGroups--">getGroups</a></span>()</code>
<div class="block">Get this Server's Groups</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getMotd--">getMotd</a></span>()</code>
<div class="block">Gets the MOTD of the Server</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../../net/ME1312/SubServers/Bungee/Network/Client.html" title="class in net.ME1312.SubServers.Bungee.Network">Client</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getSubData--">getSubData</a></span>()</code>
<div class="block">Gets the SubData Client</div>
</td>
</tr>
<tr id="i6" class="altColor">
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#hasExtra-java.lang.String-">hasExtra</a></span>(java.lang.String&nbsp;handle)</code>
<div class="block">Determine if an extra value exists</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isHidden--">isHidden</a></span>()</code>
<div class="block">If the server is hidden from players</div>
</td>
</tr>
<tr id="i8" class="altColor">
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isRestricted--">isRestricted</a></span>()</code>
<div class="block">Gets if the Server is Restricted</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<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/Server.html#removeExtra-java.lang.String-">removeExtra</a></span>(java.lang.String&nbsp;handle)</code>
<div class="block">Remove an extra value from this Server</div>
</td>
</tr>
<tr id="i10" class="altColor">
<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/Server.html#removeGroup-java.lang.String-">removeGroup</a></span>(java.lang.String&nbsp;value)</code>
<div class="block">Remove this Server from a Group</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setDisplayName-java.lang.String-">setDisplayName</a></span>(java.lang.String&nbsp;value)</code>
<div class="block">Sets the Display Name for this Server</div>
</td>
</tr>
<tr id="i11" 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/Bungee/Host/Server.html#setHidden-boolean-">setHidden</a></span>(boolean&nbsp;value)</code>
<div class="block">Set if the server is hidden from players</div>
</td>
</tr>
<tr id="i12" class="altColor">
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setMotd-java.lang.String-">setMotd</a></span>(java.lang.String&nbsp;value)</code>
<div class="block">Sets the MOTD of the Server</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setRestricted-boolean-">setRestricted</a></span>(boolean&nbsp;value)</code>
<div class="block">Sets if the Server is Restricted</div>
</td>
</tr>
<tr id="i14" class="altColor">
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setSubData-net.ME1312.SubServers.Bungee.Network.Client-">setSubData</a></span>(<a href="../../../../../net/ME1312/SubServers/Bungee/Network/Client.html" title="class in net.ME1312.SubServers.Bungee.Network">Client</a>&nbsp;client)</code>
<div class="block">Link a SubData Client to this Object</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<tr id="i18" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
@ -453,6 +471,48 @@ implements <a href="../../../../../net/ME1312/SubServers/Bungee/Network/ClientHa
</dl>
</li>
</ul>
<a name="getGroups--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroups</h4>
<pre>public&nbsp;java.util.List&lt;java.lang.String&gt;&nbsp;getGroups()</pre>
<div class="block">Get this Server's Groups</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Group names</dd>
</dl>
</li>
</ul>
<a name="addGroup-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addGroup</h4>
<pre>public&nbsp;void&nbsp;addGroup(java.lang.String&nbsp;value)</pre>
<div class="block">Add this Server to a Group</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - Group name</dd>
</dl>
</li>
</ul>
<a name="removeGroup-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeGroup</h4>
<pre>public&nbsp;void&nbsp;removeGroup(java.lang.String&nbsp;value)</pre>
<div class="block">Remove this Server from a Group</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - value Group name</dd>
</dl>
</li>
</ul>
<a name="setRestricted-boolean-">
<!-- -->
</a>

View File

@ -395,7 +395,7 @@ extends <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html" t
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;net.ME1312.SubServers.Bungee.Host.<a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a></h3>
<code><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addExtra-java.lang.String-java.lang.Object-">addExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getDisplayName--">getDisplayName</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra--">getExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra-java.lang.String-">getExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getMotd--">getMotd</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getSubData--">getSubData</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#hasExtra-java.lang.String-">hasExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isHidden--">isHidden</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isRestricted--">isRestricted</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeExtra-java.lang.String-">removeExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setDisplayName-java.lang.String-">setDisplayName</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setHidden-boolean-">setHidden</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setMotd-java.lang.String-">setMotd</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setRestricted-boolean-">setRestricted</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setSubData-net.ME1312.SubServers.Bungee.Network.Client-">setSubData</a></code></li>
<code><a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addExtra-java.lang.String-java.lang.Object-">addExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#addGroup-java.lang.String-">addGroup</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getDisplayName--">getDisplayName</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra--">getExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getExtra-java.lang.String-">getExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getGroups--">getGroups</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getMotd--">getMotd</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#getSubData--">getSubData</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#hasExtra-java.lang.String-">hasExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isHidden--">isHidden</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#isRestricted--">isRestricted</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeExtra-java.lang.String-">removeExtra</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#removeGroup-java.lang.String-">removeGroup</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setDisplayName-java.lang.String-">setDisplayName</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setHidden-boolean-">setHidden</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setMotd-java.lang.String-">setMotd</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setRestricted-boolean-">setRestricted</a>, <a href="../../../../../net/ME1312/SubServers/Bungee/Host/Server.html#setSubData-net.ME1312.SubServers.Bungee.Network.Client-">setSubData</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.net.md_5.bungee.BungeeServerInfo">

View File

@ -138,8 +138,9 @@ implements <a href="../../../../../../net/ME1312/SubServers/Bungee/Network/Packe
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-net.ME1312.SubServers.Bungee.SubPlugin-java.lang.String-java.lang.String-">PacketDownloadServerList</a></span>(<a href="../../../../../../net/ME1312/SubServers/Bungee/SubPlugin.html" title="class in net.ME1312.SubServers.Bungee">SubPlugin</a>&nbsp;plugin,
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Bungee/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-net.ME1312.SubServers.Bungee.SubPlugin-java.lang.String-java.lang.String-java.lang.String-">PacketDownloadServerList</a></span>(<a href="../../../../../../net/ME1312/SubServers/Bungee/SubPlugin.html" title="class in net.ME1312.SubServers.Bungee">SubPlugin</a>&nbsp;plugin,
java.lang.String&nbsp;host,
java.lang.String&nbsp;group,
java.lang.String&nbsp;id)</code>
<div class="block">New PacketDownloadServerList (Out)</div>
</td>
@ -214,7 +215,7 @@ implements <a href="../../../../../../net/ME1312/SubServers/Bungee/Network/Packe
</dl>
</li>
</ul>
<a name="PacketDownloadServerList-net.ME1312.SubServers.Bungee.SubPlugin-java.lang.String-java.lang.String-">
<a name="PacketDownloadServerList-net.ME1312.SubServers.Bungee.SubPlugin-java.lang.String-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
@ -222,12 +223,14 @@ implements <a href="../../../../../../net/ME1312/SubServers/Bungee/Network/Packe
<h4>PacketDownloadServerList</h4>
<pre>public&nbsp;PacketDownloadServerList(<a href="../../../../../../net/ME1312/SubServers/Bungee/SubPlugin.html" title="class in net.ME1312.SubServers.Bungee">SubPlugin</a>&nbsp;plugin,
java.lang.String&nbsp;host,
java.lang.String&nbsp;group,
java.lang.String&nbsp;id)</pre>
<div class="block">New PacketDownloadServerList (Out)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>plugin</code> - SubPlugin</dd>
<dd><code>host</code> - Host (or null for all)</dd>
<dd><code>group</code> - Group (or null for all)</dd>
<dd><code>id</code> - Receiver ID</dd>
</dl>
</li>

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,"i12":10,"i13":10,"i14":10,"i15":9,"i16":42,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":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,"i13":10,"i14":10,"i15":10,"i16":10,"i17":9,"i18":42,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":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";
@ -227,30 +227,42 @@ extends java.lang.Object</pre>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getGroup-java.lang.String-">getGroup</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Gets a Server Group</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,java.util.List&lt;<a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getGroups--">getGroups</a></span>()</code>
<div class="block">Gets the Server Groups</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Host/Host.html" title="class in net.ME1312.SubServers.Bungee.Host">Host</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getHost-java.lang.String-">getHost</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Gets a Host</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<tr id="i15" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getHostDrivers--">getHostDrivers</a></span>()</code>
<div class="block">Get a list of all available Host Drivers</div>
</td>
</tr>
<tr id="i14" class="altColor">
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,<a href="../../../../net/ME1312/SubServers/Bungee/Host/Host.html" title="class in net.ME1312.SubServers.Bungee.Host">Host</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getHosts--">getHosts</a></span>()</code>
<div class="block">Gets the Hosts</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html" title="class in net.ME1312.SubServers.Bungee">SubAPI</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getInstance--">getInstance</a></span>()</code>
<div class="block">Gets the SubAPI Methods</div>
</td>
</tr>
<tr id="i16" class="altColor">
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html" title="class in net.ME1312.SubServers.Bungee">SubPlugin</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getInternals--">getInternals</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
@ -258,93 +270,93 @@ extends java.lang.Object</pre>
</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<tr id="i19" 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/Bungee/SubAPI.html#getLang--">getLang</a></span>()</code>
<div class="block">Gets the SubServers Lang</div>
</td>
</tr>
<tr id="i18" class="altColor">
<tr id="i20" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/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="i19" class="rowColor">
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Library/Version/Version.html" title="class in net.ME1312.SubServers.Bungee.Library.Version">Version</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getProxyVersion--">getProxyVersion</a></span>()</code>
<div class="block">Gets the BungeeCord Version</div>
</td>
</tr>
<tr id="i20" class="altColor">
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Library/UniversalFile.html" title="class in net.ME1312.SubServers.Bungee.Library">UniversalFile</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getRuntimeDirectory--">getRuntimeDirectory</a></span>()</code>
<div class="block">Gets the Runtime Directory</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getServer-java.lang.String-">getServer</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Gets a Server</div>
</td>
</tr>
<tr id="i22" class="altColor">
<tr id="i24" class="altColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,<a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getServers--">getServers</a></span>()</code>
<div class="block">Gets the Servers (including SubServers)</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<tr id="i25" class="rowColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Network/SubDataServer.html" title="class in net.ME1312.SubServers.Bungee.Network">SubDataServer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getSubDataNetwork--">getSubDataNetwork</a></span>()</code>
<div class="block">Gets the SubData Network Manager</div>
</td>
</tr>
<tr id="i24" class="altColor">
<tr id="i26" class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Host/SubServer.html" title="class in net.ME1312.SubServers.Bungee.Host">SubServer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getSubServer-java.lang.String-">getSubServer</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Gets a SubServer</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<tr id="i27" class="rowColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,<a href="../../../../net/ME1312/SubServers/Bungee/Host/SubServer.html" title="class in net.ME1312.SubServers.Bungee.Host">SubServer</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getSubServers--">getSubServers</a></span>()</code>
<div class="block">Gets the SubServers</div>
</td>
</tr>
<tr id="i26" class="altColor">
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Library/Version/Version.html" title="class in net.ME1312.SubServers.Bungee.Library.Version">Version</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#getWrapperVersion--">getWrapperVersion</a></span>()</code>
<div class="block">Gets the SubServers Version</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<tr id="i29" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#removeHost-java.lang.String-">removeHost</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Remove a Host from the Network</div>
</td>
</tr>
<tr id="i28" class="altColor">
<tr id="i30" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#removeHost-java.util.UUID-java.lang.String-">removeHost</a></span>(java.util.UUID&nbsp;player,
java.lang.String&nbsp;name)</code>
<div class="block">Remove a Host from the Network</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<tr id="i31" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#removeServer-java.lang.String-">removeServer</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Remove a Server from the Network</div>
</td>
</tr>
<tr id="i30" class="altColor">
<tr id="i32" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#removeServer-java.util.UUID-java.lang.String-">removeServer</a></span>(java.util.UUID&nbsp;player,
java.lang.String&nbsp;name)</code>
<div class="block">Remove a Server from the Network</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubAPI.html#setLang-java.lang.String-java.lang.String-">setLang</a></span>(java.lang.String&nbsp;key,
java.lang.String&nbsp;value)</code>
@ -633,6 +645,36 @@ public&nbsp;<a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html" ti
</dl>
</li>
</ul>
<a name="getGroups--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroups</h4>
<pre>public&nbsp;java.util.Map&lt;java.lang.String,java.util.List&lt;<a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a>&gt;&gt;&nbsp;getGroups()</pre>
<div class="block">Gets the Server Groups</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Group Map</dd>
</dl>
</li>
</ul>
<a name="getGroup-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroup</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a>&gt;&nbsp;getGroup(java.lang.String&nbsp;name)</pre>
<div class="block">Gets a Server Group</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - Group name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Server Group</dd>
</dl>
</li>
</ul>
<a name="getServers--">
<!-- -->
</a>

View File

@ -168,26 +168,30 @@ implements net.md_5.bungee.api.plugin.Listener</pre>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#exServers">exServers</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.HashMap&lt;java.lang.String,java.util.List&lt;<a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#groups">groups</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.HashMap&lt;java.lang.String,<a href="../../../../net/ME1312/SubServers/Bungee/Host/Host.html" title="class in net.ME1312.SubServers.Bungee.Host">Host</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#hosts">hosts</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Library/Config/YAMLConfig.html" title="class in net.ME1312.SubServers.Bungee.Library.Config">YAMLConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#lang">lang</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><code>java.io.PrintStream</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#out">out</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Network/SubDataServer.html" title="class in net.ME1312.SubServers.Bungee.Network">SubDataServer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#subdata">subdata</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Host/SubServer.html" title="class in net.ME1312.SubServers.Bungee.Host">SubServer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#sudo">sudo</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../net/ME1312/SubServers/Bungee/Library/Version/Version.html" title="class in net.ME1312.SubServers.Bungee.Library.Version">Version</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/ME1312/SubServers/Bungee/SubPlugin.html#version">version</a></span></code>&nbsp;</td>
</tr>
@ -284,6 +288,15 @@ implements net.md_5.bungee.api.plugin.Listener</pre>
<pre>public final&nbsp;java.util.HashMap&lt;java.lang.String,<a href="../../../../net/ME1312/SubServers/Bungee/Host/Host.html" title="class in net.ME1312.SubServers.Bungee.Host">Host</a>&gt; hosts</pre>
</li>
</ul>
<a name="groups">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>groups</h4>
<pre>public final&nbsp;java.util.HashMap&lt;java.lang.String,java.util.List&lt;<a href="../../../../net/ME1312/SubServers/Bungee/Host/Server.html" title="class in net.ME1312.SubServers.Bungee.Host">Server</a>&gt;&gt; groups</pre>
</li>
</ul>
<a name="exServers">
<!-- -->
</a>

View File

@ -975,6 +975,12 @@
<dd>
<div class="block">Get Packet Version</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#groupMenu-int-">groupMenu(int)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">InternalUIRenderer</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#groupMenu-int-">groupMenu(int)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer</a></dt>
<dd>
<div class="block">Opens the Group Menu</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/SubPlugin.html#gui">gui</a></span> - Variable in class net.ME1312.SubServers.Client.Bukkit.<a href="net/ME1312/SubServers/Client/Bukkit/SubPlugin.html" title="class in net.ME1312.SubServers.Client.Bukkit">SubPlugin</a></dt>
<dd>&nbsp;</dd>
</dl>
@ -1349,7 +1355,7 @@
<dd>
<div class="block">New PacketDownloadServerList (In)</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-java.lang.String-net.ME1312.SubServers.Client.Bukkit.Library.JSONCallback...-">PacketDownloadServerList(String, JSONCallback...)</a></span> - Constructor for class net.ME1312.SubServers.Client.Bukkit.Network.Packet.<a href="net/ME1312/SubServers/Client/Bukkit/Network/Packet/PacketDownloadServerList.html" title="class in net.ME1312.SubServers.Client.Bukkit.Network.Packet">PacketDownloadServerList</a></dt>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-java.lang.String-java.lang.String-net.ME1312.SubServers.Client.Bukkit.Library.JSONCallback...-">PacketDownloadServerList(String, String, JSONCallback...)</a></span> - Constructor for class net.ME1312.SubServers.Client.Bukkit.Network.Packet.<a href="net/ME1312/SubServers/Client/Bukkit/Network/Packet/PacketDownloadServerList.html" title="class in net.ME1312.SubServers.Client.Bukkit.Network.Packet">PacketDownloadServerList</a></dt>
<dd>
<div class="block">New PacketDownloadServerList (Out)</div>
</dd>
@ -1511,6 +1517,12 @@
<dd>
<div class="block">Attempt to send a Title Message</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#serverMenu-int-java.lang.String-java.lang.String-">serverMenu(int, String, String)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">InternalUIRenderer</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#serverMenu-int-java.lang.String-java.lang.String-">serverMenu(int, String, String)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer</a></dt>
<dd>
<div class="block">Opens the SubServer Menu</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Library/Config/YAMLConfig.html#set-net.ME1312.SubServers.Client.Bukkit.Library.Config.YAMLSection-">set(YAMLSection)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Library.Config.<a href="net/ME1312/SubServers/Client/Bukkit/Library/Config/YAMLConfig.html" title="class in net.ME1312.SubServers.Client.Bukkit.Library.Config">YAMLConfig</a></dt>
<dd>
<div class="block">Set Config Contents</div>
@ -1677,12 +1689,6 @@
<dd>
<div class="block">Opens SubServer/&lt;name&gt;</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#subserverMenu-int-java.lang.String-">subserverMenu(int, String)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">InternalUIRenderer</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#subserverMenu-int-java.lang.String-">subserverMenu(int, String)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer</a></dt>
<dd>
<div class="block">Opens the SubServer Menu</div>
</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#subserverPlugin-int-java.lang.String-">subserverPlugin(int, String)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">InternalUIRenderer</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#subserverPlugin-int-java.lang.String-">subserverPlugin(int, String)</a></span> - Method in class net.ME1312.SubServers.Client.Bukkit.Graphic.<a href="net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer</a></dt>

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,"i12":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,"i13":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@ -161,67 +161,74 @@ extends <a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/U
</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/Client/Bukkit/Graphic/InternalUIRenderer.html#groupMenu-int-">groupMenu</a></span>(int&nbsp;page)</code>
<div class="block">Opens the Group Menu</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#hasHistory--">hasHistory</a></span>()</code>
<div class="block">If there is any Window History</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#hostAdmin-java.lang.String-">hostAdmin</a></span>(java.lang.String&nbsp;host)</code>
<div class="block">Opens Host/&lt;name&gt;</div>
</td>
</tr>
<tr id="i4" class="altColor">
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#hostCreator-net.ME1312.SubServers.Client.Bukkit.Graphic.UIRenderer.CreatorOptions-">hostCreator</a></span>(<a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.CreatorOptions.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer.CreatorOptions</a>&nbsp;options)</code>
<div class="block">Opens Host/&lt;name&gt;/Create</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#hostCreatorTemplates-int-net.ME1312.SubServers.Client.Bukkit.Graphic.UIRenderer.CreatorOptions-">hostCreatorTemplates</a></span>(int&nbsp;page,
<a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.CreatorOptions.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer.CreatorOptions</a>&nbsp;options)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#hostMenu-int-">hostMenu</a></span>(int&nbsp;page)</code>
<div class="block">Opens the Host Menu</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#hostPlugin-int-java.lang.String-">hostPlugin</a></span>(int&nbsp;page,
java.lang.String&nbsp;host)</code>
<div class="block">Opens Host/&lt;name&gt;/Plugins</div>
</td>
</tr>
<tr id="i8" class="altColor">
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#newUI--">newUI</a></span>()</code>
<div class="block">Opens a new window</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/Client/Bukkit/Graphic/InternalUIRenderer.html#reopen--">reopen</a></span>()</code>
<div class="block">Reopens the current window</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/Client/Bukkit/Graphic/InternalUIRenderer.html#serverMenu-int-java.lang.String-java.lang.String-">serverMenu</a></span>(int&nbsp;page,
java.lang.String&nbsp;host,
java.lang.String&nbsp;group)</code>
<div class="block">Opens the SubServer Menu</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#subserverAdmin-java.lang.String-">subserverAdmin</a></span>(java.lang.String&nbsp;subserver)</code>
<div class="block">Opens SubServer/&lt;name&gt;</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.html#subserverMenu-int-java.lang.String-">subserverMenu</a></span>(int&nbsp;page,
java.lang.String&nbsp;host)</code>
<div class="block">Opens the SubServer Menu</div>
</td>
</tr>
<tr id="i12" 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/Client/Bukkit/Graphic/InternalUIRenderer.html#subserverPlugin-int-java.lang.String-">subserverPlugin</a></span>(int&nbsp;page,
java.lang.String&nbsp;subserver)</code>
@ -412,19 +419,37 @@ extends <a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/U
</dl>
</li>
</ul>
<a name="subserverMenu-int-java.lang.String-">
<a name="groupMenu-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subserverMenu</h4>
<pre>public&nbsp;void&nbsp;subserverMenu(int&nbsp;page,
java.lang.String&nbsp;host)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#subserverMenu-int-java.lang.String-">UIRenderer</a></code></span></div>
<h4>groupMenu</h4>
<pre>public&nbsp;void&nbsp;groupMenu(int&nbsp;page)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#groupMenu-int-">UIRenderer</a></code></span></div>
<div class="block">Opens the Group Menu</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#groupMenu-int-">groupMenu</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>page</code> - Page Number (starting from page 1)</dd>
</dl>
</li>
</ul>
<a name="serverMenu-int-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serverMenu</h4>
<pre>public&nbsp;void&nbsp;serverMenu(int&nbsp;page,
java.lang.String&nbsp;host,
java.lang.String&nbsp;group)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#serverMenu-int-java.lang.String-java.lang.String-">UIRenderer</a></code></span></div>
<div class="block">Opens the SubServer Menu</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#subserverMenu-int-java.lang.String-">subserverMenu</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer</a></code></dd>
<dd><code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#serverMenu-int-java.lang.String-java.lang.String-">serverMenu</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>page</code> - Page Number (starting from page 1)</dd>
<dd><code>host</code> - Host Name (or null to scan all hosts)</dd>

View File

@ -17,7 +17,7 @@
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":6,"i3":6,"i4":9,"i5":9,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":9,"i13":9,"i14":6,"i15":10,"i16":10,"i17":10,"i18":10,"i19":6,"i20":6,"i21":6};
var methods = {"i0":9,"i1":9,"i2":6,"i3":6,"i4":9,"i5":9,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":9,"i14":9,"i15":6,"i16":10,"i17":10,"i18":10,"i19":6,"i20":10,"i21":6,"i22":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";
@ -218,74 +218,80 @@ extends java.lang.Object</pre>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#groupMenu-int-">groupMenu</a></span>(int&nbsp;page)</code>
<div class="block">Opens the Group Menu</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#hasHistory--">hasHistory</a></span>()</code>
<div class="block">If there is any Window History</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<tr id="i8" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#hostAdmin-java.lang.String-">hostAdmin</a></span>(java.lang.String&nbsp;host)</code>
<div class="block">Opens Host/&lt;name&gt;</div>
</td>
</tr>
<tr id="i8" class="altColor">
<tr id="i9" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#hostCreator-net.ME1312.SubServers.Client.Bukkit.Graphic.UIRenderer.CreatorOptions-">hostCreator</a></span>(<a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.CreatorOptions.html" title="class in net.ME1312.SubServers.Client.Bukkit.Graphic">UIRenderer.CreatorOptions</a>&nbsp;options)</code>
<div class="block">Opens Host/&lt;name&gt;/Create</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<tr id="i10" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#hostMenu-int-">hostMenu</a></span>(int&nbsp;page)</code>
<div class="block">Opens the Host Menu</div>
</td>
</tr>
<tr id="i10" class="altColor">
<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/Client/Bukkit/Graphic/UIRenderer.html#hostPlugin-int-java.lang.String-">hostPlugin</a></span>(int&nbsp;page,
java.lang.String&nbsp;host)</code>
<div class="block">Opens Host/&lt;name&gt;/Plugins</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<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/Client/Bukkit/Graphic/UIRenderer.html#newUI--">newUI</a></span>()</code>
<div class="block">Opens a new window</div>
</td>
</tr>
<tr id="i12" class="altColor">
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#removeHostPlugin-java.lang.String-">removeHostPlugin</a></span>(java.lang.String&nbsp;handle)</code>
<div class="block">Remove Host Plugin</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<tr id="i14" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#removeSubServerPlugin-java.lang.String-">removeSubServerPlugin</a></span>(java.lang.String&nbsp;handle)</code>
<div class="block">Remove SubServer Plugin</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/Client/Bukkit/Graphic/UIRenderer.html#reopen--">reopen</a></span>()</code>
<div class="block">Reopens the current window</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<tr id="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#sendTitle-java.lang.String-">sendTitle</a></span>(java.lang.String&nbsp;str)</code>
<div class="block">Attempt to send a Title Message</div>
</td>
</tr>
<tr id="i16" class="altColor">
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#sendTitle-java.lang.String-int-">sendTitle</a></span>(java.lang.String&nbsp;str,
int&nbsp;stay)</code>
<div class="block">Attempt to send a Title Message</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<tr id="i18" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#sendTitle-java.lang.String-int-int-int-">sendTitle</a></span>(java.lang.String&nbsp;str,
int&nbsp;fadein,
@ -294,26 +300,27 @@ extends java.lang.Object</pre>
<div class="block">Attempt to send a Title Message</div>
</td>
</tr>
<tr id="i18" class="altColor">
<tr id="i19" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#serverMenu-int-java.lang.String-java.lang.String-">serverMenu</a></span>(int&nbsp;page,
java.lang.String&nbsp;host,
java.lang.String&nbsp;group)</code>
<div class="block">Opens the SubServer Menu</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#setDownloading-java.lang.String-">setDownloading</a></span>(java.lang.String&nbsp;subtitle)</code>
<div class="block">Shows/Hides the Downloading Title Message</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<tr id="i21" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#subserverAdmin-java.lang.String-">subserverAdmin</a></span>(java.lang.String&nbsp;server)</code>
<div class="block">Opens SubServer/&lt;name&gt;</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#subserverMenu-int-java.lang.String-">subserverMenu</a></span>(int&nbsp;page,
java.lang.String&nbsp;host)</code>
<div class="block">Opens the SubServer Menu</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<tr id="i22" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Graphic/UIRenderer.html#subserverPlugin-int-java.lang.String-">subserverPlugin</a></span>(int&nbsp;page,
java.lang.String&nbsp;server)</code>
@ -635,14 +642,29 @@ extends java.lang.Object</pre>
</dl>
</li>
</ul>
<a name="subserverMenu-int-java.lang.String-">
<a name="groupMenu-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subserverMenu</h4>
<pre>public abstract&nbsp;void&nbsp;subserverMenu(int&nbsp;page,
java.lang.String&nbsp;host)</pre>
<h4>groupMenu</h4>
<pre>public abstract&nbsp;void&nbsp;groupMenu(int&nbsp;page)</pre>
<div class="block">Opens the Group Menu</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>page</code> - Page Number (starting from page 1)</dd>
</dl>
</li>
</ul>
<a name="serverMenu-int-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serverMenu</h4>
<pre>public abstract&nbsp;void&nbsp;serverMenu(int&nbsp;page,
java.lang.String&nbsp;host,
java.lang.String&nbsp;group)</pre>
<div class="block">Opens the SubServer Menu</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>

View File

@ -138,7 +138,8 @@ implements <a href="../../../../../../../net/ME1312/SubServers/Client/Bukkit/Net
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../net/ME1312/SubServers/Client/Bukkit/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-java.lang.String-net.ME1312.SubServers.Client.Bukkit.Library.JSONCallback...-">PacketDownloadServerList</a></span>(java.lang.String&nbsp;host,
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../net/ME1312/SubServers/Client/Bukkit/Network/Packet/PacketDownloadServerList.html#PacketDownloadServerList-java.lang.String-java.lang.String-net.ME1312.SubServers.Client.Bukkit.Library.JSONCallback...-">PacketDownloadServerList</a></span>(java.lang.String&nbsp;host,
java.lang.String&nbsp;group,
<a href="../../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Client.Bukkit.Library">JSONCallback</a>...&nbsp;callback)</code>
<div class="block">New PacketDownloadServerList (Out)</div>
</td>
@ -208,18 +209,20 @@ implements <a href="../../../../../../../net/ME1312/SubServers/Client/Bukkit/Net
<div class="block">New PacketDownloadServerList (In)</div>
</li>
</ul>
<a name="PacketDownloadServerList-java.lang.String-net.ME1312.SubServers.Client.Bukkit.Library.JSONCallback...-">
<a name="PacketDownloadServerList-java.lang.String-java.lang.String-net.ME1312.SubServers.Client.Bukkit.Library.JSONCallback...-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PacketDownloadServerList</h4>
<pre>public&nbsp;PacketDownloadServerList(java.lang.String&nbsp;host,
java.lang.String&nbsp;group,
<a href="../../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/JSONCallback.html" title="interface in net.ME1312.SubServers.Client.Bukkit.Library">JSONCallback</a>...&nbsp;callback)</pre>
<div class="block">New PacketDownloadServerList (Out)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>host</code> - Host name (or null for all)</dd>
<dd><code>group</code> - Group name (or null for all)</dd>
<dd><code>callback</code> - Callbacks</dd>
</dl>
</li>

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.1d
Specification-Version: 0
Implementation-Version: 2.12.1e
Specification-Version: 1

View File

@ -171,7 +171,10 @@ public class ExternalHost extends Host implements ClientHandler {
getSubServer(name).waitFor();
}
queue(new PacketExRemoveServer(name, json -> {
if (json.getInt("r") == 0) servers.remove(name.toLowerCase());
if (json.getInt("r") == 0) {
for (String group : getSubServer(name).getGroups()) getSubServer(name).removeGroup(group);
servers.remove(name.toLowerCase());
}
}));
return true;
} else return false;
@ -186,7 +189,10 @@ public class ExternalHost extends Host implements ClientHandler {
getSubServer(name).terminate();
}
queue(new PacketExRemoveServer(name, json -> {
if (json.getInt("r") == 0) servers.remove(name.toLowerCase());
if (json.getInt("r") == 0) {
for (String group : getSubServer(name).getGroups()) getSubServer(name).removeGroup(group);
servers.remove(name.toLowerCase());
}
}));
return true;
}
@ -220,6 +226,7 @@ public class ExternalHost extends Host implements ClientHandler {
System.out.println("SubServers > Removing Files...");
queue(new PacketExDeleteServer(server, info, json -> {
if (json.getInt("r") == 0) {
for (String group : getSubServer(name).getGroups()) getSubServer(name).removeGroup(group);
servers.remove(server.toLowerCase());
System.out.println("SubServers > Done!");
} else {
@ -257,6 +264,7 @@ public class ExternalHost extends Host implements ClientHandler {
System.out.println("SubServers > Removing Files...");
queue(new PacketExDeleteServer(server, info, json -> {
if (json.getInt("r") == 0) {
for (String group : getSubServer(name).getGroups()) getSubServer(name).removeGroup(group);
servers.remove(server.toLowerCase());
System.out.println("SubServers > Done!");
} else {

View File

@ -84,7 +84,9 @@ public class ExternalSubCreator extends SubCreator {
}
if (!server.contains("Enabled")) server.set("Enabled", true);
if (!server.contains("Display")) server.set("Display", "");
if (!server.contains("Host")) server.set("Host", host.getName());
if (!server.contains("Group")) server.set("Group", "");
if (!server.contains("Port")) server.set("Port", port);
if (!server.contains("Motd")) server.set("Motd", "Some SubServer");
if (!server.contains("Log")) server.set("Log", true);
@ -93,10 +95,11 @@ public class ExternalSubCreator extends SubCreator {
if (!server.contains("Stop-Command")) server.set("Stop-Command", "stop");
if (!server.contains("Run-On-Launch")) server.set("Run-On-Launch", false);
if (!server.contains("Auto-Restart")) server.set("Auto-Restart", false);
if (!server.contains("Hidden")) server.set("Hidden", false);
if (!server.contains("Restricted")) server.set("Restricted", false);
if (!server.contains("Incompatible")) server.set("Incompatible", new ArrayList<String>());
if (!server.contains("Hidden")) server.set("Hidden", false);
SubServer subserver = host.addSubServer(player, name, server.getBoolean("Enabled"), port, server.getColoredString("Motd", '&'), server.getBoolean("Log"), server.getRawString("Directory"),
host.addSubServer(player, name, server.getBoolean("Enabled"), port, server.getColoredString("Motd", '&'), server.getBoolean("Log"), server.getRawString("Directory"),
new Executable(server.getRawString("Executable")), server.getRawString("Stop-Command"), true, server.getBoolean("Auto-Restart"), server.getBoolean("Hidden"), server.getBoolean("Restricted"), false);
host.plugin.config.get().getSection("Servers").set(name, server);
host.plugin.config.save();

View File

@ -9,10 +9,13 @@ import net.ME1312.SubServers.Bungee.Library.Exception.InvalidServerException;
import net.ME1312.SubServers.Bungee.Library.NamedContainer;
import net.ME1312.SubServers.Bungee.Library.Util;
import net.ME1312.SubServers.Bungee.Network.Packet.PacketExUpdateServer;
import net.ME1312.SubServers.Bungee.SubAPI;
import java.io.File;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
/**
@ -157,6 +160,7 @@ public class ExternalSubServer extends SubServer {
@SuppressWarnings("deprecation")
public int edit(UUID player, YAMLSection edit) {
int c = 0;
boolean state = isRunning();
@ -175,6 +179,10 @@ public class ExternalSubServer extends SubServer {
SubServer server = host.addSubServer(player, value.asRawString(), isEnabled(), getAddress().getPort(), getMotd(), isLogging(), getPath(), getExecutable(), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
YAMLSection config = this.host.plugin.config.get().getSection("Servers").getSection(getName());
@ -220,11 +228,26 @@ public class ExternalSubServer extends SubServer {
c++;
}
break;
case "group":
if (value.isList()) {
for (String group : getGroups()) removeGroup(group);
for (String group : value.asStringList()) addGroup(group);
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Group", value.asStringList());
this.host.plugin.config.save();
}
c++;
}
break;
case "host":
if (value.isString() && host.removeSubServer(player, getName())) {
SubServer server = this.host.plugin.api.getHost(value.asRawString()).addSubServer(player, getName(), isEnabled(), getAddress().getPort(), getMotd(), isLogging(), getPath(), getExecutable(), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Host", server.getHost().getName());
@ -240,6 +263,10 @@ public class ExternalSubServer extends SubServer {
SubServer server = host.addSubServer(player, getName(), isEnabled(), value.asInt(), getMotd(), isLogging(), getPath(), getExecutable(), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Port", server.getAddress().getPort());
@ -279,6 +306,10 @@ public class ExternalSubServer extends SubServer {
SubServer server = host.addSubServer(player, getName(), isEnabled(), getAddress().getPort(), getMotd(), isLogging(), value.asRawString(), getExecutable(), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Directory", server.getPath());
@ -294,6 +325,10 @@ public class ExternalSubServer extends SubServer {
SubServer server = host.addSubServer(player, getName(), isEnabled(), getAddress().getPort(), getMotd(), isLogging(), getPath(), new Executable(value.asRawString()), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Executable", value.asRawString());

View File

@ -122,6 +122,7 @@ public class InternalHost extends Host {
getSubServer(name).stop();
getSubServer(name).waitFor();
}
for (String group : getSubServer(name).getGroups()) getSubServer(name).removeGroup(group);
servers.remove(name.toLowerCase());
return true;
} else return false;
@ -135,6 +136,7 @@ public class InternalHost extends Host {
if (getSubServer(name).isRunning()) {
getSubServer(name).terminate();
}
for (String group : getSubServer(name).getGroups()) getSubServer(name).removeGroup(group);
servers.remove(name.toLowerCase());
return true;
}

View File

@ -198,9 +198,10 @@ public class InternalSubCreator extends SubCreator {
.replace("$version$", version.toString().replace(" ", "@")).replace("$port$", Integer.toString(port)));
}
}
if (!server.contains("Enabled")) server.set("Enabled", true);
if (!server.contains("Display")) server.set("Display", "");
if (!server.contains("Host")) server.set("Host", host.getName());
if (!server.contains("Group")) server.set("Group", "");
if (!server.contains("Port")) server.set("Port", port);
if (!server.contains("Motd")) server.set("Motd", "Some SubServer");
if (!server.contains("Log")) server.set("Log", true);
@ -209,10 +210,11 @@ public class InternalSubCreator extends SubCreator {
if (!server.contains("Stop-Command")) server.set("Stop-Command", "stop");
if (!server.contains("Run-On-Launch")) server.set("Run-On-Launch", false);
if (!server.contains("Auto-Restart")) server.set("Auto-Restart", false);
if (!server.contains("Hidden")) server.set("Hidden", false);
if (!server.contains("Restricted")) server.set("Restricted", false);
if (!server.contains("Incompatible")) server.set("Incompatible", new ArrayList<String>());
if (!server.contains("Hidden")) server.set("Hidden", false);
SubServer subserver = host.addSubServer(player, name, server.getBoolean("Enabled"), port, server.getColoredString("Motd", '&'), server.getBoolean("Log"), server.getRawString("Directory"),
host.addSubServer(player, name, server.getBoolean("Enabled"), port, server.getColoredString("Motd", '&'), server.getBoolean("Log"), server.getRawString("Directory"),
new Executable(server.getRawString("Executable")), server.getRawString("Stop-Command"), true, server.getBoolean("Auto-Restart"), server.getBoolean("Hidden"), server.getBoolean("Restricted"), false);
host.plugin.config.get().getSection("Servers").set(name, server);
host.plugin.config.save();
@ -340,7 +342,7 @@ public class InternalSubCreator extends SubCreator {
private void generateProperties(File dir, int port) throws IOException {
File file = new File(dir, "server.properties");
if (!file.exists()) file.createNewFile();
String content = Util.readAll(new BufferedReader(new InputStreamReader(new FileInputStream(file)))).replace("server-port=", "server-port=" + port).replace("server-ip=", "server-ip=" + host.getAddress().getHostAddress().substring(1));
String content = Util.readAll(new BufferedReader(new InputStreamReader(new FileInputStream(file)))).replace("server-port=", "server-port=" + port).replace("server-ip=", "server-ip=" + host.getAddress().getHostAddress());
file.delete();
PrintWriter writer = new PrintWriter(file, "UTF-8");
writer.write(content);

View File

@ -10,6 +10,7 @@ import net.ME1312.SubServers.Bungee.Library.NamedContainer;
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.SubAPI;
import net.ME1312.SubServers.Bungee.SubPlugin;
import org.json.JSONObject;
@ -215,6 +216,7 @@ public class InternalSubServer extends SubServer {
} else return false;
}
@SuppressWarnings("deprecation")
public int edit(UUID player, YAMLSection edit) {
int c = 0;
boolean state = isRunning();
@ -233,6 +235,10 @@ public class InternalSubServer extends SubServer {
SubServer server = host.addSubServer(player, value.asRawString(), isEnabled(), getAddress().getPort(), getMotd(), isLogging(), getPath(), getExecutable(), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
YAMLSection config = this.host.plugin.config.get().getSection("Servers").getSection(getName());
@ -277,11 +283,26 @@ public class InternalSubServer extends SubServer {
c++;
}
break;
case "group":
if (value.isList()) {
for (String group : getGroups()) removeGroup(group);
for (String group : value.asStringList()) addGroup(group);
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Group", value.asStringList());
this.host.plugin.config.save();
}
c++;
}
break;
case "host":
if (value.isString() && host.removeSubServer(player, getName())) {
SubServer server = this.host.plugin.api.getHost(value.asRawString()).addSubServer(player, getName(), isEnabled(), getAddress().getPort(), getMotd(), isLogging(), getPath(), getExecutable(), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Host", server.getHost().getName());
@ -297,6 +318,10 @@ public class InternalSubServer extends SubServer {
SubServer server = host.addSubServer(player, getName(), isEnabled(), value.asInt(), getMotd(), isLogging(), getPath(), getExecutable(), getStopCommand(), false, willAutoRestart(), isHidden(), isRestricted(), isTemporary());
if (server != null) {
if (!getName().equals(getDisplayName())) server.setDisplayName(getDisplayName());
for (String group : getGroups()) {
removeGroup(group);
server.addGroup(group);
}
for (String extra : getExtra().getKeys()) server.addExtra(extra, getExtra(extra));
if (this.host.plugin.config.get().getSection("Servers").getKeys().contains(getName())) {
this.host.plugin.config.get().getSection("Servers").getSection(getName()).set("Port", server.getAddress().getPort());

View File

@ -10,12 +10,17 @@ import net.ME1312.SubServers.Bungee.Library.Util;
import net.ME1312.SubServers.Bungee.Network.Client;
import net.ME1312.SubServers.Bungee.Network.ClientHandler;
import net.ME1312.SubServers.Bungee.Network.SubDataServer;
import net.ME1312.SubServers.Bungee.SubAPI;
import net.md_5.bungee.BungeeServerInfo;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import org.json.JSONObject;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
/**
* Server Class
@ -23,6 +28,7 @@ import java.net.InetSocketAddress;
public class Server extends BungeeServerInfo implements ClientHandler, ExtraDataHandler {
private YAMLSection extra = new YAMLSection();
private Client client = null;
private List<String> groups = new ArrayList<String>();
private String nick = null;
private String motd;
private boolean restricted;
@ -124,6 +130,45 @@ public class Server extends BungeeServerInfo implements ClientHandler, ExtraData
return restricted;
}
/**
* Get this Server's Groups
*
* @return Group names
*/
public List<String> getGroups() {
return groups;
}
/**
* Add this Server to a Group
*
* @param value Group name
*/
@SuppressWarnings("deprecation")
public void addGroup(String value) {
if (Util.isNull(value)) throw new NullPointerException();
if (value.length() > 0 && !groups.contains(value)) {
List<Server> list = (SubAPI.getInstance().getInternals().groups.keySet().contains(value))?SubAPI.getInstance().getInternals().groups.get(value):new ArrayList<Server>();
list.add(this);
SubAPI.getInstance().getInternals().groups.put(value, list);
groups.add(value);
}
}
/**
* Remove this Server from a Group
*
* @param value value Group name
*/
@SuppressWarnings("deprecation")
public void removeGroup(String value) {
if (Util.isNull(value)) throw new NullPointerException();
List<Server> list = SubAPI.getInstance().getInternals().groups.get(value);
list.remove(this);
SubAPI.getInstance().getInternals().groups.put(value, list);
groups.remove(value);
}
/**
* Sets if the Server is Restricted
*
@ -169,6 +214,7 @@ public class Server extends BungeeServerInfo implements ClientHandler, ExtraData
JSONObject info = new JSONObject();
info.put("type", "Server");
info.put("name", getName());
info.put("group", getGroups());
info.put("display", getDisplayName());
info.put("address", getAddress().getAddress().getHostAddress() + ':' + getAddress().getPort());
info.put("motd", getMotd());

View File

@ -391,6 +391,7 @@ public abstract class SubServer extends Server {
JSONObject sinfo = new JSONObject(super.toString());
sinfo.put("type", "SubServer");
sinfo.put("enabled", getHost().isEnabled() && isEnabled());
sinfo.put("host", getHost().getName());
sinfo.put("running", isRunning());
sinfo.put("log", isLogging());
List<String> incompatible = new ArrayList<String>();

View File

@ -172,8 +172,10 @@ public class YAMLSection {
* @param value Value
*/
public void set(String handle, Object value) {
if (Util.isNull(handle, value)) throw new NullPointerException();
if (value instanceof Collection) {
if (Util.isNull(handle)) throw new NullPointerException();
if (value == null) {
remove(handle);
} else if (value instanceof Collection) {
set(handle, (Collection<?>) value);
} else {
map.put(handle, convert(value));

View File

@ -15,9 +15,12 @@ permissions:
groups: {}
servers:
Lobby:
display: ''
group: []
motd: '&1Just another BungeeCord - Forced Host'
address: 127.0.0.1:25566
restricted: false
hidden: false
timeout: 30000
listeners:
- query_port: 25564

View File

@ -10,6 +10,7 @@ Settings:
Hosts:
'~':
Enabled: true
Display: ''
Driver: 'BUILT-IN'
Address: '127.0.0.1'
Directory: './'
@ -18,7 +19,9 @@ Hosts:
Servers:
'Example':
Enabled: false
Display: ''
Host: '~'
Group: []
Port: 25567
Motd: '&aThis is a SubServer'
Log: true

View File

@ -1,4 +1,4 @@
Version: '2.12.1c+'
Version: '2.12.1e+'
Lang:
'Bungee.Server.Current': '&6You are currently connected to $str$'
'Bungee.Server.Available': '&6You may connect to the following servers at this time:'
@ -30,9 +30,12 @@ Lang:
'Command.Version': '&7SubServers \u00BB $name$ is running version &f$str$'
'Command.Version.Outdated': '&7You are $int$ version(s) behind.'
'Command.Version.Latest': '&7You are on the latest version.'
'Command.List.Group-Header': '&7SubServers \u00BB Group/Server List:'
'Command.List.Host-Header': '&7SubServers \u00BB Host/SubServer List:'
'Command.List.Server-Header': '&7SubServers \u00BB Server List:'
'Command.List.Header': '&7: '
'Command.List.Divider': '&7, '
'Command.List.Empty': '&7(none)'
'Command.Info': '&7SubServers \u00BB Info on &f$str$&7:'
'Command.Info.Unknown': '&cSubServers \u00BB There is no server with that name'
'Command.Info.Invalid': '&cSubServers \u00BB That Server is not a SubServer'
@ -80,7 +83,7 @@ Lang:
'Interface.Host-Menu.Host-Disabled': '&4Disabled'
'Interface.Host-Menu.Host-Server-Count': '&9$int$ Server(s)'
'Interface.Host-Menu.No-Hosts': '&c&oThere are No Hosts'
'Interface.Host-Menu.SubServer-Menu': '&a&lSubServer Menu'
'Interface.Host-Menu.Group-Menu': '&6&lView Servers by Group'
'Interface.Host-Admin.Title': 'Host/$str$'
'Interface.Host-Admin.Creator': '&eCreate a SubServer'
'Interface.Host-Admin.SubServers': '&aView SubServers'
@ -111,15 +114,21 @@ Lang:
'Interface.Host-Plugin.Title': 'Host/$str$/Plugins'
'Interface.Host-Plugin.No-Plugins': '&c&oThere are No Plugins Available'
'Interface.Host-SubServer.Title': 'Host/$str$/SubServers'
'Interface.SubServer-Menu.Title': 'SubServer Menu'
'Interface.SubServer-Menu.SubServer-Player-Count': '&2$int$ Player(s) Online'
'Interface.SubServer-Menu.SubServer-External': '&7External Server'
'Interface.SubServer-Menu.SubServer-Temporary': '&9Temporary'
'Interface.SubServer-Menu.SubServer-Offline': '&6Offline'
'Interface.SubServer-Menu.SubServer-Incompatible': '&4Incompatible with $str$'
'Interface.SubServer-Menu.SubServer-Disabled': '&4Disabled'
'Interface.SubServer-Menu.No-SubServers': '&c&oThere are No SubServers'
'Interface.SubServer-Menu.Host-Menu': '&b&lHost Menu'
'Interface.Group-Menu.Title': 'Group Menu'
'Interface.Group-Menu.Group-Server-Count': '&9$int$ Server(s)'
'Interface.Group-Menu.No-Groups': '&c&oThere are No Groups'
'Interface.Group-Menu.Server-Menu': '&a&lView All Servers'
'Interface.Group-SubServer.Title': 'Group/$str$/Servers'
'Interface.Server-Menu.Title': 'Server Menu'
'Interface.Server-Menu.Server-Player-Count': '&2$int$ Player(s) Online'
'Interface.Server-Menu.Server-External': '&7External Server'
'Interface.Server-Menu.SubServer-Temporary': '&9Temporary'
'Interface.Server-Menu.SubServer-Offline': '&6Offline'
'Interface.Server-Menu.SubServer-Incompatible': '&4Incompatible with $str$'
'Interface.Server-Menu.SubServer-Disabled': '&4Disabled'
'Interface.Server-Menu.SubServer-Invalid': '&4Cannot be managed by SubServers'
'Interface.Server-Menu.No-Servers': '&c&oThere are No Servers'
'Interface.Server-Menu.Host-Menu': '&b&lView Hosts'
'Interface.SubServer-Admin.Title': 'SubServer/$str$'
'Interface.SubServer-Admin.Start': '&aStart SubServer'
'Interface.SubServer-Admin.Start.Title': '&aStarting SubServer'

View File

@ -73,6 +73,7 @@ public class PacketDownloadServerInfo implements PacketIn, PacketOut {
} if (server != null) {
info.put("name", server.getName());
info.put("display", server.getDisplayName());
info.put("group", server.getGroups());
info.put("address", server.getAddress().getAddress().getHostAddress() + ':' + server.getAddress().getPort());
info.put("restricted", server.isRestricted());
info.put("hidden", server.isHidden());

View File

@ -11,14 +11,19 @@ import net.ME1312.SubServers.Bungee.Network.PacketIn;
import net.ME1312.SubServers.Bungee.Network.PacketOut;
import net.ME1312.SubServers.Bungee.SubPlugin;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
/**
* Download Server List Packet
*/
public class PacketDownloadServerList implements PacketIn, PacketOut {
private SubPlugin plugin;
private String host;
private String group;
private String id;
/**
@ -36,12 +41,14 @@ public class PacketDownloadServerList implements PacketIn, PacketOut {
*
* @param plugin SubPlugin
* @param host Host (or null for all)
* @param group Group (or null for all)
* @param id Receiver ID
*/
public PacketDownloadServerList(SubPlugin plugin, String host, String id) {
public PacketDownloadServerList(SubPlugin plugin, String host, String group, String id) {
if (Util.isNull(plugin)) throw new NullPointerException();
this.plugin = plugin;
this.host = host;
this.group = group;
this.id = id;
}
@ -49,13 +56,12 @@ public class PacketDownloadServerList implements PacketIn, PacketOut {
public JSONObject generate() {
JSONObject json = new JSONObject();
json.put("id", id);
if (host == null || host.equals("")) {
JSONObject exServers = new JSONObject();
for (Server server : plugin.exServers.values()) {
exServers.put(server.getName(), new JSONObject(server.toString()));
}
json.put("servers", exServers);
JSONObject exServers = new JSONObject();
for (Server server : plugin.exServers.values()) {
exServers.put(server.getName(), new JSONObject(server.toString()));
}
json.put("servers", exServers);
if (this.host == null || !this.host.equals("")) {
JSONObject hosts = new JSONObject();
@ -67,12 +73,25 @@ public class PacketDownloadServerList implements PacketIn, PacketOut {
json.put("hosts", hosts);
}
if (this.group == null || !this.group.equals("")) {
JSONObject groups = new JSONObject();
for (String group : plugin.api.getGroups().keySet()) {
if (this.group == null || this.group.equalsIgnoreCase(group)) {
JSONObject servers = new JSONObject();
for (Server server : plugin.api.getGroup(group)) {
servers.put(server.getName(), new JSONObject(server.toString()));
}
groups.put(group, servers);
}
}
json.put("groups", groups);
}
return json;
}
@Override
public void execute(Client client, JSONObject data) {
client.sendPacket(new PacketDownloadServerList(plugin, (data.keySet().contains("host"))?data.getString("host"):null, (data.keySet().contains("id"))?data.getString("id"):null));
client.sendPacket(new PacketDownloadServerList(plugin, (data.keySet().contains("host"))?data.getString("host"):null, (data.keySet().contains("group"))?data.getString("group"):null, (data.keySet().contains("id"))?data.getString("id"):null));
}
@Override

View File

@ -213,6 +213,25 @@ public final class SubAPI {
return true;
}
/**
* Gets the Server Groups
*
* @return Group Map
*/
public Map<String, List<Server>> getGroups() {
return new TreeMap<String, List<Server>>(plugin.groups);
}
/**
* Gets a Server Group
*
* @param name Group name
* @return a Server Group
*/
public List<Server> getGroup(String name) {
return getGroups().get(name);
}
/**
* Gets the Servers (including SubServers)
*

View File

@ -107,9 +107,37 @@ public final class SubCommand extends Command implements TabExecutor {
plugin.getPluginManager().dispatchCommand(ConsoleCommandSender.getInstance(), "greload");
}
} else if (args[0].equalsIgnoreCase("list")) {
sender.sendMessage("SubServers > Host/SubServer List:");
String div = ChatColor.RESET + ", ";
int i = 0;
sender.sendMessage("SubServers > Group/Server List:");
for (String group : plugin.api.getGroups().keySet()) {
String message = "";
message += ChatColor.GOLD + group + ChatColor.RESET + ": ";
List<String> names = new ArrayList<String>();
Map<String, Server> servers = plugin.api.getServers();
for (Server server : plugin.api.getGroup(group)) names.add(server.getName());
Collections.sort(names);
for (String name : names) {
if (i != 0) message += div;
Server server = servers.get(name.toLowerCase());
if (!(servers.get(name.toLowerCase()) instanceof SubServer)) {
message += ChatColor.WHITE;
} else if (((SubServer) server).isTemporary()) {
message += ChatColor.AQUA;
} else if (((SubServer) server).isRunning()) {
message += ChatColor.GREEN;
} else if (((SubServer) server).isEnabled() && ((SubServer) server).getCurrentIncompatibilities().size() == 0) {
message += ChatColor.YELLOW;
} else {
message += ChatColor.RED;
}
message += server.getDisplayName() + " (" + server.getAddress().getAddress().getHostAddress() + ':' + server.getAddress().getPort() + ((server.getName().equals(server.getDisplayName()))?"":ChatColor.stripColor(div)+server.getName()) + ")";
i++;
}
sender.sendMessage(message);
i = 0;
}
sender.sendMessage("SubServers > Host/SubServer List:");
for (Host host : plugin.api.getHosts().values()) {
String message = "";
if (host.isEnabled()) {
@ -158,6 +186,10 @@ public final class SubCommand extends Command implements TabExecutor {
if (!server.getName().equals(server.getDisplayName())) sender.sendMessage(" - Real Name: " + server.getName());
sender.sendMessage(" - Host: " + server.getHost().getDisplayName() + ((!server.getHost().getName().equals(server.getHost().getDisplayName()))?" ("+server.getHost().getName()+')':""));
sender.sendMessage(" - Enabled: " + ((server.isEnabled())?"yes":"no"));
if (server.getGroups().size() > 0) {
sender.sendMessage(" - Groups:");
for (String group : server.getGroups()) sender.sendMessage(" - " + group);
}
if (server.isTemporary()) sender.sendMessage(" - Temporary: yes");
sender.sendMessage(" - Running: " + ((server.isRunning())?"yes":"no"));
sender.sendMessage(" - Logging: " + ((server.isLogging())?"yes":"no"));

View File

@ -45,6 +45,7 @@ import java.util.concurrent.TimeUnit;
public final class SubPlugin extends BungeeCord implements Listener {
protected final HashMap<String, Class<? extends Host>> hostDrivers = new HashMap<String, Class<? extends Host>>();
public final HashMap<String, Host> hosts = new HashMap<String, Host>();
public final HashMap<String, List<Server>> groups = new HashMap<String, List<Server>>();
public final HashMap<String, Server> exServers = new HashMap<String, Server>();
private final HashMap<String, ServerInfo> legServers = new HashMap<String, ServerInfo>();
@ -93,7 +94,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
if (!(new UniversalFile(dir, "lang.yml").exists())) {
Util.copyFromJar(SubPlugin.class.getClassLoader(), "net/ME1312/SubServers/Bungee/Library/Files/lang.yml", new UniversalFile(dir, "lang.yml").getPath());
System.out.println("SubServers > Created ~/SubServers/lang.yml");
} else if ((new Version((new YAMLConfig(new UniversalFile(dir, "lang.yml"))).get().getString("Version", "0")).compareTo(new Version("2.12.1c+"))) != 0) {
} else if ((new Version((new YAMLConfig(new UniversalFile(dir, "lang.yml"))).get().getString("Version", "0")).compareTo(new Version("2.12.1e+"))) != 0) {
Files.move(new UniversalFile(dir, "lang.yml").toPath(), new UniversalFile(dir, "lang.old" + Math.round(Math.random() * 100000) + ".yml").toPath());
Util.copyFromJar(SubPlugin.class.getClassLoader(), "net/ME1312/SubServers/Bungee/Library/Files/lang.yml", new UniversalFile(dir, "lang.yml").getPath());
System.out.println("SubServers > Updated ~/SubServers/lang.yml");
@ -222,7 +223,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
if (!hostDrivers.keySet().contains(config.get().getSection("Hosts").getSection(name).getRawString("Driver").toLowerCase())) throw new InvalidHostException("Invalid Driver for host: " + name);
Host host = api.addHost(config.get().getSection("Hosts").getSection(name).getRawString("Driver").toLowerCase(), name, config.get().getSection("Hosts").getSection(name).getBoolean("Enabled"), InetAddress.getByName(config.get().getSection("Hosts").getSection(name).getRawString("Address")),
config.get().getSection("Hosts").getSection(name).getRawString("Directory"), config.get().getSection("Hosts").getSection(name).getRawString("Git-Bash"));
if (config.get().getSection("Hosts").getSection(name).getKeys().contains("Display")) host.setDisplayName(config.get().getSection("Hosts").getSection(name).getString("Display"));
if (config.get().getSection("Hosts").getSection(name).getKeys().contains("Display") && config.get().getSection("Hosts").getSection(name).getString("Display").length() > 0) host.setDisplayName(config.get().getSection("Hosts").getSection(name).getString("Display"));
if (config.get().getSection("Hosts").getSection(name).getKeys().contains("Extra")) for (String extra : config.get().getSection("Hosts").getSection(name).getSection("Extra").getKeys()) host.addExtra(extra, config.get().getSection("Hosts").getSection(name).getSection("Extra").getObject(extra));
hosts++;
} catch (Exception e) {
@ -238,7 +239,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
Server server = api.addServer(name, InetAddress.getByName(bungee.get().getSection("servers").getSection(name).getRawString("address").split(":")[0]),
Integer.parseInt(bungee.get().getSection("servers").getSection(name).getRawString("address").split(":")[1]), bungee.get().getSection("servers").getSection(name).getColoredString("motd", '&'),
bungee.get().getSection("servers").getSection(name).getBoolean("hidden", false), bungee.get().getSection("servers").getSection(name).getBoolean("restricted"));
if (bungee.get().getSection("servers").getSection(name).getKeys().contains("display")) server.setDisplayName(bungee.get().getSection("servers").getSection(name).getString("display"));
if (bungee.get().getSection("servers").getSection(name).getKeys().contains("display") && bungee.get().getSection("servers").getSection(name).getString("display").length() > 0) server.setDisplayName(bungee.get().getSection("servers").getSection(name).getString("display"));
if (bungee.get().getSection("servers").getSection(name).getKeys().contains("group")) for (String group : bungee.get().getSection("servers").getSection(name).getStringList("group")) server.addGroup(group);
if (bungee.get().getSection("servers").getSection(name).getKeys().contains("extra")) for (String extra : config.get().getSection("servers").getSection(name).getSection("extra").getKeys()) server.addExtra(extra, config.get().getSection("servers").getSection(name).getSection("extra").getObject(extra));
servers++;
} catch (Exception e) {
@ -259,7 +261,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
config.get().getSection("Servers").getSection(name).getInt("Port"), config.get().getSection("Servers").getSection(name).getColoredString("Motd", '&'), config.get().getSection("Servers").getSection(name).getBoolean("Log"),
config.get().getSection("Servers").getSection(name).getRawString("Directory"), new Executable(config.get().getSection("Servers").getSection(name).getRawString("Executable")), config.get().getSection("Servers").getSection(name).getRawString("Stop-Command"),
config.get().getSection("Servers").getSection(name).getBoolean("Run-On-Launch"), config.get().getSection("Servers").getSection(name).getBoolean("Auto-Restart"), config.get().getSection("Servers").getSection(name).getBoolean("Hidden"), config.get().getSection("Servers").getSection(name).getBoolean("Restricted"), false);
if (config.get().getSection("Servers").getSection(name).getKeys().contains("Display")) server.setDisplayName(config.get().getSection("Servers").getSection(name).getString("Display"));
if (config.get().getSection("Servers").getSection(name).getKeys().contains("Display") && config.get().getSection("Servers").getSection(name).getString("Display").length() > 0) server.setDisplayName(config.get().getSection("Servers").getSection(name).getString("Display"));
if (config.get().getSection("Servers").getSection(name).getKeys().contains("Group")) for (String group : config.get().getSection("Servers").getSection(name).getStringList("Group")) server.addGroup(group);
if (config.get().getSection("Servers").getSection(name).getKeys().contains("Extra")) for (String extra : config.get().getSection("Servers").getSection(name).getSection("Extra").getKeys()) server.addExtra(extra, config.get().getSection("Servers").getSection(name).getSection("Extra").getObject(extra));
subservers++;
} catch (Exception e) {

View File

@ -33,7 +33,7 @@ public class SubEditServerEvent extends Event implements SubEvent {
section.set(".", edit.get());
this.player = player;
this.server = server;
this.edit = new NamedContainer<String, YAMLValue>(edit.name(), section.get("."));
this.edit = new NamedContainer<String, YAMLValue>(edit.name(), section.contains(".")?section.get("."):null);
this.perm = permanent;
}

View File

@ -51,6 +51,7 @@ public class InternalUIHandler implements UIHandler, Listener {
enabled = false;
}
@SuppressWarnings("ConstantConditions")
@EventHandler(priority = EventPriority.HIGHEST)
public void click(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
@ -71,9 +72,9 @@ public class InternalUIHandler implements UIHandler, Listener {
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Next-Arrow", '&'))) {
player.closeInventory();
gui.hostMenu(gui.lastPage + 1);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Menu.SubServer-Menu", '&'))) {
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Menu.Group-Menu", '&'))) {
player.closeInventory();
gui.subserverMenu(1, null);
gui.groupMenu(1);
} else if (!item.equals(ChatColor.RESET.toString()) && !item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Menu.No-Hosts", '&'))) {
player.closeInventory();
String obj;
@ -98,7 +99,7 @@ public class InternalUIHandler implements UIHandler, Listener {
gui.lastUsedOptions.undo();
gui.hostCreator((UIRenderer.CreatorOptions) gui.lastUsedOptions);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Creator.Submit", '&'))) {
if (player.hasPermission("subservers.host.create.*") || player.hasPermission("subservers.host.create." + gui.lastVistedObject.toLowerCase())) {
if (player.hasPermission("subservers.host.create.*") || player.hasPermission("subservers.host.create." + gui.lastVisitedObject.toLowerCase())) {
player.closeInventory();
gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Downloading.Response", '&'));
plugin.subdata.sendPacket(new PacketCreateServer(player.getUniqueId(), (UIRenderer.CreatorOptions) gui.lastUsedOptions, json -> {
@ -118,7 +119,7 @@ public class InternalUIHandler implements UIHandler, Listener {
Bukkit.getScheduler().runTaskLater(plugin, () -> gui.hostCreator((UIRenderer.CreatorOptions) gui.lastUsedOptions), 4 * 20);
} else {
gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Downloading.Response", '&'));
plugin.subdata.sendPacket(new PacketDownloadServerList(null, json -> {
plugin.subdata.sendPacket(new PacketDownloadServerList(null, null, json -> {
boolean match = false;
for (String tmphost : json.getJSONObject("hosts").keySet()) {
for (String tmpsubserver : json.getJSONObject("hosts").getJSONObject(tmphost).getJSONObject("servers").keySet()) {
@ -203,10 +204,10 @@ public class InternalUIHandler implements UIHandler, Listener {
String item = event.getCurrentItem().getItemMeta().getDisplayName();
if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back-Arrow", '&'))) {
player.closeInventory();
gui.hostPlugin(gui.lastPage - 1, gui.lastVistedObject);
gui.hostPlugin(gui.lastPage - 1, gui.lastVisitedObject);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Next-Arrow", '&'))) {
player.closeInventory();
gui.hostPlugin(gui.lastPage + 1, gui.lastVistedObject);
gui.hostPlugin(gui.lastPage + 1, gui.lastVisitedObject);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back", '&'))) {
player.closeInventory();
gui.back();
@ -219,8 +220,8 @@ public class InternalUIHandler implements UIHandler, Listener {
if (plugin.get() == null) {
gui.reopen();
} else {
gui.setDownloading(ChatColor.stripColor(this.plugin.lang.getSection("Lang").getColoredString("Interface.Host-Plugin.Title", '&').replace("$str$", gui.lastVistedObject)));
this.plugin.subdata.sendPacket(new PacketDownloadHostInfo(gui.lastVistedObject, (json) -> {
gui.setDownloading(ChatColor.stripColor(this.plugin.lang.getSection("Lang").getColoredString("Interface.Host-Plugin.Title", '&').replace("$str$", gui.lastVisitedObject)));
this.plugin.subdata.sendPacket(new PacketDownloadHostInfo(gui.lastVisitedObject, (json) -> {
if (json.getBoolean("valid")) {
gui.setDownloading(null);
plugin.get().open(player, json.getJSONObject("host"));
@ -231,26 +232,56 @@ public class InternalUIHandler implements UIHandler, Listener {
}
}
}
} else if (event.getClickedInventory().getTitle().equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.Title", '&')) || // SubServer Menu
event.getClickedInventory().getTitle().startsWith(plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').split("\\$str\\$")[0]) &&
(plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').split("\\$str\\$").length == 1 ||
event.getClickedInventory().getTitle().endsWith(plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').split("\\$str\\$")[1]))) {
} else if (event.getClickedInventory().getTitle().equals(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.Title", '&'))) { // Host Menu
if (event.getCurrentItem() != null && event.getCurrentItem().getType() != Material.AIR && event.getCurrentItem().hasItemMeta()) {
String item = event.getCurrentItem().getItemMeta().getDisplayName();
if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back-Arrow", '&'))) {
player.closeInventory();
gui.subserverMenu(gui.lastPage - 1, gui.lastVistedObject);
gui.groupMenu(gui.lastPage - 1);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Next-Arrow", '&'))) {
player.closeInventory();
gui.subserverMenu(gui.lastPage + 1, gui.lastVistedObject);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.Host-Menu", '&'))) {
gui.groupMenu(gui.lastPage + 1);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.Server-Menu", '&'))) {
player.closeInventory();
gui.serverMenu(1, null, null);
} else if (!item.equals(ChatColor.RESET.toString()) && !item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.No-Groups", '&'))) {
player.closeInventory();
gui.serverMenu(1, null, ChatColor.stripColor(item));
}
}
} else if (event.getClickedInventory().getTitle().equals(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Title", '&')) || // SubServer Menu
event.getClickedInventory().getTitle().startsWith(plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').split("\\$str\\$")[0]) &&
(plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').split("\\$str\\$").length == 1 ||
event.getClickedInventory().getTitle().endsWith(plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').split("\\$str\\$")[1])) ||
event.getClickedInventory().getTitle().startsWith(plugin.lang.getSection("Lang").getColoredString("Interface.Group-SubServer.Title", '&').split("\\$str\\$")[0]) &&
(plugin.lang.getSection("Lang").getColoredString("Interface.Group-SubServer.Title", '&').split("\\$str\\$").length == 1 ||
event.getClickedInventory().getTitle().endsWith(plugin.lang.getSection("Lang").getColoredString("Interface.Group-SubServer.Title", '&').split("\\$str\\$")[1]))) {
if (event.getCurrentItem() != null && event.getCurrentItem().getType() != Material.AIR && event.getCurrentItem().hasItemMeta()) {
String item = event.getCurrentItem().getItemMeta().getDisplayName();
if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back-Arrow", '&'))) {
player.closeInventory();
if (gui.lastVisitedObjectPosition > 1) {
gui.serverMenu(gui.lastPage - 1, null, gui.lastVisitedObject);
} else {
gui.serverMenu(gui.lastPage - 1, gui.lastVisitedObject, null);
}
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Next-Arrow", '&'))) {
player.closeInventory();
if (gui.lastVisitedObjectPosition > 1) {
gui.serverMenu(gui.lastPage + 1, null, gui.lastVisitedObject);
} else {
gui.serverMenu(gui.lastPage + 1, gui.lastVisitedObject, null);
}
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Host-Menu", '&'))) {
player.closeInventory();
gui.hostMenu(1);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back", '&'))) {
player.closeInventory();
gui.back();
} else if (!item.equals(ChatColor.RESET.toString()) && !item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.No-SubServers", '&'))) {
} else if (!item.equals(ChatColor.RESET.toString()) && event.getCurrentItem().getDurability() != 0 && event.getCurrentItem().getDurability() != 8 && !item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.No-Servers", '&'))) {
player.closeInventory();
String obj;
if (event.getCurrentItem().getItemMeta().getLore() != null && event.getCurrentItem().getItemMeta().getLore().size() > 0 && event.getCurrentItem().getItemMeta().getLore().get(0).startsWith(ChatColor.GRAY.toString())) {
@ -272,15 +303,15 @@ public class InternalUIHandler implements UIHandler, Listener {
gui.back();
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Admin.Creator", '&'))) {
player.closeInventory();
if (player.hasPermission("subservers.host.create.*") || player.hasPermission("subservers.host.create." + gui.lastVistedObject.toLowerCase())) {
gui.hostCreator(new UIRenderer.CreatorOptions(gui.lastVistedObject));
if (player.hasPermission("subservers.host.create.*") || player.hasPermission("subservers.host.create." + gui.lastVisitedObject.toLowerCase())) {
gui.hostCreator(new UIRenderer.CreatorOptions(gui.lastVisitedObject));
} else gui.reopen();
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Admin.SubServers", '&'))) {
player.closeInventory();
gui.subserverMenu(1, gui.lastVistedObject);
gui.serverMenu(1, gui.lastVisitedObject, null);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Admin.Plugins", '&'))) {
player.closeInventory();
gui.hostPlugin(1, gui.lastVistedObject);
gui.hostPlugin(1, gui.lastVisitedObject);
}
}
} else if (event.getClickedInventory().getTitle().startsWith(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Title", '&').split("\\$str\\$")[0]) && // SubServer Admin
@ -294,23 +325,23 @@ public class InternalUIHandler implements UIHandler, Listener {
gui.back();
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Start", '&'))) {
player.closeInventory();
if (player.hasPermission("subservers.subserver.start.*") || player.hasPermission("subservers.subserver.start." + gui.lastVistedObject.toLowerCase())) {
if (player.hasPermission("subservers.subserver.start.*") || player.hasPermission("subservers.subserver.start." + gui.lastVisitedObject.toLowerCase())) {
gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Downloading.Response", '&'));
plugin.subdata.sendPacket(new PacketStartServer(player.getUniqueId(), gui.lastVistedObject, json -> {
plugin.subdata.sendPacket(new PacketStartServer(player.getUniqueId(), gui.lastVisitedObject, json -> {
gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Start.Title", '&'));
Bukkit.getScheduler().runTaskLater(plugin, gui::reopen, 30);
}));
} else gui.reopen();
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Stop", '&'))) {
player.closeInventory();
if (player.hasPermission("subservers.subserver.stop.*") || player.hasPermission("subservers.subserver.stop." + gui.lastVistedObject.toLowerCase())) {
if (player.hasPermission("subservers.subserver.stop.*") || player.hasPermission("subservers.subserver.stop." + gui.lastVisitedObject.toLowerCase())) {
gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Downloading.Response", '&'));
final Container<Boolean> listening = new Container<Boolean>(true);
PacketInRunEvent.callback("SubStoppedEvent", new JSONCallback() {
@Override
public void run(JSONObject json) {
try {
if (listening.get()) if (!json.getString("server").equalsIgnoreCase(gui.lastVistedObject)) {
if (listening.get()) if (!json.getString("server").equalsIgnoreCase(gui.lastVisitedObject)) {
PacketInRunEvent.callback("SubStoppedEvent", this);
} else {
gui.reopen();
@ -318,23 +349,23 @@ public class InternalUIHandler implements UIHandler, Listener {
} catch (Exception e) {}
}
});
plugin.subdata.sendPacket(new PacketStopServer(player.getUniqueId(), gui.lastVistedObject, false, json -> {
plugin.subdata.sendPacket(new PacketStopServer(player.getUniqueId(), gui.lastVisitedObject, false, json -> {
if (json.getInt("r") != 0) {
gui.reopen();
listening.set(false);
} else gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Stop.Title", '&').replace("$str$", gui.lastVistedObject));
} else gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Stop.Title", '&').replace("$str$", gui.lastVisitedObject));
}));
} else gui.reopen();
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Terminate", '&'))) {
player.closeInventory();
if (player.hasPermission("subservers.subserver.terminate.*") || player.hasPermission("subservers.subserver.terminate." + gui.lastVistedObject.toLowerCase())) {
if (player.hasPermission("subservers.subserver.terminate.*") || player.hasPermission("subservers.subserver.terminate." + gui.lastVisitedObject.toLowerCase())) {
gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Downloading.Response", '&'));
final Container<Boolean> listening = new Container<Boolean>(true);
PacketInRunEvent.callback("SubStoppedEvent", new JSONCallback() {
@Override
public void run(JSONObject json) {
try {
if (listening.get()) if (!json.getString("server").equalsIgnoreCase(gui.lastVistedObject)) {
if (listening.get()) if (!json.getString("server").equalsIgnoreCase(gui.lastVisitedObject)) {
PacketInRunEvent.callback("SubStoppedEvent", this);
} else {
gui.reopen();
@ -342,28 +373,28 @@ public class InternalUIHandler implements UIHandler, Listener {
} catch (Exception e) {}
}
});
plugin.subdata.sendPacket(new PacketStopServer(player.getUniqueId(), gui.lastVistedObject, false, json -> {
plugin.subdata.sendPacket(new PacketStopServer(player.getUniqueId(), gui.lastVisitedObject, false, json -> {
if (json.getInt("r") != 0) {
gui.reopen();
listening.set(false);
} else gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Terminate.Title", '&').replace("$str$", gui.lastVistedObject));
} else gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Terminate.Title", '&').replace("$str$", gui.lastVisitedObject));
}));
} else gui.reopen();
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Command", '&'))) {
player.closeInventory();
if (player.hasPermission("subservers.subserver.command.*") || player.hasPermission("subservers.subserver.command." + gui.lastVistedObject.toLowerCase())) {
if (player.hasPermission("subservers.subserver.command.*") || player.hasPermission("subservers.subserver.command." + gui.lastVisitedObject.toLowerCase())) {
if (!gui.sendTitle(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Command.Title", '&'), 4 * 20))
player.sendMessage(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Command.Message", '&'));
input.put(player.getUniqueId(), m -> {
gui.setDownloading(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Downloading.Response", '&'));
plugin.subdata.sendPacket(new PacketCommandServer(player.getUniqueId(), gui.lastVistedObject, (m.getString("message").startsWith("/"))?m.getString("message").substring(1):m.getString("message"), json -> {
plugin.subdata.sendPacket(new PacketCommandServer(player.getUniqueId(), gui.lastVisitedObject, (m.getString("message").startsWith("/"))?m.getString("message").substring(1):m.getString("message"), json -> {
gui.reopen();
}));
});
} else gui.reopen();
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Admin.Plugins", '&'))) {
player.closeInventory();
gui.subserverPlugin(1, gui.lastVistedObject);
gui.subserverPlugin(1, gui.lastVisitedObject);
}
}
} else if (event.getClickedInventory().getTitle().startsWith(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Plugin.Title", '&').split("\\$str\\$")[0]) && // SubServer Plugin
@ -373,10 +404,10 @@ public class InternalUIHandler implements UIHandler, Listener {
String item = event.getCurrentItem().getItemMeta().getDisplayName();
if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back-Arrow", '&'))) {
player.closeInventory();
gui.subserverPlugin(gui.lastPage - 1, gui.lastVistedObject);
gui.subserverPlugin(gui.lastPage - 1, gui.lastVisitedObject);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Next-Arrow", '&'))) {
player.closeInventory();
gui.subserverPlugin(gui.lastPage + 1, gui.lastVistedObject);
gui.subserverPlugin(gui.lastPage + 1, gui.lastVisitedObject);
} else if (item.equals(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back", '&'))) {
player.closeInventory();
gui.back();
@ -389,8 +420,8 @@ public class InternalUIHandler implements UIHandler, Listener {
if (plugin.get() == null) {
gui.reopen();
} else {
gui.setDownloading(ChatColor.stripColor(this.plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Plugin.Title", '&').replace("$str$", gui.lastVistedObject)));
this.plugin.subdata.sendPacket(new PacketDownloadServerInfo(gui.lastVistedObject, json -> {
gui.setDownloading(ChatColor.stripColor(this.plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Plugin.Title", '&').replace("$str$", gui.lastVisitedObject)));
this.plugin.subdata.sendPacket(new PacketDownloadServerInfo(gui.lastVisitedObject, json -> {
if (json.getString("type").equals("subserver")) {
gui.setDownloading(null);
plugin.get().open(player, json.getJSONObject("server"));

View File

@ -12,7 +12,6 @@ import org.bukkit.Material;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
import java.text.DecimalFormat;
import java.util.*;
@ -25,7 +24,8 @@ import java.util.regex.Pattern;
public class InternalUIRenderer extends UIRenderer {
private List<Runnable> windowHistory = new LinkedList<Runnable>();
protected Options lastUsedOptions = null;
protected String lastVistedObject = null;
protected int lastVisitedObjectPosition = 0;
protected String lastVisitedObject = null;
protected int lastPage = 1;
protected Runnable lastMenu = null;
protected boolean open = false;
@ -101,9 +101,9 @@ public class InternalUIRenderer extends UIRenderer {
public void hostMenu(final int page) {
setDownloading(ChatColor.stripColor(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Menu.Title", '&')));
plugin.subdata.sendPacket(new PacketDownloadServerList(null, (json) -> {
plugin.subdata.sendPacket(new PacketDownloadServerList(null, null, (json) -> {
setDownloading(null);
lastVistedObject = null;
lastVisitedObject = null;
lastPage = page;
lastMenu = () -> hostMenu(1);
windowHistory.add(() -> hostMenu(page));
@ -202,9 +202,9 @@ public class InternalUIRenderer extends UIRenderer {
inv.setItem(i++, block);
} else i += 2;
i++;
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 5);
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 1);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Menu.SubServer-Menu", '&'));
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Menu.Group-Menu", '&'));
block.setItemMeta(blockMeta);
inv.setItem(i++, block);
inv.setItem(i++, block);
@ -232,7 +232,7 @@ public class InternalUIRenderer extends UIRenderer {
if (hasHistory()) back();
} else {
setDownloading(null);
lastVistedObject = host;
lastVisitedObject = host;
ItemStack block;
ItemMeta blockMeta;
@ -342,7 +342,7 @@ public class InternalUIRenderer extends UIRenderer {
lastUsedOptions = options;
if (!options.init()) {
windowHistory.add(() -> hostCreator(options));
lastVistedObject = options.getHost();
lastVisitedObject = options.getHost();
}
plugin.subdata.sendPacket(new PacketDownloadHostInfo(options.getHost(), json -> {
@ -476,7 +476,7 @@ public class InternalUIRenderer extends UIRenderer {
public void hostCreatorTemplates(final int page, final CreatorOptions options) {
setDownloading(ChatColor.stripColor(plugin.lang.getSection("Lang").getColoredString("Interface.Host-Creator.Edit-Template.Title", '&').replace("$str$", options.getHost())));
lastUsedOptions = options;
if (!options.init()) lastVistedObject = options.getHost();
if (!options.init()) lastVisitedObject = options.getHost();
plugin.subdata.sendPacket(new PacketDownloadHostInfo(options.getHost(), (json) -> {
if (!json.getBoolean("valid")|| !json.getJSONObject("host").getBoolean("enabled")) {
lastUsedOptions = null;
@ -595,7 +595,7 @@ public class InternalUIRenderer extends UIRenderer {
if (hasHistory()) back();
} else {
setDownloading(null);
lastVistedObject = host;
lastVisitedObject = host;
lastPage = page;
List<String> renderers = new ArrayList<String>();
for (String renderer : renderers) {
@ -695,32 +695,16 @@ public class InternalUIRenderer extends UIRenderer {
}));
}
public void subserverMenu(final int page, final String host) {
setDownloading(ChatColor.stripColor((host == null)?plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.Title", '&'):plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').replace("$str$", host)));
plugin.subdata.sendPacket(new PacketDownloadServerList(host, json -> {
public void groupMenu(final int page) {
setDownloading(ChatColor.stripColor(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.Title", '&')));
plugin.subdata.sendPacket(new PacketDownloadServerList(null, null, (json) -> {
setDownloading(null);
lastVisitedObject = null;
lastPage = page;
HashMap<String, String> hosts = new HashMap<String, String>();
List<String> subservers = new ArrayList<String>();
if (host != null && json.getJSONObject("hosts").keySet().contains(host)) {
lastVistedObject = host;
for (String subserver : json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").keySet()) {
hosts.put(subserver, host);
subservers.add(subserver);
}
} else {
lastVistedObject = null;
lastMenu = () -> subserverMenu(1, null);
for (String tmphost : json.getJSONObject("hosts").keySet()) {
for (String tmpsubserver : json.getJSONObject("hosts").getJSONObject(tmphost).getJSONObject("servers").keySet()) {
hosts.put(tmpsubserver, tmphost);
subservers.add(tmpsubserver);
}
}
}
Collections.sort(subservers);
windowHistory.add(() -> subserverMenu(page, host));
lastMenu = () -> groupMenu(1);
windowHistory.add(() -> groupMenu(page));
List<String> groups = new ArrayList<String>();
groups.addAll(json.getJSONObject("groups").keySet());
ItemStack block;
ItemMeta blockMeta;
@ -732,10 +716,10 @@ public class InternalUIRenderer extends UIRenderer {
int i = 0;
int min = ((page - 1) * 36);
int max = (min + 35);
int count = (subservers.size() == 0)?27:((subservers.size() - min >= max)?36:subservers.size() - min);
int count = (groups.size() == 0)?27:((groups.size() - min >= max)?36:groups.size() - min);
int area = (count % 9 == 0) ? count : (int) (Math.floor(count / 9) + 1) * 9;
Inventory inv = Bukkit.createInventory(null, 18 + area, (host == null)?plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.Title", '&'):plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').replace("$str$", json.getJSONObject("hosts").getJSONObject(host).getString("display")));
Inventory inv = Bukkit.createInventory(null, 18 + area, plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.Title", '&'));
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 7);
block.setItemMeta(divMeta);
while (i < area) {
@ -746,66 +730,19 @@ public class InternalUIRenderer extends UIRenderer {
i = (int) ((count < 9) ? Math.floor((9 - count) / 2) : 0);
boolean even = (count & 1) == 0 && count < 9;
short online, temp, offline, disabled;
short color;
for (String subserver : subservers) {
if (subservers.indexOf(subserver) >= min && subservers.indexOf(subserver) <= max) {
for (String group : groups) {
if (groups.indexOf(group) >= min && groups.indexOf(group) <= max) {
if (even && (i == 4 || i == 13 || i == 22 || i == 31)) inv.setItem(i++, adiv);
online = (short) (((i & 1) == 0) ? 5 : 13);
temp = (short) (((i & 1) == 0) ? 3 : 11);
offline = (short) (((i & 1) == 0) ? 4 : 1);
disabled = (short) (((i & 1) == 0) ? 2 : 14);
color = (short) (((i & 1) == 0) ? 1 : 4);
if (json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getBoolean("temp")) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, temp);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.AQUA + json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!subserver.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display")))
lore.add(ChatColor.GRAY + subserver);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getJSONObject("players").keySet().size())));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Temporary", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
} else if (json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getBoolean("running")) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, online);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.GREEN + json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!subserver.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display")))
lore.add(ChatColor.GRAY + subserver);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getJSONObject("players").keySet().size())));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
} else if (json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getBoolean("enabled") && json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getJSONArray("incompatible").length() == 0) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, offline);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.YELLOW + json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!subserver.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display")))
lore.add(ChatColor.GRAY + subserver);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Offline", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
} else {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, disabled);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.RED + json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!subserver.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("display")))
lore.add(ChatColor.GRAY + subserver);
if (json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getJSONArray("incompatible").length() != 0) {
String list = "";
for (int ii = 0; ii < json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getJSONArray("incompatible").length(); ii++) {
if (list.length() != 0) list += ", ";
list += json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getJSONArray("incompatible").getString(ii);
}
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Incompatible", '&').replace("$str$", list));
}
if (!json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getBoolean("enabled")) lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Disabled", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(subserver)).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
}
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, color);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.GOLD + group);
LinkedList<String> lore = new LinkedList<String>();
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.Group-Server-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("groups").getJSONObject(group).keySet().size())));
blockMeta.setLore(lore);
block.setItemMeta(blockMeta);
inv.setItem(i, block);
@ -819,10 +756,10 @@ public class InternalUIRenderer extends UIRenderer {
}
}
if (subservers.size() == 0) {
if (groups.size() == 0) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 14);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.No-SubServers", '&'));
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.No-Groups", '&'));
block.setItemMeta(blockMeta);
inv.setItem(12, block);
inv.setItem(13, block);
@ -845,17 +782,215 @@ public class InternalUIRenderer extends UIRenderer {
inv.setItem(i++, block);
} else i += 2;
i++;
if (host == null || hasHistory()) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) ((host == null) ? 11 : 14));
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 5);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.Server-Menu", '&'));
block.setItemMeta(blockMeta);
inv.setItem(i++, block);
inv.setItem(i++, block);
inv.setItem(i++, block);
i++;
if (groups.size() - 1 > max) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 4);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName((host == null) ? plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.Host-Menu", '&') : plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back", '&'));
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Next-Arrow", '&'));
block.setItemMeta(blockMeta);
inv.setItem(i++, block);
inv.setItem(i, block);
}
Bukkit.getPlayer(player).openInventory(inv);
open = true;
}));
}
public void serverMenu(final int page, final String host, final String group) {
setDownloading(ChatColor.stripColor((host == null)?((group == null)?plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Title", '&'):plugin.lang.getSection("Lang").getColoredString("Interface.Group-SubServer.Title", '&').replace("$str$", group)):plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').replace("$str$", host)));
plugin.subdata.sendPacket(new PacketDownloadServerList(host, (host != null)?null:group, json -> {
setDownloading(null);
lastPage = page;
HashMap<String, String> hosts = new HashMap<String, String>();
List<String> servers = new ArrayList<String>();
if (host != null && json.getJSONObject("hosts").keySet().contains(host)) {
lastVisitedObject = host;
lastVisitedObjectPosition = 1;
for (String subserver : json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").keySet()) {
hosts.put(subserver, host);
servers.add(subserver);
}
} else if (group != null && json.getJSONObject("groups").keySet().contains(group)) {
lastVisitedObject = group;
lastVisitedObjectPosition = 2;
for (String server : json.getJSONObject("groups").getJSONObject(group).keySet()) {
hosts.put(server, (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).keySet().contains("host") && json.getJSONObject("hosts").keySet().contains(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("host")))?json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("host"):null);
servers.add(server);
}
} else {
lastVisitedObject = null;
lastVisitedObjectPosition = 0;
lastMenu = () -> serverMenu(1, null, null);
for (String s : json.getJSONObject("servers").keySet()) {
hosts.put(s, null);
servers.add(s);
}
for (String h : json.getJSONObject("hosts").keySet()) {
for (String ss : json.getJSONObject("hosts").getJSONObject(h).getJSONObject("servers").keySet()) {
hosts.put(ss, h);
servers.add(ss);
}
}
}
Collections.sort(servers);
windowHistory.add(() -> serverMenu(page, host, group));
ItemStack block;
ItemMeta blockMeta;
ItemStack div = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 15);
ItemMeta divMeta = div.getItemMeta();
divMeta.setDisplayName(ChatColor.RESET.toString());
div.setItemMeta(divMeta);
int i = 0;
int min = ((page - 1) * 36);
int max = (min + 35);
int count = (servers.size() == 0)?27:((servers.size() - min >= max)?36:servers.size() - min);
int area = (count % 9 == 0) ? count : (int) (Math.floor(count / 9) + 1) * 9;
Inventory inv = Bukkit.createInventory(null, 18 + area, (host == null)?((group == null)?plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Title", '&'):plugin.lang.getSection("Lang").getColoredString("Interface.Group-SubServer.Title", '&').replace("$str$", group)):plugin.lang.getSection("Lang").getColoredString("Interface.Host-SubServer.Title", '&').replace("$str$", json.getJSONObject("hosts").getJSONObject(host).getString("display")));
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 7);
block.setItemMeta(divMeta);
while (i < area) {
inv.setItem(i, block);
i++;
}
ItemStack adiv = block;
i = (int) ((count < 9) ? Math.floor((9 - count) / 2) : 0);
boolean even = (count & 1) == 0 && count < 9;
short external, online, temp, offline, disabled;
for (String server : servers) {
if (servers.indexOf(server) >= min && servers.indexOf(server) <= max) {
if (even && (i == 4 || i == 13 || i == 22 || i == 31)) inv.setItem(i++, adiv);
external = (short) (((i & 1) == 0) ? 0 : 8);
online = (short) (((i & 1) == 0) ? 5 : 13);
temp = (short) (((i & 1) == 0) ? 3 : 11);
offline = (short) (((i & 1) == 0) ? 4 : 1);
disabled = (short) (((i & 1) == 0) ? 2 : 14);
if (hosts.get(server) == null) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, external);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.AQUA + json.getJSONObject("servers").getJSONObject(server).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!server.equals(json.getJSONObject("servers").getJSONObject(server).getString("display")))
lore.add(ChatColor.GRAY + server);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("servers").getJSONObject(server).getJSONObject("players").keySet().size())));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-External", '&'));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Invalid", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("servers").getJSONObject(server).getString("address"):json.getJSONObject("servers").getJSONObject(server).getString("address").split(":")[json.getJSONObject("servers").getJSONObject(server).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
} else if (json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getBoolean("temp")) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, temp);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.AQUA + json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!server.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display")))
lore.add(ChatColor.GRAY + server);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getJSONObject("players").keySet().size())));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Temporary", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
} else if (json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getBoolean("running")) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, online);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.GREEN + json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!server.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display")))
lore.add(ChatColor.GRAY + server);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getJSONObject("players").keySet().size())));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
} else if (json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getBoolean("enabled") && json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getJSONArray("incompatible").length() == 0) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, offline);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.YELLOW + json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!server.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display")))
lore.add(ChatColor.GRAY + server);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Offline", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
} else {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, disabled);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(ChatColor.RED + json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display"));
LinkedList<String> lore = new LinkedList<String>();
if (!server.equals(json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("display")))
lore.add(ChatColor.GRAY + server);
if (json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getJSONArray("incompatible").length() != 0) {
String list = "";
for (int ii = 0; ii < json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getJSONArray("incompatible").length(); ii++) {
if (list.length() != 0) list += ", ";
list += json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getJSONArray("incompatible").getString(ii);
}
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Incompatible", '&').replace("$str$", list));
}
if (!json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getBoolean("enabled")) lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Disabled", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address"):json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(hosts.get(server)).getJSONObject("servers").getJSONObject(server).getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
}
block.setItemMeta(blockMeta);
inv.setItem(i, block);
count--;
if (count < 9 && (i == 8 || i == 17 || i == 26)) {
i += (int) Math.floor((9 - count) / 2) + 1;
even = (count & 1) == 0;
} else {
i++;
}
}
}
if (servers.size() == 0) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 14);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.No-Servers", '&'));
block.setItemMeta(blockMeta);
inv.setItem(12, block);
inv.setItem(13, block);
inv.setItem(14, block);
}
i = inv.getSize() - 18;
while (i < inv.getSize()) {
inv.setItem(i, div);
i++;
}
i = inv.getSize() - 9;
if (min != 0) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 4);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back-Arrow", '&'));
block.setItemMeta(blockMeta);
inv.setItem(i++, block);
inv.setItem(i++, block);
} else i += 2;
i++;
if (host == null || group == null || hasHistory()) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) ((host == null && group == null)?11:14));
blockMeta = block.getItemMeta();
blockMeta.setDisplayName((host == null && group == null)?plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Host-Menu", '&'):plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Back", '&'));
block.setItemMeta(blockMeta);
inv.setItem(i++, block);
inv.setItem(i++, block);
inv.setItem(i++, block);
i++;
}
if (subservers.size() - 1 > max) {
if (servers.size() - 1 > max) {
block = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 4);
blockMeta = block.getItemMeta();
blockMeta.setDisplayName(plugin.lang.getSection("Lang").getColoredString("Interface.Generic.Next-Arrow", '&'));
@ -877,7 +1012,7 @@ public class InternalUIRenderer extends UIRenderer {
if (hasHistory()) back();
} else {
setDownloading(null);
lastVistedObject = subserver;
lastVisitedObject = subserver;
ItemStack block;
ItemMeta blockMeta;
ItemStack div = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 15);
@ -987,8 +1122,8 @@ public class InternalUIRenderer extends UIRenderer {
LinkedList<String> lore = new LinkedList<String>();
if (!subserver.equals(json.getJSONObject("server").getString("display")))
lore.add(ChatColor.GRAY + subserver);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("server").getJSONObject("players").keySet().size())));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Temporary", '&'));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("server").getJSONObject("players").keySet().size())));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Temporary", '&'));
lore.add(ChatColor.WHITE + json.getJSONObject("server").getString("address"));
blockMeta.setLore(lore);
} else if (json.getJSONObject("server").getBoolean("running")) {
@ -998,7 +1133,7 @@ public class InternalUIRenderer extends UIRenderer {
LinkedList<String> lore = new LinkedList<String>();
if (!subserver.equals(json.getJSONObject("server").getString("display")))
lore.add(ChatColor.GRAY + subserver);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("server").getJSONObject("players").keySet().size())));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("server").getJSONObject("players").keySet().size())));
lore.add(ChatColor.WHITE + json.getJSONObject("server").getString("address"));
blockMeta.setLore(lore);
} else if (json.getJSONObject("server").getBoolean("enabled") && json.getJSONObject("server").getJSONArray("incompatible").length() == 0) {
@ -1008,7 +1143,7 @@ public class InternalUIRenderer extends UIRenderer {
LinkedList<String> lore = new LinkedList<String>();
if (!subserver.equals(json.getJSONObject("server").getString("display")))
lore.add(ChatColor.GRAY + subserver);
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Offline", '&'));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Offline", '&'));
lore.add(ChatColor.WHITE + json.getJSONObject("server").getString("address"));
blockMeta.setLore(lore);
} else {
@ -1024,9 +1159,9 @@ public class InternalUIRenderer extends UIRenderer {
if (list.length() != 0) list += ", ";
list += json.getJSONObject("server").getJSONArray("incompatible").getString(ii);
}
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Incompatible", '&').replace("$str$", list));
lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Incompatible", '&').replace("$str$", list));
}
if (!json.getJSONObject("server").getBoolean("enabled")) lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Disabled", '&'));
if (!json.getJSONObject("server").getBoolean("enabled")) lore.add(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Disabled", '&'));
lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("server").getString("address"):json.getJSONObject("server").getString("address").split(":")[json.getJSONObject("server").getString("address").split(":").length - 1]));
blockMeta.setLore(lore);
}
@ -1059,7 +1194,7 @@ public class InternalUIRenderer extends UIRenderer {
if (hasHistory()) back();
} else {
setDownloading(null);
lastVistedObject = subserver;
lastVisitedObject = subserver;
lastPage = page;
List<String> renderers = new ArrayList<String>();
for (String renderer : renderers) {

View File

@ -264,13 +264,20 @@ public abstract class UIRenderer {
*/
public abstract void hostPlugin(int page, String host);
/**
* Opens the Group Menu
*
* @param page Page Number (starting from page 1)
*/
public abstract void groupMenu(int page);
/**
* Opens the SubServer Menu
*
* @param page Page Number (starting from page 1)
* @param host Host Name (or null to scan all hosts)
*/
public abstract void subserverMenu(int page, String host);
public abstract void serverMenu(int page, String host, String group);
/**
* Opens SubServer/&lt;name&gt;

View File

@ -172,8 +172,10 @@ public class YAMLSection {
* @param value Value
*/
public void set(String handle, Object value) {
if (Util.isNull(handle, value)) throw new NullPointerException();
if (value instanceof Collection) {
if (Util.isNull(handle)) throw new NullPointerException();
if (value == null) {
remove(handle);
} else if (value instanceof Collection) {
set(handle, (Collection<?>) value);
} else {
map.put(handle, convert(value));

View File

@ -27,9 +27,10 @@ public class PacketDownloadServerList implements PacketIn, PacketOut {
* New PacketDownloadServerList (Out)
*
* @param host Host name (or null for all)
* @param group Group name (or null for all)
* @param callback Callbacks
*/
public PacketDownloadServerList(String host, JSONCallback... callback) {
public PacketDownloadServerList(String host, String group, JSONCallback... callback) {
if (Util.isNull((Object) callback)) throw new NullPointerException();
this.host = host;
this.id = Util.getNew(callbacks.keySet(), UUID::randomUUID).toString();

View File

@ -11,7 +11,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.json.JSONObject;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@ -21,6 +20,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.nio.charset.Charset;
import java.text.DecimalFormat;
@ -76,14 +76,126 @@ public final class SubCommand implements CommandExecutor {
}
} else if (args[0].equalsIgnoreCase("list")) {
final String fLabel = label;
plugin.subdata.sendPacket(new PacketDownloadServerList(null, json -> {
plugin.subdata.sendPacket(new PacketDownloadServerList(null, null, json -> {
int i = 0;
boolean sent = false;
Container<Boolean> spigot = new Container<Boolean>(false);
if (!Util.isException(() -> {
if (Class.forName("org.spigotmc.SpigotConfig") != null) spigot.set(true);
}) && spigot.get() && sender instanceof Player) {
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Host-Header", '&'));
net.md_5.bungee.api.chat.TextComponent div = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Command.List.Divider", '&'));
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Group-Header", '&'));
for (String group : json.getJSONObject("groups").keySet()) {
List<net.md_5.bungee.api.chat.TextComponent> hoverm = new LinkedList<net.md_5.bungee.api.chat.TextComponent>();
net.md_5.bungee.api.chat.TextComponent msg = new net.md_5.bungee.api.chat.TextComponent(ChatColor.RESET.toString());
net.md_5.bungee.api.chat.TextComponent message = new net.md_5.bungee.api.chat.TextComponent(group);
net.md_5.bungee.api.chat.TextComponent hover = new net.md_5.bungee.api.chat.TextComponent(group + '\n');
message.setColor(net.md_5.bungee.api.ChatColor.GOLD);
hover.setColor(net.md_5.bungee.api.ChatColor.GOLD);
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Group-Menu.Group-Server-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("groups").getJSONObject(group).keySet().size())));
hoverm.add(hover);
message.setClickEvent(new net.md_5.bungee.api.chat.ClickEvent(net.md_5.bungee.api.chat.ClickEvent.Action.RUN_COMMAND, fLabel + " open Server 1 " + group));
message.setHoverEvent(new net.md_5.bungee.api.chat.HoverEvent(net.md_5.bungee.api.chat.HoverEvent.Action.SHOW_TEXT, hoverm.toArray(new net.md_5.bungee.api.chat.TextComponent[hoverm.size()])));
msg.addExtra(message);
msg.addExtra(new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Command.List.Header", '&')));
for (String server : json.getJSONObject("groups").getJSONObject(group).keySet()) {
hoverm = new LinkedList<net.md_5.bungee.api.chat.TextComponent>();
message = new net.md_5.bungee.api.chat.TextComponent(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display"));
hover = new net.md_5.bungee.api.chat.TextComponent(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display") + '\n');
if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).keySet().contains("enabled")) {
message.setClickEvent(new net.md_5.bungee.api.chat.ClickEvent(net.md_5.bungee.api.chat.ClickEvent.Action.RUN_COMMAND, fLabel + " open SubServer/ " + server));
if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("temp")) {
message.setColor(net.md_5.bungee.api.ChatColor.AQUA);
hover.setColor(net.md_5.bungee.api.ChatColor.AQUA);
hoverm.add(hover);
if (!server.equals(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display"))) {
hover = new net.md_5.bungee.api.chat.TextComponent(server + '\n');
hover.setColor(net.md_5.bungee.api.ChatColor.GRAY);
hoverm.add(hover);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONObject("players").keySet().size())) + '\n');
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Temporary", '&'));
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("running")) {
message.setColor(net.md_5.bungee.api.ChatColor.GREEN);
hover.setColor(net.md_5.bungee.api.ChatColor.GREEN);
hoverm.add(hover);
if (!server.equals(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display"))) {
hover = new net.md_5.bungee.api.chat.TextComponent(server + '\n');
hover.setColor(net.md_5.bungee.api.ChatColor.GRAY);
hoverm.add(hover);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONObject("players").keySet().size())));
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("enabled") && json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONArray("incompatible").length() == 0) {
message.setColor(net.md_5.bungee.api.ChatColor.YELLOW);
hover.setColor(net.md_5.bungee.api.ChatColor.YELLOW);
hoverm.add(hover);
if (!server.equals(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display"))) {
hover = new net.md_5.bungee.api.chat.TextComponent(server + '\n');
hover.setColor(net.md_5.bungee.api.ChatColor.GRAY);
hoverm.add(hover);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Offline", '&'));
} else {
message.setColor(net.md_5.bungee.api.ChatColor.RED);
hover.setColor(net.md_5.bungee.api.ChatColor.RED);
if (!server.equals(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display"))) {
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(server + '\n');
hover.setColor(net.md_5.bungee.api.ChatColor.GRAY);
}
if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONArray("incompatible").length() != 0) {
hoverm.add(hover);
String list = "";
for (int ii = 0; ii < json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONArray("incompatible").length(); ii++) {
if (list.length() != 0) list += ", ";
list += json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONArray("incompatible").getString(ii);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Incompatible", '&').replace("$str$", list));
}
if (!json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("enabled")) {
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Disabled", '&'));
}
}
hoverm.add(hover);
if (plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false)) {
hover = new net.md_5.bungee.api.chat.TextComponent('\n' + json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address"));
} else {
hover = new net.md_5.bungee.api.chat.TextComponent('\n' + json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address").split(":")[json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address").split(":").length - 1]);
}
hover.setColor(net.md_5.bungee.api.ChatColor.WHITE);
hoverm.add(hover);
message.setClickEvent(new net.md_5.bungee.api.chat.ClickEvent(net.md_5.bungee.api.chat.ClickEvent.Action.RUN_COMMAND, fLabel + " open SubServer/ " + server));
} else {
message.setColor(net.md_5.bungee.api.ChatColor.WHITE);
hover.setColor(net.md_5.bungee.api.ChatColor.WHITE);
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-External", '&'));
hoverm.add(hover);
if (plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false)) {
hover = new net.md_5.bungee.api.chat.TextComponent('\n' + json.getJSONObject("servers").getJSONObject(server).getString("address"));
} else {
hover = new net.md_5.bungee.api.chat.TextComponent('\n' + json.getJSONObject("servers").getJSONObject(server).getString("address").split(":")[json.getJSONObject("servers").getJSONObject(server).getString("address").split(":").length - 1]);
}
hover.setColor(net.md_5.bungee.api.ChatColor.WHITE);
hoverm.add(hover);
}
message.setHoverEvent(new net.md_5.bungee.api.chat.HoverEvent(net.md_5.bungee.api.chat.HoverEvent.Action.SHOW_TEXT, hoverm.toArray(new net.md_5.bungee.api.chat.TextComponent[hoverm.size()])));
if (i != 0) msg.addExtra(div);
msg.addExtra(message);
i++;
}
if (i == 0) msg.addExtra(new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&')));
((Player) sender).spigot().sendMessage(msg);
i = 0;
sent = true;
}
if (!sent) sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&'));
sent = false;
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Host-Header", '&'));
for (String host : json.getJSONObject("hosts").keySet()) {
List<net.md_5.bungee.api.chat.TextComponent> hoverm = new LinkedList<net.md_5.bungee.api.chat.TextComponent>();
net.md_5.bungee.api.chat.TextComponent msg = new net.md_5.bungee.api.chat.TextComponent(ChatColor.RESET.toString());
@ -119,7 +231,7 @@ public final class SubCommand implements CommandExecutor {
message.setClickEvent(new net.md_5.bungee.api.chat.ClickEvent(net.md_5.bungee.api.chat.ClickEvent.Action.RUN_COMMAND, fLabel + " open Host/ " + host));
message.setHoverEvent(new net.md_5.bungee.api.chat.HoverEvent(net.md_5.bungee.api.chat.HoverEvent.Action.SHOW_TEXT, hoverm.toArray(new net.md_5.bungee.api.chat.TextComponent[hoverm.size()])));
msg.addExtra(message);
msg.addExtra(new net.md_5.bungee.api.chat.TextComponent(ChatColor.GRAY + ": "));
msg.addExtra(new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Command.List.Header", '&')));
for (String subserver : json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").keySet()) {
hoverm = new LinkedList<net.md_5.bungee.api.chat.TextComponent>();
@ -135,9 +247,9 @@ public final class SubCommand implements CommandExecutor {
hover.setColor(net.md_5.bungee.api.ChatColor.GRAY);
hoverm.add(hover);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getJSONObject("players").keySet().size())) + '\n');
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getJSONObject("players").keySet().size())) + '\n');
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Temporary", '&'));
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Temporary", '&'));
} else if (json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getBoolean("running")) {
message.setColor(net.md_5.bungee.api.ChatColor.GREEN);
hover.setColor(net.md_5.bungee.api.ChatColor.GREEN);
@ -147,7 +259,7 @@ public final class SubCommand implements CommandExecutor {
hover.setColor(net.md_5.bungee.api.ChatColor.GRAY);
hoverm.add(hover);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getJSONObject("players").keySet().size())));
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-Player-Count", '&').replace("$int$", new DecimalFormat("#,###").format(json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getJSONObject("players").keySet().size())));
} else if (json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getBoolean("enabled") && json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getJSONArray("incompatible").length() == 0) {
message.setColor(net.md_5.bungee.api.ChatColor.YELLOW);
hover.setColor(net.md_5.bungee.api.ChatColor.YELLOW);
@ -157,7 +269,7 @@ public final class SubCommand implements CommandExecutor {
hover.setColor(net.md_5.bungee.api.ChatColor.GRAY);
hoverm.add(hover);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Offline", '&'));
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Offline", '&'));
} else {
message.setColor(net.md_5.bungee.api.ChatColor.RED);
hover.setColor(net.md_5.bungee.api.ChatColor.RED);
@ -173,11 +285,11 @@ public final class SubCommand implements CommandExecutor {
if (list.length() != 0) list += ", ";
list += json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getJSONArray("incompatible").getString(ii);
}
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Incompatible", '&').replace("$str$", list));
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Incompatible", '&').replace("$str$", list));
}
if (!json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getBoolean("enabled")) {
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-Disabled", '&'));
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.SubServer-Disabled", '&'));
}
}
hoverm.add(hover);
@ -194,9 +306,12 @@ public final class SubCommand implements CommandExecutor {
msg.addExtra(message);
i++;
}
if (i == 0) msg.addExtra(new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&')));
((Player) sender).spigot().sendMessage(msg);
i = 0;
sent = true;
}
if (!sent) sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&'));
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Server-Header", '&'));
net.md_5.bungee.api.chat.TextComponent msg = new net.md_5.bungee.api.chat.TextComponent(ChatColor.RESET.toString());
for (String server : json.getJSONObject("servers").keySet()) {
@ -206,7 +321,7 @@ public final class SubCommand implements CommandExecutor {
message.setColor(net.md_5.bungee.api.ChatColor.WHITE);
hover.setColor(net.md_5.bungee.api.ChatColor.WHITE);
hoverm.add(hover);
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.SubServer-Menu.SubServer-External", '&'));
hover = new net.md_5.bungee.api.chat.TextComponent(plugin.lang.getSection("Lang").getColoredString("Interface.Server-Menu.Server-External", '&'));
hoverm.add(hover);
if (plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false)) {
hover = new net.md_5.bungee.api.chat.TextComponent('\n' + json.getJSONObject("servers").getJSONObject(server).getString("address"));
@ -220,11 +335,39 @@ public final class SubCommand implements CommandExecutor {
msg.addExtra(message);
i++;
}
if (i == 0) sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&'));
((Player) sender).spigot().sendMessage(msg);
} else {
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Host-Header", '&'));
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Group-Header", '&'));
String div = plugin.lang.getSection("Lang").getColoredString("Command.List.Divider", '&');
for (String group : json.getJSONObject("groups").keySet()) {
String message = "";
message += ChatColor.GOLD + group + plugin.lang.getSection("Lang").getColoredString("Command.List.Header", '&');
for (String server : json.getJSONObject("groups").getJSONObject(group).keySet()) {
if (i != 0) message += div;
if (!json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).keySet().contains("enabled")) {
message += ChatColor.WHITE;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("temp")) {
message += ChatColor.AQUA;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("running")) {
message += ChatColor.GREEN;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("enabled") && json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONArray("incompatible").length() == 0) {
message += ChatColor.YELLOW;
} else {
message += ChatColor.RED;
}
message += json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display") + " (" + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address"):json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address").split(":")[json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address").split(":").length - 1]) + ((server.equals(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display")))?"":ChatColor.stripColor(div)+server) + ")";
i++;
}
if (i == 0) message += plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&');
sender.sendMessage(message);
i = 0;
sent = true;
}
if (!sent) sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&'));
sent = false;
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Host-Header", '&'));
for (String host : json.getJSONObject("hosts").keySet()) {
String message = "";
if (json.getJSONObject("hosts").getJSONObject(host).getBoolean("enabled")) {
@ -238,7 +381,7 @@ public final class SubCommand implements CommandExecutor {
} else if (!host.equals(json.getJSONObject("hosts").getJSONObject(host).getString("display"))) {
message += " (" + host + ")";
}
message += ChatColor.GRAY + ": ";
message += plugin.lang.getSection("Lang").getColoredString("Command.List.Header", '&');
for (String subserver : json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").keySet()) {
if (i != 0) message += div;
if (json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getBoolean("temp")) {
@ -253,9 +396,12 @@ public final class SubCommand implements CommandExecutor {
message += json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("display") + " (" + json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":").length - 1] + ((subserver.equals(json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("display")))?"":ChatColor.stripColor(div)+subserver) + ")";
i++;
}
if (i == 0) message += plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&');
sender.sendMessage(message);
i = 0;
sent = true;
}
if (!sent) sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&'));
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Server-Header", '&'));
String message = "";
for (String server : json.getJSONObject("servers").keySet()) {
@ -263,6 +409,7 @@ public final class SubCommand implements CommandExecutor {
message += ChatColor.WHITE + json.getJSONObject("servers").getJSONObject(server).getString("display") + " (" + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getJSONObject("servers").getJSONObject(server).getString("address"):json.getJSONObject("servers").getJSONObject(server).getString("address").split(":")[json.getJSONObject("servers").getJSONObject(server).getString("address").split(":").length - 1]) + ((server.equals(json.getJSONObject("servers").getJSONObject(server).getString("display")))?"":ChatColor.stripColor(div)+server) + ")";
i++;
}
if (i == 0) sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.List.Empty", '&'));
sender.sendMessage(message);
}
}));
@ -279,6 +426,11 @@ public final class SubCommand implements CommandExecutor {
sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.Format", '&').replace("$str$", "Real Name") + ChatColor.AQUA + json.getJSONObject("server").getString("name"));
sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.Format", '&').replace("$str$", "Host") + ChatColor.AQUA + json.getJSONObject("server").getString("host"));
sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.Format", '&').replace("$str$", "Enabled") + ((json.getJSONObject("server").getBoolean("enabled"))?ChatColor.GREEN+"yes":ChatColor.DARK_RED+"no"));
if (json.getJSONObject("server").getJSONArray("group").length() > 0) {
sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.Format", '&').replace("$str$", "Group"));
for (int i = 0; i < json.getJSONObject("server").getJSONArray("group").length(); i++)
sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.List", '&').replace("$str$", ChatColor.GOLD + json.getJSONObject("server").getJSONArray("group").getString(i)));
}
if (json.getJSONObject("server").getBoolean("temp")) sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.Format", '&').replace("$str$", "Temporary") + ChatColor.GREEN+"yes");
sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.Format", '&').replace("$str$", "Running") + ((json.getJSONObject("server").getBoolean("running"))?ChatColor.GREEN+"yes":ChatColor.DARK_RED+"no"));
sender.sendMessage(" " + plugin.lang.getSection("Lang").getColoredString("Command.Info.Format", '&').replace("$str$", "Logging") + ((json.getJSONObject("server").getBoolean("log"))?ChatColor.GREEN+"yes":ChatColor.DARK_RED+"no"));
@ -498,25 +650,36 @@ public final class SubCommand implements CommandExecutor {
break;
case "host/creator":
if (sender.hasPermission("subservers.host.create.*") || sender.hasPermission("subservers.host.create." + args[2].toLowerCase())) plugin.gui.getRenderer((Player) sender).hostCreator(new UIRenderer.CreatorOptions(args[2]));
else throw new IllegalStateException("Player does not meet the requirements to render this page");
break;
case "host/plugins":
case "host/plugin":
if (args.length > 3) plugin.gui.getRenderer((Player) sender).hostPlugin(Integer.parseInt(args[3]), args[2]);
else plugin.gui.getRenderer((Player) sender).hostPlugin(1, args[2]);
break;
case "subserver":
if (args.length > 3) plugin.gui.getRenderer((Player) sender).subserverMenu(Integer.parseInt(args[2]), args[3]);
else if (args.length > 2) plugin.gui.getRenderer((Player) sender).subserverMenu(Integer.parseInt(args[2]), null);
else plugin.gui.getRenderer((Player) sender).subserverMenu(1, null);
case "group":
if (args.length > 2) plugin.gui.getRenderer((Player) sender).groupMenu(Integer.parseInt(args[2]));
else plugin.gui.getRenderer((Player) sender).groupMenu(1);
break;
case "server":
if (args.length > 4) plugin.gui.getRenderer((Player) sender).serverMenu(Integer.parseInt(args[2]), args[4], null);
else if (args.length > 3) plugin.gui.getRenderer((Player) sender).serverMenu(Integer.parseInt(args[2]), null, args[3]);
else if (args.length > 2) plugin.gui.getRenderer((Player) sender).serverMenu(Integer.parseInt(args[2]), null, null);
else plugin.gui.getRenderer((Player) sender).serverMenu(1, null, null);
break;
case "subserver/":
plugin.gui.getRenderer((Player) sender).subserverAdmin(args[2]);
break;
case "subserver/plugins":
case "subserver/plugin":
if (args.length > 3) plugin.gui.getRenderer((Player) sender).subserverPlugin(Integer.parseInt(args[3]), args[2]);
else plugin.gui.getRenderer((Player) sender).subserverPlugin(1, args[2]);
break;
}
} catch (Throwable e) {}
} catch (Throwable e) {
List<String> list = new LinkedList<String>();
list.addAll(Arrays.asList(args));
list.remove(0);
new InvocationTargetException(e, "Could not render page with arguments: " + list.toString()).printStackTrace();
}
} else {
sender.sendMessage(plugin.lang.getSection("Lang").getColoredString("Command.Generic.Invalid-Permission", '&').replace("$str$", "subservers.interface"));
}

View File

@ -27,7 +27,7 @@ public final class SubPlugin extends JavaPlugin {
public UIHandler gui = null;
public final Version version;
public final Version bversion = null;
public final Version bversion = new Version(1);
public final SubAPI api = new SubAPI(this);
public SubPlugin() {

View File

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

View File

@ -53,8 +53,8 @@ public final class ExHost {
public YAMLSection lang = null;
public SubDataClient subdata = null;
public final Version version = new Version("2.12.1c");
public final Version bversion = null;
public final Version version = new Version("2.12.1d");
public final Version bversion = new Version(1);
public final SubAPI api = new SubAPI(this);
private boolean running;

View File

@ -172,8 +172,10 @@ public class YAMLSection {
* @param value Value
*/
public void set(String handle, Object value) {
if (Util.isNull(handle, value)) throw new NullPointerException();
if (value instanceof Collection) {
if (Util.isNull(handle)) throw new NullPointerException();
if (value == null) {
remove(handle);
} else if (value instanceof Collection) {
set(handle, (Collection<?>) value);
} else {
map.put(handle, convert(value));

View File

@ -83,10 +83,38 @@ public class SubCommand {
@Override
public void command(String handle, String[] args) {
host.subdata.sendPacket(new PacketDownloadServerList(null, json -> {
host.log.message.println("Host/SubServer List:");
ExHost h = host;
String div = TextColor.RESET + ", ";
int i = 0;
boolean sent = false;
String div = TextColor.RESET + ", ";
host.log.message.println("Group/Server List:");
for (String group : json.getJSONObject("groups").keySet()) {
String message = "";
message += TextColor.GOLD + group + TextColor.RESET + ": ";
for (String server : json.getJSONObject("groups").getJSONObject(group).keySet()) {
if (i != 0) message += div;
if (!json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).keySet().contains("enabled")) {
message += TextColor.WHITE;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("temp")) {
message += TextColor.AQUA;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("running")) {
message += TextColor.GREEN;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("enabled") && json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONArray("incompatible").length() == 0) {
message += TextColor.YELLOW;
} else {
message += TextColor.RED;
}
message += json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display") + " (" + json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address") + ((server.equals(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display")))?"":TextColor.stripColor(div)+server) + ")";
i++;
}
if (i == 0) message += TextColor.RESET + "(none)";
host.log.message.println(message);
i = 0;
sent = true;
}
if (!sent) host.log.message.println(TextColor.RESET + "(none)");
sent = false;
ExHost h = host;
host.log.message.println("Host/SubServer List:");
for (String host : json.getJSONObject("hosts").keySet()) {
String message = "";
if (json.getJSONObject("hosts").getJSONObject(host).getBoolean("enabled")) {
@ -109,9 +137,12 @@ public class SubCommand {
message += json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("display") + " (" + json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":").length - 1] + ((subserver.equals(json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("display")))?"":TextColor.stripColor(div)+subserver) + ")";
i++;
}
if (i == 0) message += TextColor.RESET + "(none)";
h.log.message.println(message);
i = 0;
sent = true;
}
if (!sent) host.log.message.println(TextColor.RESET + "(none)");
host.log.message.println("Server List:");
String message = "";
for (String server : json.getJSONObject("servers").keySet()) {
@ -119,6 +150,7 @@ public class SubCommand {
message += TextColor.WHITE + json.getJSONObject("servers").getJSONObject(server).getString("display") + " (" + json.getJSONObject("servers").getJSONObject(server).getString("address") + ((server.equals(json.getJSONObject("servers").getJSONObject(server).getString("display")))?"":TextColor.stripColor(div)+server) + ")";
i++;
}
if (i == 0) message += TextColor.RESET + "(none)";
host.log.message.println(message);
}));
}
@ -143,6 +175,12 @@ public class SubCommand {
if (!json.getJSONObject("server").getString("name").equals(json.getJSONObject("server").getString("display"))) host.log.message.println(" - Real Name: " + json.getJSONObject("server").getString("name"));
host.log.message.println(" - Host: " + json.getJSONObject("server").getString("host"));
host.log.message.println(" - Enabled: " + ((json.getJSONObject("server").getBoolean("enabled"))?"yes":"no"));
host.log.message.println(" - Group: " + ((json.getJSONObject("server").getString("group").length() > 0)?json.getJSONObject("server").getString("group"):"(none)"));
if (json.getJSONObject("server").getJSONArray("group").length() > 0) {
host.log.message.println(" - Group:");
for (int i = 0; i < json.getJSONObject("server").getJSONArray("group").length(); i++)
host.log.message.println(" - " + json.getJSONObject("server").getJSONArray("group").getString(i));
}
if (json.getJSONObject("server").getBoolean("temp")) host.log.message.println(" - Temporary: yes");
host.log.message.println(" - Running: " + ((json.getJSONObject("server").getBoolean("running"))?"yes":"no"));
host.log.message.println(" - Logging: " + ((json.getJSONObject("server").getBoolean("log"))?"yes":"no"));

View File

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

View File

@ -172,8 +172,10 @@ public class YAMLSection {
* @param value Value
*/
public void set(String handle, Object value) {
if (Util.isNull(handle, value)) throw new NullPointerException();
if (value instanceof Collection) {
if (Util.isNull(handle)) throw new NullPointerException();
if (value == null) {
remove(handle);
} else if (value instanceof Collection) {
set(handle, (Collection<?>) value);
} else {
map.put(handle, convert(value));

View File

@ -80,9 +80,37 @@ public final class SubCommand extends Command {
}
} else if (args[0].equalsIgnoreCase("list")) {
plugin.subdata.sendPacket(new PacketDownloadServerList(null, json -> {
sender.sendMessage("SubServers > Host/SubServer List:");
String div = ChatColor.RESET + ", ";
int i = 0;
boolean sent = false;
String div = ChatColor.RESET + ", ";
sender.sendMessage("SubServers > Group/Server List:");
for (String group : json.getJSONObject("groups").keySet()) {
String message = "";
message += ChatColor.GOLD + group + ChatColor.RESET + ": ";
for (String server : json.getJSONObject("groups").getJSONObject(group).keySet()) {
if (i != 0) message += div;
if (!json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).keySet().contains("enabled")) {
message += ChatColor.WHITE;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("temp")) {
message += ChatColor.AQUA;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("running")) {
message += ChatColor.GREEN;
} else if (json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getBoolean("enabled") && json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getJSONArray("incompatible").length() == 0) {
message += ChatColor.YELLOW;
} else {
message += ChatColor.RED;
}
message += json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display") + " (" + json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("address") + ((server.equals(json.getJSONObject("groups").getJSONObject(group).getJSONObject(server).getString("display")))?"":ChatColor.stripColor(div)+server) + ")";
i++;
}
if (i == 0) message += ChatColor.RESET + "(none)";
sender.sendMessage(message);
i = 0;
sent = true;
}
if (!sent) sender.sendMessage(ChatColor.RESET + "(none)");
sent = false;
sender.sendMessage("SubServers > Host/SubServer List:");
for (String host : json.getJSONObject("hosts").keySet()) {
String message = "";
if (json.getJSONObject("hosts").getJSONObject(host).getBoolean("enabled")) {
@ -105,9 +133,12 @@ public final class SubCommand extends Command {
message += json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("display") + " (" + json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":")[json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("address").split(":").length - 1] + ((subserver.equals(json.getJSONObject("hosts").getJSONObject(host).getJSONObject("servers").getJSONObject(subserver).getString("display"))) ? "" : ChatColor.stripColor(div) + subserver) + ")";
i++;
}
if (i == 0) message += ChatColor.RESET + "(none)";
sender.sendMessage(message);
i = 0;
sent = true;
}
if (!sent) sender.sendMessage(ChatColor.RESET + "(none)");
sender.sendMessage("SubServers > Server List:");
String message = "";
for (String server : json.getJSONObject("servers").keySet()) {
@ -115,6 +146,7 @@ public final class SubCommand extends Command {
message += ChatColor.WHITE + json.getJSONObject("servers").getJSONObject(server).getString("display") + " (" + json.getJSONObject("servers").getJSONObject(server).getString("address") + ((server.equals(json.getJSONObject("servers").getJSONObject(server).getString("display"))) ? "" : ChatColor.stripColor(div) + server) + ")";
i++;
}
if (i == 0) message += ChatColor.RESET + "(none)";
sender.sendMessage(message);
}));
} else if (args[0].equalsIgnoreCase("info") || args[0].equalsIgnoreCase("status")) {
@ -129,6 +161,11 @@ public final class SubCommand extends Command {
if (!json.getJSONObject("server").getString("name").equals(json.getJSONObject("server").getString("display"))) sender.sendMessage(" - Real Name: " + json.getJSONObject("server").getString("name"));
sender.sendMessage(" - Host: " + json.getJSONObject("server").getString("host"));
sender.sendMessage(" - Enabled: " + ((json.getJSONObject("server").getBoolean("enabled"))?"yes":"no"));
if (json.getJSONObject("server").getJSONArray("group").length() > 0) {
sender.sendMessage(" - Group:");
for (int i = 0; i < json.getJSONObject("server").getJSONArray("group").length(); i++)
sender.sendMessage(" - " + json.getJSONObject("server").getJSONArray("group").getString(i));
}
if (json.getJSONObject("server").getBoolean("temp")) sender.sendMessage(" - Temporary: yes");
sender.sendMessage(" - Running: " + ((json.getJSONObject("server").getBoolean("running"))?"yes":"no"));
sender.sendMessage(" - Logging: " + ((json.getJSONObject("server").getBoolean("log"))?"yes":"no"));