Fixes POM, and moves things around
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.massivecore.event.EventMassiveCore;
|
||||
|
||||
public abstract class EventFactionsAbstract extends EventMassiveCore {
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsAbstract() {
|
||||
|
||||
}
|
||||
|
||||
public EventFactionsAbstract(boolean isAsync) {
|
||||
super(isAsync);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.massivecore.event.EventMassiveCore;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
public abstract class EventFactionsAbstractSender extends EventMassiveCore {
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final CommandSender sender;
|
||||
|
||||
public CommandSender getSender() {
|
||||
return this.sender;
|
||||
}
|
||||
|
||||
public MPlayer getMPlayer() {
|
||||
return this.sender == null ? null : MPlayer.get(this.sender);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsAbstractSender(CommandSender sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public EventFactionsAbstractSender(boolean async, CommandSender sender) {
|
||||
super(async);
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.massivecore.Colorized;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public enum EventFactionsChunkChangeType implements Colorized {
|
||||
// -------------------------------------------- //
|
||||
// ENUM
|
||||
// -------------------------------------------- //
|
||||
|
||||
NONE("none", "none", ChatColor.WHITE),
|
||||
BUY("buy", "bought", ChatColor.GREEN),
|
||||
SELL("sell", "sold", ChatColor.GREEN),
|
||||
CONQUER("conquer", "conquered", ChatColor.DARK_GREEN),
|
||||
PILLAGE("pillage", "pillaged", ChatColor.RED),
|
||||
|
||||
// END OF LIST
|
||||
;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
public final String now;
|
||||
public final String past;
|
||||
|
||||
public final ChatColor color;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
EventFactionsChunkChangeType(String now, String past, ChatColor color) {
|
||||
this.now = now;
|
||||
this.past = past;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public ChatColor getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// UTIL
|
||||
// -------------------------------------------- //
|
||||
|
||||
public static EventFactionsChunkChangeType get(Faction oldFaction, Faction newFaction, Faction self) {
|
||||
if (newFaction == oldFaction) {
|
||||
return NONE;
|
||||
}
|
||||
if (oldFaction.isNone()) {
|
||||
return BUY;
|
||||
}
|
||||
if (newFaction.isNormal()) {
|
||||
return CONQUER;
|
||||
}
|
||||
if (oldFaction == self) {
|
||||
return SELL;
|
||||
}
|
||||
return PILLAGE;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.BoardColl;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.massivecore.collections.MassiveMap;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
import com.massivecraft.massivecore.util.MUtil;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
public class EventFactionsChunksChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Set<PS> chunks;
|
||||
|
||||
public Set<PS> getChunks() {
|
||||
return this.chunks;
|
||||
}
|
||||
|
||||
private final Faction newFaction;
|
||||
|
||||
public Faction getNewFaction() {
|
||||
return this.newFaction;
|
||||
}
|
||||
|
||||
private final Map<PS, Faction> oldChunkFaction;
|
||||
|
||||
public Map<PS, Faction> getOldChunkFaction() {
|
||||
return this.oldChunkFaction;
|
||||
}
|
||||
|
||||
private final Map<Faction, Set<PS>> oldFactionChunks;
|
||||
|
||||
public Map<Faction, Set<PS>> getOldFactionChunks() {
|
||||
return this.oldFactionChunks;
|
||||
}
|
||||
|
||||
private final Map<PS, EventFactionsChunkChangeType> chunkType;
|
||||
|
||||
public Map<PS, EventFactionsChunkChangeType> getChunkType() {
|
||||
return this.chunkType;
|
||||
}
|
||||
|
||||
private final Map<EventFactionsChunkChangeType, Set<PS>> typeChunks;
|
||||
|
||||
public Map<EventFactionsChunkChangeType, Set<PS>> getTypeChunks() {
|
||||
return this.typeChunks;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsChunksChange(CommandSender sender, Set<PS> chunks, Faction newFaction) {
|
||||
super(sender);
|
||||
chunks = PS.getDistinctChunks(chunks);
|
||||
this.chunks = Collections.unmodifiableSet(chunks);
|
||||
this.newFaction = newFaction;
|
||||
this.oldChunkFaction = Collections.unmodifiableMap(BoardColl.getChunkFaction(chunks));
|
||||
this.oldFactionChunks = Collections.unmodifiableMap(MUtil.reverseIndex(this.oldChunkFaction));
|
||||
|
||||
MPlayer msender = this.getMPlayer();
|
||||
Faction self = null;
|
||||
if (msender != null) {
|
||||
self = msender.getFaction();
|
||||
}
|
||||
Map<PS, EventFactionsChunkChangeType> currentChunkType = new MassiveMap<>();
|
||||
for (Entry<PS, Faction> entry : this.oldChunkFaction.entrySet()) {
|
||||
PS chunk = entry.getKey();
|
||||
Faction from = entry.getValue();
|
||||
currentChunkType.put(chunk, EventFactionsChunkChangeType.get(from, newFaction, self));
|
||||
}
|
||||
|
||||
this.chunkType = Collections.unmodifiableMap(currentChunkType);
|
||||
this.typeChunks = Collections.unmodifiableMap(MUtil.reverseIndex(this.chunkType));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsCreate extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final String factionId;
|
||||
|
||||
public final String getFactionId() {
|
||||
return this.factionId;
|
||||
}
|
||||
|
||||
private final String factionName;
|
||||
|
||||
public final String getFactionName() {
|
||||
return this.factionName;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsCreate(CommandSender sender, String factionId, String factionName) {
|
||||
super(sender);
|
||||
this.factionId = factionId;
|
||||
this.factionName = factionName;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* External plugins that add Faction flags should make sure they exist when this event is called.
|
||||
*/
|
||||
public class EventFactionsCreateFlags extends EventFactionsAbstract {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsCreateFlags() {
|
||||
|
||||
}
|
||||
|
||||
public EventFactionsCreateFlags(boolean isAsync) {
|
||||
super(isAsync);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* External plugins that add Faction perms should make sure they exist when this event is called.
|
||||
*/
|
||||
public class EventFactionsCreatePerms extends EventFactionsAbstract {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsDescriptionChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private String newDescription;
|
||||
|
||||
public String getNewDescription() {
|
||||
return this.newDescription;
|
||||
}
|
||||
|
||||
public void setNewDescription(String newDescription) {
|
||||
this.newDescription = newDescription;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsDescriptionChange(CommandSender sender, Faction faction, String newDescription) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.newDescription = newDescription;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsDisband extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private final String factionId;
|
||||
|
||||
public String getFactionId() {
|
||||
return this.factionId;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsDisband(CommandSender sender, Faction faction) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.factionId = faction.getId();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.massivecore.collections.MassiveTreeMap;
|
||||
import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class EventFactionsExpansions extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final MassiveTreeMap<String, Boolean, ComparatorCaseInsensitive> expansions = new MassiveTreeMap<>(ComparatorCaseInsensitive.get());
|
||||
|
||||
public Map<String, Boolean> getExpansions() {
|
||||
return this.expansions;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsExpansions(CommandSender sender) {
|
||||
super(sender);
|
||||
this.getExpansions().put("FactionsTax", false);
|
||||
this.getExpansions().put("FactionsDynmap", false);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.massivecore.PriorityLines;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class EventFactionsFactionShowAsync extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private final Map<String, PriorityLines> idPriorityLiness;
|
||||
|
||||
public Map<String, PriorityLines> getIdPriorityLiness() {
|
||||
return this.idPriorityLiness;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsFactionShowAsync(CommandSender sender, Faction faction) {
|
||||
super(true, sender);
|
||||
this.faction = faction;
|
||||
this.idPriorityLiness = new HashMap<>();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MFlag;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsFlagChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private final MFlag flag;
|
||||
|
||||
public MFlag getFlag() {
|
||||
return this.flag;
|
||||
}
|
||||
|
||||
private boolean newValue;
|
||||
|
||||
public boolean isNewValue() {
|
||||
return this.newValue;
|
||||
}
|
||||
|
||||
public void setNewValue(boolean newValue) {
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsFlagChange(CommandSender sender, Faction faction, MFlag flag, boolean newValue) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.flag = flag;
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsInvitedChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final MPlayer mplayer;
|
||||
|
||||
public MPlayer getMPlayer() {
|
||||
return this.mplayer;
|
||||
}
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private boolean newInvited;
|
||||
|
||||
public boolean isNewInvited() {
|
||||
return this.newInvited;
|
||||
}
|
||||
|
||||
public void setNewInvited(boolean newInvited) {
|
||||
this.newInvited = newInvited;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsInvitedChange(CommandSender sender, MPlayer mplayer, Faction faction, boolean newInvited) {
|
||||
super(sender);
|
||||
this.mplayer = mplayer;
|
||||
this.faction = faction;
|
||||
this.newInvited = newInvited;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsMembershipChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancelled) {
|
||||
if (!this.reason.isCancellable()) {
|
||||
cancelled = false;
|
||||
}
|
||||
super.setCancelled(cancelled);
|
||||
}
|
||||
|
||||
private final MPlayer mplayer;
|
||||
|
||||
public MPlayer getMPlayer() {
|
||||
return this.mplayer;
|
||||
}
|
||||
|
||||
private final Faction newFaction;
|
||||
|
||||
public Faction getNewFaction() {
|
||||
return this.newFaction;
|
||||
}
|
||||
|
||||
private final MembershipChangeReason reason;
|
||||
|
||||
public MembershipChangeReason getReason() {
|
||||
return this.reason;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsMembershipChange(CommandSender sender, MPlayer mplayer, Faction newFaction, MembershipChangeReason reason) {
|
||||
super(sender);
|
||||
this.mplayer = mplayer;
|
||||
this.newFaction = newFaction;
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// REASON ENUM
|
||||
// -------------------------------------------- //
|
||||
|
||||
public enum MembershipChangeReason {
|
||||
// Join
|
||||
JOIN(true),
|
||||
CREATE(false),
|
||||
// Leader is not used, but temporarily kept to avoid other plugins crashing
|
||||
@Deprecated
|
||||
LEADER(true),
|
||||
RANK(true),
|
||||
|
||||
// Leave
|
||||
LEAVE(true),
|
||||
//JOINOTHER (true),
|
||||
KICK(true),
|
||||
DISBAND(false),
|
||||
//RESET (false),
|
||||
;
|
||||
|
||||
private final boolean cancellable;
|
||||
|
||||
public boolean isCancellable() {
|
||||
return this.cancellable;
|
||||
}
|
||||
|
||||
MembershipChangeReason(boolean cancellable) {
|
||||
this.cancellable = cancellable;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsMotdChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private String newMotd;
|
||||
|
||||
public String getNewMotd() {
|
||||
return this.newMotd;
|
||||
}
|
||||
|
||||
public void setNewMotd(String newMotd) {
|
||||
this.newMotd = newMotd;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsMotdChange(CommandSender sender, Faction faction, String newMotd) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.newMotd = newMotd;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsNameChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private String newName;
|
||||
|
||||
public String getNewName() {
|
||||
return this.newName;
|
||||
}
|
||||
|
||||
public void setNewName(String newName) {
|
||||
this.newName = newName;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsNameChange(CommandSender sender, Faction faction, String newName) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.newName = newName;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MPerm;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsPermChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private final MPerm perm;
|
||||
|
||||
public MPerm getPerm() {
|
||||
return this.perm;
|
||||
}
|
||||
|
||||
private final MPerm.MPermable permable;
|
||||
|
||||
public MPerm.MPermable getRel() {
|
||||
return this.permable;
|
||||
}
|
||||
|
||||
private boolean newValue;
|
||||
|
||||
public boolean getNewValue() {
|
||||
return this.newValue;
|
||||
}
|
||||
|
||||
public void setNewValue(boolean newValue) {
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsPermChange(CommandSender sender, Faction faction, MPerm perm, MPerm.MPermable permable, boolean newValue) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.perm = perm;
|
||||
this.permable = permable;
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsPowerChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final MPlayer mplayer;
|
||||
|
||||
public MPlayer getMPlayer() {
|
||||
return this.mplayer;
|
||||
}
|
||||
|
||||
private final PowerChangeReason reason;
|
||||
|
||||
public PowerChangeReason getReason() {
|
||||
return this.reason;
|
||||
}
|
||||
|
||||
private double newPower;
|
||||
|
||||
public double getNewPower() {
|
||||
return this.newPower;
|
||||
}
|
||||
|
||||
public void setNewPower(double newPower) {
|
||||
this.newPower = newPower;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsPowerChange(CommandSender sender, MPlayer mplayer, PowerChangeReason reason, double newPower) {
|
||||
super(sender);
|
||||
this.mplayer = mplayer;
|
||||
this.reason = reason;
|
||||
this.newPower = mplayer.getLimitedPower(newPower);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// REASON ENUM
|
||||
// -------------------------------------------- //
|
||||
|
||||
public enum PowerChangeReason {
|
||||
TIME,
|
||||
DEATH,
|
||||
COMMAND,
|
||||
UNDEFINED,
|
||||
;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.engine.DisallowCause;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
||||
/**
|
||||
* This event is fired when PVP is disallowed between players due to any rules in Factions.
|
||||
* Canceling this event allows the PVP in spite of this and stops text messages from being sent.
|
||||
* <p>
|
||||
* Note that the defender field always is set but the attacker can be null.
|
||||
* Some other plugins seem to fire EntityDamageByEntityEvent without an attacker.
|
||||
*/
|
||||
public class EventFactionsPvpDisallowed extends EventFactionsAbstract {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Player attacker;
|
||||
|
||||
public Player getAttacker() {
|
||||
return this.attacker;
|
||||
}
|
||||
|
||||
public MPlayer getMAttacker() {
|
||||
return this.attacker == null ? null : MPlayer.get(this.attacker);
|
||||
}
|
||||
|
||||
private final Player defender;
|
||||
|
||||
public Player getDefender() {
|
||||
return this.defender;
|
||||
}
|
||||
|
||||
public MPlayer getMDefender() {
|
||||
return this.defender == null ? null : MPlayer.get(this.defender);
|
||||
}
|
||||
|
||||
private final DisallowCause cause;
|
||||
|
||||
public DisallowCause getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
private final EntityDamageByEntityEvent event;
|
||||
|
||||
public EntityDamageByEntityEvent getEvent() {
|
||||
return this.event;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsPvpDisallowed(Player attacker, Player defender, DisallowCause cause, EntityDamageByEntityEvent event) {
|
||||
this.attacker = attacker;
|
||||
this.defender = defender;
|
||||
this.cause = cause;
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.factions.entity.Rank;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsRankChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final MPlayer mplayer;
|
||||
|
||||
public MPlayer getMPlayer() {
|
||||
return this.mplayer;
|
||||
}
|
||||
|
||||
private Rank newRank;
|
||||
|
||||
public Rank getNewRank() {
|
||||
return this.newRank;
|
||||
}
|
||||
|
||||
public void setNewRank(Rank newRole) {
|
||||
this.newRank = newRole;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsRankChange(CommandSender sender, MPlayer mplayer, Rank newRank) {
|
||||
super(sender);
|
||||
this.mplayer = mplayer;
|
||||
this.newRank = newRank;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
|
||||
public class EventFactionsRelationChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private final Faction otherFaction;
|
||||
|
||||
public Faction getOtherFaction() {
|
||||
return this.otherFaction;
|
||||
}
|
||||
|
||||
private Rel newRelation;
|
||||
|
||||
public Rel getNewRelation() {
|
||||
return this.newRelation;
|
||||
}
|
||||
|
||||
public void setNewRelation(Rel newRelation) {
|
||||
this.newRelation = newRelation;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsRelationChange(CommandSender sender, Faction faction, Faction otherFaction, Rel newRelation) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.otherFaction = otherFaction;
|
||||
this.newRelation = newRelation;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsTitleChange extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final MPlayer mplayer;
|
||||
|
||||
public MPlayer getMPlayer() {
|
||||
return this.mplayer;
|
||||
}
|
||||
|
||||
private String newTitle;
|
||||
|
||||
public String getNewTitle() {
|
||||
return this.newTitle;
|
||||
}
|
||||
|
||||
public void setNewTitle(String newTitle) {
|
||||
this.newTitle = newTitle;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsTitleChange(CommandSender sender, MPlayer mplayer, String newTitle) {
|
||||
super(sender);
|
||||
this.mplayer = mplayer;
|
||||
this.newTitle = newTitle;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.Vote;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsVoteAdd extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private Vote vote;
|
||||
|
||||
public Vote getVote() {
|
||||
return this.vote;
|
||||
}
|
||||
|
||||
public void setVote(Vote vote) {
|
||||
this.vote = vote;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsVoteAdd(CommandSender sender, Faction faction, Vote vote) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.vote = vote;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.Vote;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsVoteRemove extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private Vote vote;
|
||||
|
||||
public Vote getVote() {
|
||||
return this.vote;
|
||||
}
|
||||
|
||||
public void setVote(Vote vote) {
|
||||
this.vote = vote;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsVoteRemove(CommandSender sender, Faction faction, Vote vote) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.vote = vote;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.Warp;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsWarpAdd extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private Warp warp;
|
||||
|
||||
public Warp getNewWarp() {
|
||||
return this.warp;
|
||||
}
|
||||
|
||||
public void setNewWarp(Warp warp) {
|
||||
this.warp = warp;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsWarpAdd(CommandSender sender, Faction faction, Warp warp) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.warp = warp;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.Warp;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsWarpRemove extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Faction faction;
|
||||
|
||||
public Faction getFaction() {
|
||||
return this.faction;
|
||||
}
|
||||
|
||||
private Warp warp;
|
||||
|
||||
public Warp getWarp() {
|
||||
return this.warp;
|
||||
}
|
||||
|
||||
public void setWarp(Warp warp) {
|
||||
this.warp = warp;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsWarpRemove(CommandSender sender, Faction faction, Warp warp) {
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.warp = warp;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.factions.entity.Warp;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsWarpTeleport extends EventFactionsAbstractSender {
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final Warp warp;
|
||||
|
||||
public Warp getWarp() {
|
||||
return this.warp;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsWarpTeleport(CommandSender sender, Warp warp) {
|
||||
super(sender);
|
||||
this.warp = warp;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user