Wiki 9Minecraft Wiki 9Minecraft

Handle Player Events (Gamemode Changes and Respawns)

Java EditionModGuides 4FAQ 10Related mods 48
DownloadiCommon API Mod

Get the files on 9Minecraft

Contents (4)
  1. Player-Triggered Events
  2. PlayerGamemodeChangeEvent
  3. ServerPlayerInitEvent
  4. For Players

Player-Triggered Events

The iCommon API Mod provides events for common player actions. Mods built on this library can respond to PlayerGamemodeChangeEvent and ServerPlayerInitEvent to customize behavior when players join or change their mode.

PlayerGamemodeChangeEvent

This event fires whenever a player's gamemode changes (Survival → Creative, etc.). Mods can use this to:

  • Adjust player inventory or abilities based on new gamemode
  • Log gamemode switches
  • Trigger special effects or notifications
  • Enforce custom gamemode rules

ServerPlayerInitEvent

This event fires when a player first joins the server or respawns. Use it to:

  • Grant starter items or effects
  • Initialize player-specific data
  • Apply welcome messages or tutorials
  • Restore player state from previous sessions

For Players

If a mod using iCommon API isn't responding correctly to your gamemode changes or respawns, check that mod's config file for relevant settings. Some mods let you disable certain player event features.

More guides for this mod