Updated Faction Event System -- Land Events
Changes: ---------- * changed internal storage of faction from String Id to Faction for LandClaimEvent and LandUnclaimEvent * added getFactionId(), getFactionTag(), getPlayer() to LandClaimEvent * added getFactionId(), getFactionTag(), getFPlayer(), getPlayer() to LandUnclaimEvent * removed LandUnclaimEvent from unclaimAll() in Board.java * created LandUnclaimAllEvent (uncancellable) and hooked into cmdUnclaimall Notes: -------- * LandUnclaimAllEvent currently only returns calling faction and fplayer information. Location data is unavailable as it is determined in Board.java's unclaimAll(). Realistically this should be enough information for anyone hooking this event to determine what is being altered. On branch CustomFactionEvents modified: src/com/massivecraft/factions/Board.java modified: src/com/massivecraft/factions/FPlayer.java modified: src/com/massivecraft/factions/cmd/CmdUnclaim.java modified: src/com/massivecraft/factions/cmd/CmdUnclaimall.java modified: src/com/massivecraft/factions/event/LandClaimEvent.java new file: src/com/massivecraft/factions/event/LandUnclaimAllEvent.java modified: src/com/massivecraft/factions/event/LandUnclaimEvent.java
This commit is contained in:
@@ -664,7 +664,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
||||
}
|
||||
}
|
||||
|
||||
LandClaimEvent claimEvent = new LandClaimEvent(flocation, forFaction.getId(), this.getId());
|
||||
LandClaimEvent claimEvent = new LandClaimEvent(flocation, forFaction, this);
|
||||
Bukkit.getServer().getPluginManager().callEvent(claimEvent);
|
||||
if(claimEvent.isCancelled()) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user