mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 04:33:56 -07:00
@@ -1,12 +1,12 @@
|
||||
--- a/net/minecraft/server/CommandGamemode.java
|
||||
+++ b/net/minecraft/server/CommandGamemode.java
|
||||
@@ -55,6 +55,12 @@
|
||||
--- a/net/minecraft/server/commands/CommandGamemode.java
|
||||
+++ b/net/minecraft/server/commands/CommandGamemode.java
|
||||
@@ -63,6 +63,12 @@
|
||||
|
||||
if (entityplayer.playerInteractManager.getGameMode() != enumgamemode) {
|
||||
entityplayer.a(enumgamemode);
|
||||
+ // CraftBukkit start - handle event cancelling the change
|
||||
+ if (entityplayer.playerInteractManager.getGameMode() != enumgamemode) {
|
||||
+ commandcontext.getSource().sendFailureMessage(new ChatComponentText("Failed to set the gamemode of '" + entityplayer.getName() + "'"));
|
||||
+ commandcontext.getSource().sendFailureMessage(new net.minecraft.network.chat.ChatComponentText("Failed to set the gamemode of '" + entityplayer.getName() + "'"));
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
Reference in New Issue
Block a user