Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.squallz.wispclasses.events;
- import com.squallz.nations.NationsMain;
- import com.squallz.nations.objects.NPlayer;
- import com.squallz.nations.objects.Nation;
- import com.squallz.wispclasses.ClassesMain;
- import com.squallz.wispclasses.objects.CPlayer;
- import org.bukkit.entity.Player;
- import org.bukkit.event.Event;
- import org.bukkit.event.HandlerList;
- public abstract class AbilityEvent extends Event {
- private HandlerList HANDLERS_LIST = new HandlerList();
- private Player player;
- private Nation nation;
- private NPlayer nPlayer;
- private CPlayer cPlayer;
- public HandlerList getHandlers() {
- return HANDLERS_LIST;
- }
- public AbilityEvent(Player player) {
- this.player = player;
- NPlayer playerNPlayer = NationsMain.getInstance().nPlayerManager.getNPlayerByUUID(player.getUniqueId());
- CPlayer playerCPlayer = ClassesMain.getInstance().cPlayerManager.getCPlayerByUUID(player.getUniqueId());
- this.cPlayer = playerCPlayer;
- this.nPlayer = playerNPlayer;
- if(playerNPlayer.hasNation()) {
- this.nation = playerNPlayer.getNation();
- } else {
- this.nation = null;
- }
- }
- public Player getPlayer() {
- return player;
- }
- public Nation getNation() {
- return nation;
- }
- public CPlayer getCplayer() {
- return cPlayer;
- }
- public NPlayer getNPlayer() {
- return nPlayer;
- }
- public class PlayerUseRushEvent extends AbilityEvent {
- public PlayerUseRushEvent(Player player) {
- super(player);
- }
- }
- public class PlayerUsePullEvent extends AbilityEvent {
- public PlayerUsePullEvent(Player player) {
- super(player);
- }
- }
- public class PlayerUseMoraleBoostEvent extends AbilityEvent {
- public PlayerUseMoraleBoostEvent(Player player) {
- super(player);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement