Event first
This commit is contained in:
@@ -2,7 +2,7 @@ package com.massivecraft.factions.event;
|
||||
|
||||
import com.massivecraft.massivecore.event.EventMassiveCore;
|
||||
|
||||
public abstract class FactionsEventAbstract extends EventMassiveCore
|
||||
public abstract class EventFactionsAbstract extends EventMassiveCore
|
||||
{
|
||||
|
||||
}
|
@@ -5,7 +5,7 @@ import org.bukkit.command.CommandSender;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.massivecore.event.EventMassiveCore;
|
||||
|
||||
public abstract class FactionsEventAbstractSender extends EventMassiveCore
|
||||
public abstract class EventFactionsAbstractSender extends EventMassiveCore
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
@@ -19,7 +19,7 @@ public abstract class FactionsEventAbstractSender extends EventMassiveCore
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventAbstractSender(CommandSender sender)
|
||||
public EventFactionsAbstractSender(CommandSender sender)
|
||||
{
|
||||
this.sender = sender;
|
||||
}
|
@@ -8,7 +8,7 @@ import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
|
||||
public class FactionsEventChunkChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsChunkChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -33,7 +33,7 @@ public class FactionsEventChunkChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventChunkChange(CommandSender sender, PS chunk, Faction newFaction)
|
||||
public EventFactionsChunkChange(CommandSender sender, PS chunk, Faction newFaction)
|
||||
{
|
||||
super(sender);
|
||||
this.chunk = chunk.getChunk(true);
|
||||
@@ -45,15 +45,15 @@ public class FactionsEventChunkChange extends FactionsEventAbstractSender
|
||||
// UTIL
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventChunkChangeType getType()
|
||||
public EventFactionsChunkChangeType getType()
|
||||
{
|
||||
if (currentFaction.isNone()) return FactionsEventChunkChangeType.BUY;
|
||||
if (newFaction.isNormal()) return FactionsEventChunkChangeType.CONQUER;
|
||||
if (currentFaction.isNone()) return EventFactionsChunkChangeType.BUY;
|
||||
if (newFaction.isNormal()) return EventFactionsChunkChangeType.CONQUER;
|
||||
|
||||
UPlayer usender = this.getUSender();
|
||||
if (usender != null && usender.getFaction() == currentFaction) return FactionsEventChunkChangeType.SELL;
|
||||
if (usender != null && usender.getFaction() == currentFaction) return EventFactionsChunkChangeType.SELL;
|
||||
|
||||
return FactionsEventChunkChangeType.PILLAGE;
|
||||
return EventFactionsChunkChangeType.PILLAGE;
|
||||
}
|
||||
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.event;
|
||||
|
||||
public enum FactionsEventChunkChangeType
|
||||
public enum EventFactionsChunkChangeType
|
||||
{
|
||||
BUY,
|
||||
SELL,
|
@@ -3,7 +3,7 @@ package com.massivecraft.factions.event;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class FactionsEventCreate extends FactionsEventAbstractSender
|
||||
public class EventFactionsCreate extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -30,7 +30,7 @@ public class FactionsEventCreate extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventCreate(CommandSender sender, String universe, String factionId, String factionName)
|
||||
public EventFactionsCreate(CommandSender sender, String universe, String factionId, String factionName)
|
||||
{
|
||||
super(sender);
|
||||
this.universe = universe;
|
@@ -5,7 +5,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public class FactionsEventDescriptionChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsDescriptionChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -30,7 +30,7 @@ public class FactionsEventDescriptionChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventDescriptionChange(CommandSender sender, Faction faction, String newDescription)
|
||||
public EventFactionsDescriptionChange(CommandSender sender, Faction faction, String newDescription)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
@@ -5,7 +5,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public class FactionsEventDisband extends FactionsEventAbstractSender
|
||||
public class EventFactionsDisband extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -29,7 +29,7 @@ public class FactionsEventDisband extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventDisband(CommandSender sender, Faction faction)
|
||||
public EventFactionsDisband(CommandSender sender, Faction faction)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
@@ -6,7 +6,7 @@ import org.bukkit.event.HandlerList;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
|
||||
public class FactionsEventHomeChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsHomeChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -31,7 +31,7 @@ public class FactionsEventHomeChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventHomeChange(CommandSender sender, Faction faction, PS newHome)
|
||||
public EventFactionsHomeChange(CommandSender sender, Faction faction, PS newHome)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
@@ -3,7 +3,7 @@ package com.massivecraft.factions.event;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class FactionsEventHomeTeleport extends FactionsEventAbstractSender
|
||||
public class EventFactionsHomeTeleport extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -17,7 +17,7 @@ public class FactionsEventHomeTeleport extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventHomeTeleport(CommandSender sender)
|
||||
public EventFactionsHomeTeleport(CommandSender sender)
|
||||
{
|
||||
super(sender);
|
||||
}
|
@@ -6,7 +6,7 @@ import org.bukkit.event.HandlerList;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public class FactionsEventInvitedChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsInvitedChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -34,7 +34,7 @@ public class FactionsEventInvitedChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventInvitedChange(CommandSender sender, UPlayer uplayer, Faction faction, boolean newInvited)
|
||||
public EventFactionsInvitedChange(CommandSender sender, UPlayer uplayer, Faction faction, boolean newInvited)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
@@ -6,7 +6,7 @@ import org.bukkit.event.HandlerList;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public class FactionsEventMembershipChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsMembershipChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -40,7 +40,7 @@ public class FactionsEventMembershipChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventMembershipChange(CommandSender sender, UPlayer uplayer, Faction newFaction, MembershipChangeReason reason)
|
||||
public EventFactionsMembershipChange(CommandSender sender, UPlayer uplayer, Faction newFaction, MembershipChangeReason reason)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
@@ -5,7 +5,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public class FactionsEventNameChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsNameChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -30,7 +30,7 @@ public class FactionsEventNameChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventNameChange(CommandSender sender, Faction faction, String newName)
|
||||
public EventFactionsNameChange(CommandSender sender, Faction faction, String newName)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
@@ -5,7 +5,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public class FactionsEventOpenChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsOpenChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -30,7 +30,7 @@ public class FactionsEventOpenChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventOpenChange(CommandSender sender, Faction faction, boolean newOpen)
|
||||
public EventFactionsOpenChange(CommandSender sender, Faction faction, boolean newOpen)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
@@ -5,7 +5,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class FactionsEventPowerChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsPowerChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -33,7 +33,7 @@ public class FactionsEventPowerChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventPowerChange(CommandSender sender, UPlayer uplayer, PowerChangeReason reason, double newPower)
|
||||
public EventFactionsPowerChange(CommandSender sender, UPlayer uplayer, PowerChangeReason reason, double newPower)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
@@ -13,7 +13,7 @@ import com.massivecraft.factions.entity.UPlayer;
|
||||
* 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 FactionsEventPvpDisallowed extends FactionsEventAbstract
|
||||
public class EventFactionsPvpDisallowed extends EventFactionsAbstract
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -42,7 +42,7 @@ public class FactionsEventPvpDisallowed extends FactionsEventAbstract
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventPvpDisallowed(Player attacker, Player defender, EntityDamageByEntityEvent event)
|
||||
public EventFactionsPvpDisallowed(Player attacker, Player defender, EntityDamageByEntityEvent event)
|
||||
{
|
||||
this.attacker = attacker;
|
||||
this.defender = defender;
|
@@ -7,7 +7,7 @@ import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
|
||||
public class FactionsEventRelationChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsRelationChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -35,7 +35,7 @@ public class FactionsEventRelationChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventRelationChange(CommandSender sender, Faction faction, Faction otherFaction, Rel newRelation)
|
||||
public EventFactionsRelationChange(CommandSender sender, Faction faction, Faction otherFaction, Rel newRelation)
|
||||
{
|
||||
super(sender);
|
||||
this.faction = faction;
|
@@ -5,7 +5,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class FactionsEventTitleChange extends FactionsEventAbstractSender
|
||||
public class EventFactionsTitleChange extends EventFactionsAbstractSender
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// REQUIRED EVENT CODE
|
||||
@@ -30,7 +30,7 @@ public class FactionsEventTitleChange extends FactionsEventAbstractSender
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public FactionsEventTitleChange(CommandSender sender, UPlayer uplayer, String newTitle)
|
||||
public EventFactionsTitleChange(CommandSender sender, UPlayer uplayer, String newTitle)
|
||||
{
|
||||
super(sender);
|
||||
this.uplayer = uplayer;
|
Reference in New Issue
Block a user