Maven Attempt 1
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.massivecore.event.EventMassiveCore;
|
||||
|
||||
public abstract class EventFactionsAbstract extends EventMassiveCore
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.massivecore.event.EventMassiveCore;
|
||||
|
||||
public abstract class EventFactionsAbstractSender extends EventMassiveCore
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private final CommandSender sender;
|
||||
public CommandSender getSender() { return this.sender; }
|
||||
public UPlayer getUSender() { return this.sender == null ? null : UPlayer.get(this.sender); }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsAbstractSender(CommandSender sender)
|
||||
{
|
||||
this.sender = sender;
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.BoardColls;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
|
||||
public class EventFactionsChunkChange 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 PS chunk;
|
||||
public PS getChunk() { return this.chunk; }
|
||||
|
||||
private final Faction currentFaction;
|
||||
private final Faction newFaction;
|
||||
public Faction getNewFaction() { return this.newFaction; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsChunkChange(CommandSender sender, PS chunk, Faction newFaction)
|
||||
{
|
||||
super(sender);
|
||||
this.chunk = chunk.getChunk(true);
|
||||
this.currentFaction = BoardColls.get().getFactionAt(chunk);
|
||||
this.newFaction = newFaction;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// UTIL
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsChunkChangeType getType()
|
||||
{
|
||||
if (currentFaction.isNone()) return EventFactionsChunkChangeType.BUY;
|
||||
if (newFaction.isNormal()) return EventFactionsChunkChangeType.CONQUER;
|
||||
|
||||
UPlayer usender = this.getUSender();
|
||||
if (usender != null && usender.getFaction() == currentFaction) return EventFactionsChunkChangeType.SELL;
|
||||
|
||||
return EventFactionsChunkChangeType.PILLAGE;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
public enum EventFactionsChunkChangeType
|
||||
{
|
||||
BUY,
|
||||
SELL,
|
||||
CONQUER,
|
||||
PILLAGE,
|
||||
;
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
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 universe;
|
||||
public final String getUniverse() { return this.universe; }
|
||||
|
||||
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 universe, String factionId, String factionName)
|
||||
{
|
||||
super(sender);
|
||||
this.universe = universe;
|
||||
this.factionId = factionId;
|
||||
this.factionName = factionName;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
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,39 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
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,41 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
|
||||
public class EventFactionsHomeChange 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 PS newHome;
|
||||
public PS getNewHome() { return this.newHome; }
|
||||
public void setNewHome(PS newHome) { this.newHome = newHome; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsHomeChange(CommandSender sender, Faction faction, PS newHome)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.newHome = newHome;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class EventFactionsHomeTeleport extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@Override public HandlerList getHandlers() { return handlers; }
|
||||
public static HandlerList getHandlerList() { return handlers; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsHomeTeleport(CommandSender sender)
|
||||
{
|
||||
super(sender);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
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 UPlayer uplayer;
|
||||
public UPlayer getUPlayer() { return this.uplayer; }
|
||||
|
||||
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, UPlayer uplayer, Faction faction, boolean newInvited)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
||||
this.faction = faction;
|
||||
this.newInvited = newInvited;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
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 UPlayer uplayer;
|
||||
public UPlayer getUPlayer() { return this.uplayer; }
|
||||
|
||||
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, UPlayer uplayer, Faction newFaction, MembershipChangeReason reason)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
||||
this.newFaction = newFaction;
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// REASON ENUM
|
||||
// -------------------------------------------- //
|
||||
|
||||
public enum MembershipChangeReason
|
||||
{
|
||||
// Join
|
||||
JOIN (true),
|
||||
CREATE (false),
|
||||
LEADER (true),
|
||||
|
||||
// Leave
|
||||
LEAVE (true),
|
||||
//JOINOTHER (true),
|
||||
KICK (true),
|
||||
DISBAND (false),
|
||||
//RESET (false),
|
||||
;
|
||||
|
||||
private final boolean cancellable;
|
||||
public boolean isCancellable() { return this.cancellable; }
|
||||
|
||||
private MembershipChangeReason(boolean cancellable)
|
||||
{
|
||||
this.cancellable = cancellable;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
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,40 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public class EventFactionsOpenChange 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 boolean newOpen;
|
||||
public boolean isNewOpen() { return this.newOpen; }
|
||||
public void setNewOpen(boolean newOpen) { this.newOpen = newOpen; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsOpenChange(CommandSender sender, Faction faction, boolean newOpen)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
||||
this.newOpen = newOpen;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
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 UPlayer uplayer;
|
||||
public UPlayer getUPlayer() { return this.uplayer; }
|
||||
|
||||
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, UPlayer uplayer, PowerChangeReason reason, double newPower)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
||||
this.reason = reason;
|
||||
this.newPower = uplayer.getLimitedPower(newPower);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// REASON ENUM
|
||||
// -------------------------------------------- //
|
||||
|
||||
public enum PowerChangeReason
|
||||
{
|
||||
TIME,
|
||||
DEATH,
|
||||
UNDEFINED,
|
||||
;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* 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 UPlayer getUAttacker() { return this.attacker == null ? null : UPlayer.get(this.attacker); }
|
||||
|
||||
private final Player defender;
|
||||
public Player getDefender() { return this.defender; }
|
||||
public UPlayer getUDefender() { return this.defender == null ? null : UPlayer.get(this.defender); }
|
||||
|
||||
private final EntityDamageByEntityEvent event;
|
||||
public EntityDamageByEntityEvent getEvent() { return this.event; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsPvpDisallowed(Player attacker, Player defender, EntityDamageByEntityEvent event)
|
||||
{
|
||||
this.attacker = attacker;
|
||||
this.defender = defender;
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
|
||||
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,40 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
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 UPlayer uplayer;
|
||||
public UPlayer getUPlayer() { return this.uplayer; }
|
||||
|
||||
private String newTitle;
|
||||
public String getNewTitle() { return this.newTitle; }
|
||||
public void setNewTitle(String newTitle) { this.newTitle = newTitle; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public EventFactionsTitleChange(CommandSender sender, UPlayer uplayer, String newTitle)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
||||
this.newTitle = newTitle;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user