Slightly better claim messages. Much better LWC.

This commit is contained in:
Olof Larsson
2014-10-03 11:23:54 +02:00
parent e722662223
commit 636e72ee67
10 changed files with 153 additions and 48 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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; }