XGamemode

Quick rating

XGamemode

No reviews yet

You're not switching modes, you're switching dimensions.

Performance & Optimization
Mod Loaders
Paper
Spigot
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Unsupported
Server Required

About

Project Details

Type
Mod
License
Creative Commons Attribution Non Commercial Share Alike 4.0 International
Latest Version
4.5-rls
Authors

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.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

XGamemode Logo

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 GamemodeChangeEvent is only fired for online players when their mode is actually changed. The getPlayerMode() method returns null if 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!

Screenshots

Gallery

  • XGamemode
    XGamemode XGamemode

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

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~2,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works