Skip to content

Instantly share code, notes, and snippets.

@brcdev
Created October 3, 2016 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brcdev/a17b93c60c226765b774d674191c6185 to your computer and use it in GitHub Desktop.
Save brcdev/a17b93c60c226765b774d674191c6185 to your computer and use it in GitHub Desktop.
package net.brcdev.gangs.event;
import net.brcdev.gangs.gang.Gang;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Called when a gang levels up
*/
public class GangLevelUpEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private Gang gang;
private int previousLevel, currentLevel;
private boolean cancelled;
public GangLevelUpEvent(Gang gang, int previousLevel, int currentLevel) {
this.gang = gang;
this.previousLevel = previousLevel;
this.currentLevel = currentLevel;
}
/**
* Returns the gang which was levelled up
*
* @return Gang Gang which was levelled up
*/
public Gang getGang() {
return gang;
}
/**
* Returns the level gang levelled up from
*
* @return int Level gang was levelled up from
*/
public int getPreviousLevel() {
return previousLevel;
}
/**
* Returns the level gang levelled up to
*
* @return int Level gang was levelled up to
*/
public int getCurrentLevel() {
return currentLevel;
}
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment