2012-03-02 02:16:45 +01:00
|
|
|
package com.massivecraft.factions.event;
|
|
|
|
|
2013-04-12 09:47:43 +02:00
|
|
|
import org.bukkit.command.CommandSender;
|
2012-03-02 02:16:45 +01:00
|
|
|
import org.bukkit.event.Cancellable;
|
|
|
|
import org.bukkit.event.Event;
|
|
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
|
|
|
|
public class FactionCreateEvent extends Event implements Cancellable
|
|
|
|
{
|
2013-04-10 09:34:14 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// REQUIRED EVENT CODE
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2012-03-02 02:16:45 +01:00
|
|
|
private static final HandlerList handlers = new HandlerList();
|
2013-04-10 09:34:14 +02:00
|
|
|
@Override public HandlerList getHandlers() { return handlers; }
|
|
|
|
public static HandlerList getHandlerList() { return handlers; }
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// FIELDS
|
|
|
|
// -------------------------------------------- //
|
2012-03-02 02:16:45 +01:00
|
|
|
|
2013-04-12 09:47:43 +02:00
|
|
|
private boolean cancelled = false;
|
2013-04-10 09:34:14 +02:00
|
|
|
@Override public boolean isCancelled() { return this.cancelled; }
|
|
|
|
@Override public void setCancelled(boolean cancelled) { this.cancelled = cancelled; }
|
|
|
|
|
2013-04-12 09:47:43 +02:00
|
|
|
private final CommandSender sender;
|
|
|
|
public CommandSender getSender() { return this.sender; }
|
|
|
|
|
|
|
|
// TODO: How do we know what universe? Should we perhaps actually create the faction?
|
2013-04-10 09:34:14 +02:00
|
|
|
|
2012-03-02 02:16:45 +01:00
|
|
|
private String factionTag;
|
2013-04-10 09:34:14 +02:00
|
|
|
public String getFactionTag() { return this.factionTag; }
|
|
|
|
|
2013-04-12 09:47:43 +02:00
|
|
|
private String factionId;
|
|
|
|
public String getFactionId() { return this.factionId; }
|
2013-04-10 09:34:14 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2013-04-12 09:47:43 +02:00
|
|
|
public FactionCreateEvent(CommandSender sender, String factionTag, String factionId)
|
2012-03-13 14:27:03 +01:00
|
|
|
{
|
2013-04-10 09:34:14 +02:00
|
|
|
this.sender = sender;
|
2013-04-12 09:47:43 +02:00
|
|
|
this.factionTag = factionTag;
|
|
|
|
this.factionId = factionId;
|
2012-03-13 14:27:03 +01:00
|
|
|
}
|
2012-03-02 02:16:45 +01:00
|
|
|
|
|
|
|
}
|