Skip to main content

Configuration

warning

Correct sound and material names must be used. Refer to the Spigot docs for more information:

Adding a region

Regions are added through the /rpgr add [region] command. This will make the region a "configured region" within RPGRegions.

The region is provided by the integration that you use, e.g WorldGuard or the built-in one. You will first need to create the region in that integration to be able to "configure" it.

Default discovery settings

tip

📆 You can find out how to format dates here.

settings.server.discoveries.date.format: format of dates shown to users settings.server.discoveries.discovered.title.fadein: title fadein time (Ticks) settings.server.discoveries.discovered.title.stay: title stay time (Ticks) settings.server.discoveries.discovered.title.fadeout: title fadeout time (Ticks) settings.server.discoveries.discovered.sound.name: default sound to play settings.server.discoveries.discovered.sound.pitch: pitch of sound

Editing language files

Language files are reloaded whenever you save them. So, just edit what you need and the changes will be reflected in-game after a while.

If you want to add a language, you must create a new file with the following format: <language_code>.yml.

A list of valid language codes can be found at https://minecraft.wiki/w/Language#Languages (see "in-game" column).

Default language file (en_gb)

info

RPGRegions uses MiniMessage for message formatting. This allows for easy, modern text handling with hex colours and more.

next_page: "<gradient:green:yellow>Next Page"
previous_page: "<gradient:red:yellow>Previous Page"
regions: "Regions"
discovered_on: "<gradient:gray:white>Discovered on: %s"
discovered_title:
- "<light_purple>%s discovered!"
discovered_subtitle:
- "<white>Keep exploring to discover more!"
already_discovered_title:
- "<light_purple>%s entered!"
already_discovered_subtitle:
- "<white>Already discovered!"
teleport: "<green>Click to teleport"
teleport_cooldown: "<red>Teleport is on cooldown."
teleport_cost: "<yellow>Teleport will cost %f%s"
teleport_no_money: "<red>You do not have enough money to teleport."
cannot_teleport: "<red>We can't teleport you because you don't meet the requirements for that area!"
unknown_region: "Unknown Realm"
exit: "<red>Exit"
cannot_enter: "<red>You require %s to enter this area."
previous_page_lore:
- "<white>Go to the previous page"
next_page_lore:
- "<white>Go to the next page"
exit_lore:
- "<white>Exit the GUI"
cooldown: "<red>That is currently on cooldown."
region_enter_actionbar: "<green>%s"
discovering_area_placeholder: "<gold>Discovering a new area (%d%)..."
requirement_met: "<gradient:dark_green:green>✔ %s"
requirement_not_met: "<gradient:dark_red:red>✘ %s"
coordinates: "<gray>Coordinates: %d, %d"
# Fauna related settings
fauna_discover_title: "<#F5AF2F>Bestiary Updated"
fauna_discover_subtitle: "<white>%s <#04DB64>indexed"

InventoryFramework configuration

RPGRegions takes advantage of InventoryFramework, an advanced GUI framework. Most of RPGRegion's GUIs are configurable via config.yml.

info

See the Inventory Framework Wiki for more information.

Panes

Panes, put simply, are a section of the GUI. They can contain any number of items, and their position is determined by the posX and posY in the config.yml sections.

It is important the posY does not exceed that of the GUI as a whole. It is also important the height does not exceed it either.

Masks

Some panes can contain masks. Masks define where the items within a pane will be placed. An example is the outline pane:

- '111111111'
- '100000001'
- '100000001'
- '100000001'
- '100000001'
- '111111111'

This will place items all around the inventory border. 0 is empty and 1 is filled. It is important the length and height match that of the maximum inventory size.

Reward types

  • ConsoleCommandReward
  • ExperienceReward
  • ItemReward
  • LevelReward
  • MessageReward
  • MoneyReward
  • PlayerCommandReward
  • RegionDiscoverReward
  • TeleportReward
  • AlonsoLevelReward

Effect types

  • PotionRegionEffect
  • VanishEffect
  • FogEffect Currently deprecated, may return soon
tip

There is currently an experimental jar for 1.19.4 fog available on request.

Requirement types

  • ItemRequirement
  • LevelRequirement
  • DependencyRequirement
  • MoneyRequirement
  • PermissionRequirement
  • AlonsoLevelRequirement

Before we get started (Region configs)

It is important to have a basic understanding of the format of JSON. You should also use an editor that is able to validate JSON files, such as Visual Studio Code.

Before editing a region file, you will want to ensure the current data in-game has been saved to its file. Run /rpgregions save to do this.

After editing, you will want to run /rpgregions reload to reload the file to the server.

Icon commands

Icon commands are for executing commands when the player clicks on the region icon in the discovery menu.

An IconCommand looks like the following in your json files:

  "iconCommand": [
{
"command": "say",
"clickType": "DISCOVERED",
"console": false,
"cooldown": 0
},
{
"command": "say command2",
"clickType": "UNDISCOVERED",
"console": false,
"cooldown": 0
}
]

The "command" value is the command to execute (supports placeholders), the "clickType" value is whether to run this command when clicked when the region is DISCOVERED by the player or UNDISCOVERED. The "cooldown" is how long, in ticks, a player has to wait to execute this command again.

There is also a %region% placeholder, which is the region id, and %player%, the name of the player who clicked.

The console option determines whether the command will be executed by the player or console.

Per-region titles

Find the following in your region config:

"title": null, // Discovery entry
"subtitle": null, // Discovery entry
"discoveredTitle": null, // Subsequent entry
"discoveredSubtitle": null, // Subsequent entry

The first title settings are for when the player first discovers it. The second set is for when the player has already discovered the region.

These take an array, so you can animate them. Here's an example that we used to create this:

info

You will likely need to edit the plugin's config.yml to adjust the speed of the title so it works properly if you choose to use animated titles.

discovery-opt.gif

warning

The length of the two arrays must be equal: this is why we repeat the "title" value to match the "subtitle" length in the example below.

"title": [
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH",
"\u0026c\u0026lADVENTURER\u0027S PATH"
],
"subtitle": [
"\u00267\u0026oA",
"\u00267\u0026oAr",
"\u00267\u0026oAre",
"\u00267\u0026oArea ",
"\u00267\u0026oArea D",
"\u00267\u0026oArea Di",
"\u00267\u0026oArea Dis",
"\u00267\u0026oArea Disc",
"\u00267\u0026oArea Disco",
"\u00267\u0026oArea Discov",
"\u00267\u0026oArea Discove",
"\u00267\u0026oArea Discover",
"\u00267\u0026oArea Discovere",
"\u00267\u0026oArea Discovered"
],

Be sure to save the file and then reload it to RPGRegions using /rpgr reload.

Example config

Region configs are defined in a json file. These can be found under plugins/RPGRegions/regions/. An example file is created and updated every time the plugin starts (exampleconfig.json);

info

Items are encoded in Base64 which is why it will appear as random letters in the config. All items can be edited in-game, so you don't have to worry about this.

{
"world": null,
"id": "exampleconfig",
"customName": "ExampleConfig",
"rewards": [
{
"type": "net.islandearth.rpgregions.rewards.ExperienceReward",
"properties": {
"xp": 10,
"alwaysAward": false,
"timeBetweenReward": 0,
"lastReward": 0
}
},
{
"type": "net.islandearth.rpgregions.rewards.ItemReward",
"properties": {
"item": "rO0ABXNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFwdAAPTGphdmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFibGVNYXAkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAkwABGtleXN0ABJMamF2YS9sYW5nL09iamVjdDtMAAZ2YWx1ZXNxAH4ABHhwdXIAE1tMamF2YS5sYW5nLk9iamVjdDuQzlifEHMpbAIAAHhwAAAAA3QAAj09dAABdnQABHR5cGV1cQB+AAYAAAADdAAeb3JnLmJ1a2tpdC5pbnZlbnRvcnkuSXRlbVN0YWNrc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAADQl0AAlJUk9OX0JBUlM\u003d",
"alwaysAward": false,
"timeBetweenReward": 0,
"lastReward": 0
}
},
{
"type": "net.islandearth.rpgregions.rewards.PlayerCommandReward",
"properties": {
"command": "say I discovered a region!",
"alwaysAward": false,
"timeBetweenReward": 0,
"lastReward": 0
}
},
{
"type": "net.islandearth.rpgregions.rewards.ConsoleCommandReward",
"properties": {
"command": "say Server sees you discovered a region!",
"alwaysAward": false,
"timeBetweenReward": 0,
"lastReward": 0
}
},
{
"type": "net.islandearth.rpgregions.rewards.MessageReward",
"properties": {
"messages": [
"\u0026aExample message as a reward"
],
"alwaysAward": false,
"timeBetweenReward": 0,
"lastReward": 0
}
}
],
"sound": "AMBIENT_UNDERWATER_EXIT",
"icon": "WOODEN_AXE",
"iconModel": 0,
"undiscoveredIconModel": 0,
"undiscoveredIcon": "TOTEM_OF_UNDYING",
"iconCommand": [
{
"command": "say",
"clickType": "DISCOVERED",
"cooldown": 0
}
],
"showCoords": false,
"location": null,
"hints": [],
"showHint": false,
"teleportable": false,
"hidden": false,
"discoverable": true,
"effects": [
{
"type": "net.islandearth.rpgregions.effects.PotionRegionEffect",
"properties": {
"potionEffect": {
"type": "GLOWING",
"duration": 100,
"amplifier": 1,
"ambient": true,
"particles": true,
"icon": true
},
"wearingRequired": true,
"ignoreItems": [
"rO0ABXNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFwdAAPTGphdmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFibGVNYXAkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAkwABGtleXN0ABJMamF2YS9sYW5nL09iamVjdDtMAAZ2YWx1ZXNxAH4ABHhwdXIAE1tMamF2YS5sYW5nLk9iamVjdDuQzlifEHMpbAIAAHhwAAAAA3QAAj09dAABdnQABHR5cGV1cQB+AAYAAAADdAAeb3JnLmJ1a2tpdC5pbnZlbnRvcnkuSXRlbVN0YWNrc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAADQl0AA9JUk9OX0NIRVNUUExBVEU\u003d"
],
"ignorePerm": true
}
}
],
"requirements": [],
"discoveredLore": [],
"alwaysShowTitles": false,
"title": null,
"subtitle": null,
"discoveredTitle": null,
"discoveredSubtitle": null,
"regenerate": {
"schematicName": null,
"origin": null,
"regenerateInterval": 50000,
"loadChunks": false,
"regeneratingEntities": [
{
"entityType": "SHULKER",
"validSpawnSurfaces": [
"PURPUR_BLOCK",
"PURPUR_PILLAR"
],
"maxPerChunk": 5,
"rarity": 30,
"isMythicEntity": false
}
],
"onDiscover": false,
"onlyEntities": true
},
"teleportCooldown": 0,
"teleportCost": 0.0,
"showActionbar": true,
"colour": "13369344",
"lineColour": "13369344",
"dynmap": true,
"secondsInsideToDiscover": 0,
"disablePassthrough": false
}