mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-09-27 13:02:35 +02:00
3e074e365d
The changes this time are to some of GalaxiEngine's core utilities... which means it took a lot of work this time.
62 lines
1.3 KiB
Java
62 lines
1.3 KiB
Java
package net.ME1312.SubServers.Bungee.Event;
|
|
|
|
import net.ME1312.Galaxi.Library.Util;
|
|
import net.ME1312.SubServers.Bungee.Host.Host;
|
|
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;
|
|
|
|
/**
|
|
* Host Add Event
|
|
*/
|
|
public class SubAddHostEvent extends Event implements SubEvent, Cancellable {
|
|
private boolean cancelled = false;
|
|
private UUID player;
|
|
private Host host;
|
|
|
|
/**
|
|
* Host Add Event
|
|
*
|
|
* @param player Player Adding Server
|
|
* @param host Host Being Added
|
|
*/
|
|
public SubAddHostEvent(UUID player, Host host) {
|
|
Util.nullpo(host);
|
|
this.player = player;
|
|
this.host = host;
|
|
}
|
|
|
|
/**
|
|
* Gets the Host to be Added
|
|
*
|
|
* @return The Host to be Added
|
|
*/
|
|
public Host getHost() { return host; }
|
|
|
|
/**
|
|
* Gets the player that triggered the Event
|
|
*
|
|
* @return The Player that triggered this Event or null if Console
|
|
*/
|
|
public UUID getPlayer() { return player; }
|
|
|
|
/**
|
|
* Gets the Cancelled Status
|
|
*
|
|
* @return Cancelled Status
|
|
*/
|
|
public boolean isCancelled() {
|
|
return cancelled;
|
|
}
|
|
|
|
/**
|
|
* Sets the Cancelled Status
|
|
*/
|
|
public void setCancelled(boolean value) {
|
|
cancelled = value;
|
|
}
|
|
}
|