-
Notifications
You must be signed in to change notification settings - Fork 3
Developers
Factions has been made fairly transparent for developers to allow them to get data from the mod and hook into events triggered by the mod
You can download the latest release, stick that in a directory in your project (E.G. "{Project}/libs"), then in your build.gradle tell it to compile the files in that directory by adding the following into the dependencies section of the build.gradle (replace 'libs' with whatever subdirectory you put the jar in):
compile fileTree(dir: 'libs', include: ['*.jar'])
You can add the curse maven repository to your project, and fetch Factions from there Add the following to your build.gradle:
repositories {
maven { url 'https://jitpack.io' }
}And under dependencies add:
compile 'com.github.jtljac:Factions:1.+'
Many of the things that happen in factions fire events, most of these events can be cancelled and modified for new results
| Event | Description | Fields |
|---|---|---|
| OutFactionEvent.FactionCreateEvent | Fired when a faction is being created | UUID causingPlayerID, String factionName |
| InFactionEvent.FactionRelationEvent | Fired when a relation between two factions is changed | UUID causingPlayerID, UUID factionID, UUID otherFaction, RelationState newRelation |
| InFactionEvent.ChunkEvent.FactionClaimEvent | Fired when a faction claims some land | UUID causingPlayerID, UUID factionID, UUID currentOwner, ChunkLocation position |
| InFactionEvent.ChunkEvent.FactionUnClaimEvent | Fired when a faction releases their claim on some land | UUID causingPlayerID, UUID factionID, ChunkLocation position |
All of factions is dealt with by the faction manager, you can access this with
FactionManager.getInstance()
which gives you access to all of the factions system, details about what you can do with this are here