From c4fcdeb7c2cb8e2d9e7dcb405027cc93c1c507b7 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Tue, 1 Feb 2022 20:15:26 -0600 Subject: [PATCH] Add config and messages documentation --- docs/Customization/config.md | 137 ++++++++++++++++++++++++++++++++- docs/Customization/messages.md | 66 +++++++++++++++- 2 files changed, 201 insertions(+), 2 deletions(-) diff --git a/docs/Customization/config.md b/docs/Customization/config.md index b26e22a..ec43e62 100644 --- a/docs/Customization/config.md +++ b/docs/Customization/config.md @@ -7,4 +7,139 @@ sidebar_position: 1 # Introduction This page will show you how to modify the configuration file. The configuration file is located at: ```/plugins/Plex/config.yml```. -# Coming soon... \ No newline at end of file +# Default configuration +Below is the default `config.yml` file when Plex is loaded for the first time. +```yaml title=/plugins/Plex/config.yml +# Plex Configuration File + +server: + name: "Plexus" + motd: "%servername% - Minecraft %mcversion%" + colorize_motd: true + +# Ban message is customized here. Additional messages can be configured in messages.yml +banning: + message: "&cYou are banned! Please appeal on the forums at https://forum.plex.us.org/" + + +# Settings for commands relating to Plex +commands: + # Should Plex use a "true op" system with ranks or only permission nodes + permissions: ranks + +data: + central: + storage: sqlite # Use mariadb, mongodb, or sqlite here + user: "" + password: "" + hostname: 127.0.0.1 + port: 27017 + db: "plex" + side: # This is Redis, leave password blank if auth is false + auth: true + hostname: 127.0.0.1 + port: 6379 + password: "" + +worlds: + flatlands: + name: "Flatlands" + parameters: + grass_block: 1 + dirt: 32 + stone: 16 + bedrock: 1 + adminworld: + name: "Admin World" + parameters: + grass_block: 1 + dirt: 32 + stone: 16 + bedrock: 1 + masterbuilderworld: + name: "MasterBuilder World" + parameters: + grass_block: 1 + dirt: 32 + stone: 16 + bedrock: 1 + +# Additional logging for debugging +debug: false +``` + +# Server +### server.name +The name of your server goes here and is used throughout Plex. +### server.motd +The text here will appear on the server list. +### server.colorize_motd +This determines if the message of the day should randomly be colorized. You can disable this option and manually colorize your MOTD. + +# Banning +### banning.message +This message will appear whenever a player tries to join the server, but is banned. You can use any color coding you would like here. + +# Commands +### comamnds.permissions +**Options:** `ranks` or `permissions` + +This determines how Plex's command system works. If `ranks` is selected, Plex will use a ranking system and give all players operator status. If `permissions` is selected, no players are given operator. Instead, every command will have a permission attached to it which can be assigned in any permission system. + +# Data +### data.central.storage +**Options**: `sqlite`, `mariadb`, `mongodb` + +Select which database software you would like to use. `sqlite` is the default. Note that if you change which data storage you use, no data will be transferred. + +### data.central.user +This is the username for whichever database software you use. Note that `sqlite` does not require a username. + +### data.central.password +This is the password for whichever database software you use. Note that `sqlite` does not require a password. + +### data.central.hostname +This is the hostname for whichever database software you use. Note that `sqlite` does not require a hostname. + +### data.central.port +This is the port for whichever database software you use. Note that `sqlite` does not require a port. + +### data.central.db +This is the name for whichever database software you use. Note that `sqlite` does not require a name. + +### data.side.auth +**Options**: `true` / `false` + +This is whether authentication mode for Redis is turned on or not + +:::info +It is highly recommended to have Redis authentication turned on. +::: + +### data.side.hostnane +This is the hostname for Redis. This is required for Redis to work. + +### data.side.port +This is the port that Redis is listening on. This is requird for Redis to work. + +### data.side.password +This is the password for your Redis instance. Note that this can be left if authentication is turned off. + + +# Worlds +An infinite amount of worlds can be generated from the configuration file. A few are automatically generated by default. The format for generating new worlds is as follows: +```yaml title=/plugins/Plex/config.yml + : + name: 'Human readable name' + parameters: + grass_block: 1 + dirt: 32 + stone: 16 + bedrock: 1 +``` +Note that in the `parameters` section, this is how the world should actually be generated. The order is from top to bottom. In the example above, a world will generate with one grass layer, 32 layers of dirt, 16 layers of stone, and one layer of bedrock. + +# Debugging +**Options:** `true` / `false` + +The `debug` option is standalone and enables additional logging. This may be useful for diagnosing issues as more information will be displayed in the console. It is recommended to keep this option turned off. \ No newline at end of file diff --git a/docs/Customization/messages.md b/docs/Customization/messages.md index a07778f..41db4ae 100644 --- a/docs/Customization/messages.md +++ b/docs/Customization/messages.md @@ -7,4 +7,68 @@ sidebar_position: 2 # Introduction Almost all of the messages inside of Plex are fully customizable. This page will document how to change messages in the ```messages.yml``` file inside the Plex folder. -# Coming soon... \ No newline at end of file +# Default file +The default `messages.yml` file is below. +```yaml title=/plugins/Plex/messages.yml +# Plex Messages File + +baseColor: "7" +broadcastColor: "b" +errorColor: "c" + +test: "this is a test message!" +# 1: the command sender's username +variableTest: "variable test with !" +playerNotFound: "Player not found!" +worldNotFound: "World not found!" +noAdminWorldBlockPlace: "You are not allowed to place blocks in the admin world!" +noAdminWorldBlockBreak: "You are not allowed to break blocks in the admin world!" +# 1: the world you have been teleported to +playerWorldTeleport: "You have been teleported to ." +# 1: the command sender who opped everyone +oppedAllPlayers: " - Opped all players on the server" +deoppedAllPlayers: " - De-opped all players on the server" +# 1: the person who is opping +# 2: the person who has been opped +oppedPlayer: " - Opped " +# 1: the person who is freezing +# 2: the person who has been frozen +frozePlayer: " - Froze " +# 1: the person who is unfreezing +# 2: the person who has been unfrozen +unfrozePlayer: " - Unfroze " +noPermission: "You cannot use this command!" +# 1: the login message (uncolored) of the rank required to use the command +noPermissionRank: "You must be at least to use this command!" +noPermissionNode: "You must have the permission: to use this command!" +noPermissionInGame: "You must be in console to use this command!" +noPermissionConsole: "You must be in-game to use this command!" +# 1: the username of the name history +nameHistoryTitle: "Name History of " +# 1: a username of the found user +# 2: when the user changed to that username +nameHistoryBody: " - ()" +# 1: the username that failed +nameHistoryFail: "Something went wrong while trying to retrieve name history of ! Try again later!" +gameModeSetTo: "Your gamemode has been set to ." +setOtherPlayerGameModeTo: "You set 's gamemode to ." +playerSetOtherGameMode: " set your gamemode to ." +consoleMustDefinePlayer: "You must define a player since you are running this command from console." +newAdminAdded: " - Adding to the admin list" +adminRemoved: " - Removing from the admin list" +adminSetRank: " - Setting 's rank to " +teleportedToWorld: "You have been teleported to the ." +higherRankThanYou: "This player is an admin and a higher rank than you." +playerNotAdmin: "That player is not an admin." +playerIsAdmin: "That player is already an admin." +rankNotFound: "The rank you entered was not found." +rankMustBeHigherThanAdmin: "The rank you entered must be higher than Admin." +consoleOnly: "This command can only be executed by the console." +yourRank: "Your rank is: " +banningPlayer: " - Banning " +unbanningPlayer: " - Unbanning " +playerNotBanned: "That player is not banned!" +``` + +# Troubleshooting +If you receive `No message.` when executing a command, it is likely you need to regenerate your `messages.yml` file. The default configuration file is also available on [GitHub](https://raw.githubusercontent.com/PlexDevelopment/Plex/master/src/main/resources/messages.yml). \ No newline at end of file