Events

NOTE: player is no longer "PlayerName" but the UUID of the player.

Events

  • serverEmpty: server is now empty (last user logged off) (arg1: last player)
  • serverNotEmpty: server is no longer empty (server had 0 users, now has 1) (arg1: player)
  • playerJoin: player joined (arg1: player)
  • playerFirstJoin: player joined for the first time (never logged in before) (arg1: player) note that due to some internal craftbukkit stuff this may or may not be working correctly randomly with how it is currently done, open issue tracking what to do to fix it here
  • playerQuit: player logged out (arg1: player)
  • playerTeleportWorld: player teleported between worlds (arg1: player, arg2: from_world arg3: to_world)
  • worldEmpty: world is now empty (arg1: last player, arg2: world) This is useful for small temporary adventure maps, as a "hey, lets now reset this world" or resetting the end dimension using Multiverse or some such.
  • worldNotEmpty: world is no longer empty (arg1: player, arg2: world) Idea is that you could do a do say $1 is now playing adventures in $2, go join him with /warp $2 or some such
  • hourChange: called every in-game hour for every world (careful, that means it is called quite often!), (arg1: world). Note that due to how schedualing works inside of bukkit, this and all time events are "best effort" meaning that the event might be missed in some rare cases, or might fire a couple ticks late/early ect. Not much can be done here sadly.
  • dawn: called when world time is 0 (arg1: world)
  • midday: called when world time is 6000 (arg1: world)
  • dusk: called when world time is 12000 (arg1: world)
  • night: called when world time is 12500 (arg1: world)
  • midnight: called when world time is 18000 (arg1: world)
  • playerDeath called when a player dies (arg1: player, arg2: world they died in)
  • playerRespawn called when a player spawns again after death. (arg1: player, arg2: world they spawned in)
  • more events as recommended, to recommend a new event please open a ticket here.

SCE script format

added to the normal .scc script format, we now have variables that are replaced inside the script, these are held with $n where n is the argument number. $0 is always the event name that called the script. For example the events/playerJoin.sce:

do say $0:::$1