Module: core
Color Boxes
◉ Does fuji support the hot reload?
Yes, fuji does support to hot reload the files from a enabled module.
To do that, just issue /fuji reload.
However, you can't enable or disable a module when the server is running.
This is a design decision.
Fuji will never load a disabled module at all, for these considerations:
-
For flexible, you can
disable any moduleyou don't like. -
If any other mods conflicts with
a module, you can justdisable that module. -
You only enable the
interested modules, and there is no performance paying fordisabled module.
◉ How to use fuji?
All modules are disabled by default.
You can only enable the interested modules.
Modify the config/fuji/config.json file to enable a module.
After that, re-start the server, to apply the module enable status.
◉ Adjust the lore text font size.
If the lore text is too large in your UI.
You can configure it in Esc - Options - Video Settings - GUI Scale
◉ Install the client-side mod to improve the displaying of tooltip.
If adjusting the GUI Scale option doesn't work well for you.
You can install the ToolTipFix mod to enhance the tooltip displaying.
◉ Use a modern text editor.
The most of config files are written in json language, and contains lots of lines.
A modern text editor can highlight the structure of the file, and check the syntax errors for you.
So that you can read and edit the config files easier.
Here are recommended text editors:
-
Visual Studio Code: https://code.visualstudio.com/
-
Vim: https://neovim.io/
◉ Setup a test server in your local machine.
You may have a remote machine (Typically named production server) that is running and hosting your Minecraft network.
However, it's strongly recommended to setup a test server in your local machine.
The test server should be a mirror of that production server.
It should contains the mods files and the config files.
You can modify and test new things in your test server.
After everything is configured and working properly, you just upload the mods and config files into your remote machine.
◉ Open this GUI
Issue: /fuji
◉ List all fuji commands
Issue: /fuji inspect fuji-commands
◉ List all fuji permissions and fuji metas
Issue: /fuji inspect permissions-and-metas
◉ List all fuji placeholders
Issue: /fuji inspect placeholders
◉ List all fuji configurations
Issue: /fuji inspect configurations
◉ List all fuji jobs
Issue: /fuji inspect jobs
◉ List all fuji languages
Issue: /fuji inspect languages
◉ List all fuji argument types
Issue: /fuji inspect argument-types
◉ List all fuji 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.
-
File Name:
config.json -
Document: This file is named
Main Control File.It's used to:
-
Configure the options for
core, which affects allmodules. -
Enable or disable a
module.
NOTE: You need to re-start the server, to
enableordisableamodule. -
-
File Content:
Click to see the default content...
{
/* Fuji is composed by `core` and `module`.
The `core` config affects `all` modules.
The `module` config only affects that specific module. */
"core": {
/* Debug related options. */
"debug": {
/* Force disable `all` modules.
Used to test the compatibility between `fuji` and `other mods`. */
"disable_all_modules": false
/* Should we log the `debug` level messages into the `console`?
This option can be changed using `/fuji debug` command. */,
"log_debug_messages": false
/* Should we print the user guide in the console on server startup? */,
"print_user_guide_in_console": true
}
/* Fuji will back up the `config/fuji` dir before it loads any module. */,
"backup": {
/* How many `backup files` should we keep? */
"max_slots": 15
/* The `paths` that should be skipped when backup.
The `path` is resolved and related to `config/fuji/` dir. */,
"skip": [
"modules/head/head-data"
]
}
/* The language related options. */,
"language": {
/* The `default language` used by Fuji.
The language files are located in `config/fuji/lang` dir. */
"default_language": "en_US",
"validator": {
/* Should we validate the `arguments` when loading a `language file`? */
"validate_arguments": true
}
}
/* The options for all fuji commands. */,
"command": {
/* The `command assistant` offers an `auto help` feature for all fuji commands.
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, you have to:
1. Issue `/fuji reload` first, to reload the `main control file`.
2. Issue `/reload`, to reload `all the commands`. */
"assistant": {
"enable": true
/* The requirement to use the `command assistant`. */,
"requirement": {
"level_permission": 0
}
}
}
/* The permission related options. */,
"permission": {
/* Fuji defines 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.
If you want to define the permission of commands by yourself,
you can enable `this` option.
And use `command_permission` module to define permission for each command. */
"all_commands_require_level_4_permission_to_use_by_default": false
}
/* The scheduler related options.
The `scheduler` system is used to run `jobs`. */,
"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": {
/* When `enable` this option, we will always use the `built-in doc strings`, which is written in `English`.
This option is used to ensure you always see the `latest version` of `doc strings` from your `current using version`.
When `disable` this option, we will ues the `doc strings` from the `language files`. */
"always_use_built_in_doc_strings": true
}
}
/* Fuji is designed to be fully-modular.
All modules is `disabled` by default.
You can modify the `enable` field to enable a module <red>after a server re-start</red>.
<b>Remember to `restart` the server to apply the modification.
Issue `/fuji inspect modules` to see the module status. */,
"modules": {
"fuji": {
"enable": true
}
/* The language related options. */,
"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
},
"gamerule": {
"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
}
}
}
-
File Name:
permission.json -
Document: ◉ How is
permissionhandled for each fuji command?- Each fuji command is registered with a
default level permission.
1.a. Check the status of
all_commands_require_level_4_permission_to_use_by_defaultoption inconfig.jsonfile.1.a.i. If it's
true, then all fuji commands are registered withlevel permission 4.1.a.ii. If it's
false, then each fuji command is registered withlevel permission Ndefined inpermission.jsonfile.- You can use
command_permissionmodule to assign astring permissionfor each command, and override thedefault level permission.
◉ What is the
permission.jsonfile?This file is used to define the
default required level permissionfor each registered fuji commands.After modifying this file, issue the
/reloadcommand to reload all the commands.This config is typically used in a
single-player world, where noLuckPermsmod is installed.If you are hosting a dedicated Minecraft server, you can configure the
string permissionfor each command usingcommand_permissionmodule.The
command_permissionmodule will override thecommand requirementdefined in this file.So, if you are hosting a dedicated Minecraft server, you can simply use
command_permissionmodule, and ignore this file. - Each fuji command is registered with a
-
File Content:
Click to see the default content...
{
"default_level_permission": {
"commands": {}
}
}
Jobs
-
Job Name:
FlushCacheJob -
Document: This
jobis used toflushthecache datafrommemoryintostorage.The
cache filesare located inconfig/fuji/cache/directory.
-
Job Name:
CleanTTLMapJob -
Document: This
jobis used to clean up theTTL Mapdata structure, and removeexpired entries.The
TTL Mapis used in/command-callbackcommand, to store thecallback entry.NOTE: The
/command-callbackcommand is typically used forclick eventin text.A player requires the permission to use
/command-callbackcommand, or the client will get theUnknown Command Error.
Argument Types
- Argument Type Name:
[biome] - Argument Type Class:
[BiomeId]
- Argument Type Name:
[blockpos, block-pos] - Argument Type Class:
[BlockPos]
- Argument Type Name:
[blockstate, block-state] - Argument Type Class:
[BlockState]
- Argument Type Name:
[bool, boolean] - Argument Type Class:
[boolean, Boolean]
- Argument Type Name:
[bossbar-color] - Argument Type Class:
[Color]
- Argument Type Name:
[bossbar-style] - Argument Type Class:
[Style]
- Argument Type Name:
[color] - Argument Type Class:
[Formatting]
- Argument Type Name:
[column-pos] - Argument Type Class:
[ColumnPos]
- Argument Type Name:
[] - Argument Type Class:
[CommandActor]
- Argument Type Name:
[] - Argument Type Class:
[CommandContext]
- Argument Type Name:
[command-function] - Argument Type Class:
[CommandFunction]
- Argument Type Name:
[dimension, world] - Argument Type Class:
[Dimension]
- Argument Type Name:
[dimension-type, world-type] - Argument Type Class:
[DimensionType]
- Argument Type Name:
[double] - Argument Type Class:
[double, Double]
- Argument Type Name:
[entity-anchor] - Argument Type Class:
[EntityAnchor]
- Argument Type Name:
[entity] - Argument Type Class:
[Entity]
- Argument Type Name:
[entities] - Argument Type Class:
[EntityCollection]
- Argument Type Name:
[entity-type] - Argument Type Class:
[NotSupportedType]
- Argument Type Name:
[float] - Argument Type Class:
[float, Float]
- Argument Type Name:
[float-range] - Argument Type Class:
[DoubleRange]
- Argument Type Name:
[fuji-identifier] - Argument Type Class:
[FujiIdentifier]
- Argument Type Name:
[game-profile, profile] - Argument Type Class:
[GameProfileCollection]
- Argument Type Name:
[gamemode] - Argument Type Class:
[GameMode]
- Argument Type Name:
[greedy-string, greedy] - Argument Type Class:
[GreedyString]
- Argument Type Name:
[greedy-command-string] - Argument Type Class:
[GreedyCommandString]
- Argument Type Name:
[greedy-string-list, greedy-list] - Argument Type Class:
[GreedyStringList]
- Argument Type Name:
[id, identifier] - Argument Type Class:
[Identifier]
- Argument Type Name:
[int-range] - Argument Type Class:
[IntRange]
- Argument Type Name:
[int, integer] - Argument Type Class:
[int, Integer]
- Argument Type Name:
[item-predicate] - Argument Type Class:
[ItemStackPredicateArgument]
- Argument Type Name:
[item-slot] - Argument Type Class:
[ItemSlotArgumentType]
- Argument Type Name:
[item, itemstack] - Argument Type Class:
[ItemStackWrapper]
- Argument Type Name:
[long] - Argument Type Class:
[long, Long]
- Argument Type Name:
[nbt-compound] - Argument Type Class:
[NbtCompound]
- Argument Type Name:
[nbt-element] - Argument Type Class:
[NbtElement]
- Argument Type Name:
[nbt-path] - Argument Type Class:
[NbtPath]
- Argument Type Name:
[offline-game-profile] - Argument Type Class:
[OfflineGameProfile]
- Argument Type Name:
[offline-player] - Argument Type Class:
[OfflinePlayerName]
- Argument Type Name:
[operation] - Argument Type Class:
[Operation]
- Argument Type Name:
[particle-effect] - Argument Type Class:
[ParticleEffect]
- Argument Type Name:
[player] - Argument Type Class:
[ServerPlayerEntity]
- Argument Type Name:
[players, player-list] - Argument Type Class:
[PlayerCollection]
- Argument Type Name:
[rotation] - Argument Type Class:
[PosArgument]
- Argument Type Name:
[scoreboard-criterion] - Argument Type Class:
[ScoreboardCriterion]
- Argument Type Name:
[scoreboard-objective] - Argument Type Class:
[ScoreboardObjective]
- Argument Type Name:
[scoreboard-slot] - Argument Type Class:
[ScoreboardDisplaySlot]
- Argument Type Name:
[] - Argument Type Class:
[ServerCommandSource]
- Argument Type Name:
[slot-range] - Argument Type Class:
[SlotRange]
- Argument Type Name:
[str, string] - Argument Type Class:
[String]
- Argument Type Name:
[string-list] - Argument Type Class:
[StringList]
- Argument Type Name:
[style] - Argument Type Class:
[Style]
- Argument Type Name:
[team] - Argument Type Class:
[Team]
- Argument Type Name:
[text] - Argument Type Class:
[Text]
- Argument Type Name:
[vec2f, vec2] - Argument Type Class:
[Vec2f]
- Argument Type Name:
[vec3d] - Argument Type Class:
[Vec3d]
- Argument Type Name:
[word] - Argument Type Class:
[Word]
- Argument Type Name:
[step-type] - Argument Type Class:
[StepType]
- Argument Type Name:
[duration] - Argument Type Class:
[Duration]