Expand PlayerGameModeChangeEvent

This commit is contained in:
Jake Potrebic
2021-05-15 10:04:43 -07:00
parent 64365b4218
commit d6b69e74a9
6 changed files with 152 additions and 51 deletions

View File

@@ -1671,7 +1671,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(mode != null, "GameMode cannot be null");
if (this.getHandle().connection == null) return;
this.getHandle().setGameMode(GameType.byId(mode.getValue()));
this.getHandle().setGameMode(GameType.byId(mode.getValue()), org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.PLUGIN, null); // Paper - Expand PlayerGameModeChangeEvent
}
@Override