HomeJavaModsFactions Blue
Factions Blue
[​IMG]

FactionsBlue
was made to play factions differently, and to be more survival friendly. Instead of being able to claim up to your power, you're now given a configurable amount of claims which increases over a configurable amount of time.

Wiki (In progress): https://www.spigotmc.org/wiki/factions-blue/

Spoiler: Commands
/f create <name>
/f disband
/f roles
/f setrole <player>
/f leader <player>
/f invite <player> [revoke]
/f join <player/faction>
/f leave
/f kick <player>
/f info [faction/player]
/f claim [radius][safezone/warzone] ( Bypass mode for safe/war zone claiming)
/f autoclaim
/f unclaim [all]
/f map [on/off]
/f chat [public/ally/faction]
/f sethome
/f home
/f warp <name> [password]
/f warp list
/f setwarp <name> [password]
/f delwarp <name> [password]
/f top [update]
/f set <name/desc> <input>
/f list
/f bypass
/f reload
/f boost <claims/power> <faction> <amount> (Negative to deduct)
Spoiler: Add-ons
TNTFill
https://www.spigotmc.org/resources/tntfill.25651/

Made an addon for Factions Blue? Message me and I'll add your resource to the list :)
Spoiler: Plans
  1. Owner claims
  2. Improved chat formatting
  3. Customizable GUIs
  4. Improved Factions Top
  5. Faction Duels
Feel free to make suggestions!

Claiming Land
When a faction is created, it is given a configurable amount of claims. Over a configurable amount of time the claims will increase.

To claim warzone or safezone you must be in admin mode (/f bypass). /f claim [radius] safezone/warzone.

Faction Power
Every player in the faction counts for a configurable amount of power, this adds up to your total power. To prevent an insane high amount of power you can cap total power and faction members. If the total power drops below a configurable percentage the faction will become vulnerable. If a faction is vulnerable all restrictions are lifted, meaning that anyone can build, break, open chests & doors. Role permission restrictions persist.

Factions regenerates a configurable amount of power over a configurable amount of time.


Don't want teleport features?
Thankfully you can completely disable all teleport commands and role permissions. Permission node: "factions.survival" contains all regular permissions without teleport permissions. To remove certain role permissions from the plugin, simply add the permission to the disabledRolePermissions list in config.yml
Spoiler: List of Role Permissions
Code (Text):

chat
build
break
opendoor
openchest
home
sethome
warp
managewarps
bypasspassword
kick
invite
claim
unclaim
ally
manageroles
assignroles
changeinfo
 

Permissible Faction Names
You can specify names that require a permission, once specified the player will require the permission "factions.name.<name>". This way you can blacklist names and/or reserve names for your players.

Factions Map
The colors of /f map can be configured in config.yml!
[​IMG]


Permission Nodes
Spoiler: Permissions
Code (YAML):

permissions
:
  factions.admin
:
    description
: admin perms
    children
:
      factions.top-update
: true
      factions.reload
: true
      factions.boost
: true
      factions.bypass
: true
      factions.player
: true

  factions.player
:
    description
: all player perms
    children
:
      factions.survival
: true
      factions.use-warp
: true
      factions.set-warp
: true
      factions.del-warp
: true
      factions.use-home
: true
      factions.set-home
: true

  factions.survival
:
    description
: no teleports
    children
:
      factions.create
: true
      factions.list
: true
      factions.claim
: true
      factions.auto-claim
: true
      factions.radius-claim
: true
      factions.unclaim
: true
      factions.unclaim-all
: true
      factions.ally
: true
      factions.info
: true
      factions.map
: true
      factions.auto-map
: true
      factions.top
: true

  factions.reload
:
    description
: reload messages and config.
  factions.unclaim
:
    description
: unclaim
  factions.unclaim-all
:
    description
: unclaim all
  factions.claim
:
    description
: claim land for your faction
  factions.radius-claim
:
    description
: claim in radius.
  factions.auto-claim
:
    description
: auto claim
  factions.bypass
:
    description
: disable restrictions.
  factions.ally
:
    description
: become allies with a faction.
  factions.boost
:
    description
: boost power or max claims.
  factions.use-warp
:
    description
: use warp
  factions.set-warp
:
    description
: set warp
  factions.del-warp
:
    description
: delete a warp
  factions.set-home
:
    description
: set f home
  factions.use-home
:
    description
: use f home
  factions.map
:
    description
: use f map
  factions.auto-map
:
    description
: use auto map
  factions.info
:
    description
: use f info
  factions.list
:
    description
: list of factions
  factions.create
:
    description
: create a faction
  factions.top
:
    description
: use f top
  factions.top-update
:
    description
: update /f top
 
Spoiler: Chat Format, Placeholders & API
Spoiler: MWvD & PlaceholderAPI Support
Available placeholders for MVdWPlaceholderAPI:
{faction_name}
= Faction Name
{faction_power} = Faction Power
{faction_max_power} = Faction Max Power
{faction_max_claims} = Faction Max Claims
{faction_status} = Faction Status(stable/vulnerable)
{faction_role} = Member role (if none: N/A)

PlaceholderAPI
%factionsblue_faction_name%
= Faction Name
%factionsblue_faction_power% = Faction Power
%factionsblue_faction_maxpower% = Faction Max Power
%factionsblue_faction_maxclaims% = Faction Max Claims
%factionsblue_faction_status% = Faction Status(stable/vulnerable)
%factionsblue_faction_role% = Member role (if none: N/A)
Spoiler: Chat format
You can use FactionsBlue placeholders in any chat formatting plugin.
The following placeholders are available:
  • {FACTION_NAME}
  • {FACTION_ROLE_SYMBOL}
  • {FACTION_ROLE_TAG}
The default chat format of Factions Blue looks looks like this and can be enabled in the configuration and modified in messages.yml.
[​IMG]
Spoiler: FactionsBlue API
Code (Java):

public boolean isInOwnTerritory (Player player ) {
    // Get the faction player
    FPlayer fPlayer = FactionsApi. getFPlayer (player ) ;
 
    // Check if the player has a faction, without one a player can't possibly be in own territory.
    if ( !fPlayer. hasFaction ( ) )
        return false ;
 
    // Get the player's faction
    Faction faction = fPlayer. getFaction ( ) ;
    // Get the claim of player's location
    Claim claim = new Claim (player. getLocation ( ) ) ;
    // Get the owner of the claim
    Faction claimOwner = FactionsApi. getOwner (claim ) ;
 
    // Check if claimOwner is the same faction as faction
    return faction. equals (claimOwner ) ;
}
Set & get properties to factions
Code (Java):

Faction faction = fPlayer. getFaction ( ) ;
// Check if property contains key
faction. getProperties ( ). containsKey ( "example" ) ;
// Add properties
faction. getProperties ( ). setBoolean ( "example", false ) ;
faction. getProperties ( ). setDouble ( "example2", 45.03 ) ;
faction. getProperties ( ). setInt ( "example3", 500 ) ;
// Retrieve properties
boolean example = faction. getProperties ( ). getBoolean ( "example" ) ;
// And so on...
Spoiler: Creating a subcommand
Code (Java):
public class CmdExample extends SubCommand {

    public CmdExample ( ) {
        super ( "example", "description", "alias" ) ;
        setRequiresFaction ( true ) ;
        setPermission ( "permission.node" ) ;
        setRolePermission ( "example" ) ;
        // setLeaderCommand(true);
        setArgument ( 0, new Argument ( "example", boolean isRequired, String. class, "permission.node" ) ) ;
    }

    @Override
    public void onCommand (Player player, FPlayer fPlayer, String [ ] args ) {
        Messages. send (player, "hello!" ) ;
    }

}
 
Now you can register it with
Code (Java):
FactionsApi. addSubCommand ( new CmdExample ( ), pageNumber ) ;

We do not have a repository at this point, if you use maven, please us this.
Code (XML):

<dependency>
    <groupId>me.zysea </groupId>
    <artifactId>FactionsBlue </artifactId>
    <version>1.0.0-BETA </version>
    <scope>system </scope>
    <systemPath>${project.basedir}/lib/FactionsBlue-1.0.0-BETA.jar </systemPath>
</dependency>
Spoiler: List of Events
Code (Text):

FactionDisbandEvent
AsyncFactionMaxClaimsIncreaseEvent
AsyncFactionPowerRegenerateEvent
FactionVulnerableEvent
FPlayerFriendlyDamagePreventEvent
FPlayerTerritoryChangeEvent
FPlayerClaimEvent
 
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Factions Blue is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 7,239 times (via Spigot). Download it and open it directly in the game.

Explore more