Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Proxies connected to Redis are downloaded on startup/reload - Named proxies are no longer removed on disconnect - Proxies now show up in `/sub list` - Proxies now have Add/Remove events in the API - Proxies are included in the response of the `DownloadServerList` packet
- Loading branch information
Showing
44 changed files
with
988 additions
and
295 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Event/SubAddProxyEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.ME1312.SubServers.Bungee.Event; | ||
|
||
import net.ME1312.SubServers.Bungee.Host.Proxy; | ||
import net.ME1312.SubServers.Bungee.Library.SubEvent; | ||
import net.ME1312.SubServers.Bungee.Library.Util; | ||
import net.md_5.bungee.api.plugin.Event; | ||
|
||
/** | ||
* Proxy Add Event | ||
*/ | ||
public class SubAddProxyEvent extends Event implements SubEvent { | ||
private Proxy proxy; | ||
|
||
/** | ||
* Proxy Add Event | ||
* | ||
* @param proxy Host Being Added | ||
*/ | ||
public SubAddProxyEvent(Proxy proxy) { | ||
if (Util.isNull(proxy)) throw new NullPointerException(); | ||
this.proxy = proxy; | ||
} | ||
|
||
/** | ||
* Gets the Proxy to be Added | ||
* | ||
* @return The Proxy to be Added | ||
*/ | ||
public Proxy getProxy() { return proxy; } | ||
} |
61 changes: 61 additions & 0 deletions
61
SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Event/SubNetworkConnectEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package net.ME1312.SubServers.Bungee.Event; | ||
|
||
import net.ME1312.SubServers.Bungee.Library.SubEvent; | ||
import net.ME1312.SubServers.Bungee.Library.Util; | ||
import net.ME1312.SubServers.Bungee.Network.SubDataServer; | ||
import net.md_5.bungee.api.plugin.Cancellable; | ||
import net.md_5.bungee.api.plugin.Event; | ||
|
||
import java.net.InetAddress; | ||
|
||
/** | ||
* SubData Network Connect Event | ||
*/ | ||
public class SubNetworkConnectEvent extends Event implements SubEvent, Cancellable { | ||
private boolean cancelled = false; | ||
private SubDataServer network; | ||
private InetAddress address; | ||
|
||
/** | ||
* SubData Network Connect Event | ||
*/ | ||
public SubNetworkConnectEvent(SubDataServer network, InetAddress address) { | ||
if (Util.isNull(network, address)) throw new NullPointerException(); | ||
this.network = network; | ||
this.address = address; | ||
} | ||
|
||
/** | ||
* Get the network the client is trying to connect to | ||
* | ||
* @return SubData Network | ||
*/ | ||
public SubDataServer getNetwork() { | ||
return network; | ||
} | ||
|
||
/** | ||
* Get the address of the connecting client | ||
* | ||
* @return Client address | ||
*/ | ||
public InetAddress getAddress() { | ||
return address; | ||
} | ||
|
||
/** | ||
* Gets the Cancelled Status | ||
* | ||
* @return Cancelled Status | ||
*/ | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
/** | ||
* Sets the Cancelled Status | ||
*/ | ||
public void setCancelled(boolean value) { | ||
cancelled = value; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Event/SubNetworkDisconnectEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package net.ME1312.SubServers.Bungee.Event; | ||
|
||
import net.ME1312.SubServers.Bungee.Library.SubEvent; | ||
import net.ME1312.SubServers.Bungee.Library.Util; | ||
import net.ME1312.SubServers.Bungee.Network.Client; | ||
import net.ME1312.SubServers.Bungee.Network.SubDataServer; | ||
import net.md_5.bungee.api.plugin.Event; | ||
|
||
/** | ||
* SubData Network Disconnect Event | ||
*/ | ||
public class SubNetworkDisconnectEvent extends Event implements SubEvent { | ||
private SubDataServer network; | ||
private Client client; | ||
|
||
/** | ||
* SubData Network Disconnect Event | ||
*/ | ||
public SubNetworkDisconnectEvent(SubDataServer network, Client client) { | ||
if (Util.isNull(network, client)) throw new NullPointerException(); | ||
this.network = network; | ||
this.client = client; | ||
} | ||
|
||
/** | ||
* Get the network the client is disconnecting from | ||
* | ||
* @return SubData Network | ||
*/ | ||
public SubDataServer getNetwork() { | ||
return network; | ||
} | ||
|
||
/** | ||
* Get the disconnecting client | ||
* | ||
* @return Client | ||
*/ | ||
public Client getClient() { | ||
return client; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Event/SubRemoveProxyEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.ME1312.SubServers.Bungee.Event; | ||
|
||
import net.ME1312.SubServers.Bungee.Host.Proxy; | ||
import net.ME1312.SubServers.Bungee.Library.SubEvent; | ||
import net.ME1312.SubServers.Bungee.Library.Util; | ||
import net.md_5.bungee.api.plugin.Event; | ||
|
||
/** | ||
* Proxy Remove Event | ||
*/ | ||
public class SubRemoveProxyEvent extends Event implements SubEvent { | ||
private Proxy proxy; | ||
|
||
/** | ||
* Proxy Remove Event | ||
* | ||
* @param proxy Host Being Added | ||
*/ | ||
public SubRemoveProxyEvent(Proxy proxy) { | ||
if (Util.isNull(proxy)) throw new NullPointerException(); | ||
this.proxy = proxy; | ||
} | ||
|
||
/** | ||
* Gets the Proxy to be Removed | ||
* | ||
* @return The Proxy to be Removed | ||
*/ | ||
public Proxy getProxy() { return proxy; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.