Created
October 3, 2016 22:53
-
-
Save brcdev/a17b93c60c226765b774d674191c6185 to your computer and use it in GitHub Desktop.
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
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