Configuration

Configuration

To add aliases you must create individual .json files inside the "aliases" folder that is created when you start the plugin for the first time.

example.json:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
  "key": "powerexample",
  "aliases": [
    "pow",
    "power",
    "powerexample",
    "example"
  ],
  "execute": "f p",
  "requirements": {
    "FactionsEnabledInWorld": true,
    "ExecuterIsPlayer": false,
    "ExecuterIsLeader": false,
    "ExecuterIsInFaction": false
  },
  "permission": "factions.power",
  "permissionDeniedMessage": "§cYou dont have permission to do this!",
  "description": "This is an example"
}

As you can see its a simple JSON format.

First you have key you should just set this to the file name, as it is a unique identifier for this command.

Then we have a section under that aliases this is a list of all the commands that are added under the /f command. So in this example, it will add:

  • /f powerexample
  • /f example
  • /f power
  • /f pow

All of these will point to the next section, execute. Please note when executing the command, any arguments will automatically be passed along. So if we execute '/f example MarkehMe' it will execute '/f p MarkehMe' - this will also execute as the command sender. So you can ensure any per-player permissions are followed!

The requirements section is a list of requirements that have to be passed to follow.

permission is simply the permission required to run the command. If they don't have this command, the permissionDeniedMessage value is sent to the player.

When you run /f help you get a list of commands added, we add our commands to this. The description value is what will show alongside the command.