Feature Structure
FactionsKore uses a structure where each feature is split into its own 'module'.
Enabling/Disabling
Each feature may be turned on or off via the in game command /kore (feature-name) on/off
.
If a feature is off, it will turn all of its listeners and tasks off as to not incur performance losses.
Reloading
Due to FactionsKore being a large plugin, using /plugman reload FactionsKore
or reload
may cause the plugin to break.
Instead, simply use the built-in command /kore reload [feature=all]
to reload the appropriate feature.
Permissions
Every feature in FactionsKore (other than a few small exceptions) have two primary permissions.
factionskore.base.(feature-name)
- For base level usage (ex./coins
for the mobcoins feature.)factionskore.admin.(feature-name)
- For admin level usage (ex./chunkbuster give ...
for the chunkbuster feature.)
Placeholders
FactionsKore supports PlaceholderAPI's placeholder system.
To view the placeholders of a given feature, type /kore placeholders (feature)
.
This will list all the available placeholders and their purposes for the given feature.
Feature Configs
Every feature is linked to a single main config. The main config is used to configure everything about the feature. Every config follows the structure of:
enabled: <true/false>
feature:
config-option-1: ...
config-option-2: ...
...
The enabled
flag is used for the plugin to know if the feature has been toggled on or off.
Warning
It is not advised to manually set this flag while the server is running. Please use the /kore (feature) (on/off)
command.
Common Config Values
There are a few generalities when configuring FactionsKore. Things like locations or items are configured in similar ways throughout the plugin.
Locations
Locations, or positions in the world, are configured like so:
config-value: x-decimal:y-decimal:z-decimal:world-name
To add in yaw/pitch, you can do the following:
config-value: x-decimal:y-decimal:z-decimal:world-name:yaw-decimal:pitch-decimal
You can use yaw/pitch wherever a location is required.
Potions
Potion effects can be serialized as follows:
config-value: POTION_TYPE:AMPLIFIER:DURATION_TICKS
Regions
In features like koth and outpost, regions must be defined for the capture areas. Regions are defined as two differnt points. Hint: Think of these two points like a selection in WorldEdit Here's an example from the koth feature
corner-one: 50:75:50:world
corner-two: 55:80:55:world
IMPORTANT: As previously stated, these locations are decimals!
If your region has any negative coordinates, you may need to subtract 1
from the value to cover the entire region.
ex. If the X value of the block on the edge of your region is at -50
, you may need to use -51
as your coordinate.
Items
Items are configured in many of the features in this plugin. A simplistic item from chunkbuster can be configured as so:
chunk-buster-item:
type: TNT
is-glowing: true
name: '&d&l* &5&lChunk Buster &d{RADIUS}&5x&d{RADIUS} &l*'
lore:
- '&7Place this anywhere to destroy all chunks within &d{RADIUS}&7x&d{RADIUS}&7!'
There are several more optional config options when using items.
amount
- integer
The amount of the item.
damage
- integer
The item's durability or 'damage' is the item's data.
unbreakable
- boolean
If the item should be set as unbreakable.
enchants
- config section
Each sub entry in this section, formatted like ENCHANT_NAME: LEVEL
, adds an enchant to the item.
color
- RGB hex
The color of the item, only used if the item's type is leather.
custom-model-data
- integer
The custom model data used for items in newer minecraft versions.
item-flags
- string list
A list of item flags that apply to the item. (See the appropriate version of https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html)
commands
- string list
Commands to be run on click if this item is being used in a GUI
skull-url
- string
If the type of the item is a player head, this will set the texture to the skin. Skull URLs can be found here
skull-texture
- string
If the type of the item is a player head, this will set the texture to the given base64 value. These values can be found here
skull-name
- player name
If the type of the item is a player head, this will set the skull's texture to the player with the given name's.
potion-data.main-effect
- serialized potion
If the type of the item is a potion, this will set its main effect.
potion-data.side-effects
- serialized potion list
If the type of the item is a potion, this will set the potion's side effects. ex.
config-value
- POTION_TYPE:AMPLIFIER:DURATION
- POTION_TYPE:AMPLIFIER:DURATION
...
Menus
Most menus in FactionsKore use the same formatting for placing items in slots. Here's an example taken from the stats feature:
gui:
size: 27
name: "&e{PLAYER}&a's Stats"
fill-null-slots: true
items:
combat:
type: DIAMOND_SWORD
is-glowing: true
name: '&c&lCombat Stats'
lore:
- '&cKills: &f{KILLS}'
- '&cDeaths: &f{DEATHS}'
- '&cBlaze Kills: &f{KILLS_BLAZE}'
general:
type: DIAMOND_SWORD
is-glowing: true
name: '&b&lGeneral Stats'
lore:
- '&bCane: &f{CANE_HARVESTED}'
- '&bGen Blocks: &f{GEN_BLOCKS}'
- '&bSpawners Broken: &f{SPAWNERS_BROKEN}'
- '&bSpawners Placed: &f{SPAWNERS_PLACED}'
playtime:
type: WATCH
is-glowing: true
name: '&e&lPlay Time'
lore:
- ''
- '&f{PLAY_TIME}'
slots:
'11': combat
'13': general
'15': playtime
size
and name
options should be self-explanatory.
fill-null-slots
if set to true will fill the inventory's empty spaces with, by default, gray stained-glass panes.
However, you can override this by setting an item under the dummy-item
section. i.e.
gui:
...
fill-null-slots: true
dummy-item:
type: APPLE
name: '&aApple Slot!'
...
Under the items
section you'll define all items that the GUI has.
The title of the section defining the item is the item's ID. (In this example, the IDs are combat
, general
, and playtime
)
These IDs are used under the slots
section where you define the slots that the items will go in.
For example:
slots:
'11': combat
'13': general
'15': playtime
Note
Not every config option will be documented. Things like messages or config options which may be considered 'obvious' may be left out. If you're confused about an option and believe it may need more documentation, contact us in our discord.