Slightly better claim messages. Much better LWC.
This commit is contained in:
@ -13,7 +13,7 @@ public abstract class EventFactionsAbstractSender extends EventMassiveCore
|
||||
|
||||
private final CommandSender sender;
|
||||
public CommandSender getSender() { return this.sender; }
|
||||
public MPlayer getUSender() { return this.sender == null ? null : MPlayer.get(this.sender); }
|
||||
public MPlayer getMSender() { return this.sender == null ? null : MPlayer.get(this.sender); }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
|
@ -50,7 +50,7 @@ public class EventFactionsChunkChange extends EventFactionsAbstractSender
|
||||
if (currentFaction.isNone()) return EventFactionsChunkChangeType.BUY;
|
||||
if (newFaction.isNormal()) return EventFactionsChunkChangeType.CONQUER;
|
||||
|
||||
MPlayer usender = this.getUSender();
|
||||
MPlayer usender = this.getMSender();
|
||||
if (usender != null && usender.getFaction() == currentFaction) return EventFactionsChunkChangeType.SELL;
|
||||
|
||||
return EventFactionsChunkChangeType.PILLAGE;
|
||||
|
@ -2,9 +2,33 @@ package com.massivecraft.factions.event;
|
||||
|
||||
public enum EventFactionsChunkChangeType
|
||||
{
|
||||
BUY,
|
||||
SELL,
|
||||
CONQUER,
|
||||
PILLAGE,
|
||||
// -------------------------------------------- //
|
||||
// ENUM
|
||||
// -------------------------------------------- //
|
||||
|
||||
BUY("buy", "bought"),
|
||||
SELL("sell", "sold"),
|
||||
CONQUER("conquer", "conquered"),
|
||||
PILLAGE("pillage", "pillaged"),
|
||||
|
||||
// END OF LIST
|
||||
;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
public final String now;
|
||||
public final String past;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
EventFactionsChunkChangeType(String now, String past)
|
||||
{
|
||||
this.now = now;
|
||||
this.past = past;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,11 +29,11 @@ public class EventFactionsPvpDisallowed extends EventFactionsAbstract
|
||||
|
||||
private final Player attacker;
|
||||
public Player getAttacker() { return this.attacker; }
|
||||
public MPlayer getUAttacker() { return this.attacker == null ? null : MPlayer.get(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 getUDefender() { return this.defender == null ? null : MPlayer.get(this.defender); }
|
||||
public MPlayer getMDefender() { return this.defender == null ? null : MPlayer.get(this.defender); }
|
||||
|
||||
private final EntityDamageByEntityEvent event;
|
||||
public EntityDamageByEntityEvent getEvent() { return this.event; }
|
||||
|
Reference in New Issue
Block a user