mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
addition of PlayerGameModeChangeEvent
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
@@ -39,6 +39,10 @@ public class GameModeCommand extends VanillaCommand {
|
||||
Command.broadcastCommandMessage(sender, "Setting " + player.getName() + " to game mode " + mode.getValue());
|
||||
|
||||
player.setGameMode(mode);
|
||||
|
||||
if (mode != player.getGameMode()) {
|
||||
Command.broadcastCommandMessage(sender, "The game mode change for " + player.getName() + " was cancelled!");
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(player.getName() + " already has game mode " + mode.getValue());
|
||||
}
|
||||
|
Reference in New Issue
Block a user