XGamemode
No reviews yet
You're not switching modes, you're switching dimensions.
Enhances game performance and optimizes resource usage.
Paper is a fork of Spigot that adds its own plugin API on top of the Bukkit API. All Spigot plugins are compatible with paper, not all paper plugins are compatible with Spigot.
Spigot is a popular software for running dedicated servers that can load Plugins created with the Bukkit API.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description

“You're not switching modes, you're switching dimensions.”
2000 Downloads?! Thanks!
1 Feature
1.1 Offline Player
You can change the gamemode of a player, even he (or she) was offline.
1.2 Permissions
Allow permission group plugins (like Luckperms) to manage which gamemodes can be switched to and which gamemodes cannot be switched to.
e.g. Allow to switch to survival mode but not to any other mode.
1.3 Alias
/gamemode is simplified to /gm and /g.
(of course you can still use /gamemode)
1.4 Cross-Server Storage
Support MySQL and SQLite storage backends. Player gamemodes are saved and synchronized across multiple servers in a network.
1.5 Folia Support
Fully compatible with Folia servers — using region-based scheduling for optimal performance.
1.6 Lightweight
The Plugin size is only ~25 KB and has almost no impact on server performance!
2 Caution
2.1 Shortcut Keys
If you need to use shortcut keys such as F3+F4, please install another plugin F3NPerm.
2.2 Versions
1.8.X +
All Bukkit based server (Paper, Spigot, Purpur, Folia, etc.)
3 Commands
- /xgamemode
- /xgamemode reload
- /gm <mode>
- /gm <mode> <player>
- /gm <mode> -all
- /gm <mode> -online
- /gm <mode> -offline
/g = /gm = /gamemode
/xg = /xgm = /xgamemode
4 Permission Node
- xgamemode.survival
- xgamemode.creative
- xgamemode.adventure
- xgamemode.spectator
- xgamemode.others.survival
- xgamemode.others.creative
- xgamemode.others.adventure
- xgamemode.others.spectator
- xgamemode.reload
- xgamemode.admin
5 Custom Config
5.1 Basic Settings
lang: en-US
Language setting
default_gamemode: survival
If a new player joined your server, which gamemode should he (she) be?
survival, creative, adventure, spectator
show_logo: true
Show logo or not when plugin enabled.
true, false
debug: false
Enable debug logging for troubleshooting.
true, false
5.2 Storage Configuration
storage:
type: yaml
Storage backend type: yaml, sqlite, mysql
SQLite Example
storage:
type: sqlite
# No additional config needed — data.db will be created automatically
MySQL Example
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: minecraft
username: root
password: your_password
5.3 Custom Messages
messages:
en-US: # Original en-US Language by Wind_Blood
reloaded: "&aXGamemode Reloaded!"
# ......
custom_lang: # Add Your Custom Language!
reloaded: "Thank you for using XGamemode!"
# ......
Customizable Messages. You can add your own new language here!
5.4 An Example config.yml
lang: msgForMyServer
default_gamemode: survival
show_logo: false
debug: false
storage:
type: yaml
messages:
msgForMyServer:
reloaded: "很明显作者是中国人 会说中文很正常 然后我也不知道为什么我要在一堆英文里写一段中文 挺好笑的 哈哈哈 对了 看到我就是缘分 XGamemode 官方 QQ 反馈交流群:点击链接加入群聊【XGamemode 反馈群】:https://qm.qq.com/q/rpTk5LK7w4 欢迎加"
usage: "&cUsage: /gm <mode> [player/-all/-online/-offline]"
console_usage: "&cUsage: /gm <mode> <player/-all/-online/-offline>"
invalid_gamemode: "&cInvalid Gamemode!"
invalid_player: "&cInvalid Player!"
gamemode_self: "&aYour Gamemode Changed to {mode}!"
gamemode_all: "&aChanged All Player's Gamemode to {mode}!"
gamemode_online: "&aAll Online Player's Gamemode Changed to {mode}!"
gamemode_offline: "&aAll Offline Player's Gamemode Changed to {mode}!"
no_permission: "&cYOU ARE NOT ALLOWED TO DO THAT!"
gamemode_other: "&a{player}'s Gamemode Changed to {mode}!"
gamemode_other_offline: "&a{player} (Offline)'s Gamemode Changed to {mode}!"
6 Developer API (Async)
Get Instance
Main plugin = Main.getInstance();
Get Player Gamemode
plugin.getPlayerMode(playerUUID).thenAccept(mode -> {
if (mode != null) {
// mode is GameMode.SURVIVAL, CREATIVE, ADVENTURE, or SPECTATOR
// Player is online or has saved data
} else {
// Player not found or no saved gamemode yet
}
});
Set Player Gamemode
plugin.setPlayerMode(playerUUID, GameMode.SURVIVAL).thenAccept(success -> {
if (success) {
// Gamemode changed and saved successfully
// Works for both online and offline players
} else {
// Failed to save (database error, etc.)
}
});
Listen to Gamemode Changes
@EventHandler
public void onGamemodeChange(GamemodeChangeEvent event) {
Player player = event.getPlayer(); // Online player only
GameMode oldMode = event.getOldMode();
GameMode newMode = event.getNewMode();
}
Note: All APIs are fully async and thread-safe. The
GamemodeChangeEventis only fired for online players when their mode is actually changed. ThegetPlayerMode()method returnsnullif the player has no saved gamemode data.
7 Reprint Post
www.minebbs.com/resources/xgamemode.11041
hangar.papermc.io/Wind_Blood/XGamemode
modrinth.com/plugin/xgamemode
8 Feedback
Just e-mail me with [email protected]. Thanks!
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources