Version 3.7.0
The Discord Admin Plugin is a comprehensive integration between Rising World and Discord, providing advanced administration tools, player management, chat relay, and server monitoring capabilities. This plugin enables server admins to manage their Rising World server directly from Discord, streamlining administration and enhancing the player community experience.
plugins
directoryconfig.properties
file in the plugin's directoryNote: Upon first start, the plugin will create default configuration files in a folder named plugins/Discord Admin Integration
in your Rising World server directory.
Before using the plugin, you need to create a Discord bot and invite it to your server:
config.properties
file's discord.token
settingconfig.properties
file's discord.admin.channel
settingTip: To enable Developer Mode in Discord, go to User Settings > Advanced > Developer Mode.
The main configuration file is config.properties
located in your plugin's directory. Below are the available settings, organized by category.
Setting | Description | Default Value |
---|---|---|
discord.token |
Your Discord bot token (required) | Empty |
discord.admin.channel |
Discord channel ID for admin communications (required) | Empty |
discord.bot.activity |
Bot activity status shown in Discord | Watching Rising World |
discord.startup.notification |
Send notification when plugin starts (true/false) | true |
discord.error.notification.enabled |
Send notifications about errors (true/false) | true |
Setting | Description | Default Value |
---|---|---|
chat.relay.game_to_discord |
Enable chat relay from game to Discord | true |
chat.relay.discord_to_game |
Enable chat relay from Discord to game | true |
chat.format.discord_to_game |
Format for messages sent from Discord to game. Placeholders: %author%, %message% | [Discord] %author%: %message% |
chat.format.game_to_discord |
Format for messages sent from game to Discord. Placeholders: %player%, %message% | [Game] %player%: %message% |
Setting | Description | Default Value |
---|---|---|
chat.filter.enabled |
Enable the chat filter (true/false) | false |
chat.filter.words |
Comma-separated list of words to filter from chat | badword1,badword2 |
Setting | Description | Default Value |
---|---|---|
status.updates.enabled |
Enable automatic status updates | true |
status.updates.interval |
Status update interval in minutes | 10 |
status.embed.online.color |
Color for online status in hex format | #00FF00 |
status.embed.offline.color |
Color for offline status in hex format | #FF0000 |
status.embed.restart.color |
Color for restart status in hex format | #FFA500 |
status.embed.max_players |
Maximum number of players to display in status message | 15 |
status.embed.show_admin |
Show admin status in player list (true/false) | false |
status.embed.show_player_time |
Show player connection time in player list (true/false) | false |
status.embed.recreate_on_startup |
Always recreate status message on startup instead of reusing existing one (true/false) | false |
Setting | Description | Default Value |
---|---|---|
restart.daily.enabled |
Enable daily automatic restarts (true/false) | true |
restart.daily.time |
Daily restart time in 24-hour format (HH:MM) | 04:00 |
restart.timezone |
Timezone for restart scheduling (e.g. UTC, America/New_York) | System default |
restart.countdown.minutes |
Warning countdown in minutes before restart | 30 |
restart.warning.times |
Warning times in minutes (comma-separated) | 20,15,10,5,3,1 |
restart.broadcast.prefix |
Prefix for restart warning messages | ⚠️ **SERVER RESTART** |
restart.pre_shutdown.backup |
Create backup before restart (true/false) | true |
restart.immediate_action |
Action to take when immediate restart is triggered: "lock" or "kick" | lock |
restart.command |
Server restart command (OS specific) | OS specific default |
Note: The restart.command
setting is crucial for proper restart functionality. For Linux servers, a bash script is typically used. For Windows, a batch file might be needed.
Linux:
restart.command=bash -c "./rwserver restart > /Home/RWserver/log/command_output.log 2>&1 &"
Windows:
restart.command=start cmd /c start_server.bat
Setting | Description | Default Value |
---|---|---|
discord.message.delete.delay |
Delay (in seconds) before deleting messages | 300 |
discord.message.delete.mode |
Message deletion mode: "always", "on_restart", or "never" | always |
Setting | Description | Default Value |
---|---|---|
player.connection.log.enabled |
Enable logging of player connections (true/false) | true |
player.connection.log.directory |
Directory for player connection logs | player_connections |
player.rejoin.time.track |
Track time between player rejoins (true/false) | true |
player.history.enabled |
Enable player history tracking (true/false) | true |
player.history.max_notes |
Maximum number of notes per player | 50 |
player.welcome.message.enabled |
Enable welcome message for new players (true/false) | true |
player.welcome.message |
Welcome message text (placeholder: %player% | Welcome to the server, %player%! |
Setting | Description | Default Value |
---|---|---|
message.join.format |
Player join message format (placeholder: %player%,%playercount%,%totalplayers%) | 🟢 **%player% joined the server** |
message.leave.format |
Player leave message format (placeholder: %player%,%playercount%, %totalplayers%) | 🔴 **%player% left the server** |
Setting | Description | Default Value |
---|---|---|
invite.enabled |
Master switch to enable/disable Discord invites completely | true |
invite.auto_assign_role |
Automatically assign roles based on invite used | true |
invite.tracking_window |
Tracking window (in seconds) for invite usage detection | 15 |
invite.auto_send_on_join |
Enable automatic Discord invite on player join (true/false) | true |
invite.welcome_message |
Discord welcome message for new members (placeholder: %user%) | Welcome, %user%! Join our game server with /link |
invite.use_dynamic |
Use dynamic invites with expiry (true) or permanent invites (false) | false |
invite.dynamic.max_uses |
Default maximum uses for dynamic invites (0 for unlimited) | 1 |
invite.dynamic.expiration_hours |
Default expiration hours for dynamic invites (0 for never) | 24 |
invite.dynamic.role_id |
Role ID to assign for dynamic invites (required when dynamic invites enabled) | Empty |
Note: The dynamic invite system is a new feature in version 3.7. It allows for creating temporary invites that expire after a certain time or number of uses, with automatic role assignment.
Setting | Description | Default Value |
---|---|---|
backup.directory |
Directory for backups | backups |
backup.max_count |
Maximum number of backups to keep | 10 |
Setting | Description | Default Value |
---|---|---|
logs.max_files |
Maximum number of log files to keep | 30 |
logs.directory |
Directory for log files | logs |
logs.level |
Log level (DEBUG, INFO, WARNING, SEVERE, CRITICAL) | INFO |
logs.console.debug |
Enable console output for debug logs (true/false) | false |
The plugin adds numerous slash commands to Discord. Below is a complete reference.
Lists all online players on the server.
Permissions: Available to everyone by default
Refreshes the server status message.
Permissions: ADMINISTRATOR, MANAGE_SERVER
Kicks a player from the server.
Parameters:
player
- Player name (required)reason
- Reason for kick (optional)Permissions: KICK_MEMBERS, ADMINISTRATOR
Bans a player from the server.
Parameters:
player
- Player name (required)reason
- Reason for ban (optional)time
- Ban duration in minutes (-1 for permanent) (optional)Permissions: BAN_MEMBERS, ADMINISTRATOR
Unbans a player from the server.
Parameters:
player
- Player name (required)Permissions: BAN_MEMBERS, ADMINISTRATOR
Teleports a player to coordinates or another player.
Parameters:
player
- Player name (required)x
- X coordinate (optional)y
- Y coordinate (optional)z
- Z coordinate (optional)target
- Target player name (optional)Permissions: ADMINISTRATOR
Note: You must provide either coordinates (x, y, z) or a target player.
Broadcasts a message to all players on the server.
Parameters:
message
- Message to broadcast (required)Permissions: MANAGE_SERVER, ADMINISTRATOR
Initiates a server restart with the configured countdown.
Permissions: MANAGE_SERVER, ADMINISTRATOR
Enables or disables automatic server restarts.
Parameters:
enabled
- Whether restarts should be enabled (true/false) (required)Permissions: ADMINISTRATOR
Sets the daily restart time.
Parameters:
time
- Time in HH:MM format (24-hour) (required)Permissions: ADMINISTRATOR
Sets the timezone for restarts.
Parameters:
timezone
- Timezone ID (e.g., UTC, America/New_York) (required)Permissions: ADMINISTRATOR
Lists available timezones for restart configuration.
Parameters:
common_only
- Show only common timezones (optional)Permissions: ADMINISTRATOR
Reloads the plugin's configuration files.
Permissions: ADMINISTRATOR
Links your Discord account to your game account.
Parameters:
username
- Your in-game username (required)Permissions: Available to everyone by default
Promotes a player to admin status.
Parameters:
player
- Player name (required)Permissions: ADMINISTRATOR
Demotes a player from admin status.
Parameters:
player
- Player name (required)Permissions: ADMINISTRATOR
Adds a warning to a player's history.
Parameters:
player
- Player name (required)reason
- Warning reason (required)Permissions: KICK_MEMBERS, ADMINISTRATOR
Adds a note to a player's history.
Parameters:
player
- Player name (required)note
- Note text (required)Permissions: KICK_MEMBERS, ADMINISTRATOR
View a player's history (warnings, notes, moderation actions).
Parameters:
player
- Player name (required)Permissions: KICK_MEMBERS, ADMINISTRATOR
Delete a note from a player's history.
Parameters:
player
- Player name (required)note_id
- Note ID to delete (required)Permissions: ADMINISTRATOR
Resets Discord connection status for a player.
Parameters:
player
- Player name (required)Permissions: ADMINISTRATOR
Sends a Discord invite to a specific player.
Parameters:
player
- Player name (required)invite_code
- Discord invite code (without discord.gg/) (optional)dynamic
- Create a dynamic invite (optional)role
- Role ID to assign for dynamic invite (optional)max_uses
- Maximum uses for dynamic invite (optional)expiration_hours
- Hours until expiration for dynamic invite (optional)Permissions: ADMINISTRATOR
Enable or disable Discord invites completely.
Parameters:
enabled
- Whether Discord invites should be enabled (true/false) (required)Permissions: ADMINISTRATOR
Creates an invite link that assigns a role.
Parameters:
channel
- Channel ID to create invite for (required)role
- Role ID to assign (required)max_uses
- Maximum number of uses (0 for unlimited) (optional)expiration_hours
- Hours until expiration (0 for never) (optional)Permissions: CREATE_INSTANT_INVITE, ADMINISTRATOR
Creates a dynamic invite with expiry.
Parameters:
channel
- Channel ID to create invite for (required)role
- Role ID to assign (required)max_uses
- Maximum number of uses (0 for unlimited) (optional)expiration_hours
- Hours until expiration (0 for never) (optional)Permissions: CREATE_INSTANT_INVITE, ADMINISTRATOR
Links an existing invite with a role.
Parameters:
channel
- Channel ID where the invite exists (required)code
- Invite code to link (required)role
- Role ID to assign (required)Permissions: MANAGE_CHANNEL, ADMINISTRATOR
Deletes a role invite.
Parameters:
code
- Invite code to delete (required)Permissions: MANAGE_CHANNEL, ADMINISTRATOR
Lists all role invites.
Permissions: MANAGE_CHANNEL, ADMINISTRATOR
Sets the default Discord invite for automatic player invites.
Parameters:
invite_code
- Discord invite code (without discord.gg/) (required)Permissions: ADMINISTRATOR
Sets whether to use dynamic or permanent invites.
Parameters:
type
- Invite type: "dynamic" or "permanent" (required)Permissions: ADMINISTRATOR
The Discord Admin Plugin offers powerful tools for managing Discord invites and automatically assigning roles to players who join your Discord server. Here's a comprehensive guide to setting this up.
Enable invites in configuration:
Make sure the following settings are enabled in your config.properties
:
invite.enabled=true invite.auto_assign_role=true invite.auto_send_on_join=true
Create a role for players:
In your Discord server, create a role for players (e.g., "Rising World Player").
Right-click on the role and select "Copy ID" (make sure Developer Mode is enabled in Discord).
Create an invite with role assignment:
Use the command /create_invite
in Discord:
/create_invite channel:YOUR_CHANNEL_ID role:YOUR_ROLE_ID
Replace YOUR_CHANNEL_ID
with the ID of the channel you want the invite to direct to (right-click channel, "Copy ID").
Replace YOUR_ROLE_ID
with the ID of the role you copied earlier.
Set as default invite:
Once the invite is created, you'll get a response with the invite code. Use this to set it as the default:
/set_default_invite invite_code:YOUR_INVITE_CODE
This invite will now be automatically sent to players when they join your server.
Dynamic invites are temporary invites that expire after a set time or number of uses. This can provide better security and tracking.
Enable dynamic invites in configuration:
Update your config.properties
with:
invite.use_dynamic=true invite.dynamic.max_uses=1 invite.dynamic.expiration_hours=24 invite.dynamic.role_id=YOUR_ROLE_ID
Replace YOUR_ROLE_ID
with the Discord role ID for players.
Switch to dynamic invites in Discord:
/set_invite_type type:dynamic
Test the system:
You can manually send a dynamic invite to a player with:
/send_discord_invite player:PlayerName dynamic:true role:YOUR_ROLE_ID
You can create multiple invites with different roles for different player types:
Create different roles in Discord:
Examples: "RW-VIP", "RW-Donor", "RW-Regular", etc.
Create multiple invites with different roles:
/create_invite channel:CHANNEL_ID role:VIP_ROLE_ID /create_invite channel:CHANNEL_ID role:DONOR_ROLE_ID /create_invite channel:CHANNEL_ID role:REGULAR_ROLE_ID
Send specific invites to specific players:
/send_discord_invite player:VIPPlayerName invite_code:VIP_INVITE_CODE
/list_invites
/delete_invite code:INVITE_CODE
/reset_discord_connection player:PlayerName
Security Tip: Consider using dynamic invites with a single-use limit for better security. This prevents invite links from being shared and ensures each player gets a unique invite.
The Discord Admin Plugin includes a chat filter system that can automatically censor inappropriate words in both in-game and Discord chat. Here's how to set it up.
Enable the chat filter:
In your config.properties
file, set:
chat.filter.enabled=true
Define filtered words:
Add a comma-separated list of words to filter:
chat.filter.words=badword1,badword2,badword3
The filter is case-insensitive, so you don't need to include variations.
Save and restart:
Save your configuration file and restart the server to apply the changes.
The chat filter has several advanced features:
To effectively maintain your chat filter:
Note: The chat filter will only affect new messages; it won't retroactively filter existing messages in Discord.
The player history system allows server administrators to keep track of player behavior, warnings, and notes. This is especially useful for moderation and tracking problematic players.
Enable player history:
In your config.properties
, ensure these settings are enabled:
player.history.enabled=true player.history.max_notes=50
Restart your server:
This will create the necessary directories and files for the history system.
There are two main types of entries you can add to a player's history:
Warnings:
Warnings are formal notifications to players about rule violations. To add a warning:
/warn player:PlayerName reason:Reason for warning
When you add a warning, the player will be notified in-game with a message.
Notes:
Notes are staff-only comments about a player. To add a note:
/note player:PlayerName note:This is a staff note about the player
Notes are not visible to the player.
To view a player's complete history:
/history player:PlayerName
This will show:
To delete a note from a player's history:
/history player:PlayerName
/delete_note player:PlayerName note_id:NOTE_ID
When a player connects to the server, if they have any warnings, they will be informed of the number of warnings on their record.
Tip: Player history is stored in JSON files in the player_history
directory inside your plugin folder. These can be backed up if needed.
Automated server restarts can help maintain server performance and stability. The Discord Admin Plugin provides a robust system for scheduled restarts with appropriate warnings and notifications.
Enable automated restarts:
In your config.properties
, set:
restart.daily.enabled=true restart.daily.time=04:00 restart.timezone=UTC
This would schedule a daily restart at 4:00 AM UTC.
Configure warning times:
restart.countdown.minutes=30 restart.warning.times=20,15,10,5,3,1
This sets a 30-minute countdown with warnings at 20, 15, 10, 5, 3, and 1 minutes before restart.
Set message format:
restart.broadcast.prefix=⚠️ **SERVER RESTART**
The most important part of the restart system is the restart command, which is OS-specific:
restart.command=bash -c "./rwserver restart > /Home/RWserver/log/command_output.log 2>&1 &"
This assumes you have a script called rwserver
in the current directory with a restart
command.
restart.command=start cmd /c start_server.bat
This assumes you have a batch file called start_server.bat
that handles restarting the server.
Important: The restart command must be properly configured for your specific server environment. Testing is highly recommended to ensure it works correctly.
To list available timezones and set your server's timezone:
/list_timezones
to see available timezone IDs/restart_timezone timezone:America/New_York
(example)To manually trigger a restart with the configured countdown:
/restart
Configure what happens right before restart:
restart.pre_shutdown.backup=true
- Create a backup before restartrestart.immediate_action=lock
- Action to take at 2 minutes before restart ("lock" or "kick")You can temporarily disable and re-enable scheduled restarts:
/restart_enable enabled:false
/restart_enable enabled:true
You can change the daily restart time without editing the config file:
/restart_time time:03:30
This would change the restart time to 3:30 AM in your configured timezone.
Best Practice: Schedule restarts during low-activity hours to minimize disruption to players.
discord.token
is correct and properly formattedapplications.commands
scope enabled in the invite URL/reload_config
command if it's availableadmins.properties
file to add your Discord user IDchat.relay.game_to_discord
and chat.relay.discord_to_game
are set to true
discord.admin.channel
restart.command
is correctly configured for your OSinvite.enabled
and invite.auto_send_on_join
are set to true
/set_default_invite
invite.dynamic.role_id
is set correctlyplugins
directoryTo get more detailed information for troubleshooting:
Enable detailed logging:
In your config.properties
, set:
logs.level=DEBUG logs.console.debug=true
Check log files:
Log files are stored in the logs
directory within your plugin folder.
If you're still experiencing issues:
Discord Admin Plugin Manual - Version 3.7.0