Skip to main content

Module: core

Color Boxes

Tip

◉ How to use this mod?

Functions are provided by modules.

All modules are disabled by default.

You need to enable the modules you want to use.

◉ How to enable a module?

  1. Edit the <your-server>/config/fuji/config.json file.

  2. In modules section, set the true and false values for each module.

  3. Re-start the server to apply the changes.

Tip

◉ Can I reload the config files while the server is running?

Yes.

You can do that only for a enabled module.

For such module, use /fuji reload to reload the module specific files.

You can not enable or disable a module while the server is running.

Modules are only loaded during the server start-up.

It's a design choice, for reasons:

  1. For performance: You never pay for the disabled modules.

  2. For compatibility: If conflicting with other mods, you can disable the related module to solve it.

Tip

◉ How can I make the lore text easier to read?

➜ Adjust lore text font size if too large

If lore text is too large:

  • Open EscOptionsVideo SettingsGUI Scale.

➜ Improve lore text rendering if necessary

If GUI scaling isn't enough, install the client-side mod ToolTipFix:

Tip

◉ How can I make the config file easier to edit?

Please use a modern text editor.

Most configuration files are written in JSON format and may be large.

A modern text editor provides structure highlighting and error checking features.

It makes configuration easier.

Recommended text editors:

  1. Visual Studio Code: https://code.visualstudio.com/

  2. Vim: https://neovim.io/

  3. Emacs: https://www.gnu.org/software/emacs/

Tip

◉ How can I know what is provided by this mod?

➜ Open the interactive document GUI

Issue: /fuji

➜ List all commands

Issue: /fuji inspect fuji-commands

➜ List all permissions and metas

Issue: /fuji inspect permissions-and-metas

➜ List all placeholders

Issue: /fuji inspect placeholders

➜ List all configurations

Issue: /fuji inspect configurations

➜ List all jobs

Issue: /fuji inspect jobs

➜ List all languages

Issue: /fuji inspect languages

➜ List all argument types

Issue: /fuji inspect argument-types

➜ List all events

Issue: /fuji inspect events

Configurations

The following JSON content is provided for reference only. It must NOT be copied directly into the configuration directory, as it does not represent valid JSON syntax.

Config
  • File Name: config.json

  • Document: This file is named Main Control File.

    It's used to:

    1. Control the behaviour of the core, which affects all modules.

    2. Enable or disable a module.

    You can NOT enable or disable a module while the server is running.

    You MUST re-start the server, to switch the modules.

  • File Content:

Click to see the default content...
config/fuji/config.json
{
/* This mod is composed of `core` and `module` parts.
The `core` part options are applied to ALL the modules.
The `module` part options are applied to ONLY that module. */
"core": {
"debug": {
/* Forcefully disable `all` modules.
If you want to test the `compatibility` between `this mod` and `other mods`, set the option to `true`. */
"disable_all_modules": false
/* Print the `DEBUG` level messages into the `console`.

This option can be switched using `/fuji debug` command, while the server is running. */,
"log_debug_messages": false
/* Print the `first-time user guide` in the `console` on server start-up. */,
"print_user_guide_in_console": true
}
/* Backup options.
This mod will back up the `config/fuji` directory at server start-up, before it loads any module. */,
"backup": {
/* Max number of backup files to keep in `config/fuji/backup/` directory. */
"max_slots": 15
/* Define the `paths` to be ignored when creating a `backup file`.
A `path` is resolved and related to the `config/fuji/` directory. */,
"skip": [
"modules/head/head-data"
]
},
"language": {
/* Define the `default language` used by this mod.
A language file is located in `config/fuji/languages/` directory. */
"default_language": "en_US"
/* Define the `common prefix` for all `language values`.
This prefix will `only` be inserted when a text is displayed in `chat message`. */,
"language_value_common_prefix": "<orange>➜</orange> ",
"validator": {
/* If true, it will `validate` the `arity` of `arguments` for each `language value`, when loading a `language file`.
If false, do nothing. */
"validate_arguments": true
}
},
"command": {
/* The `command assistant` function offers the `auto /help feature` for all commands from this mod.
It dynamically inspects possible command paths and provides users with real-time command hints.

<green>NOTE: To hot-switch this feature without a server re-start, do:
1. Issue `/fuji reload` command, to reload the `main control file`.
2. Issue `/reload` command, to reload `all the commands`. */
"assistant": {
"enable": true
/* Define the requirement to use the `command assistant` function. */,
"requirement": {
"level_permission": 0
}
}
},
"permission": {
/* ◉ What is the permission system of this mod?

➜ Vanilla `permission level` is used for all commands.
You can use this mod without a 3rd party `permission mods`.
By default, all commands from this mod using the `permission level` as their requirement.
It makes it easier to use this mod in a `single player` world.

➜ There are two groups of commands
This mod splits commands into 2 groups, for different users.
One group for `normal user`, these commands require `level 0 permission` to use.
One group for `admin user`, these commands require `level 4 permission` to use.

➜ Integrate with the `LuckPerms` mod.
One typical use-case, is to:
1. Set this option to be `true`
2. Use `command_permission` module, to assign a `string permission` for each command. */
"all_commands_require_level_4_permission_to_use_by_default": false
},
"scheduler": {
/* The logger level for `quartz` library.
The level is recommended to be higher than `WARN`, to prevent console spam.
Acceptable levels: ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF */
"logger_level": "WARN"
},
"formatter": {
"date_formatter": "yyyy-MM-dd HH:mm:ss"
},
"document": {
/* If true, it will always use the `built-in doc strings` from the `.jar` file. (It's written in `English`)
So that you can always see the `latest version` of `doc strings`.

If false, it will use the `external doc strings` from the `config/fuji/languages/<default-language>.json` file. */
"always_use_built_in_doc_strings": true
}
},
"modules": {
"fuji": {
"enable": true
},
"language": {
"enable": true
},
"chat": {
"enable": false,
"style": {
"enable": true
},
"display": {
"enable": true
},
"history": {
"enable": true
},
"trigger": {
"enable": true
},
"replace": {
"enable": true
},
"mention": {
"enable": true
},
"spy": {
"enable": false
}
},
"placeholder": {
"enable": false
},
"predicate": {
"enable": false
},
"motd": {
"enable": false
},
"nametag": {
"enable": false
},
"tab": {
"enable": false
},
"tpa": {
"enable": false
},
"back": {
"enable": false
},
"home": {
"enable": false
},
"pvp": {
"enable": false
},
"afk": {
"enable": false,
"effect": {
"enable": true
}
},
"rtp": {
"enable": false
},
"works": {
"enable": false
},
"deathlog": {
"enable": false
},
"view": {
"enable": false
},
"echo": {
"enable": true,
"send_message": {
"enable": true
},
"send_broadcast": {
"enable": true
},
"send_actionbar": {
"enable": true
},
"send_title": {
"enable": true
},
"send_toast": {
"enable": true
},
"send_chat": {
"enable": true
},
"send_bossbar": {
"enable": true
},
"send_custom": {
"enable": true
},
"send_console": {
"enable": true
},
"send_dialog": {
"enable": true
}
},
"functional": {
"enable": false,
"workbench": {
"enable": false
},
"enchantment": {
"enable": false
},
"grindstone": {
"enable": false
},
"stonecutter": {
"enable": false
},
"anvil": {
"enable": false
},
"cartography": {
"enable": false
},
"enderchest": {
"enable": false
},
"smithing": {
"enable": false
},
"loom": {
"enable": false
}
},
"economy": {
"enable": false
},
"system_message": {
"enable": false
},
"cleaner": {
"enable": false
},
"world": {
"enable": false,
"border": {
"enable": true
}
},
"skin": {
"enable": false
},
"title": {
"enable": false
},
"leaderboard": {
"enable": false
},
"jail": {
"enable": false
},
"kit": {
"enable": false
},
"rank": {
"enable": false
},
"head": {
"enable": false
},
"color": {
"enable": false,
"sign": {
"enable": true
},
"anvil": {
"enable": true
}
},
"sit": {
"enable": false
},
"teleport_warmup": {
"enable": false
},
"temp_ban": {
"enable": false
},
"anti_build": {
"enable": false
},
"warning": {
"enable": false
},
"maintenance": {
"enable": false
},
"command_scheduler": {
"enable": false
},
"command_permission": {
"enable": false
},
"command_rewrite": {
"enable": false
},
"command_alias": {
"enable": false
},
"command_bundle": {
"enable": false
},
"command_attachment": {
"enable": false
},
"command_interactive": {
"enable": false
},
"command_warmup": {
"enable": false
},
"command_cooldown": {
"enable": false
},
"command_toolbox": {
"enable": false,
"bed": {
"enable": false
},
"extinguish": {
"enable": false
},
"feed": {
"enable": false
},
"fly": {
"enable": false
},
"god": {
"enable": false
},
"hat": {
"enable": false
},
"heal": {
"enable": false
},
"itemname": {
"enable": false
},
"lore": {
"enable": false
},
"more": {
"enable": false
},
"ping": {
"enable": false
},
"realname": {
"enable": false
},
"nickname": {
"enable": false
},
"repair": {
"enable": false
},
"reply": {
"enable": false
},
"seen": {
"enable": false
},
"suicide": {
"enable": false
},
"top": {
"enable": false
},
"down": {
"enable": false
},
"trashcan": {
"enable": false
},
"tppos": {
"enable": false
},
"tphere": {
"enable": false
},
"warp": {
"enable": false
},
"burn": {
"enable": false
},
"help_op": {
"enable": false
},
"near": {
"enable": false
},
"jump": {
"enable": false
},
"compass": {
"enable": false
},
"glow": {
"enable": false
},
"freeze": {
"enable": false
},
"rules": {
"enable": false
},
"speed": {
"enable": false
},
"disconnect": {
"enable": false
}
},
"command_spy": {
"enable": false
},
"command_event": {
"enable": false
},
"command_debug": {
"enable": false
},
"command_advice": {
"enable": false
},
"command_state": {
"enable": false
},
"command_menu": {
"enable": false
},
"command_meta": {
"enable": false,
"run": {
"enable": false
},
"for_each": {
"enable": false
},
"one_of": {
"enable": false
},
"chain": {
"enable": false
},
"IF": {
"enable": false
},
"NOT": {
"enable": false
},
"AND": {
"enable": false
},
"OR": {
"enable": false
},
"nop": {
"enable": false
},
"delay": {
"enable": false
},
"json": {
"enable": false
},
"attachment": {
"enable": false
},
"shell": {
"enable": false
},
"when_online": {
"enable": false
}
},
"top_chunks": {
"enable": false
},
"world_downloader": {
"enable": false
},
"whitelist": {
"enable": false
},
"profiler": {
"enable": false
},
"launcher": {
"enable": false
},
"multiplier": {
"enable": false
},
"disabler": {
"enable": false,
"chat_speed_disabler": {
"enable": false
},
"move_speed_disabler": {
"enable": false
},
"move_wrongly_disabler": {
"enable": false
},
"max_player_disabler": {
"enable": false
}
},
"queue": {
"enable": false
},
"gameplay": {
"enable": false,
"multi_obsidian_platform": {
"enable": false
},
"carpet": {
"enable": false,
"fake_player_manager": {
"enable": false
},
"better_info": {
"enable": false
}
}
},
"doctor": {
"enable": true
},
"tester": {
"enable": false
},
"document": {
"enable": false
},
"evaluator": {
"enable": false
}
}
}
Config
  • File Name: permission.json

  • Document: ◉ What is the permission of a command from this mod?

    1. Each command is registered with a default level permission.

    1.a. Check the value of all_commands_require_level_4_permission_to_use_by_default option in config/fuji/config.json file.

    1.a.i. If true, then all commands from this mod are registered with level permission 4.

    1.a.ii. If false, then each command from this mod is registered with level permission N defined in config/fuji/permission.json file.

    ◉ What is the permission.json file?

    This file is used to define the default required level permission for each command from this mod.

    After modifying this file, issue the /reload command to reload all the commands.

    This config is usually used in a single-player world, where LuckPerms mod is NOT installed.

    If you are hosting a dedicated Minecraft server, you may want to use the command_permission module.

    ◉ What if I want to use a string permission from LuckPerms mod?

    You can use command_permission module.

    That module is used to assign a string permission for each command, and override the original (the default level permission) requirement.

    In other words, the default required level permission defined in permission.json file will be overridden by command_permission module.

  • File Content:

Click to see the default content...
config/fuji/permission.json
{
"default_level_permission": {
"commands": {}
}
}

Jobs

Job
  • Job Name: FlushCacheJob

  • Document: This job is used to flush the cache data from memory into storage.

    The cache files are located in config/fuji/cache/ directory.

Job
  • Job Name: CleanTTLMapJob

  • Document: This job is used to clean up the TTL Map data structure, and remove expired entries.

    The TTL Map is used in /command-callback command, to store the callback entry.

    NOTE: The /command-callback command is typically used for click event in text.

    A player requires the permission to use /command-callback command, or the client will get the Unknown Command Error.

Argument Types

Argument Type
  • Argument Type Name: [biome]
  • Argument Type Class: [BiomeId]
Argument Type
  • Argument Type Name: [blockpos, block-pos]
  • Argument Type Class: [BlockPos]
Argument Type
  • Argument Type Name: [blockstate, block-state]
  • Argument Type Class: [BlockState]
Argument Type
  • Argument Type Name: [bool, boolean]
  • Argument Type Class: [boolean, Boolean]
Argument Type
  • Argument Type Name: [bossbar-color]
  • Argument Type Class: [BossBarColor]
Argument Type
  • Argument Type Name: [bossbar-style]
  • Argument Type Class: [BossBarOverlay]
Argument Type
  • Argument Type Name: [color]
  • Argument Type Class: [ChatFormatting]
Argument Type
  • Argument Type Name: [column-pos]
  • Argument Type Class: [ColumnPos]
Argument Type
  • Argument Type Name: []
  • Argument Type Class: [CommandActor]
Argument Type
  • Argument Type Name: []
  • Argument Type Class: [CommandContext]
Argument Type
  • Argument Type Name: [command-function]
  • Argument Type Class: [CommandFunction]
Argument Type
  • Argument Type Name: [dimension, world]
  • Argument Type Class: [Dimension]
Argument Type
  • Argument Type Name: [dimension-type, world-type]
  • Argument Type Class: [DimensionType]
Argument Type
  • Argument Type Name: [double]
  • Argument Type Class: [double, Double]
Argument Type
  • Argument Type Name: [entity-anchor]
  • Argument Type Class: [Anchor]
Argument Type
  • Argument Type Name: [entity]
  • Argument Type Class: [Entity]
Argument Type
  • Argument Type Name: [entities]
  • Argument Type Class: [EntityCollection]
Argument Type
  • Argument Type Name: [entity-type]
  • Argument Type Class: [NotSupportedType]
Argument Type
  • Argument Type Name: [float]
  • Argument Type Class: [float, Float]
Argument Type
  • Argument Type Name: [float-range]
  • Argument Type Class: [NotSupportedType]
Argument Type
  • Argument Type Name: [fuji-identifier]
  • Argument Type Class: [FujiIdentifier]
Argument Type
  • Argument Type Name: [game-profile, profile]
  • Argument Type Class: [GameProfileCollection]
Argument Type
  • Argument Type Name: [gamemode]
  • Argument Type Class: [GameType]
Argument Type
  • Argument Type Name: [greedy-string, greedy]
  • Argument Type Class: [GreedyString]
Argument Type
  • Argument Type Name: [greedy-command-string]
  • Argument Type Class: [GreedyCommandString]
Argument Type
  • Argument Type Name: [greedy-string-list, greedy-list]
  • Argument Type Class: [GreedyStringList]
Argument Type
  • Argument Type Name: [id, identifier]
  • Argument Type Class: [IdentifierIR]
Argument Type
  • Argument Type Name: [int-range]
  • Argument Type Class: [NotSupportedType]
Argument Type
  • Argument Type Name: [int, integer]
  • Argument Type Class: [int, Integer]
Argument Type
  • Argument Type Name: [item-predicate]
  • Argument Type Class: [Result]
Argument Type
  • Argument Type Name: [item-slot]
  • Argument Type Class: [SlotArgument]
Argument Type
  • Argument Type Name: [item, itemstack]
  • Argument Type Class: [ItemStackWrapper]
Argument Type
  • Argument Type Name: [long]
  • Argument Type Class: [long, Long]
Argument Type
  • Argument Type Name: [nbt-compound]
  • Argument Type Class: [CompoundTag]
Argument Type
  • Argument Type Name: [nbt-element]
  • Argument Type Class: [Tag]
Argument Type
  • Argument Type Name: [nbt-path]
  • Argument Type Class: [NbtPath]
Argument Type
  • Argument Type Name: [offline-game-profile]
  • Argument Type Class: [OfflineGameProfile]
Argument Type
  • Argument Type Name: [offline-player]
  • Argument Type Class: [OfflinePlayerName]
Argument Type
  • Argument Type Name: [operation]
  • Argument Type Class: [Operation]
Argument Type
  • Argument Type Name: [particle-effect]
  • Argument Type Class: [ParticleOptions]
Argument Type
  • Argument Type Name: [player]
  • Argument Type Class: [ServerPlayer]
Argument Type
  • Argument Type Name: [players, player-list]
  • Argument Type Class: [PlayerCollection]
Argument Type
  • Argument Type Name: [rotation]
  • Argument Type Class: [Coordinates]
Argument Type
  • Argument Type Name: [scoreboard-criterion]
  • Argument Type Class: [ObjectiveCriteria]
Argument Type
  • Argument Type Name: [scoreboard-objective]
  • Argument Type Class: [Objective]
Argument Type
  • Argument Type Name: [scoreboard-slot]
  • Argument Type Class: [DisplaySlot]
Argument Type
  • Argument Type Name: []
  • Argument Type Class: [CommandSourceStack]
Argument Type
  • Argument Type Name: [slot-range]
  • Argument Type Class: [SlotRange]
Argument Type
  • Argument Type Name: [str, string]
  • Argument Type Class: [String]
Argument Type
  • Argument Type Name: [string-list]
  • Argument Type Class: [StringList]
Argument Type
  • Argument Type Name: [style]
  • Argument Type Class: [Style]
Argument Type
  • Argument Type Name: [team]
  • Argument Type Class: [PlayerTeam]
Argument Type
  • Argument Type Name: [text]
  • Argument Type Class: [Component]
Argument Type
  • Argument Type Name: [vec2f, vec2]
  • Argument Type Class: [Vec2]
Argument Type
  • Argument Type Name: [vec3d]
  • Argument Type Class: [Vec3]
Argument Type
  • Argument Type Name: [word]
  • Argument Type Class: [Word]
Argument Type
  • Argument Type Name: [step-type]
  • Argument Type Class: [StepType]
Argument Type
  • Argument Type Name: [duration]
  • Argument Type Class: [Duration]