Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
253 additions
and
14 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Event/SubStartedEvent.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,34 @@ | ||
package net.ME1312.SubServers.Bungee.Event; | ||
|
||
import net.ME1312.Galaxi.Library.Util; | ||
import net.ME1312.SubServers.Bungee.Host.SubServer; | ||
import net.ME1312.SubServers.Bungee.Library.SubEvent; | ||
import net.md_5.bungee.api.plugin.Cancellable; | ||
import net.md_5.bungee.api.plugin.Event; | ||
|
||
import java.util.UUID; | ||
|
||
/** | ||
* Server Started Event | ||
*/ | ||
public class SubStartedEvent extends Event implements SubEvent { | ||
private SubServer server; | ||
|
||
/** | ||
* Server Started Event<br> | ||
* <b>This event can only be called when a SubData connection is made!</b> | ||
* | ||
* @param server Server Starting | ||
*/ | ||
public SubStartedEvent(SubServer server) { | ||
if (Util.isNull(server)) throw new NullPointerException(); | ||
this.server = server; | ||
} | ||
|
||
/** | ||
* Gets the Server Effected | ||
* | ||
* @return The Server Effected | ||
*/ | ||
public SubServer getServer() { return server; } | ||
} |
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
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
40 changes: 40 additions & 0 deletions
40
SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Event/SubStartedEvent.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,40 @@ | ||
package net.ME1312.SubServers.Client.Bukkit.Event; | ||
|
||
import net.ME1312.Galaxi.Library.Util; | ||
import net.ME1312.SubServers.Client.Bukkit.Library.SubEvent; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
/** | ||
* Server Started Event | ||
*/ | ||
public class SubStartedEvent extends Event implements SubEvent { | ||
private String server; | ||
|
||
/** | ||
* Server Started Event<br> | ||
* <b>This event can only be called when a SubData connection is made!</b> | ||
* | ||
* @param server Server that Started | ||
*/ | ||
public SubStartedEvent(String server) { | ||
if (Util.isNull(server)) throw new NullPointerException(); | ||
this.server = server; | ||
} | ||
|
||
/** | ||
* Gets the Server Effected | ||
* | ||
* @return The Server Effected | ||
*/ | ||
public String getServer() { return server; } | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
private static HandlerList handlers = new HandlerList(); | ||
} |
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
43 changes: 43 additions & 0 deletions
43
SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/Event/SubStartedEvent.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.Client.Sponge.Event; | ||
|
||
import net.ME1312.Galaxi.Library.Util; | ||
import net.ME1312.SubServers.Client.Sponge.Library.SubEvent; | ||
import org.spongepowered.api.event.cause.Cause; | ||
import org.spongepowered.api.event.impl.AbstractEvent; | ||
|
||
/** | ||
* Server Started Event | ||
*/ | ||
public class SubStartedEvent extends AbstractEvent implements SubEvent { | ||
private String server; | ||
|
||
/** | ||
* Server Started Event<br> | ||
* <b>This event can only be called when a SubData connection is made!</b> | ||
* | ||
* @param server Server that Started | ||
*/ | ||
public SubStartedEvent(String server) { | ||
if (Util.isNull(server)) throw new NullPointerException(); | ||
this.server = server; | ||
} | ||
|
||
/** | ||
* Gets the Server Effected | ||
* | ||
* @return The Server Effected | ||
*/ | ||
public String getServer() { return server; } | ||
|
||
/** | ||
* Gets the cause of this Event | ||
* | ||
* @deprecated Use simplified methods where available | ||
* @return An empty cause list | ||
*/ | ||
@Override | ||
@Deprecated | ||
public Cause getCause() { | ||
return Cause.builder().build(getContext()); | ||
} | ||
} |
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
31 changes: 31 additions & 0 deletions
31
SubServers.Host/src/net/ME1312/SubServers/Host/Event/SubStartedEvent.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,31 @@ | ||
package net.ME1312.SubServers.Host.Event; | ||
|
||
import net.ME1312.Galaxi.Library.Event.Event; | ||
import net.ME1312.Galaxi.Library.Util; | ||
|
||
/** | ||
* Server Started Event | ||
*/ | ||
public class SubStartedEvent extends Event { | ||
private String server; | ||
|
||
/** | ||
* Server Started Event<br> | ||
* <b>This event can only be called when a SubData connection is made!</b> | ||
* | ||
* @param server Server that Started | ||
*/ | ||
public SubStartedEvent(String server) { | ||
if (Util.isNull(server)) throw new NullPointerException(); | ||
this.server = server; | ||
} | ||
|
||
/** | ||
* Gets the Server Effected | ||
* | ||
* @return The Server Effected | ||
*/ | ||
public String getServer() { | ||
return server; | ||
} | ||
} |
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.