Improve and document event system. Deprecate duplicate methods.
This commit is contained in:
@@ -8,51 +8,34 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class LandUnclaimEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||
|
||||
private boolean cancelled;
|
||||
private FLocation location;
|
||||
private Faction faction;
|
||||
private FPlayer fplayer;
|
||||
|
||||
public LandUnclaimEvent(FLocation loc, Faction f, FPlayer p) {
|
||||
super(f, p);
|
||||
cancelled = false;
|
||||
location = loc;
|
||||
faction = f;
|
||||
fplayer = p;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public FLocation getLocation() {
|
||||
return this.location;
|
||||
}
|
||||
|
||||
public Faction getFaction() {
|
||||
return faction;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public String getFactionId() {
|
||||
return faction.getId();
|
||||
return getFaction().getId();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public String getFactionTag() {
|
||||
return faction.getTag();
|
||||
}
|
||||
|
||||
public FPlayer getFPlayer() {
|
||||
return fplayer;
|
||||
return getFaction().getTag();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Player getPlayer() {
|
||||
return fplayer.getPlayer();
|
||||
return getfPlayer().getPlayer();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user