Events
Faction Events
Shop Events
Region Events
Quest Events
Examples

FactionTerritoryEnterEvent

fired when a player enters a faction territory
​
​
​
getPlayer();
returns the player which enterd the territory
Player
getChunk();
returns the chunk the player entered
Chunk
getFaction();
returns the faction of the entered territory
Faction

FactionTerritoryLeaveEvent

fired when a player leaves a faction territory
​
​
​
getPlayer();
returns the player which left the territory
Player
getChunk();
returns the chunk the player has left
Chunk

FactionChangeNameEvent

fired when a faction changed its name
​
​
​
getPlayer();
returns the player which changed the name
Player
getFaction();
returns the faction that changed its name
Faction
getOldName();
returns the old faction name
String
getNewName();
returns the new faction name
String

FactionChangeDescriptionEvent

fired when a faction changed its description
​
​
​
getPlayer();
returns the player which changed the description
Player
getFaction();
returns the faction that changed its description
Faction
getOldDesc();
returns the old faction description
String
getNewDesc();
returns the new faction description
String

FactionClaimChunkEvent

fired when a faction claims a chunk
​
​
​
getPlayer();
returns the player which claimed the chunk
Player
getFaction();
returns the faction the chunk is owned by
Faction
getChunk();
returns the claimed chunk
Chunk

FactionUnClaimChunkEvent

fired when a faction unclaims a chunk
​
​
​
getPlayer();
returns the player which unclaimed the chunk
Player
getFaction();
returns the faction the chunk was removed from
Faction
getChunk();
returns the unclaimed chunk
Chunk

FactionCreateEvent

fired when a faction is created
​
​
​
getPlayer();
returns the player which created the faction
Player
getFaction();
returns the faction that was created
Faction

FactionDisbandEvent

fired when a faction is disbanded
​
​
​
getPlayer();
returns the player which disbanded the faction
Player
getFaction();
returns the faction that was disbanded
Faction

FactionSetWarpEvent

fired when a faction sets a warp
​
​
​
getPlayer();
returns the player which sets the warp
Player
getFaction();
returns the faction the warp was added to
Faction
getWarp();
returns the created Warp
FactionWarp

FactionDeleteWarpEvent

fired when a faction deletes a warp
​
​
​
getPlayer();
returns the player which deleted the warp
Player
getFaction();
returns the faction the warp was removed from
Faction
getWarp();
returns the deleted Warp
FactionWarp

FactionPlayerJoinEvent

fired when a player joins a faction
​
​
​
getPlayer();
returns the player which joins the faction
Player
getFaction();
returns the faction
Faction

FactionPlayerLeaveEvent

fired when a player leaves a faction
​
​
​
getPlayer();
returns the player which left the faction
Player
getFaction();
returns the faction
Faction

FactionUpgradedEvent

fired when a player upgrades a faction
​
​
​
getPlayer();
returns the player which left the faction
Player
getFaction();
returns the faction
Faction
getOldLevel();
returns the old faction level
Integer
getNewLevel();
returns the new faction level
Integer

TopFactionsUpdateEvent

fired after the top factions gets calculated
​
​
​
getTopFactions();
returns a Collections of the top 10 factions
Collection<Faction>

ShopBuyItemEvent

fired when a player buys an item in the shop
​
​
​
getPlayer();
returns the player which bought the item
Player
getShopItem();
returns the ShopItem that was bought
ShopItem

ShopSellItemEvent

fired when a player sells an item in the shop
​
​
​
getPlayer();
returns the player which sold the item
Player
getShopItem();
returns the ShopItem that was sold
ShopItem

RegionEnterEvent

fired when a player enters a region
​
​
​
getPlayer();
returns the player which enterd the region
Player
getRegion();
returns the region
Region

RegionLeaveEvent

fired when a player leaves a region
​
​
​
getPlayer();
returns the player which left the region
Player

FactionAcceptedQuestEvent

fired when a faction accepts a quest
​
​
​
getPlayer();
returns the player which accepted the quest
Player
getFaction();
returns the faction that accepted the quest
Faction
getQuest();
returns the quest that has been accepted
Quest

FactionCompletedQuestEvent

fired when a faction completes a quest
​
​
​
getFaction();
returns the faction that completed the quest
Faction
getQuest();
returns the quest that has been completed
Quest

Get a faction of a player

1
public Faction getFaction(Player player) {
2
return FactionsSystem.getFactions().getFaction(player);
3
}
Copied!

Check if a faction level contains a specific upgrade

1
// Example: check if a upgrade has fly
2
public boolean hasUpgrade(int level) {
3
return FactionsSystem.getFactionLevels().hasFly(level);
4
}
Copied!
​
Last modified 9mo ago
Copy link