diff --git a/build.xml b/build.xml index 2b70ee8f1..0b7681a67 100644 --- a/build.xml +++ b/build.xml @@ -12,7 +12,7 @@ - + diff --git a/docs/API-Reference.md b/docs/API-Reference.md index b42ec1788..9361dba19 100644 --- a/docs/API-Reference.md +++ b/docs/API-Reference.md @@ -173,171 +173,184 @@ Walter Higgins * [events.serverShutdown()](#eventsservershutdown) * [Events Helper Module (bukkit version)](#events-helper-module-bukkit-version) * [Usage](#usage-1) - * [events.weatherChange()](#eventsweatherchange-1) - * [events.lightningStrike()](#eventslightningstrike-1) - * [events.thunderChange()](#eventsthunderchange) - * [events.vehicleMove()](#eventsvehiclemove-1) - * [events.vehicleDestroy()](#eventsvehicledestroy-1) - * [events.vehicleExit()](#eventsvehicleexit-1) - * [events.vehicleEntityCollision()](#eventsvehicleentitycollision) - * [events.vehicleBlockCollision()](#eventsvehicleblockcollision) - * [events.vehicleEnter()](#eventsvehicleenter-1) - * [events.vehicleDamage()](#eventsvehicledamage-1) - * [events.vehicleUpdate()](#eventsvehicleupdate) - * [events.vehicleCreate()](#eventsvehiclecreate) - * [events.paintingBreak()](#eventspaintingbreak) - * [events.paintingBreakByEntity()](#eventspaintingbreakbyentity) - * [events.paintingPlace()](#eventspaintingplace) + * [events.blockBreak()](#eventsblockbreak) + * [events.blockBurn()](#eventsblockburn) + * [events.blockCanBuild()](#eventsblockcanbuild) + * [events.blockDamage()](#eventsblockdamage) + * [events.blockDispense()](#eventsblockdispense) + * [events.blockExp()](#eventsblockexp) + * [events.blockExplode()](#eventsblockexplode) + * [events.blockFade()](#eventsblockfade) + * [events.blockForm()](#eventsblockform) + * [events.blockFromTo()](#eventsblockfromto) + * [events.blockGrow()](#eventsblockgrow-1) + * [events.blockIgnite()](#eventsblockignite) + * [events.blockMultiPlace()](#eventsblockmultiplace) + * [events.blockPhysics()](#eventsblockphysics-1) + * [events.blockPistonExtend()](#eventsblockpistonextend) + * [events.blockPistonRetract()](#eventsblockpistonretract) + * [events.blockPlace()](#eventsblockplace-1) + * [events.blockRedstone()](#eventsblockredstone) + * [events.blockSpread()](#eventsblockspread) + * [events.cauldronLevelChange()](#eventscauldronlevelchange) + * [events.entityBlockForm()](#eventsentityblockform) + * [events.leavesDecay()](#eventsleavesdecay) + * [events.notePlay()](#eventsnoteplay) + * [events.signChange()](#eventssignchange-1) * [events.enchantItem()](#eventsenchantitem) * [events.prepareItemEnchant()](#eventsprepareitemenchant) - * [events.playerInteractEntity()](#eventsplayerinteractentity) - * [events.playerEggThrow()](#eventsplayereggthrow) - * [events.playerUnleashEntity()](#eventsplayerunleashentity) - * [events.playerInventory()](#eventsplayerinventory) - * [events.playerLevelChange()](#eventsplayerlevelchange) - * [events.playerPortal()](#eventsplayerportal) - * [events.playerItemConsume()](#eventsplayeritemconsume) - * [events.playerTeleport()](#eventsplayerteleport) - * [events.playerBedEnter()](#eventsplayerbedenter) - * [events.playerUnregisterChannel()](#eventsplayerunregisterchannel) - * [events.playerArmorStandManipulate()](#eventsplayerarmorstandmanipulate) - * [events.playerChat()](#eventsplayerchat) - * [events.playerShearEntity()](#eventsplayershearentity) - * [events.playerItemDamage()](#eventsplayeritemdamage) - * [events.asyncPlayerChat()](#eventsasyncplayerchat) - * [events.playerDropItem()](#eventsplayerdropitem) - * [events.playerRegisterChannel()](#eventsplayerregisterchannel) - * [events.playerMove()](#eventsplayermove-1) - * [events.playerItemBreak()](#eventsplayeritembreak) - * [events.playerBucketEmpty()](#eventsplayerbucketempty) - * [events.playerStatisticIncrement()](#eventsplayerstatisticincrement) - * [events.playerToggleFlight()](#eventsplayertoggleflight) - * [events.playerItemHeld()](#eventsplayeritemheld) - * [events.playerAchievementAwarded()](#eventsplayerachievementawarded) - * [events.playerToggleSneak()](#eventsplayertogglesneak) - * [events.playerExpChange()](#eventsplayerexpchange) - * [events.playerResourcePackStatus()](#eventsplayerresourcepackstatus) - * [events.playerPreLogin()](#eventsplayerprelogin) - * [events.playerJoin()](#eventsplayerjoin) - * [events.playerAnimation()](#eventsplayeranimation) - * [events.playerEditBook()](#eventsplayereditbook) - * [events.playerPickupItem()](#eventsplayerpickupitem) - * [events.playerInteractAtEntity()](#eventsplayerinteractatentity) - * [events.playerChangedWorld()](#eventsplayerchangedworld) - * [events.playerFish()](#eventsplayerfish) - * [events.playerChatTabComplete()](#eventsplayerchattabcomplete) - * [events.playerRespawn()](#eventsplayerrespawn) - * [events.playerBedLeave()](#eventsplayerbedleave) - * [events.asyncPlayerPreLogin()](#eventsasyncplayerprelogin) - * [events.playerInteract()](#eventsplayerinteract) - * [events.playerBucketFill()](#eventsplayerbucketfill) - * [events.playerVelocity()](#eventsplayervelocity) - * [events.playerQuit()](#eventsplayerquit) - * [events.playerLogin()](#eventsplayerlogin) - * [events.playerKick()](#eventsplayerkick) - * [events.playerToggleSprint()](#eventsplayertogglesprint) - * [events.playerCommandPreprocess()](#eventsplayercommandpreprocess) - * [events.playerGameModeChange()](#eventsplayergamemodechange) - * [events.furnaceSmelt()](#eventsfurnacesmelt) - * [events.inventoryDrag()](#eventsinventorydrag) - * [events.craftItem()](#eventscraftitem) - * [events.furnaceBurn()](#eventsfurnaceburn) - * [events.inventoryOpen()](#eventsinventoryopen) - * [events.inventoryPickupItem()](#eventsinventorypickupitem) - * [events.inventoryMoveItem()](#eventsinventorymoveitem) - * [events.inventoryClick()](#eventsinventoryclick) - * [events.inventoryClose()](#eventsinventoryclose) - * [events.inventoryCreative()](#eventsinventorycreative) - * [events.inventory()](#eventsinventory-1) - * [events.prepareItemCraft()](#eventsprepareitemcraft) - * [events.furnaceExtract()](#eventsfurnaceextract) - * [events.brew()](#eventsbrew) - * [events.serverCommand()](#eventsservercommand) - * [events.serverListPing()](#eventsserverlistping-1) - * [events.serviceRegister()](#eventsserviceregister) - * [events.pluginDisable()](#eventsplugindisable-1) - * [events.remoteServerCommand()](#eventsremoteservercommand) - * [events.mapInitialize()](#eventsmapinitialize) - * [events.serviceUnregister()](#eventsserviceunregister) - * [events.pluginEnable()](#eventspluginenable-1) - * [events.playerDeath()](#eventsplayerdeath-1) - * [events.entityCreatePortal()](#eventsentitycreateportal) + * [events.areaEffectCloudApply()](#eventsareaeffectcloudapply) + * [events.creatureSpawn()](#eventscreaturespawn) + * [events.creeperPower()](#eventscreeperpower) + * [events.enderDragonChangePhase()](#eventsenderdragonchangephase) + * [events.entityAirChange()](#eventsentityairchange) + * [events.entityBreakDoor()](#eventsentitybreakdoor) + * [events.entityBreed()](#eventsentitybreed) + * [events.entityChangeBlock()](#eventsentitychangeblock) + * [events.entityCombustByBlock()](#eventsentitycombustbyblock) + * [events.entityCombustByEntity()](#eventsentitycombustbyentity) * [events.entityCombust()](#eventsentitycombust) - * [events.sheepDyeWool()](#eventssheepdyewool) - * [events.expBottle()](#eventsexpbottle) - * [events.entityTame()](#eventsentitytame-1) - * [events.projectileLaunch()](#eventsprojectilelaunch) + * [events.entityCreatePortal()](#eventsentitycreateportal) + * [events.entityDamageByBlock()](#eventsentitydamagebyblock) + * [events.entityDamageByEntity()](#eventsentitydamagebyentity) * [events.entityDamage()](#eventsentitydamage) - * [events.itemSpawn()](#eventsitemspawn) - * [events.projectileHit()](#eventsprojectilehit-1) - * [events.foodLevelChange()](#eventsfoodlevelchange) - * [events.itemDespawn()](#eventsitemdespawn) + * [events.entityDeath()](#eventsentitydeath-1) + * [events.entityExplode()](#eventsentityexplode) + * [events.entityInteract()](#eventsentityinteract) * [events.entityPortalEnter()](#eventsentityportalenter) * [events.entityPortal()](#eventsentityportal) - * [events.entityTarget()](#eventsentitytarget) - * [events.entityDeath()](#eventsentitydeath-1) - * [events.entitySpawn()](#eventsentityspawn-1) - * [events.sheepRegrowWool()](#eventssheepregrowwool) + * [events.entityPortalExit()](#eventsentityportalexit) + * [events.entityRegainHealth()](#eventsentityregainhealth) + * [events.entityResurrect()](#eventsentityresurrect) * [events.entityShootBow()](#eventsentityshootbow) - * [events.creeperPower()](#eventscreeperpower) - * [events.entityCombustByBlock()](#eventsentitycombustbyblock) - * [events.entityBreakDoor()](#eventsentitybreakdoor) - * [events.entityDamageByEntity()](#eventsentitydamagebyentity) + * [events.entitySpawn()](#eventsentityspawn-1) + * [events.entityTame()](#eventsentitytame-1) + * [events.entityTarget()](#eventsentitytarget) + * [events.entityTargetLivingEntity()](#eventsentitytargetlivingentity) + * [events.entityTeleport()](#eventsentityteleport) + * [events.entityToggleGlide()](#eventsentitytoggleglide) * [events.entityUnleash()](#eventsentityunleash) - * [events.entityExplode()](#eventsentityexplode) - * [events.entityInteract()](#eventsentityinteract) + * [events.expBottle()](#eventsexpbottle) * [events.explosionPrime()](#eventsexplosionprime) + * [events.fireworkExplode()](#eventsfireworkexplode-1) + * [events.foodLevelChange()](#eventsfoodlevelchange) * [events.horseJump()](#eventshorsejump) - * [events.creatureSpawn()](#eventscreaturespawn) - * [events.entityCombustByEntity()](#eventsentitycombustbyentity) - * [events.entityDamageByBlock()](#eventsentitydamagebyblock) - * [events.entityTargetLivingEntity()](#eventsentitytargetlivingentity) - * [events.entityTeleport()](#eventsentityteleport) - * [events.playerLeashEntity()](#eventsplayerleashentity) - * [events.spawnerSpawn()](#eventsspawnerspawn) + * [events.itemDespawn()](#eventsitemdespawn) * [events.itemMerge()](#eventsitemmerge) - * [events.slimeSplit()](#eventsslimesplit-1) + * [events.itemSpawn()](#eventsitemspawn) + * [events.lingeringPotionSplash()](#eventslingeringpotionsplash) * [events.pigZap()](#eventspigzap) + * [events.playerDeath()](#eventsplayerdeath-1) + * [events.playerLeashEntity()](#eventsplayerleashentity) * [events.potionSplash()](#eventspotionsplash) - * [events.entityChangeBlock()](#eventsentitychangeblock) - * [events.entityPortalExit()](#eventsentityportalexit) - * [events.entityRegainHealth()](#eventsentityregainhealth) - * [events.entityBlockForm()](#eventsentityblockform) - * [events.blockSpread()](#eventsblockspread) - * [events.blockMultiPlace()](#eventsblockmultiplace) - * [events.blockExplode()](#eventsblockexplode) - * [events.notePlay()](#eventsnoteplay) - * [events.blockFade()](#eventsblockfade) - * [events.blockPlace()](#eventsblockplace-1) - * [events.blockPhysics()](#eventsblockphysics-1) - * [events.blockIgnite()](#eventsblockignite) - * [events.blockBreak()](#eventsblockbreak) - * [events.blockBurn()](#eventsblockburn) - * [events.blockFromTo()](#eventsblockfromto) - * [events.blockRedstone()](#eventsblockredstone) - * [events.blockPistonRetract()](#eventsblockpistonretract) - * [events.blockDispense()](#eventsblockdispense) - * [events.signChange()](#eventssignchange-1) - * [events.blockPistonExtend()](#eventsblockpistonextend) - * [events.blockCanBuild()](#eventsblockcanbuild) - * [events.blockGrow()](#eventsblockgrow-1) - * [events.leavesDecay()](#eventsleavesdecay) - * [events.blockExp()](#eventsblockexp) - * [events.blockForm()](#eventsblockform) - * [events.blockDamage()](#eventsblockdamage) - * [events.hangingPlace()](#eventshangingplace) + * [events.projectileHit()](#eventsprojectilehit-1) + * [events.projectileLaunch()](#eventsprojectilelaunch) + * [events.sheepDyeWool()](#eventssheepdyewool) + * [events.sheepRegrowWool()](#eventssheepregrowwool) + * [events.slimeSplit()](#eventsslimesplit-1) + * [events.spawnerSpawn()](#eventsspawnerspawn) + * [events.villagerAcquireTrade()](#eventsvillageracquiretrade) + * [events.villagerReplenishTrade()](#eventsvillagerreplenishtrade) * [events.hangingBreakByEntity()](#eventshangingbreakbyentity) * [events.hangingBreak()](#eventshangingbreak) - * [events.structureGrow()](#eventsstructuregrow) + * [events.hangingPlace()](#eventshangingplace) + * [events.brew()](#eventsbrew) + * [events.brewingStandFuel()](#eventsbrewingstandfuel) + * [events.craftItem()](#eventscraftitem) + * [events.furnaceBurn()](#eventsfurnaceburn) + * [events.furnaceExtract()](#eventsfurnaceextract) + * [events.furnaceSmelt()](#eventsfurnacesmelt) + * [events.inventoryClick()](#eventsinventoryclick) + * [events.inventoryClose()](#eventsinventoryclose) + * [events.inventoryCreative()](#eventsinventorycreative) + * [events.inventoryDrag()](#eventsinventorydrag) + * [events.inventory()](#eventsinventory-1) + * [events.inventoryMoveItem()](#eventsinventorymoveitem) + * [events.inventoryOpen()](#eventsinventoryopen) + * [events.inventoryPickupItem()](#eventsinventorypickupitem) + * [events.prepareAnvil()](#eventsprepareanvil) + * [events.prepareItemCraft()](#eventsprepareitemcraft) + * [events.asyncPlayerChat()](#eventsasyncplayerchat) + * [events.asyncPlayerPreLogin()](#eventsasyncplayerprelogin) + * [events.playerAchievementAwarded()](#eventsplayerachievementawarded) + * [events.playerAnimation()](#eventsplayeranimation) + * [events.playerArmorStandManipulate()](#eventsplayerarmorstandmanipulate) + * [events.playerBedEnter()](#eventsplayerbedenter) + * [events.playerBedLeave()](#eventsplayerbedleave) + * [events.playerBucketEmpty()](#eventsplayerbucketempty) + * [events.playerBucketFill()](#eventsplayerbucketfill) + * [events.playerChangedMainHand()](#eventsplayerchangedmainhand) + * [events.playerChangedWorld()](#eventsplayerchangedworld) + * [events.playerChat()](#eventsplayerchat) + * [events.playerChatTabComplete()](#eventsplayerchattabcomplete) + * [events.playerCommandPreprocess()](#eventsplayercommandpreprocess) + * [events.playerDropItem()](#eventsplayerdropitem) + * [events.playerEditBook()](#eventsplayereditbook) + * [events.playerEggThrow()](#eventsplayereggthrow) + * [events.playerExpChange()](#eventsplayerexpchange) + * [events.playerFish()](#eventsplayerfish) + * [events.playerGameModeChange()](#eventsplayergamemodechange) + * [events.playerInteractAtEntity()](#eventsplayerinteractatentity) + * [events.playerInteractEntity()](#eventsplayerinteractentity) + * [events.playerInteract()](#eventsplayerinteract) + * [events.playerItemBreak()](#eventsplayeritembreak) + * [events.playerItemConsume()](#eventsplayeritemconsume) + * [events.playerItemDamage()](#eventsplayeritemdamage) + * [events.playerItemHeld()](#eventsplayeritemheld) + * [events.playerJoin()](#eventsplayerjoin) + * [events.playerKick()](#eventsplayerkick) + * [events.playerLevelChange()](#eventsplayerlevelchange) + * [events.playerLogin()](#eventsplayerlogin) + * [events.playerMove()](#eventsplayermove-1) + * [events.playerPickupArrow()](#eventsplayerpickuparrow) + * [events.playerPickupItem()](#eventsplayerpickupitem) + * [events.playerPortal()](#eventsplayerportal) + * [events.playerPreLogin()](#eventsplayerprelogin) + * [events.playerQuit()](#eventsplayerquit) + * [events.playerRegisterChannel()](#eventsplayerregisterchannel) + * [events.playerResourcePackStatus()](#eventsplayerresourcepackstatus) + * [events.playerRespawn()](#eventsplayerrespawn) + * [events.playerShearEntity()](#eventsplayershearentity) + * [events.playerStatisticIncrement()](#eventsplayerstatisticincrement) + * [events.playerSwapHandItems()](#eventsplayerswaphanditems) + * [events.playerTeleport()](#eventsplayerteleport) + * [events.playerToggleFlight()](#eventsplayertoggleflight) + * [events.playerToggleSneak()](#eventsplayertogglesneak) + * [events.playerToggleSprint()](#eventsplayertogglesprint) + * [events.playerUnleashEntity()](#eventsplayerunleashentity) + * [events.playerUnregisterChannel()](#eventsplayerunregisterchannel) + * [events.playerVelocity()](#eventsplayervelocity) + * [events.mapInitialize()](#eventsmapinitialize) + * [events.pluginDisable()](#eventsplugindisable-1) + * [events.pluginEnable()](#eventspluginenable-1) + * [events.remoteServerCommand()](#eventsremoteservercommand) + * [events.serverCommand()](#eventsservercommand) + * [events.serverListPing()](#eventsserverlistping-1) + * [events.serviceRegister()](#eventsserviceregister) + * [events.serviceUnregister()](#eventsserviceunregister) + * [events.tabComplete()](#eventstabcomplete) + * [events.vehicleBlockCollision()](#eventsvehicleblockcollision) + * [events.vehicleCreate()](#eventsvehiclecreate) + * [events.vehicleDamage()](#eventsvehicledamage-1) + * [events.vehicleDestroy()](#eventsvehicledestroy-1) + * [events.vehicleEnter()](#eventsvehicleenter-1) + * [events.vehicleEntityCollision()](#eventsvehicleentitycollision) + * [events.vehicleExit()](#eventsvehicleexit-1) + * [events.vehicleMove()](#eventsvehiclemove-1) + * [events.vehicleUpdate()](#eventsvehicleupdate) + * [events.lightningStrike()](#eventslightningstrike-1) + * [events.thunderChange()](#eventsthunderchange) + * [events.weatherChange()](#eventsweatherchange-1) + * [events.chunkLoad()](#eventschunkload) + * [events.chunkPopulate()](#eventschunkpopulate) + * [events.chunkUnload()](#eventschunkunload-1) + * [events.portalCreate()](#eventsportalcreate-1) * [events.spawnChange()](#eventsspawnchange) - * [events.worldLoad()](#eventsworldload) + * [events.structureGrow()](#eventsstructuregrow) * [events.worldInit()](#eventsworldinit) - * [events.worldUnload()](#eventsworldunload) + * [events.worldLoad()](#eventsworldload) * [events.worldSave()](#eventsworldsave) - * [events.chunkUnload()](#eventschunkunload-1) - * [events.chunkPopulate()](#eventschunkpopulate) - * [events.portalCreate()](#eventsportalcreate-1) - * [events.chunkLoad()](#eventschunkload) + * [events.worldUnload()](#eventsworldunload) * [console global variable](#console-global-variable) * [Example](#example) * [Using string substitutions](#using-string-substitutions) @@ -447,43 +460,8 @@ Walter Higgins * [watcher.watchDir() function](#watcherwatchdir-function) * [watcher.unwatchFile() function](#watcherunwatchfile-function) * [watcher.unwatchDir() function](#watcherunwatchdir-function) - * [Example Plugin #1 - A simple extension to Minecraft.](#example-plugin-1---a-simple-extension-to-minecraft) - * [Usage:](#usage-4) - * [Example Plugin #2 - Making extensions available for all players.](#example-plugin-2---making-extensions-available-for-all-players) - * [Usage:](#usage-5) - * [Example Plugin #3 - Limiting use of commands to operators only.](#example-plugin-3---limiting-use-of-commands-to-operators-only) - * [Usage:](#usage-6) - * [Example Plugin #4 - Using parameters in commands.](#example-plugin-4---using-parameters-in-commands) - * [Usage:](#usage-7) - * [Example Plugin #5 - Re-use - Using your own and others modules.](#example-plugin-5---re-use---using-your-own-and-others-modules) - * [Usage:](#usage-8) - * [Example Plugin #6 - Re-use - Using 'utils' to get Player objects.](#example-plugin-6---re-use---using-utils-to-get-player-objects) - * [Usage:](#usage-9) - * [Example Plugin #7 - Listening for events, Greet players when they join the game.](#example-plugin-7---listening-for-events-greet-players-when-they-join-the-game) - * [Arrows Plugin](#arrows-plugin) - * [Usage:](#usage-10) - * [Spawn Plugin](#spawn-plugin) - * [Usage](#usage-11) - * [alias Plugin](#alias-plugin) - * [Examples](#examples-2) - * [Commando Plugin](#commando-plugin) - * [Description](#description) - * [Example hi-command.js](#example-hi-commandjs) - * [Example - timeofday-command.js](#example---timeofday-commandjs) - * [Caveats](#caveats) - * [homes Plugin](#homes-plugin) - * [Basic options](#basic-options) - * [Social options](#social-options) - * [Administration options](#administration-options) - * [NumberGuess mini-game:](#numberguess-mini-game) - * [Description](#description-1) - * [Example](#example-3) - * [Cow Clicker Mini-Game](#cow-clicker-mini-game) - * [How to Play](#how-to-play) - * [Rules](#rules) - * [Gameplay Mechanics](#gameplay-mechanics) * [Items module](#items-module) - * [Usage](#usage-12) + * [Usage](#usage-4) ## Modules in Scriptcraft @@ -2033,1323 +2011,1427 @@ to choose from any of the approx. 160 different event types to listen to. The crucial difference is that the events module now has functions for each of the built-in events. The functions are accessible via TAB-completion so will help beginning programmers to explore the events at the server console window. -### events.weatherChange() +### events.blockBreak() #### Parameters - * callback - A function which is called whenever the [weather.WeatherChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/WeatherChangeEvent.html) is fired + * callback - A function which is called whenever the [block.BlockBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockBreakEvent.html) is fired * priority - optional - see events.on() for more information. -### events.lightningStrike() +### events.blockBurn() #### Parameters - * callback - A function which is called whenever the [weather.LightningStrikeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/LightningStrikeEvent.html) is fired + * callback - A function which is called whenever the [block.BlockBurnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockBurnEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockCanBuild() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockCanBuildEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockCanBuildEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockDamage() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDamageEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockDispense() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockDispenseEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDispenseEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockExp() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockExpEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockExpEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockExplode() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockExplodeEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockFade() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockFadeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFadeEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockForm() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockFormEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFormEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockFromTo() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockFromToEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFromToEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockGrow() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockGrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockGrowEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockIgnite() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockIgniteEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockIgniteEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockMultiPlace() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockMultiPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockMultiPlaceEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockPhysics() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockPhysicsEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPhysicsEvent.html) is fired + + * priority - optional - see events.on() for more information. + +### events.blockPistonExtend() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockPistonExtendEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPistonExtendEvent.html) is fired * priority - optional - see events.on() for more information. -### events.thunderChange() +### events.blockPistonRetract() #### Parameters - * callback - A function which is called whenever the [weather.ThunderChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/ThunderChangeEvent.html) is fired + * callback - A function which is called whenever the [block.BlockPistonRetractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPistonRetractEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleMove() +### events.blockPlace() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleMoveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleMoveEvent.html) is fired + * callback - A function which is called whenever the [block.BlockPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPlaceEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleDestroy() +### events.blockRedstone() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleDestroyEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleDestroyEvent.html) is fired + * callback - A function which is called whenever the [block.BlockRedstoneEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockRedstoneEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleExit() +### events.blockSpread() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleExitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleExitEvent.html) is fired + * callback - A function which is called whenever the [block.BlockSpreadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockSpreadEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleEntityCollision() +### events.cauldronLevelChange() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleEntityCollisionEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.html) is fired + * callback - A function which is called whenever the [block.CauldronLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/CauldronLevelChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleBlockCollision() +### events.entityBlockForm() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleBlockCollisionEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.html) is fired + * callback - A function which is called whenever the [block.EntityBlockFormEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/EntityBlockFormEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleEnter() +### events.leavesDecay() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleEnterEvent.html) is fired + * callback - A function which is called whenever the [block.LeavesDecayEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/LeavesDecayEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleDamage() +### events.notePlay() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleDamageEvent.html) is fired + * callback - A function which is called whenever the [block.NotePlayEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/NotePlayEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleUpdate() +### events.signChange() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleUpdateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleUpdateEvent.html) is fired + * callback - A function which is called whenever the [block.SignChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/SignChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.vehicleCreate() +### events.enchantItem() #### Parameters - * callback - A function which is called whenever the [vehicle.VehicleCreateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleCreateEvent.html) is fired + * callback - A function which is called whenever the [enchantment.EnchantItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/enchantment/EnchantItemEvent.html) is fired * priority - optional - see events.on() for more information. -### events.paintingBreak() +### events.prepareItemEnchant() #### Parameters - * callback - A function which is called whenever the [painting.PaintingBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/painting/PaintingBreakEvent.html) is fired + * callback - A function which is called whenever the [enchantment.PrepareItemEnchantEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/enchantment/PrepareItemEnchantEvent.html) is fired * priority - optional - see events.on() for more information. -### events.paintingBreakByEntity() +### events.areaEffectCloudApply() #### Parameters - * callback - A function which is called whenever the [painting.PaintingBreakByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/painting/PaintingBreakByEntityEvent.html) is fired + * callback - A function which is called whenever the [entity.AreaEffectCloudApplyEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/AreaEffectCloudApplyEvent.html) is fired * priority - optional - see events.on() for more information. -### events.paintingPlace() +### events.creatureSpawn() #### Parameters - * callback - A function which is called whenever the [painting.PaintingPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/painting/PaintingPlaceEvent.html) is fired + * callback - A function which is called whenever the [entity.CreatureSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.html) is fired * priority - optional - see events.on() for more information. -### events.enchantItem() +### events.creeperPower() #### Parameters - * callback - A function which is called whenever the [enchantment.EnchantItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/enchantment/EnchantItemEvent.html) is fired + * callback - A function which is called whenever the [entity.CreeperPowerEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreeperPowerEvent.html) is fired * priority - optional - see events.on() for more information. -### events.prepareItemEnchant() +### events.enderDragonChangePhase() #### Parameters - * callback - A function which is called whenever the [enchantment.PrepareItemEnchantEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/enchantment/PrepareItemEnchantEvent.html) is fired + * callback - A function which is called whenever the [entity.EnderDragonChangePhaseEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EnderDragonChangePhaseEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerInteractEntity() +### events.entityAirChange() #### Parameters - * callback - A function which is called whenever the [player.PlayerInteractEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEntityEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityAirChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityAirChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerEggThrow() +### events.entityBreakDoor() #### Parameters - * callback - A function which is called whenever the [player.PlayerEggThrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerEggThrowEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityBreakDoorEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityBreakDoorEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerUnleashEntity() +### events.entityBreed() #### Parameters - * callback - A function which is called whenever the [player.PlayerUnleashEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerUnleashEntityEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityBreedEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityBreedEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerInventory() +### events.entityChangeBlock() #### Parameters - * callback - A function which is called whenever the [player.PlayerInventoryEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInventoryEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityChangeBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityChangeBlockEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerLevelChange() +### events.entityCombustByBlock() #### Parameters - * callback - A function which is called whenever the [player.PlayerLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerLevelChangeEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityCombustByBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustByBlockEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerPortal() +### events.entityCombustByEntity() #### Parameters - * callback - A function which is called whenever the [player.PlayerPortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPortalEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityCombustByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustByEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerItemConsume() +### events.entityCombust() #### Parameters - * callback - A function which is called whenever the [player.PlayerItemConsumeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemConsumeEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityCombustEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerTeleport() +### events.entityCreatePortal() #### Parameters - * callback - A function which is called whenever the [player.PlayerTeleportEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerTeleportEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityCreatePortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCreatePortalEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerBedEnter() +### events.entityDamageByBlock() #### Parameters - * callback - A function which is called whenever the [player.PlayerBedEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBedEnterEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityDamageByBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageByBlockEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerUnregisterChannel() +### events.entityDamageByEntity() #### Parameters - * callback - A function which is called whenever the [player.PlayerUnregisterChannelEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerUnregisterChannelEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityDamageByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageByEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerArmorStandManipulate() +### events.entityDamage() #### Parameters - * callback - A function which is called whenever the [player.PlayerArmorStandManipulateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerArmorStandManipulateEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerChat() +### events.entityDeath() #### Parameters - * callback - A function which is called whenever the [player.PlayerChatEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChatEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityDeathEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDeathEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerShearEntity() +### events.entityExplode() #### Parameters - * callback - A function which is called whenever the [player.PlayerShearEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerShearEntityEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityExplodeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerItemDamage() +### events.entityInteract() #### Parameters - * callback - A function which is called whenever the [player.PlayerItemDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemDamageEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityInteractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityInteractEvent.html) is fired * priority - optional - see events.on() for more information. -### events.asyncPlayerChat() +### events.entityPortalEnter() #### Parameters - * callback - A function which is called whenever the [player.AsyncPlayerChatEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerChatEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityPortalEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalEnterEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerDropItem() +### events.entityPortal() #### Parameters - * callback - A function which is called whenever the [player.PlayerDropItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerDropItemEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityPortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerRegisterChannel() +### events.entityPortalExit() #### Parameters - * callback - A function which is called whenever the [player.PlayerRegisterChannelEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerRegisterChannelEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityPortalExitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalExitEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerMove() +### events.entityRegainHealth() #### Parameters - * callback - A function which is called whenever the [player.PlayerMoveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerMoveEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityRegainHealthEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityRegainHealthEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerItemBreak() +### events.entityResurrect() #### Parameters - * callback - A function which is called whenever the [player.PlayerItemBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemBreakEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityResurrectEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityResurrectEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerBucketEmpty() +### events.entityShootBow() #### Parameters - * callback - A function which is called whenever the [player.PlayerBucketEmptyEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketEmptyEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityShootBowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityShootBowEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerStatisticIncrement() +### events.entitySpawn() #### Parameters - * callback - A function which is called whenever the [player.PlayerStatisticIncrementEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerStatisticIncrementEvent.html) is fired + * callback - A function which is called whenever the [entity.EntitySpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntitySpawnEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerToggleFlight() +### events.entityTame() #### Parameters - * callback - A function which is called whenever the [player.PlayerToggleFlightEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleFlightEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityTameEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTameEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerItemHeld() +### events.entityTarget() #### Parameters - * callback - A function which is called whenever the [player.PlayerItemHeldEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemHeldEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityTargetEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerAchievementAwarded() +### events.entityTargetLivingEntity() #### Parameters - * callback - A function which is called whenever the [player.PlayerAchievementAwardedEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerAchievementAwardedEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityTargetLivingEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetLivingEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerToggleSneak() +### events.entityTeleport() #### Parameters - * callback - A function which is called whenever the [player.PlayerToggleSneakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleSneakEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityTeleportEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTeleportEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerExpChange() +### events.entityToggleGlide() #### Parameters - * callback - A function which is called whenever the [player.PlayerExpChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerExpChangeEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityToggleGlideEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityToggleGlideEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerResourcePackStatus() +### events.entityUnleash() #### Parameters - * callback - A function which is called whenever the [player.PlayerResourcePackStatusEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerResourcePackStatusEvent.html) is fired + * callback - A function which is called whenever the [entity.EntityUnleashEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityUnleashEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerPreLogin() +### events.expBottle() #### Parameters - * callback - A function which is called whenever the [player.PlayerPreLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPreLoginEvent.html) is fired + * callback - A function which is called whenever the [entity.ExpBottleEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ExpBottleEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerJoin() +### events.explosionPrime() #### Parameters - * callback - A function which is called whenever the [player.PlayerJoinEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerJoinEvent.html) is fired + * callback - A function which is called whenever the [entity.ExplosionPrimeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ExplosionPrimeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerAnimation() +### events.fireworkExplode() #### Parameters - * callback - A function which is called whenever the [player.PlayerAnimationEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerAnimationEvent.html) is fired + * callback - A function which is called whenever the [entity.FireworkExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/FireworkExplodeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerEditBook() +### events.foodLevelChange() #### Parameters - * callback - A function which is called whenever the [player.PlayerEditBookEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerEditBookEvent.html) is fired + * callback - A function which is called whenever the [entity.FoodLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/FoodLevelChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerPickupItem() +### events.horseJump() #### Parameters - * callback - A function which is called whenever the [player.PlayerPickupItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPickupItemEvent.html) is fired + * callback - A function which is called whenever the [entity.HorseJumpEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/HorseJumpEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerInteractAtEntity() +### events.itemDespawn() #### Parameters - * callback - A function which is called whenever the [player.PlayerInteractAtEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractAtEntityEvent.html) is fired + * callback - A function which is called whenever the [entity.ItemDespawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemDespawnEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerChangedWorld() +### events.itemMerge() #### Parameters - * callback - A function which is called whenever the [player.PlayerChangedWorldEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChangedWorldEvent.html) is fired + * callback - A function which is called whenever the [entity.ItemMergeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemMergeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerFish() +### events.itemSpawn() #### Parameters - * callback - A function which is called whenever the [player.PlayerFishEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerFishEvent.html) is fired + * callback - A function which is called whenever the [entity.ItemSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemSpawnEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerChatTabComplete() +### events.lingeringPotionSplash() #### Parameters - * callback - A function which is called whenever the [player.PlayerChatTabCompleteEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChatTabCompleteEvent.html) is fired + * callback - A function which is called whenever the [entity.LingeringPotionSplashEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/LingeringPotionSplashEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerRespawn() +### events.pigZap() #### Parameters - * callback - A function which is called whenever the [player.PlayerRespawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerRespawnEvent.html) is fired + * callback - A function which is called whenever the [entity.PigZapEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PigZapEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerBedLeave() +### events.playerDeath() #### Parameters - * callback - A function which is called whenever the [player.PlayerBedLeaveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBedLeaveEvent.html) is fired + * callback - A function which is called whenever the [entity.PlayerDeathEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PlayerDeathEvent.html) is fired * priority - optional - see events.on() for more information. -### events.asyncPlayerPreLogin() +### events.playerLeashEntity() #### Parameters - * callback - A function which is called whenever the [player.AsyncPlayerPreLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerPreLoginEvent.html) is fired + * callback - A function which is called whenever the [entity.PlayerLeashEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PlayerLeashEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerInteract() +### events.potionSplash() #### Parameters - * callback - A function which is called whenever the [player.PlayerInteractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html) is fired + * callback - A function which is called whenever the [entity.PotionSplashEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PotionSplashEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerBucketFill() +### events.projectileHit() #### Parameters - * callback - A function which is called whenever the [player.PlayerBucketFillEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketFillEvent.html) is fired + * callback - A function which is called whenever the [entity.ProjectileHitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ProjectileHitEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerVelocity() +### events.projectileLaunch() #### Parameters - * callback - A function which is called whenever the [player.PlayerVelocityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerVelocityEvent.html) is fired + * callback - A function which is called whenever the [entity.ProjectileLaunchEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ProjectileLaunchEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerQuit() +### events.sheepDyeWool() #### Parameters - * callback - A function which is called whenever the [player.PlayerQuitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerQuitEvent.html) is fired + * callback - A function which is called whenever the [entity.SheepDyeWoolEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SheepDyeWoolEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerLogin() +### events.sheepRegrowWool() #### Parameters - * callback - A function which is called whenever the [player.PlayerLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerLoginEvent.html) is fired + * callback - A function which is called whenever the [entity.SheepRegrowWoolEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SheepRegrowWoolEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerKick() +### events.slimeSplit() #### Parameters - * callback - A function which is called whenever the [player.PlayerKickEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerKickEvent.html) is fired + * callback - A function which is called whenever the [entity.SlimeSplitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SlimeSplitEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerToggleSprint() +### events.spawnerSpawn() #### Parameters - * callback - A function which is called whenever the [player.PlayerToggleSprintEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleSprintEvent.html) is fired + * callback - A function which is called whenever the [entity.SpawnerSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SpawnerSpawnEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerCommandPreprocess() +### events.villagerAcquireTrade() #### Parameters - * callback - A function which is called whenever the [player.PlayerCommandPreprocessEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerCommandPreprocessEvent.html) is fired + * callback - A function which is called whenever the [entity.VillagerAcquireTradeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/VillagerAcquireTradeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerGameModeChange() +### events.villagerReplenishTrade() #### Parameters - * callback - A function which is called whenever the [player.PlayerGameModeChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerGameModeChangeEvent.html) is fired + * callback - A function which is called whenever the [entity.VillagerReplenishTradeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/VillagerReplenishTradeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.furnaceSmelt() +### events.hangingBreakByEntity() #### Parameters - * callback - A function which is called whenever the [inventory.FurnaceSmeltEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceSmeltEvent.html) is fired + * callback - A function which is called whenever the [hanging.HangingBreakByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakByEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventoryDrag() +### events.hangingBreak() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryDragEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryDragEvent.html) is fired + * callback - A function which is called whenever the [hanging.HangingBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakEvent.html) is fired * priority - optional - see events.on() for more information. -### events.craftItem() +### events.hangingPlace() #### Parameters - * callback - A function which is called whenever the [inventory.CraftItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/CraftItemEvent.html) is fired + * callback - A function which is called whenever the [hanging.HangingPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingPlaceEvent.html) is fired * priority - optional - see events.on() for more information. -### events.furnaceBurn() +### events.brew() #### Parameters - * callback - A function which is called whenever the [inventory.FurnaceBurnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceBurnEvent.html) is fired + * callback - A function which is called whenever the [inventory.BrewEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/BrewEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventoryOpen() +### events.brewingStandFuel() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryOpenEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryOpenEvent.html) is fired + * callback - A function which is called whenever the [inventory.BrewingStandFuelEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/BrewingStandFuelEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventoryPickupItem() +### events.craftItem() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryPickupItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryPickupItemEvent.html) is fired + * callback - A function which is called whenever the [inventory.CraftItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/CraftItemEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventoryMoveItem() +### events.furnaceBurn() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryMoveItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryMoveItemEvent.html) is fired + * callback - A function which is called whenever the [inventory.FurnaceBurnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceBurnEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventoryClick() +### events.furnaceExtract() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryClickEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryClickEvent.html) is fired + * callback - A function which is called whenever the [inventory.FurnaceExtractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceExtractEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventoryClose() +### events.furnaceSmelt() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryCloseEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryCloseEvent.html) is fired + * callback - A function which is called whenever the [inventory.FurnaceSmeltEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceSmeltEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventoryCreative() +### events.inventoryClick() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryCreativeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryCreativeEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryClickEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryClickEvent.html) is fired * priority - optional - see events.on() for more information. -### events.inventory() +### events.inventoryClose() #### Parameters - * callback - A function which is called whenever the [inventory.InventoryEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryCloseEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryCloseEvent.html) is fired * priority - optional - see events.on() for more information. -### events.prepareItemCraft() +### events.inventoryCreative() #### Parameters - * callback - A function which is called whenever the [inventory.PrepareItemCraftEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/PrepareItemCraftEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryCreativeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryCreativeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.furnaceExtract() +### events.inventoryDrag() #### Parameters - * callback - A function which is called whenever the [inventory.FurnaceExtractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceExtractEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryDragEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryDragEvent.html) is fired * priority - optional - see events.on() for more information. -### events.brew() +### events.inventory() #### Parameters - * callback - A function which is called whenever the [inventory.BrewEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/BrewEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryEvent.html) is fired * priority - optional - see events.on() for more information. -### events.serverCommand() +### events.inventoryMoveItem() #### Parameters - * callback - A function which is called whenever the [server.ServerCommandEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServerCommandEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryMoveItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryMoveItemEvent.html) is fired * priority - optional - see events.on() for more information. -### events.serverListPing() +### events.inventoryOpen() #### Parameters - * callback - A function which is called whenever the [server.ServerListPingEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServerListPingEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryOpenEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryOpenEvent.html) is fired * priority - optional - see events.on() for more information. -### events.serviceRegister() +### events.inventoryPickupItem() #### Parameters - * callback - A function which is called whenever the [server.ServiceRegisterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServiceRegisterEvent.html) is fired + * callback - A function which is called whenever the [inventory.InventoryPickupItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryPickupItemEvent.html) is fired * priority - optional - see events.on() for more information. -### events.pluginDisable() +### events.prepareAnvil() #### Parameters - * callback - A function which is called whenever the [server.PluginDisableEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/PluginDisableEvent.html) is fired + * callback - A function which is called whenever the [inventory.PrepareAnvilEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/PrepareAnvilEvent.html) is fired * priority - optional - see events.on() for more information. -### events.remoteServerCommand() +### events.prepareItemCraft() #### Parameters - * callback - A function which is called whenever the [server.RemoteServerCommandEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/RemoteServerCommandEvent.html) is fired + * callback - A function which is called whenever the [inventory.PrepareItemCraftEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/PrepareItemCraftEvent.html) is fired * priority - optional - see events.on() for more information. -### events.mapInitialize() +### events.asyncPlayerChat() #### Parameters - * callback - A function which is called whenever the [server.MapInitializeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/MapInitializeEvent.html) is fired + * callback - A function which is called whenever the [player.AsyncPlayerChatEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerChatEvent.html) is fired * priority - optional - see events.on() for more information. -### events.serviceUnregister() +### events.asyncPlayerPreLogin() #### Parameters - * callback - A function which is called whenever the [server.ServiceUnregisterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServiceUnregisterEvent.html) is fired + * callback - A function which is called whenever the [player.AsyncPlayerPreLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerPreLoginEvent.html) is fired * priority - optional - see events.on() for more information. -### events.pluginEnable() +### events.playerAchievementAwarded() #### Parameters - * callback - A function which is called whenever the [server.PluginEnableEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/PluginEnableEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerAchievementAwardedEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerAchievementAwardedEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerDeath() +### events.playerAnimation() #### Parameters - * callback - A function which is called whenever the [entity.PlayerDeathEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PlayerDeathEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerAnimationEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerAnimationEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityCreatePortal() +### events.playerArmorStandManipulate() #### Parameters - * callback - A function which is called whenever the [entity.EntityCreatePortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCreatePortalEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerArmorStandManipulateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerArmorStandManipulateEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityCombust() +### events.playerBedEnter() #### Parameters - * callback - A function which is called whenever the [entity.EntityCombustEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerBedEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBedEnterEvent.html) is fired * priority - optional - see events.on() for more information. -### events.sheepDyeWool() +### events.playerBedLeave() #### Parameters - * callback - A function which is called whenever the [entity.SheepDyeWoolEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SheepDyeWoolEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerBedLeaveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBedLeaveEvent.html) is fired * priority - optional - see events.on() for more information. -### events.expBottle() +### events.playerBucketEmpty() #### Parameters - * callback - A function which is called whenever the [entity.ExpBottleEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ExpBottleEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerBucketEmptyEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketEmptyEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityTame() +### events.playerBucketFill() #### Parameters - * callback - A function which is called whenever the [entity.EntityTameEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTameEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerBucketFillEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketFillEvent.html) is fired * priority - optional - see events.on() for more information. -### events.projectileLaunch() +### events.playerChangedMainHand() #### Parameters - * callback - A function which is called whenever the [entity.ProjectileLaunchEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ProjectileLaunchEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerChangedMainHandEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChangedMainHandEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityDamage() +### events.playerChangedWorld() #### Parameters - * callback - A function which is called whenever the [entity.EntityDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerChangedWorldEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChangedWorldEvent.html) is fired * priority - optional - see events.on() for more information. -### events.itemSpawn() +### events.playerChat() #### Parameters - * callback - A function which is called whenever the [entity.ItemSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemSpawnEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerChatEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChatEvent.html) is fired * priority - optional - see events.on() for more information. -### events.projectileHit() +### events.playerChatTabComplete() #### Parameters - * callback - A function which is called whenever the [entity.ProjectileHitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ProjectileHitEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerChatTabCompleteEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChatTabCompleteEvent.html) is fired * priority - optional - see events.on() for more information. -### events.foodLevelChange() +### events.playerCommandPreprocess() #### Parameters - * callback - A function which is called whenever the [entity.FoodLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/FoodLevelChangeEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerCommandPreprocessEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerCommandPreprocessEvent.html) is fired * priority - optional - see events.on() for more information. -### events.itemDespawn() +### events.playerDropItem() #### Parameters - * callback - A function which is called whenever the [entity.ItemDespawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemDespawnEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerDropItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerDropItemEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityPortalEnter() +### events.playerEditBook() #### Parameters - * callback - A function which is called whenever the [entity.EntityPortalEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalEnterEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerEditBookEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerEditBookEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityPortal() +### events.playerEggThrow() #### Parameters - * callback - A function which is called whenever the [entity.EntityPortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerEggThrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerEggThrowEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityTarget() +### events.playerExpChange() #### Parameters - * callback - A function which is called whenever the [entity.EntityTargetEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerExpChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerExpChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityDeath() +### events.playerFish() #### Parameters - * callback - A function which is called whenever the [entity.EntityDeathEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDeathEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerFishEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerFishEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entitySpawn() +### events.playerGameModeChange() #### Parameters - * callback - A function which is called whenever the [entity.EntitySpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntitySpawnEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerGameModeChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerGameModeChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.sheepRegrowWool() +### events.playerInteractAtEntity() #### Parameters - * callback - A function which is called whenever the [entity.SheepRegrowWoolEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SheepRegrowWoolEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerInteractAtEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractAtEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityShootBow() +### events.playerInteractEntity() #### Parameters - * callback - A function which is called whenever the [entity.EntityShootBowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityShootBowEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerInteractEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.creeperPower() +### events.playerInteract() #### Parameters - * callback - A function which is called whenever the [entity.CreeperPowerEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreeperPowerEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerInteractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityCombustByBlock() +### events.playerItemBreak() #### Parameters - * callback - A function which is called whenever the [entity.EntityCombustByBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustByBlockEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerItemBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemBreakEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityBreakDoor() +### events.playerItemConsume() #### Parameters - * callback - A function which is called whenever the [entity.EntityBreakDoorEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityBreakDoorEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerItemConsumeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemConsumeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityDamageByEntity() +### events.playerItemDamage() #### Parameters - * callback - A function which is called whenever the [entity.EntityDamageByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageByEntityEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerItemDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemDamageEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityUnleash() +### events.playerItemHeld() #### Parameters - * callback - A function which is called whenever the [entity.EntityUnleashEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityUnleashEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerItemHeldEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemHeldEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityExplode() +### events.playerJoin() #### Parameters - * callback - A function which is called whenever the [entity.EntityExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityExplodeEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerJoinEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerJoinEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityInteract() +### events.playerKick() #### Parameters - * callback - A function which is called whenever the [entity.EntityInteractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityInteractEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerKickEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerKickEvent.html) is fired * priority - optional - see events.on() for more information. -### events.explosionPrime() +### events.playerLevelChange() #### Parameters - * callback - A function which is called whenever the [entity.ExplosionPrimeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ExplosionPrimeEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerLevelChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.horseJump() +### events.playerLogin() #### Parameters - * callback - A function which is called whenever the [entity.HorseJumpEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/HorseJumpEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerLoginEvent.html) is fired * priority - optional - see events.on() for more information. -### events.creatureSpawn() +### events.playerMove() #### Parameters - * callback - A function which is called whenever the [entity.CreatureSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerMoveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerMoveEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityCombustByEntity() +### events.playerPickupArrow() #### Parameters - * callback - A function which is called whenever the [entity.EntityCombustByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustByEntityEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerPickupArrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPickupArrowEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityDamageByBlock() +### events.playerPickupItem() #### Parameters - * callback - A function which is called whenever the [entity.EntityDamageByBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageByBlockEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerPickupItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPickupItemEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityTargetLivingEntity() +### events.playerPortal() #### Parameters - * callback - A function which is called whenever the [entity.EntityTargetLivingEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetLivingEntityEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerPortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPortalEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityTeleport() +### events.playerPreLogin() #### Parameters - * callback - A function which is called whenever the [entity.EntityTeleportEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTeleportEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerPreLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPreLoginEvent.html) is fired * priority - optional - see events.on() for more information. -### events.playerLeashEntity() +### events.playerQuit() #### Parameters - * callback - A function which is called whenever the [entity.PlayerLeashEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PlayerLeashEntityEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerQuitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerQuitEvent.html) is fired * priority - optional - see events.on() for more information. -### events.spawnerSpawn() +### events.playerRegisterChannel() #### Parameters - * callback - A function which is called whenever the [entity.SpawnerSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SpawnerSpawnEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerRegisterChannelEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerRegisterChannelEvent.html) is fired * priority - optional - see events.on() for more information. -### events.itemMerge() +### events.playerResourcePackStatus() #### Parameters - * callback - A function which is called whenever the [entity.ItemMergeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemMergeEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerResourcePackStatusEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerResourcePackStatusEvent.html) is fired * priority - optional - see events.on() for more information. -### events.slimeSplit() +### events.playerRespawn() #### Parameters - * callback - A function which is called whenever the [entity.SlimeSplitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SlimeSplitEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerRespawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerRespawnEvent.html) is fired * priority - optional - see events.on() for more information. -### events.pigZap() +### events.playerShearEntity() #### Parameters - * callback - A function which is called whenever the [entity.PigZapEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PigZapEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerShearEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerShearEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.potionSplash() +### events.playerStatisticIncrement() #### Parameters - * callback - A function which is called whenever the [entity.PotionSplashEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PotionSplashEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerStatisticIncrementEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerStatisticIncrementEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityChangeBlock() +### events.playerSwapHandItems() #### Parameters - * callback - A function which is called whenever the [entity.EntityChangeBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityChangeBlockEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerSwapHandItemsEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerSwapHandItemsEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityPortalExit() +### events.playerTeleport() #### Parameters - * callback - A function which is called whenever the [entity.EntityPortalExitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalExitEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerTeleportEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerTeleportEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityRegainHealth() +### events.playerToggleFlight() #### Parameters - * callback - A function which is called whenever the [entity.EntityRegainHealthEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityRegainHealthEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerToggleFlightEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleFlightEvent.html) is fired * priority - optional - see events.on() for more information. -### events.entityBlockForm() +### events.playerToggleSneak() #### Parameters - * callback - A function which is called whenever the [block.EntityBlockFormEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/EntityBlockFormEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerToggleSneakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleSneakEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockSpread() +### events.playerToggleSprint() #### Parameters - * callback - A function which is called whenever the [block.BlockSpreadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockSpreadEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerToggleSprintEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleSprintEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockMultiPlace() +### events.playerUnleashEntity() #### Parameters - * callback - A function which is called whenever the [block.BlockMultiPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockMultiPlaceEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerUnleashEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerUnleashEntityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockExplode() +### events.playerUnregisterChannel() #### Parameters - * callback - A function which is called whenever the [block.BlockExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockExplodeEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerUnregisterChannelEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerUnregisterChannelEvent.html) is fired * priority - optional - see events.on() for more information. -### events.notePlay() +### events.playerVelocity() #### Parameters - * callback - A function which is called whenever the [block.NotePlayEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/NotePlayEvent.html) is fired + * callback - A function which is called whenever the [player.PlayerVelocityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerVelocityEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockFade() +### events.mapInitialize() #### Parameters - * callback - A function which is called whenever the [block.BlockFadeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFadeEvent.html) is fired + * callback - A function which is called whenever the [server.MapInitializeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/MapInitializeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockPlace() +### events.pluginDisable() #### Parameters - * callback - A function which is called whenever the [block.BlockPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPlaceEvent.html) is fired + * callback - A function which is called whenever the [server.PluginDisableEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/PluginDisableEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockPhysics() +### events.pluginEnable() #### Parameters - * callback - A function which is called whenever the [block.BlockPhysicsEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPhysicsEvent.html) is fired + * callback - A function which is called whenever the [server.PluginEnableEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/PluginEnableEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockIgnite() +### events.remoteServerCommand() #### Parameters - * callback - A function which is called whenever the [block.BlockIgniteEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockIgniteEvent.html) is fired + * callback - A function which is called whenever the [server.RemoteServerCommandEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/RemoteServerCommandEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockBreak() +### events.serverCommand() #### Parameters - * callback - A function which is called whenever the [block.BlockBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockBreakEvent.html) is fired + * callback - A function which is called whenever the [server.ServerCommandEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServerCommandEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockBurn() +### events.serverListPing() #### Parameters - * callback - A function which is called whenever the [block.BlockBurnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockBurnEvent.html) is fired + * callback - A function which is called whenever the [server.ServerListPingEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServerListPingEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockFromTo() +### events.serviceRegister() #### Parameters - * callback - A function which is called whenever the [block.BlockFromToEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFromToEvent.html) is fired + * callback - A function which is called whenever the [server.ServiceRegisterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServiceRegisterEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockRedstone() +### events.serviceUnregister() #### Parameters - * callback - A function which is called whenever the [block.BlockRedstoneEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockRedstoneEvent.html) is fired + * callback - A function which is called whenever the [server.ServiceUnregisterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServiceUnregisterEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockPistonRetract() +### events.tabComplete() #### Parameters - * callback - A function which is called whenever the [block.BlockPistonRetractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPistonRetractEvent.html) is fired + * callback - A function which is called whenever the [server.TabCompleteEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/TabCompleteEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockDispense() +### events.vehicleBlockCollision() #### Parameters - * callback - A function which is called whenever the [block.BlockDispenseEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDispenseEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleBlockCollisionEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.html) is fired * priority - optional - see events.on() for more information. -### events.signChange() +### events.vehicleCreate() #### Parameters - * callback - A function which is called whenever the [block.SignChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/SignChangeEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleCreateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleCreateEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockPistonExtend() +### events.vehicleDamage() #### Parameters - * callback - A function which is called whenever the [block.BlockPistonExtendEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPistonExtendEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleDamageEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockCanBuild() +### events.vehicleDestroy() #### Parameters - * callback - A function which is called whenever the [block.BlockCanBuildEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockCanBuildEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleDestroyEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleDestroyEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockGrow() +### events.vehicleEnter() #### Parameters - * callback - A function which is called whenever the [block.BlockGrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockGrowEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleEnterEvent.html) is fired * priority - optional - see events.on() for more information. -### events.leavesDecay() +### events.vehicleEntityCollision() #### Parameters - * callback - A function which is called whenever the [block.LeavesDecayEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/LeavesDecayEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleEntityCollisionEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockExp() +### events.vehicleExit() #### Parameters - * callback - A function which is called whenever the [block.BlockExpEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockExpEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleExitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleExitEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockForm() +### events.vehicleMove() #### Parameters - * callback - A function which is called whenever the [block.BlockFormEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFormEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleMoveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleMoveEvent.html) is fired * priority - optional - see events.on() for more information. -### events.blockDamage() +### events.vehicleUpdate() #### Parameters - * callback - A function which is called whenever the [block.BlockDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDamageEvent.html) is fired + * callback - A function which is called whenever the [vehicle.VehicleUpdateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleUpdateEvent.html) is fired * priority - optional - see events.on() for more information. -### events.hangingPlace() +### events.lightningStrike() #### Parameters - * callback - A function which is called whenever the [hanging.HangingPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingPlaceEvent.html) is fired + * callback - A function which is called whenever the [weather.LightningStrikeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/LightningStrikeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.hangingBreakByEntity() +### events.thunderChange() #### Parameters - * callback - A function which is called whenever the [hanging.HangingBreakByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakByEntityEvent.html) is fired + * callback - A function which is called whenever the [weather.ThunderChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/ThunderChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.hangingBreak() +### events.weatherChange() #### Parameters - * callback - A function which is called whenever the [hanging.HangingBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakEvent.html) is fired + * callback - A function which is called whenever the [weather.WeatherChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/WeatherChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.structureGrow() +### events.chunkLoad() #### Parameters - * callback - A function which is called whenever the [world.StructureGrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/StructureGrowEvent.html) is fired + * callback - A function which is called whenever the [world.ChunkLoadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkLoadEvent.html) is fired * priority - optional - see events.on() for more information. -### events.spawnChange() +### events.chunkPopulate() #### Parameters - * callback - A function which is called whenever the [world.SpawnChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/SpawnChangeEvent.html) is fired + * callback - A function which is called whenever the [world.ChunkPopulateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkPopulateEvent.html) is fired * priority - optional - see events.on() for more information. -### events.worldLoad() +### events.chunkUnload() #### Parameters - * callback - A function which is called whenever the [world.WorldLoadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldLoadEvent.html) is fired + * callback - A function which is called whenever the [world.ChunkUnloadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkUnloadEvent.html) is fired * priority - optional - see events.on() for more information. -### events.worldInit() +### events.portalCreate() #### Parameters - * callback - A function which is called whenever the [world.WorldInitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldInitEvent.html) is fired + * callback - A function which is called whenever the [world.PortalCreateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/PortalCreateEvent.html) is fired * priority - optional - see events.on() for more information. -### events.worldUnload() +### events.spawnChange() #### Parameters - * callback - A function which is called whenever the [world.WorldUnloadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldUnloadEvent.html) is fired + * callback - A function which is called whenever the [world.SpawnChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/SpawnChangeEvent.html) is fired * priority - optional - see events.on() for more information. -### events.worldSave() +### events.structureGrow() #### Parameters - * callback - A function which is called whenever the [world.WorldSaveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldSaveEvent.html) is fired + * callback - A function which is called whenever the [world.StructureGrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/StructureGrowEvent.html) is fired * priority - optional - see events.on() for more information. -### events.chunkUnload() +### events.worldInit() #### Parameters - * callback - A function which is called whenever the [world.ChunkUnloadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkUnloadEvent.html) is fired + * callback - A function which is called whenever the [world.WorldInitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldInitEvent.html) is fired * priority - optional - see events.on() for more information. -### events.chunkPopulate() +### events.worldLoad() #### Parameters - * callback - A function which is called whenever the [world.ChunkPopulateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkPopulateEvent.html) is fired + * callback - A function which is called whenever the [world.WorldLoadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldLoadEvent.html) is fired * priority - optional - see events.on() for more information. -### events.portalCreate() +### events.worldSave() #### Parameters - * callback - A function which is called whenever the [world.PortalCreateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/PortalCreateEvent.html) is fired + * callback - A function which is called whenever the [world.WorldSaveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldSaveEvent.html) is fired * priority - optional - see events.on() for more information. -### events.chunkLoad() +### events.worldUnload() #### Parameters - * callback - A function which is called whenever the [world.ChunkLoadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkLoadEvent.html) is fired + * callback - A function which is called whenever the [world.WorldUnloadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldUnloadEvent.html) is fired * priority - optional - see events.on() for more information. @@ -5629,525 +5711,6 @@ watcher.unwatchFile (file); ``` for each file inside directory (and unwatchDir for each directory inside it) -## Example Plugin #1 - A simple extension to Minecraft. - -A simple minecraft plugin. The most basic module. - -### Usage: - -At the in-game prompt type ... - - /js hello(self) - -... and a message `Hello {player-name}` will appear (where - {player-name} is replaced by your own name). - -This example demonstrates the basics of adding new functionality which -is only usable by server operators or users with the -scriptcraft.evaluate permission. By default, only ops are granted this -permission. - -The `hello` function below is only usable by players with the scriptcraft.evaluate -permission since it relies on the `/js` command to execute. - - exports.hello = function(player){ - echo( player, 'Hello ' + player.name); - }; - -## Example Plugin #2 - Making extensions available for all players. - -A simple minecraft plugin. Commands for other players. - -### Usage: - -At the in-game prompt type ... - - /jsp hello - -... and a message `Hello {player-name}` will appear (where {player-name} is -replaced by your own name). - -This example demonstrates the basics of adding new functionality -which is usable all players or those with the scriptcraft.proxy -permission. By default, all players are granted this permission. - -This differs from example 1 in that a new 'jsp ' command extension -is defined. Since all players can use the `jsp` command, all players -can use the new extension. Unlike the previous example, the `jsp hello` -command does not evaluate javascript code so this command is much more secure. - - command('hello', function (parameters, player) { - echo( player, 'Hello ' + player.name); - }); - -## Example Plugin #3 - Limiting use of commands to operators only. - -A simple minecraft plugin. Commands for operators only. - -### Usage: - -At the in-game prompt type ... - - /jsp op-hello - -... and a message `Hello {player-name}` will appear (where {player-name} is -replaced by your own name). - -This example demonstrates the basics of adding new functionality -which is usable all players or those with the scriptcraft.proxy -permission. By default, all players are granted this permission. In -this command though, the function checks to see if the player is an -operator and if they aren't will return immediately. - -This differs from example 2 in that the function will only print a -message for operators. - - command('op-hello', function (parameters, player) { - if ( !isOp(player) ){ - echo( player, 'Only operators can do this.'); - return; - } - echo( player, 'Hello ' + player.name); - }); -## Example Plugin #4 - Using parameters in commands. - -A simple minecraft plugin. Handling parameters. - -### Usage: - -At the in-game prompt type ... - - /jsp hello-params Hi - /jsp hello-params Saludos - /jsp hello-params Greetings - -... and a message `Hi {player-name}` or `Saludos {player-name}` etc -will appear (where {player-name} is replaced by your own name). - -This example demonstrates adding and using parameters in commands. - -This differs from example 3 in that the greeting can be changed from -a fixed 'Hello ' to anything you like by passing a parameter. - - command( 'hello-params', function ( parameters, player ) { - var salutation = parameters[0] ; - echo( player, salutation + ' ' + player.name ); - }); - -## Example Plugin #5 - Re-use - Using your own and others modules. - -A simple minecraft plugin. Using Modules. - -### Usage: - -At the in-game prompt type ... - - /jsp hello-module - -... and a message `Hello {player-name}` will appear (where {player-name} is -replaced by your own name). - -This example demonstrates the use of modules. In -example-1-hello-module.js we created a new javascript module. In -this example, we use that module... - - * We load the module using the `require()` function. Because this - module and the module we require are n the same directory, we - specify `'./example-1-hello-module'` as the path (when loading a - module from the same directory, `./` at the start of the path - indicates that the file should be searched for in the same - directory. - - * We assign the loaded module to a variable (`greetings`) and then - use the module's `hello` method to display the message. - -Source Code... - - var greetings = require('./example-1-hello-module'); - command( 'hello-module', function( parameters, player ) { - greetings.hello( player ); - }); - -## Example Plugin #6 - Re-use - Using 'utils' to get Player objects. - -A simple minecraft plugin. Finding players by name. - -### Usage: - -At the in-game prompt type ... - - /jsp hello-byname {player-name} - -... substituting {player-name} with the name of a player currently -online and a message `Hello ...` will be sent to the named -player. - -This example builds on example-5 and also introduces a new concept - -use of shared modules. That is : modules which are not specific to -any one plugin or set of plugins but which can be used by all -plugins. Shared modules should be placed in the -`scriptcraft/modules` directory. - - * The utils module is used. Because the 'utils' module is - located in the modules folder we don't need to specify an exact - path, just 'utils' will do. - - * The `utils.player()` function is used to obtain a player object - matching the player name. Once a player object is obtained, a - message is sent to that player. - -Source Code ... - - var utils = require('utils'); - var greetings = require('./example-1-hello-module'); - - command( 'hello-byname', function( parameters, sender ) { - var playerName = parameters[0]; - var recipient = utils.player( playerName ); - if ( recipient ) { - greetings.hello( recipient ); - } else { - echo( sender, 'Player ' + playerName + ' not found.' ); - } - }); - -## Example Plugin #7 - Listening for events, Greet players when they join the game. - -A simple event-driven minecraft plugin. How to handle Events. - -This example demonstrates event-driven programming. The code below -will display the version of ScriptCraft every time an operator joins -the game. This module is notable from previous modules for the -following reasons... - - 1. It does not export any functions or variables. That's fine. Not - all modules need export stuff. Code in this module will be - executed when the module is first loaded. Because it is in the - `/scriptcraft/plugins` directory, it will be loaded automatically - when the server starts up. - - 2. It uses ScriptCraft's `events` module to add a new *Event - Handler*. An *Event Handler* is a function that gets - called whenever a particular *event* happens in the game. The - function defined below will only be executed whenever a player - joins the game. This style of program is sometimes refered to as - *Event-Driven Programming*. - -Adding new *Event Handlers* in ScriptCraft is relatively easy. Use one -of the `events` module's functions to add a new event handler. The -events module has many functions - one for each type of event. Each -function takes a single parameter: - - * The event handling function (also sometimes refered to as a - 'callback'). In ScriptCraft, this function takes a single - parameter, an event object. All of the information about the event - is in the event object. - -In the example below, if a player joins the server and is an operator, -then the ScriptCraft plugin information will be displayed to that -player. - -```javascript -function onJoin( event ){ - if ( isOp(event.player) ) { - echo( event.player, 'Welcome to ' + __plugin ); - } -} -events.connection( onJoin ); -``` -First the onJoin() function is defined, this is our event handler - -the function we wish to be called every time some new player joins the -game. Then we hook up - or register - that function using the -events.connection() function. The events.connection function is the -function responsible for adding new *connection* event handlers - that -is - functions which should be invoked when there's a new *connection* -event in the game. A new *connection* event is fired whenever a player -joins the game. There are many other types of events you can handle in -Minecraft. You can see [a full list of events here][cmEvtList]. - -[cmEvtList]: #events-helper-module-canary-version -## Arrows Plugin - -The arrows mod adds fancy arrows to the game. Arrows which ... - - * Launch fireworks. - * Explode on impact. - * Force Lightning to strike where they land. - * Teleport the player to the landing spot. - * Spawn Trees at the landing spot. - -### Usage: - - * `/js arrows.firework(self)` - A firework launches where the the arrow lands. - * `/js arrows.lightning(self)` - lightning strikes where the arrow lands. - * `/js arrows.teleport(self)` - makes player teleport to where arrow has landed. - * `/js arrows.flourish(self)` - makes a tree grow where the arrow lands. - * `/js arrows.explosive(self)` - makes arrows explode. - * `/js arrows.normal(self)` sets arrow type to normal. - * `/js arrows.sign(self)` turns a targeted sign into an Arrows menu - -All of the above functions can take an optional player object or name -as a parameter. For example: `/js arrows.explosive('player23')` makes -player23's arrows explosive. - -## Spawn Plugin - -Allows in-game operators to easily spawn creatures at current location. - -### Usage - - /jsp spawn cow - /jsp spawn sheep - /jsp spawn wolf - -This command supports TAB completion so to see a list of possible -entitities, type `/jsp spawn ' at the in-game command prompt, then -press TAB. Visit - (CanaryMod) -or (Bukkit) - -for a list of possible entities (creatures) which can be spawned. - -## alias Plugin - -The alias module lets players and server admins create their own -per-player or global custom in-game command aliases. - -### Examples - -To set a command alias which is only visible to the current player -(per-player alias)... - - /jsp alias set cw = time set {1} ; weather {2} - -... Creates a new custom command only usable by the player who set -it called `cw` (short for set Clock and Weather) which when invoked... - - /cw 4000 sun - -... will perform the following commands... - - /time set 4000 - /weather sun - -Aliases can use paramters as above. On the right hand side of the `=`, the -`{1}` refers to the first parameter provided with the `cw` alias, `{2}` -refers to the second parameter and so on. So `cw 4000 sun` is converted to -`time set 4000` and `weather sun`. - -To set a global command alias usable by all (only operators can create -such an alias)... - - /jsp alias global stormy = time 18000; weather storm - -To remove an alias ... - - /jsp alias remove cw - -... removes the 'cw' alias from the appropriate alias map. - -To get a list of aliases currently defined... - - /jsp alias list - -To get help on the `jsp alias` command: - - /jsp alias help - -Aliases can be used at the in-game prompt by players or in the server -console. Aliases will not be able to avail of command autocompletion -(pressing the TAB key will have no effect). - -## Commando Plugin - -### Description - -commando is a plugin which can be used to add completely new commands -to Minecraft. Normally ScriptCraft only allows for provision of new -commands as extensions to the jsp command. For example, to create a -new simple command for use by all players... - - /js command('hi', function(args,player){ echo( player, 'Hi ' + player.name); }); - -... then players can use this command by typing... - - /jsp hi - -... A couple of ScriptCraft users have asked for the ability to take -this a step further and allow the global command namespace to be -populated so that when a developer creates a new command using the -'command' function, then the command is added to the global command -namespace so that players can use it simply like this... - - /hi - -... There are good reasons why ScriptCraft's core `command()` function -does not do this. Polluting the global namespace with commands would -make ScriptCraft a bad citizen in that Plugins should be able to work -together in the same server and - as much as possible - not step on -each others' toes. The CraftBukkit team have very good reasons for -forcing Plugins to declare their commands in the plugin.yml -configuration file. It makes approving plugins easier and ensures that -craftbukkit plugins behave well together. While it is possible to -override other plugins' commands, the CraftBukkit team do not -recommend this. However, as ScriptCraft users have suggested, it -should be at the discretion of server administrators as to when -overriding or adding new commands to the global namespace is good. - -So this is where `commando()` comes in. It uses the exact same -signature as the core `command()` function but will also make the -command accessible without the `jsp` prefix so instead of having to -type `/jsp hi` for the above command example, players simply type -`/hi` . This functionality is provided as a plugin rather than as part -of the ScriptCraft core. - -### Example hi-command.js - - var commando = require('../commando'); - commando('hi', function(args,player){ - echo( player, 'Hi ' + player.name); - }); - -...Displays a greeting to any player who issues the `/hi` command. - -### Example - timeofday-command.js - - var times = {Dawn: 0, Midday: 6000, Dusk: 12000, Midnight:18000}; - commando('timeofday', function(params,player){ - player.location.world.setTime(times[params[0]]); - }, - ['Dawn','Midday','Dusk','Midnight']); - -... changes the time of day using a new `/timeofday` command (options are Dawn, Midday, Dusk, Midnight) - -### Caveats - -Since commands registered using commando are really just appendages to -the `/jsp` command and are not actually registered globally (it just -looks like that to the player), you won't be able to avail of tab -completion for the command itself or its parameters (unless you go the -traditional route of adding the `jsp` prefix). This plugin uses the -[PlayerCommandPreprocessEvent][pcppevt] which allows plugins to -intercepts all commands and inject their own commands instead. If -anyone reading this knows of a better way to programmatically add new -global commands for a plugin, please let me know. - -[pcppevt]: http://jd.bukkit.org/dev/apidocs/org/bukkit/event/player/PlayerCommandPreprocessEvent.html - -## homes Plugin - -The homes plugin lets players set a location as home and return to the -location, invite other players to their home and also visit other -player's homes. - -This module is a good example of how to create a javascript-based -minecraft mod which provides... - - * A programmatic interface (API) and - * A command extension which uses that API to provide new functionality for players. - -The module uses the `plugin()` function to specify an object and -methods, and the `command()` function to expose functionality to -players through a new `jsp home` command. This module also -demonstrates how to enable autocompletion for custom commands (to see -this in action, at the in-game prompt or server console prompt type -`jsp home ` then press the TAB key - you should see a list of further -possible options). - -The `jsp home` command has the following options... - -### Basic options - - * `/jsp home set` Will set your current location as your - 'home' location to which you can return at any time using the ... - - * `/jsp home` ..command will return you to your home, if you have set one. - - * `/jsp home {player}` Will take you to the home of {player} (where - {player} is the name of the player whose home you wish to visit. - - * `/jsp home delete` Deletes your home location from the location - database. This does not actually remove the home from the world or - change the world in any way. This command is completely - non-destructive and cannot be used for griefing. No blocks will be - destroyed by this command. - -### Social options -The following options allow players to open their homes to all or some -players, invite players to their home and see a list of homes they can -visit. - - * `/jsp home list` Lists home which you can visit. - * `/jsp home ilist` Lists players who can visit your home. - * `/jsp home invite {player}` Invites the named player to your home. - * `/jsp home uninvite {player}` Uninvites (revokes invitation) the named player to your home. - * `/jsp home public` Opens your home to all players (all players can visit your home). - * `/jsp home private` Makes your home private (no longer visitable by all). - -### Administration options -The following administration options can only be used by server operators... - - * `/jsp home listall` List all of the homes - * `/jsp home clear {player}` Removes the player's home - location. Again, this command does not destroy any structures in - the world, it simply removes the location from the database. No - blocks are destroyed by this command. - -## NumberGuess mini-game: - -### Description -This is a very simple number guessing game. Minecraft will ask you to -guess a number between 1 and 10 and you will tell you if you're too -hight or too low when you guess wrong. The purpose of this mini-game -code is to demonstrate use of Bukkit's Conversation API. - -### Example - - /js Game_NumberGuess.start(self) - -Once the game begins, guess a number by typing the `/` character -followed by a number between 1 and 10. - -## Cow Clicker Mini-Game - -### How to Play - -At the in-game prompt type `jsp cowclicker` to start or stop -playing. Right-Click on Cows to score points. No points for killing -cows (hint: use the same keyboard keys you'd use for opening doors). - -Every time you click a cow your score increases by 1 point. Your score -is displayed in a side-bar along the right edge of of the screen. - -![cow clicker](img/cowclicker.png) - -### Rules - - * You can join and leave the Cow Clicker game at any time by typing - `/jsp cowclicker` at the in-game prompt. - - * Once you leave the game, your score is reset to zero. - - * When you disconnect from the server, your score will be reset to zero. - -### Gameplay Mechanics - -This is meant as a trivially simple use of the [Bukkit Scoreboard -API][bukscore]. There are many things you'll want to consider when constructing -your own mini-game... - - * Is the game itself a long-lived game - that is - should players and - scores be persisted (stored) between server restarts? - - * What should happen when a player quits the server - should this also be - understood as quitting the mini-game? - - * What should happen when a player who was previously playing the - mini-game, joins the server - should they automatically resume the - mini-game? - -[bukscore]: http://jd.bukkit.org/beta/apidocs/org/bukkit/scoreboard/package-summary.html - /********************* ## Items module The Items module provides a suite of functions - one for each possible item. diff --git a/docs/ScriptCraft-API-Reference.md b/docs/ScriptCraft-API-Reference.md new file mode 100644 index 000000000..3b4c9ae76 --- /dev/null +++ b/docs/ScriptCraft-API-Reference.md @@ -0,0 +1,5383 @@ +# ScriptCraft API Reference + +[![MVCode](http://d14nx13ylsx7x8.cloudfront.net/comfy/cms/files/files/000/000/553/original/new-logo.png)](https://www.mvcodeclub.com) + +Original content by [Walter Higgins](https://github.com/walterhiggins) + +Additions and modifications by Aaron Powell @ [MVCode](https://www.mvcodeclub.com) + +NOTE: **Work in Progress -- some information may be incorrect or incomplete** + +## Table of Contents + * [Global Variables](#global-variables) + * [server variable](#server-variable) + * [self variable](#self-variable) + * [events variable](#events-variable) + * [Global Functions](#global-functions) + * [echo function](#echo-function) + * [setTimeout() function](#settimeout-function) + * [clearTimeout() function](#cleartimeout-function) + * [setInterval() function](#setinterval-function) + * [clearInterval() function](#clearinterval-function) + * [Events](#events) + * [Registering Events](#registering-events) + * [List of Events](#list-of-events) + * [Module Loading](#module-loading) + * [String Colors](#string-colors) + * [Items Module](#items-module) + * [Entity Module](#entity-module) + * [Blocks Module](#blocks-module) + * [Recipes Module](#recipes-module) + * [Inventory Module](#inventory-module) + * [Action Module](#action-module) + * [BlockFace Module](#blockface-module) + * [Bukkit Module](#bukkit-module) + * [bukkit.broadcastMessage()](#bukkitbroadcastmessage) + * [bukkit.dispatchCommand()](#bukkitdispatchcommand) + * [Color Module](#color-module) + * [DyeColor Module](#dyecolor-module) + * [DamageCause Module](#damagecause-module) + * [Effect Module](#effect-module) + * [Enchantment Module](#enchantment-module) + * [EntityTypeCheck Module](#entitytypecheck-module) + * [EntityType Module](#entitytype-module) + * [File Module](#file-module) + * [FireworkEffect Module](#fireworkeffect-module) + * [GameMode Module](#gamemode-module) + * [ItemFlag Module](#itemflag-module) + * [Location Module](#location-module) + * [NewPotionEffect Module](#newpotioneffect-module) + * [Scoreboard Module](#scoreboard-module) + * [SpawnReason Module](#spawnreason-module) + * [Particle Module](#particle-module) + * [EquipmentSlot Module](#equipmentslot-module) + * [Vector Module](#vector-module) + * [Drone Module](#drone-module) + * [Constructing a Drone Object](#constructing-a-drone-object) + * [Drone Methods](#drone-methods) + * [Utilities Module](#utilities-module) + * [Utility Methods](#utility-methods) + * [Using Spigot JavaDocs](#using-spigot-javadocs) + +## Global Variables + +There are a few special javascript variables provided by ScriptCraft that can be accessed in all plugins. + +### server variable + +The Minecraft Server object + +### self variable + +The current player. (Note - this value should not be used in multi-threaded scripts or event-handling code - it's not thread-safe). This variable is only safe to use at the in-game prompt and should *never* be used in modules. For example you can use it here... + +```javascript +/js console.log(self.name) +``` + +... but not in any event handling code. `self` is a temporary short-lived variable which only exists in the context of the in-game or server command prompts. + +### events variable + +The `events` object is used to add new event handlers to Minecraft. + +## Global Functions + +ScripCraft provides some global functions which can be used by all plugins. + +### echo function + +The `echo()` function displays a message on the in-game screen. + +#### Example + +```javascript +/js echo( self, 'Hello World') +``` + +### setTimeout() function + +This function mimics the [setTimeout()](http://www.w3schools.com/jsref/met_win_settimeout.asp) function used in browser-based javascript. However, the function will only accept a function reference, not a string of javascript code. Where setTimeout() in the browser returns a numeric value which can be subsequently passed to clearTimeout(), this implementation returns an object which can be subsequently passed to ScriptCraft's own clearTimeout() implementation. + +#### Example + +```javascript +// +// start a storm in 5 seconds +// +setTimeout( function() { + var world = server.worlds.get(0); + world.setStorm(true); +}, 5000); +``` + +### clearTimeout() function + +A scriptcraft implementation of [clearTimeout()](http://www.w3schools.com/jsref/met_win_cleartimeout.asp). + +### setInterval() function + +This function mimics the [setInterval()](http://www.w3schools.com/jsref/met_win_setinterval.asp) function used in browser-based javascript. However, the function will only accept a function reference, not a string of javascript code. Where setInterval() in the browser returns a numeric value which can be subsequently passed to clearInterval(), this implementation returns an object which can be subsequently passed to ScriptCraft's own clearInterval() implementation. + +### clearInterval() function + +A scriptcraft implementation of [clearInterval()](http://www.w3schools.com/jsref/met_win_clearinterval.asp). + +## Events + +Events are how the server tells your plugin that something has happened in the world. Bukkit defines many events, in multiple categories; e.g. player actions (player logged in, player clicked a block, player died, player respawned...), block events (block placed, block broken, block's neighbour changed...), entity events (a mob targeted you, a creeper exploded...), world-wide events (a world loaded or unloaded, a chunk loaded or unloaded), and many more. + +If we want our plugin to do something specific when one of these events occurs, we need to **register a callback function for that event**. This will cause the function we registered to be called by the server whenever the specified event occurs. + +### Registering Events + +```javascript +/* This will register the function onBlockBreak() to be called + whenever a BlockBreakEvent occurs, resulting in the message + "You broke a block!" being sent to the player that broke a block +*/ +var onBlockBreak = function(event) { + echo(event.player, "You broke a block!"); +}; +events.blockBreak(onBlockBreak); +``` + +### List of Events + +* [events.weatherChange()](#eventsweatherchange) +* [events.lightningStrike()](#eventslightningstrike) +* [events.thunderChange()](#eventsthunderchange) +* [events.vehicleMove()](#eventsvehiclemove) +* [events.vehicleDestroy()](#eventsvehicledestroy) +* [events.vehicleExit()](#eventsvehicleexit) +* [events.vehicleEntityCollision()](#eventsvehicleentitycollision) +* [events.vehicleBlockCollision()](#eventsvehicleblockcollision) +* [events.vehicleEnter()](#eventsvehicleenter) +* [events.vehicleDamage()](#eventsvehicledamage) +* [events.vehicleUpdate()](#eventsvehicleupdate) +* [events.vehicleCreate()](#eventsvehiclecreate) +* [events.enchantItem()](#eventsenchantitem) +* [events.prepareItemEnchant()](#eventsprepareitemenchant) +* [events.playerInteractEntity()](#eventsplayerinteractentity) +* [events.playerEggThrow()](#eventsplayereggthrow) +* [events.playerUnleashEntity()](#eventsplayerunleashentity) +* [events.playerInventory()](#eventsplayerinventory) +* [events.playerLevelChange()](#eventsplayerlevelchange) +* [events.playerPortal()](#eventsplayerportal) +* [events.playerItemConsume()](#eventsplayeritemconsume) +* [events.playerTeleport()](#eventsplayerteleport) +* [events.playerBedEnter()](#eventsplayerbedenter) +* [events.playerUnregisterChannel()](#eventsplayerunregisterchannel) +* [events.playerArmorStandManipulate()](#eventsplayerarmorstandmanipulate) +* [events.playerChat()](#eventsplayerchat) +* [events.playerShearEntity()](#eventsplayershearentity) +* [events.playerItemDamage()](#eventsplayeritemdamage) +* [events.asyncPlayerChat()](#eventsasyncplayerchat) +* [events.playerDropItem()](#eventsplayerdropitem) +* [events.playerRegisterChannel()](#eventsplayerregisterchannel) +* [events.playerMove()](#eventsplayermove) +* [events.playerItemBreak()](#eventsplayeritembreak) +* [events.playerBucketEmpty()](#eventsplayerbucketempty) +* [events.playerStatisticIncrement()](#eventsplayerstatisticincrement) +* [events.playerToggleFlight()](#eventsplayertoggleflight) +* [events.playerItemHeld()](#eventsplayeritemheld) +* [events.playerAchievementAwarded()](#eventsplayerachievementawarded) +* [events.playerToggleSneak()](#eventsplayertogglesneak) +* [events.playerExpChange()](#eventsplayerexpchange) +* [events.playerResourcePackStatus()](#eventsplayerresourcepackstatus) +* [events.playerPreLogin()](#eventsplayerprelogin) +* [events.playerJoin()](#eventsplayerjoin) +* [events.playerAnimation()](#eventsplayeranimation) +* [events.playerEditBook()](#eventsplayereditbook) +* [events.playerPickupItem()](#eventsplayerpickupitem) +* [events.playerInteractAtEntity()](#eventsplayerinteractatentity) +* [events.playerChangedWorld()](#eventsplayerchangedworld) +* [events.playerFish()](#eventsplayerfish) +* [events.playerChatTabComplete()](#eventsplayerchattabcomplete) +* [events.playerRespawn()](#eventsplayerrespawn) +* [events.playerBedLeave()](#eventsplayerbedleave) +* [events.asyncPlayerPreLogin()](#eventsasyncplayerprelogin) +* [events.playerInteract()](#eventsplayerinteract) +* [events.playerBucketFill()](#eventsplayerbucketfill) +* [events.playerVelocity()](#eventsplayervelocity) +* [events.playerQuit()](#eventsplayerquit) +* [events.playerLogin()](#eventsplayerlogin) +* [events.playerSwapHandItems()](#eventsplayerswaphanditems) +* [events.playerKick()](#eventsplayerkick) +* [events.playerToggleSprint()](#eventsplayertogglesprint) +* [events.playerCommandPreprocess()](#eventsplayercommandpreprocess) +* [events.playerGameModeChange()](#eventsplayergamemodechange) +* [events.furnaceSmelt()](#eventsfurnacesmelt) +* [events.prepareAnvil()](#eventsprepareanvil) +* [events.inventoryDrag()](#eventsinventorydrag) +* [events.craftItem()](#eventscraftitem) +* [events.furnaceBurn()](#eventsfurnaceburn) +* [events.inventoryOpen()](#eventsinventoryopen) +* [events.inventoryPickupItem()](#eventsinventorypickupitem) +* [events.inventoryMoveItem()](#eventsinventorymoveitem) +* [events.inventoryClick()](#eventsinventoryclick) +* [events.inventoryClose()](#eventsinventoryclose) +* [events.inventoryCreative()](#eventsinventorycreative) +* [events.inventory()](#eventsinventory) +* [events.prepareItemCraft()](#eventsprepareitemcraft) +* [events.furnaceExtract()](#eventsfurnaceextract) +* [events.brew()](#eventsbrew) +* [events.serverCommand()](#eventsservercommand) +* [events.serverListPing()](#eventsserverlistping) +* [events.serviceRegister()](#eventsserviceregister) +* [events.pluginDisable()](#eventsplugindisable) +* [events.remoteServerCommand()](#eventsremoteservercommand) +* [events.mapInitialize()](#eventsmapinitialize) +* [events.serviceUnregister()](#eventsserviceunregister) +* [events.pluginEnable()](#eventspluginenable) +* [events.villagerAcquireTrade()](#eventsvillageracquiretrade) +* [events.playerDeath()](#eventsplayerdeath) +* [events.entityCreatePortal()](#eventsentitycreateportal) +* [events.entityCombust()](#eventsentitycombust) +* [events.sheepDyeWool()](#eventssheepdyewool) +* [events.expBottle()](#eventsexpbottle) +* [events.entityTame()](#eventsentitytame) +* [events.projectileLaunch()](#eventsprojectilelaunch) +* [events.entityDamage()](#eventsentitydamage) +* [events.itemSpawn()](#eventsitemspawn) +* [events.projectileHit()](#eventsprojectilehit) +* [events.foodLevelChange()](#eventsfoodlevelchange) +* [events.itemDespawn()](#eventsitemdespawn) +* [events.villagerReplenishTrade()](#eventsvillagerreplenishtrade) +* [events.entityPortalEnter()](#eventsentityportalenter) +* [events.entityPortal()](#eventsentityportal) +* [events.entityTarget()](#eventsentitytarget) +* [events.entityDeath()](#eventsentitydeath) +* [events.entitySpawn()](#eventsentityspawn) +* [events.sheepRegrowWool()](#eventssheepregrowwool) +* [events.entityShootBow()](#eventsentityshootbow) +* [events.creeperPower()](#eventscreeperpower) +* [events.entityCombustByBlock()](#eventsentitycombustbyblock) +* [events.entityBreakDoor()](#eventsentitybreakdoor) +* [events.entityDamageByEntity()](#eventsentitydamagebyentity) +* [events.entityUnleash()](#eventsentityunleash) +* [events.entityExplode()](#eventsentityexplode) +* [events.entityInteract()](#eventsentityinteract) +* [events.entityToggleGlide()](#eventsentitytoggleglide) +* [events.explosionPrime()](#eventsexplosionprime) +* [events.horseJump()](#eventshorsejump) +* [events.creatureSpawn()](#eventscreaturespawn) +* [events.entityCombustByEntity()](#eventsentitycombustbyentity) +* [events.entityDamageByBlock()](#eventsentitydamagebyblock) +* [events.entityTargetLivingEntity()](#eventsentitytargetlivingentity) +* [events.entityTeleport()](#eventsentityteleport) +* [events.playerLeashEntity()](#eventsplayerleashentity) +* [events.spawnerSpawn()](#eventsspawnerspawn) +* [events.itemMerge()](#eventsitemmerge) +* [events.slimeSplit()](#eventsslimesplit) +* [events.pigZap()](#eventspigzap) +* [events.fireworkExplode()](#eventsfireworkexplode) +* [events.potionSplash()](#eventspotionsplash) +* [events.entityChangeBlock()](#eventsentitychangeblock) +* [events.entityPortalExit()](#eventsentityportalexit) +* [events.entityRegainHealth()](#eventsentityregainhealth) +* [events.entityBlockForm()](#eventsentityblockform) +* [events.blockSpread()](#eventsblockspread) +* [events.blockMultiPlace()](#eventsblockmultiplace) +* [events.blockExplode()](#eventsblockexplode) +* [events.notePlay()](#eventsnoteplay) +* [events.cauldronLevelChange()](#eventscauldronlevelchange) +* [events.blockFade()](#eventsblockfade) +* [events.blockPlace()](#eventsblockplace) +* [events.blockPhysics()](#eventsblockphysics) +* [events.blockIgnite()](#eventsblockignite) +* [events.blockBreak()](#eventsblockbreak) +* [events.blockBurn()](#eventsblockburn) +* [events.blockFromTo()](#eventsblockfromto) +* [events.blockRedstone()](#eventsblockredstone) +* [events.blockPistonRetract()](#eventsblockpistonretract) +* [events.blockDispense()](#eventsblockdispense) +* [events.signChange()](#eventssignchange) +* [events.blockPistonExtend()](#eventsblockpistonextend) +* [events.blockCanBuild()](#eventsblockcanbuild) +* [events.blockGrow()](#eventsblockgrow) +* [events.leavesDecay()](#eventsleavesdecay) +* [events.blockExp()](#eventsblockexp) +* [events.blockForm()](#eventsblockform) +* [events.blockDamage()](#eventsblockdamage) +* [events.hangingPlace()](#eventshangingplace) +* [events.hangingBreakByEntity()](#eventshangingbreakbyentity) +* [events.hangingBreak()](#eventshangingbreak) +* [events.structureGrow()](#eventsstructuregrow) +* [events.spawnChange()](#eventsspawnchange) +* [events.worldLoad()](#eventsworldload) +* [events.worldInit()](#eventsworldinit) +* [events.worldUnload()](#eventsworldunload) +* [events.worldSave()](#eventsworldsave) +* [events.chunkUnload()](#eventschunkunload) +* [events.chunkPopulate()](#eventschunkpopulate) +* [events.portalCreate()](#eventsportalcreate) +* [events.chunkLoad()](#eventschunkload) + +### events.weatherChange() + +#### Parameters + + * callback - A function which is called whenever the [weather.WeatherChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/WeatherChangeEvent.html) is fired + +### events.lightningStrike() + +#### Parameters + + * callback - A function which is called whenever the [weather.LightningStrikeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/LightningStrikeEvent.html) is fired + + + +### events.thunderChange() + +#### Parameters + + * callback - A function which is called whenever the [weather.ThunderChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/weather/ThunderChangeEvent.html) is fired + + + +### events.vehicleMove() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleMoveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleMoveEvent.html) is fired + + + +### events.vehicleDestroy() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleDestroyEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleDestroyEvent.html) is fired + + + +### events.vehicleExit() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleExitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleExitEvent.html) is fired + + + +### events.vehicleEntityCollision() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleEntityCollisionEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.html) is fired + + + +### events.vehicleBlockCollision() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleBlockCollisionEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.html) is fired + + + +### events.vehicleEnter() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleEnterEvent.html) is fired + + + +### events.vehicleDamage() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleDamageEvent.html) is fired + + + +### events.vehicleUpdate() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleUpdateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleUpdateEvent.html) is fired + + + +### events.vehicleCreate() + +#### Parameters + + * callback - A function which is called whenever the [vehicle.VehicleCreateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleCreateEvent.html) is fired + + + +### events.enchantItem() + +#### Parameters + + * callback - A function which is called whenever the [enchantment.EnchantItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/enchantment/EnchantItemEvent.html) is fired + + + +### events.prepareItemEnchant() + +#### Parameters + + * callback - A function which is called whenever the [enchantment.PrepareItemEnchantEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/enchantment/PrepareItemEnchantEvent.html) is fired + + + +### events.playerInteractEntity() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerInteractEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEntityEvent.html) is fired + + + +### events.playerEggThrow() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerEggThrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerEggThrowEvent.html) is fired + + + +### events.playerUnleashEntity() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerUnleashEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerUnleashEntityEvent.html) is fired + + + +### events.playerInventory() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerInventoryEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInventoryEvent.html) is fired + + + +### events.playerLevelChange() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerLevelChangeEvent.html) is fired + + + +### events.playerPortal() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerPortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPortalEvent.html) is fired + + + +### events.playerItemConsume() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerItemConsumeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemConsumeEvent.html) is fired + + + +### events.playerTeleport() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerTeleportEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerTeleportEvent.html) is fired + + + +### events.playerBedEnter() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerBedEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBedEnterEvent.html) is fired + + + +### events.playerUnregisterChannel() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerUnregisterChannelEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerUnregisterChannelEvent.html) is fired + + + +### events.playerArmorStandManipulate() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerArmorStandManipulateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerArmorStandManipulateEvent.html) is fired + + + +### events.playerChat() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerChatEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChatEvent.html) is fired + + + +### events.playerShearEntity() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerShearEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerShearEntityEvent.html) is fired + + + +### events.playerItemDamage() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerItemDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemDamageEvent.html) is fired + + + +### events.asyncPlayerChat() + +#### Parameters + + * callback - A function which is called whenever the [player.AsyncPlayerChatEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerChatEvent.html) is fired + + + +### events.playerDropItem() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerDropItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerDropItemEvent.html) is fired + + + +### events.playerRegisterChannel() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerRegisterChannelEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerRegisterChannelEvent.html) is fired + + + +### events.playerMove() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerMoveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerMoveEvent.html) is fired + + + +### events.playerItemBreak() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerItemBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemBreakEvent.html) is fired + + + +### events.playerBucketEmpty() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerBucketEmptyEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketEmptyEvent.html) is fired + + + +### events.playerStatisticIncrement() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerStatisticIncrementEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerStatisticIncrementEvent.html) is fired + + + +### events.playerToggleFlight() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerToggleFlightEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleFlightEvent.html) is fired + + + +### events.playerItemHeld() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerItemHeldEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerItemHeldEvent.html) is fired + + + +### events.playerAchievementAwarded() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerAchievementAwardedEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerAchievementAwardedEvent.html) is fired + + + +### events.playerToggleSneak() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerToggleSneakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleSneakEvent.html) is fired + + + +### events.playerExpChange() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerExpChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerExpChangeEvent.html) is fired + + + +### events.playerResourcePackStatus() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerResourcePackStatusEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerResourcePackStatusEvent.html) is fired + + + +### events.playerPreLogin() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerPreLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPreLoginEvent.html) is fired + + + +### events.playerJoin() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerJoinEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerJoinEvent.html) is fired + + + +### events.playerAnimation() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerAnimationEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerAnimationEvent.html) is fired + + + +### events.playerEditBook() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerEditBookEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerEditBookEvent.html) is fired + + + +### events.playerPickupItem() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerPickupItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerPickupItemEvent.html) is fired + + + +### events.playerInteractAtEntity() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerInteractAtEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractAtEntityEvent.html) is fired + + + +### events.playerChangedWorld() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerChangedWorldEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChangedWorldEvent.html) is fired + + + +### events.playerFish() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerFishEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerFishEvent.html) is fired + + + +### events.playerChatTabComplete() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerChatTabCompleteEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerChatTabCompleteEvent.html) is fired + + + +### events.playerRespawn() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerRespawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerRespawnEvent.html) is fired + + + +### events.playerBedLeave() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerBedLeaveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBedLeaveEvent.html) is fired + + + +### events.asyncPlayerPreLogin() + +#### Parameters + + * callback - A function which is called whenever the [player.AsyncPlayerPreLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerPreLoginEvent.html) is fired + + + +### events.playerInteract() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerInteractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html) is fired + + + +### events.playerBucketFill() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerBucketFillEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketFillEvent.html) is fired + + + +### events.playerVelocity() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerVelocityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerVelocityEvent.html) is fired + + + +### events.playerQuit() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerQuitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerQuitEvent.html) is fired + + + +### events.playerLogin() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerLoginEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerLoginEvent.html) is fired + + + +### events.playerSwapHandItems() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerSwapHandItemsEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerSwapHandItemsEvent.html) is fired + + + +### events.playerKick() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerKickEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerKickEvent.html) is fired + + + +### events.playerToggleSprint() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerToggleSprintEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerToggleSprintEvent.html) is fired + + + +### events.playerCommandPreprocess() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerCommandPreprocessEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerCommandPreprocessEvent.html) is fired + + + +### events.playerGameModeChange() + +#### Parameters + + * callback - A function which is called whenever the [player.PlayerGameModeChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerGameModeChangeEvent.html) is fired + + + +### events.furnaceSmelt() + +#### Parameters + + * callback - A function which is called whenever the [inventory.FurnaceSmeltEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceSmeltEvent.html) is fired + + + +### events.prepareAnvil() + +#### Parameters + + * callback - A function which is called whenever the [inventory.PrepareAnvilEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/PrepareAnvilEvent.html) is fired + + + +### events.inventoryDrag() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryDragEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryDragEvent.html) is fired + + + +### events.craftItem() + +#### Parameters + + * callback - A function which is called whenever the [inventory.CraftItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/CraftItemEvent.html) is fired + + + +### events.furnaceBurn() + +#### Parameters + + * callback - A function which is called whenever the [inventory.FurnaceBurnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceBurnEvent.html) is fired + + + +### events.inventoryOpen() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryOpenEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryOpenEvent.html) is fired + + + +### events.inventoryPickupItem() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryPickupItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryPickupItemEvent.html) is fired + + + +### events.inventoryMoveItem() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryMoveItemEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryMoveItemEvent.html) is fired + + + +### events.inventoryClick() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryClickEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryClickEvent.html) is fired + + + +### events.inventoryClose() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryCloseEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryCloseEvent.html) is fired + + + +### events.inventoryCreative() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryCreativeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryCreativeEvent.html) is fired + + + +### events.inventory() + +#### Parameters + + * callback - A function which is called whenever the [inventory.InventoryEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryEvent.html) is fired + + + +### events.prepareItemCraft() + +#### Parameters + + * callback - A function which is called whenever the [inventory.PrepareItemCraftEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/PrepareItemCraftEvent.html) is fired + + + +### events.furnaceExtract() + +#### Parameters + + * callback - A function which is called whenever the [inventory.FurnaceExtractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceExtractEvent.html) is fired + + + +### events.brew() + +#### Parameters + + * callback - A function which is called whenever the [inventory.BrewEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/BrewEvent.html) is fired + + + +### events.serverCommand() + +#### Parameters + + * callback - A function which is called whenever the [server.ServerCommandEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServerCommandEvent.html) is fired + + + +### events.serverListPing() + +#### Parameters + + * callback - A function which is called whenever the [server.ServerListPingEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServerListPingEvent.html) is fired + + + +### events.serviceRegister() + +#### Parameters + + * callback - A function which is called whenever the [server.ServiceRegisterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServiceRegisterEvent.html) is fired + + + +### events.pluginDisable() + +#### Parameters + + * callback - A function which is called whenever the [server.PluginDisableEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/PluginDisableEvent.html) is fired + + + +### events.remoteServerCommand() + +#### Parameters + + * callback - A function which is called whenever the [server.RemoteServerCommandEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/RemoteServerCommandEvent.html) is fired + + + +### events.mapInitialize() + +#### Parameters + + * callback - A function which is called whenever the [server.MapInitializeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/MapInitializeEvent.html) is fired + + + +### events.serviceUnregister() + +#### Parameters + + * callback - A function which is called whenever the [server.ServiceUnregisterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/ServiceUnregisterEvent.html) is fired + + + +### events.pluginEnable() + +#### Parameters + + * callback - A function which is called whenever the [server.PluginEnableEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/server/PluginEnableEvent.html) is fired + + + +### events.villagerAcquireTrade() + +#### Parameters + + * callback - A function which is called whenever the [entity.VillagerAcquireTradeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/VillagerAcquireTradeEvent.html) is fired + + + +### events.playerDeath() + +#### Parameters + + * callback - A function which is called whenever the [entity.PlayerDeathEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PlayerDeathEvent.html) is fired + + + +### events.entityCreatePortal() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityCreatePortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCreatePortalEvent.html) is fired + + + +### events.entityCombust() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityCombustEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustEvent.html) is fired + + + +### events.sheepDyeWool() + +#### Parameters + + * callback - A function which is called whenever the [entity.SheepDyeWoolEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SheepDyeWoolEvent.html) is fired + + + +### events.expBottle() + +#### Parameters + + * callback - A function which is called whenever the [entity.ExpBottleEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ExpBottleEvent.html) is fired + + + +### events.entityTame() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityTameEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTameEvent.html) is fired + + + +### events.projectileLaunch() + +#### Parameters + + * callback - A function which is called whenever the [entity.ProjectileLaunchEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ProjectileLaunchEvent.html) is fired + + + +### events.entityDamage() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.html) is fired + + + +### events.itemSpawn() + +#### Parameters + + * callback - A function which is called whenever the [entity.ItemSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemSpawnEvent.html) is fired + + + +### events.projectileHit() + +#### Parameters + + * callback - A function which is called whenever the [entity.ProjectileHitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ProjectileHitEvent.html) is fired + + + +### events.foodLevelChange() + +#### Parameters + + * callback - A function which is called whenever the [entity.FoodLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/FoodLevelChangeEvent.html) is fired + + + +### events.itemDespawn() + +#### Parameters + + * callback - A function which is called whenever the [entity.ItemDespawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemDespawnEvent.html) is fired + + + +### events.villagerReplenishTrade() + +#### Parameters + + * callback - A function which is called whenever the [entity.VillagerReplenishTradeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/VillagerReplenishTradeEvent.html) is fired + + + +### events.entityPortalEnter() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityPortalEnterEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalEnterEvent.html) is fired + + + +### events.entityPortal() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityPortalEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalEvent.html) is fired + + + +### events.entityTarget() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityTargetEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetEvent.html) is fired + + + +### events.entityDeath() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityDeathEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDeathEvent.html) is fired + + + +### events.entitySpawn() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntitySpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntitySpawnEvent.html) is fired + + + +### events.sheepRegrowWool() + +#### Parameters + + * callback - A function which is called whenever the [entity.SheepRegrowWoolEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SheepRegrowWoolEvent.html) is fired + + + +### events.entityShootBow() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityShootBowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityShootBowEvent.html) is fired + + + +### events.creeperPower() + +#### Parameters + + * callback - A function which is called whenever the [entity.CreeperPowerEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreeperPowerEvent.html) is fired + + + +### events.entityCombustByBlock() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityCombustByBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustByBlockEvent.html) is fired + + + +### events.entityBreakDoor() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityBreakDoorEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityBreakDoorEvent.html) is fired + + + +### events.entityDamageByEntity() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityDamageByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageByEntityEvent.html) is fired + + + +### events.entityUnleash() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityUnleashEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityUnleashEvent.html) is fired + + + +### events.entityExplode() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityExplodeEvent.html) is fired + + + +### events.entityInteract() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityInteractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityInteractEvent.html) is fired + + + +### events.entityToggleGlide() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityToggleGlideEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityToggleGlideEvent.html) is fired + + + +### events.explosionPrime() + +#### Parameters + + * callback - A function which is called whenever the [entity.ExplosionPrimeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ExplosionPrimeEvent.html) is fired + + + +### events.horseJump() + +#### Parameters + + * callback - A function which is called whenever the [entity.HorseJumpEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/HorseJumpEvent.html) is fired + + + +### events.creatureSpawn() + +#### Parameters + + * callback - A function which is called whenever the [entity.CreatureSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.html) is fired + + + +### events.entityCombustByEntity() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityCombustByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityCombustByEntityEvent.html) is fired + + + +### events.entityDamageByBlock() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityDamageByBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageByBlockEvent.html) is fired + + + +### events.entityTargetLivingEntity() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityTargetLivingEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetLivingEntityEvent.html) is fired + + + +### events.entityTeleport() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityTeleportEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTeleportEvent.html) is fired + + + +### events.playerLeashEntity() + +#### Parameters + + * callback - A function which is called whenever the [entity.PlayerLeashEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PlayerLeashEntityEvent.html) is fired + + + +### events.spawnerSpawn() + +#### Parameters + + * callback - A function which is called whenever the [entity.SpawnerSpawnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SpawnerSpawnEvent.html) is fired + + + +### events.itemMerge() + +#### Parameters + + * callback - A function which is called whenever the [entity.ItemMergeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ItemMergeEvent.html) is fired + + + +### events.slimeSplit() + +#### Parameters + + * callback - A function which is called whenever the [entity.SlimeSplitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/SlimeSplitEvent.html) is fired + + + +### events.pigZap() + +#### Parameters + + * callback - A function which is called whenever the [entity.PigZapEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PigZapEvent.html) is fired + + + +### events.fireworkExplode() + +#### Parameters + + * callback - A function which is called whenever the [entity.FireworkExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/FireworkExplodeEvent.html) is fired + + + +### events.potionSplash() + +#### Parameters + + * callback - A function which is called whenever the [entity.PotionSplashEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/PotionSplashEvent.html) is fired + + + +### events.entityChangeBlock() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityChangeBlockEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityChangeBlockEvent.html) is fired + + + +### events.entityPortalExit() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityPortalExitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPortalExitEvent.html) is fired + + + +### events.entityRegainHealth() + +#### Parameters + + * callback - A function which is called whenever the [entity.EntityRegainHealthEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityRegainHealthEvent.html) is fired + + + +### events.entityBlockForm() + +#### Parameters + + * callback - A function which is called whenever the [block.EntityBlockFormEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/EntityBlockFormEvent.html) is fired + + + +### events.blockSpread() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockSpreadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockSpreadEvent.html) is fired + + + +### events.blockMultiPlace() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockMultiPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockMultiPlaceEvent.html) is fired + + + +### events.blockExplode() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockExplodeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockExplodeEvent.html) is fired + + + +### events.notePlay() + +#### Parameters + + * callback - A function which is called whenever the [block.NotePlayEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/NotePlayEvent.html) is fired + + + +### events.cauldronLevelChange() + +#### Parameters + + * callback - A function which is called whenever the [block.CauldronLevelChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/CauldronLevelChangeEvent.html) is fired + + + +### events.blockFade() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockFadeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFadeEvent.html) is fired + + + +### events.blockPlace() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPlaceEvent.html) is fired + + + +### events.blockPhysics() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockPhysicsEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPhysicsEvent.html) is fired + + + +### events.blockIgnite() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockIgniteEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockIgniteEvent.html) is fired + + + +### events.blockBreak() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockBreakEvent.html) is fired + + + +### events.blockBurn() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockBurnEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockBurnEvent.html) is fired + + + +### events.blockFromTo() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockFromToEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFromToEvent.html) is fired + + + +### events.blockRedstone() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockRedstoneEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockRedstoneEvent.html) is fired + + + +### events.blockPistonRetract() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockPistonRetractEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPistonRetractEvent.html) is fired + + + +### events.blockDispense() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockDispenseEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDispenseEvent.html) is fired + + + +### events.signChange() + +#### Parameters + + * callback - A function which is called whenever the [block.SignChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/SignChangeEvent.html) is fired + + + +### events.blockPistonExtend() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockPistonExtendEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPistonExtendEvent.html) is fired + + + +### events.blockCanBuild() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockCanBuildEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockCanBuildEvent.html) is fired + + + +### events.blockGrow() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockGrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockGrowEvent.html) is fired + + + +### events.leavesDecay() + +#### Parameters + + * callback - A function which is called whenever the [block.LeavesDecayEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/LeavesDecayEvent.html) is fired + + + +### events.blockExp() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockExpEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockExpEvent.html) is fired + + + +### events.blockForm() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockFormEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFormEvent.html) is fired + + + +### events.blockDamage() + +#### Parameters + + * callback - A function which is called whenever the [block.BlockDamageEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDamageEvent.html) is fired + + + +### events.hangingPlace() + +#### Parameters + + * callback - A function which is called whenever the [hanging.HangingPlaceEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingPlaceEvent.html) is fired + + + +### events.hangingBreakByEntity() + +#### Parameters + + * callback - A function which is called whenever the [hanging.HangingBreakByEntityEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakByEntityEvent.html) is fired + + + +### events.hangingBreak() + +#### Parameters + + * callback - A function which is called whenever the [hanging.HangingBreakEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakEvent.html) is fired + + + +### events.structureGrow() + +#### Parameters + + * callback - A function which is called whenever the [world.StructureGrowEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/StructureGrowEvent.html) is fired + + + +### events.spawnChange() + +#### Parameters + + * callback - A function which is called whenever the [world.SpawnChangeEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/SpawnChangeEvent.html) is fired + + + +### events.worldLoad() + +#### Parameters + + * callback - A function which is called whenever the [world.WorldLoadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldLoadEvent.html) is fired + + + +### events.worldInit() + +#### Parameters + + * callback - A function which is called whenever the [world.WorldInitEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldInitEvent.html) is fired + + + +### events.worldUnload() + +#### Parameters + + * callback - A function which is called whenever the [world.WorldUnloadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldUnloadEvent.html) is fired + + + +### events.worldSave() + +#### Parameters + + * callback - A function which is called whenever the [world.WorldSaveEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/WorldSaveEvent.html) is fired + + + +### events.chunkUnload() + +#### Parameters + + * callback - A function which is called whenever the [world.ChunkUnloadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkUnloadEvent.html) is fired + + + +### events.chunkPopulate() + +#### Parameters + + * callback - A function which is called whenever the [world.ChunkPopulateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkPopulateEvent.html) is fired + + + +### events.portalCreate() + +#### Parameters + + * callback - A function which is called whenever the [world.PortalCreateEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/PortalCreateEvent.html) is fired + + + +### events.chunkLoad() + +#### Parameters + + * callback - A function which is called whenever the [world.ChunkLoadEvent event](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkLoadEvent.html) is fired + +## Module Loading + +If we are writing a plugin that relies on functions provided by ScriptCraft modules, we need to load them into our plugin.js file. We can import all of the modules at once by loading `master.js` as shown: + +```javascript +load("scriptcraft/modules/bukkit/master.js"); +``` + +Adding this line to the top of a plugin file will give you access to all ScriptCraft modules. + +## String Colors + +The display color of strings can be changed by using the string formatting methods provided by this module. + +### Usage + +```javascript +"This text is red!".red() +``` + +### Example + +```javascript +echo(self, "Hello Minecraft!".aqua()); +``` +![Hello Minecraft!](https://d14nx13ylsx7x8.cloudfront.net/lesson_image_blocks/assets/000/004/661/original/temp1450223230.png) + + +### The following string formatting methods are available: + + * aqua() + * black() + * blue() + * bold() + * brightgreen() + * darkaqua() + * darkblue() + * darkgray() + * darkgreen() + * purple() + * darkpurple() + * darkred() + * gold() + * gray() + * green() + * italic() + * lightpurple() + * indigo() + * green() + * red() + * pink() + * yellow() + * white() + * strike() + * random() + * magic() + * underline() + * reset() + +## Items Module + +The `items` module exports a factory function for each item material in Minecraft that returns an `ItemStack`. The functions take one argument, `numItems`, that determines how many of the given item will be in the returned ItemStack. `numItems` has a default value of `1`. + +See the [Spigot JavaDocs: Material](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html) for a list of possible item materials. + +### Usage + + items.book(); // returns an ItemStack with one book in it + items.book(2); // returns an ItemStack with two books in it + +Items with names that are longer than one word are written in [camelCase](https://en.wikipedia.org/wiki/CamelCase) which means the first word is lowercase and each subsquent word is capitalized, with all spaces removed. + +If we want an item with the type `ACACIA_FENCE_GATE` we would write `items.acaciaFenceGate()` + +### Example + +```javascript +// adds 5 baked potatoes to the inventory of "player" +inventory(player).add(items.bakedPotato(5)); +player.updateInventory(); +``` + +### List of item functions + + * acaciaDoor() + * acaciaDoorItem() + * acaciaFence() + * acaciaFenceGate() + * acaciaStairs() + * activatorRail() + * air() + * anvil() + * apple() + * armorStand() + * arrow() + * bakedPotato() + * banner() + * barrier() + * beacon() + * bed() + * bedBlock() + * bedrock() + * beetroot() + * beetrootBlock() + * beetrootSeeds() + * beetrootSoup() + * birchDoor() + * birchDoorItem() + * birchFence() + * birchFenceGate() + * birchWoodStairs() + * blazePowder() + * blazeRod() + * boat() + * boatAcacia() + * boatBirch() + * boatDarkOak() + * boatJungle() + * boatSpruce() + * bone() + * boneBlock() + * book() + * bookAndQuill() + * bookshelf() + * bow() + * bowl() + * bread() + * brewingStand() + * brewingStandItem() + * brick() + * brickStairs() + * brownMushroom() + * bucket() + * burningFurnace() + * cactus() + * cake() + * cakeBlock() + * carpet() + * carrot() + * carrotItem() + * carrotStick() + * cauldron() + * cauldronItem() + * chainmailBoots() + * chainmailChestplate() + * chainmailHelmet() + * chainmailLeggings() + * chest() + * chorusFlower() + * chorusFruit() + * chorusFruitPopped() + * chorusPlant() + * clay() + * clayBall() + * clayBrick() + * coal() + * coalBlock() + * coalOre() + * cobbleWall() + * cobblestone() + * cobblestoneStairs() + * cocoa() + * command() + * commandChain() + * commandMinecart() + * commandRepeating() + * compass() + * cookedBeef() + * cookedChicken() + * cookedFish() + * cookedMutton() + * cookedRabbit() + * cookie() + * crops() + * darkOakDoor() + * darkOakDoorItem() + * darkOakFence() + * darkOakFenceGate() + * darkOakStairs() + * daylightDetector() + * daylightDetectorInverted() + * deadBush() + * detectorRail() + * diamond() + * diamondAxe() + * diamondBarding() + * diamondBlock() + * diamondBoots() + * diamondChestplate() + * diamondHelmet() + * diamondHoe() + * diamondLeggings() + * diamondOre() + * diamondPickaxe() + * diamondSpade() + * diamondSword() + * diode() + * diodeBlockOff() + * diodeBlockOn() + * dirt() + * dispenser() + * doublePlant() + * doubleStep() + * doubleStoneSlab2() + * dragonEgg() + * dragonsBreath() + * dropper() + * egg() + * elytra() + * emerald() + * emeraldBlock() + * emeraldOre() + * emptyMap() + * enchantedBook() + * enchantmentTable() + * endBricks() + * endCrystal() + * endGateway() + * endRod() + * enderChest() + * enderPearl() + * enderPortal() + * enderPortalFrame() + * enderStone() + * expBottle() + * explosiveMinecart() + * eyeOfEnder() + * feather() + * fence() + * fenceGate() + * fermentedSpiderEye() + * fire() + * fireball() + * firework() + * fireworkCharge() + * fishingRod() + * flint() + * flintAndSteel() + * flowerPot() + * flowerPotItem() + * frostedIce() + * furnace() + * ghastTear() + * glass() + * glassBottle() + * glowingRedstoneOre() + * glowstone() + * glowstoneDust() + * goldAxe() + * goldBarding() + * goldBlock() + * goldBoots() + * goldChestplate() + * goldHelmet() + * goldHoe() + * goldIngot() + * goldLeggings() + * goldNugget() + * goldOre() + * goldPickaxe() + * goldPlate() + * goldRecord() + * goldSpade() + * goldSword() + * goldenApple() + * goldenCarrot() + * grass() + * grassPath() + * gravel() + * greenRecord() + * grilledPork() + * hardClay() + * hayBlock() + * hopper() + * hopperMinecart() + * hugeMushroom1() + * hugeMushroom2() + * ice() + * inkSack() + * ironAxe() + * ironBarding() + * ironBlock() + * ironBoots() + * ironChestplate() + * ironDoor() + * ironDoorBlock() + * ironFence() + * ironHelmet() + * ironHoe() + * ironIngot() + * ironLeggings() + * ironOre() + * ironPickaxe() + * ironPlate() + * ironSpade() + * ironSword() + * ironTrapdoor() + * itemFrame() + * jackOLantern() + * jukebox() + * jungleDoor() + * jungleDoorItem() + * jungleFence() + * jungleFenceGate() + * jungleWoodStairs() + * ladder() + * lapisBlock() + * lapisOre() + * lava() + * lavaBucket() + * leash() + * leather() + * leatherBoots() + * leatherChestplate() + * leatherHelmet() + * leatherLeggings() + * leaves() + * leaves2() + * lever() + * lingeringPotion() + * log() + * log2() + * longGrass() + * magma() + * magmaCream() + * map() + * melon() + * melonBlock() + * melonSeeds() + * melonStem() + * milkBucket() + * minecart() + * mobSpawner() + * monsterEgg() + * monsterEggs() + * mossyCobblestone() + * mushroomSoup() + * mutton() + * mycel() + * nameTag() + * netherBrick() + * netherBrickItem() + * netherBrickStairs() + * netherFence() + * netherStalk() + * netherStar() + * netherWartBlock() + * netherWarts() + * netherrack() + * noteBlock() + * obsidian() + * packedIce() + * painting() + * paper() + * pistonBase() + * pistonExtension() + * pistonMovingPiece() + * pistonStickyBase() + * poisonousPotato() + * pork() + * portal() + * potato() + * potatoItem() + * potion() + * poweredMinecart() + * poweredRail() + * prismarine() + * prismarineCrystals() + * prismarineShard() + * pumpkin() + * pumpkinPie() + * pumpkinSeeds() + * pumpkinStem() + * purpurBlock() + * purpurDoubleSlab() + * purpurPillar() + * purpurSlab() + * purpurStairs() + * quartz() + * quartzBlock() + * quartzOre() + * quartzStairs() + * rabbit() + * rabbitFoot() + * rabbitHide() + * rabbitStew() + * rails() + * rawBeef() + * rawChicken() + * rawFish() + * record10() + * record11() + * record12() + * record3() + * record4() + * record5() + * record6() + * record7() + * record8() + * record9() + * redMushroom() + * redNetherBrick() + * redRose() + * redSandstone() + * redSandstoneStairs() + * redstone() + * redstoneBlock() + * redstoneComparator() + * redstoneComparatorOff() + * redstoneComparatorOn() + * redstoneLampOff() + * redstoneLampOn() + * redstoneOre() + * redstoneTorchOff() + * redstoneTorchOn() + * redstoneWire() + * rottenFlesh() + * saddle() + * sand() + * sandstone() + * sandstoneStairs() + * sapling() + * seaLantern() + * seeds() + * shears() + * shield() + * sign() + * signPost() + * skull() + * skullItem() + * slimeBall() + * slimeBlock() + * smoothBrick() + * smoothStairs() + * snow() + * snowBall() + * snowBlock() + * soil() + * soulSand() + * speckledMelon() + * spectralArrow() + * spiderEye() + * splashPotion() + * sponge() + * spruceDoor() + * spruceDoorItem() + * spruceFence() + * spruceFenceGate() + * spruceWoodStairs() + * stainedClay() + * stainedGlass() + * stainedGlassPane() + * standingBanner() + * stationaryLava() + * stationaryWater() + * step() + * stick() + * stone() + * stoneAxe() + * stoneButton() + * stoneHoe() + * stonePickaxe() + * stonePlate() + * stoneSlab2() + * stoneSpade() + * stoneSword() + * storageMinecart() + * string() + * structureBlock() + * structureVoid() + * sugar() + * sugarCane() + * sugarCaneBlock() + * sulphur() + * thinGlass() + * tippedArrow() + * tnt() + * torch() + * trapDoor() + * trappedChest() + * tripwire() + * tripwireHook() + * vine() + * wallBanner() + * wallSign() + * watch() + * water() + * waterBucket() + * waterLily() + * web() + * wheat() + * wood() + * woodAxe() + * woodButton() + * woodDoor() + * woodDoubleStep() + * woodHoe() + * woodPickaxe() + * woodPlate() + * woodSpade() + * woodStairs() + * woodStep() + * woodSword() + * woodenDoor() + * wool() + * workbench() + * writtenBook() + * yellowFlower() + + +## Entity Module + +The `entity` module provides easy access to all of the entity interfaces in Minecraft. Entities are any non-voxel objects that can exist in a world, including all players, monsters, projectiles, etc. + +For a description of the entities, click [here](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/package-summary.html) + +### Usage + +```javascript +entity.zombie // refers to the org.bukkit.entity.ZOMBIE interface +``` + +### Example + +```javascript +// launches a witherSkull projectile if the player right-clicks the air while holding a bone +var onPlayerInteract = function(event) { + if (event.action == action.rightClickAir) { + var player = event.player; + if (player.itemInHand.type.equals(material.bone)) { + var skull = player.launchProjectile(entity.witherSkull.class); + skull.shooter = player; + skull.velocity = player.location.direction.multiply(1.8); + } + } +}; +events.playerInteract(onPlayerInteract); +``` + +### List of entities + + * ageable + * ambient + * animals + * animalTamer + * areaEffectCloud + * armorStand + * arrow + * bat + * blaze + * boat + * caveSpider + * chicken + * complexEntityPart + * complexLivingEntity + * cow + * creature + * creeper + * damageable + * dragonFireball + * egg + * enderCrystal + * enderDragon + * enderDragonPart + * enderman + * endermite + * enderPearl + * enderSignal + * entity + * experienceOrb + * explosive + * fallingBlock + * fallingSandDeprecated + * fireball + * firework + * fishHook + * flying + * ghast + * giant + * golem + * guardian + * hanging + * horse + * humanEntity + * ironGolem + * item + * itemFrame + * largeFireball + * leashHitch + * lightningStrike + * lingeringPotion + * livingEntity + * magmaCube + * minecart + * monster + * mushroomCow + * npc + * ocelot + * painting + * pig + * pigZombie + * player + * polarBear + * poweredMinecart + * projectile + * rabbit + * sheep + * shulker + * shulkerBullet + * silverfish + * skeleton + * slime + * smallFireball + * snowball + * snowman + * spectralArrow + * spider + * splashPotion + * squid + * storageMinecart + * tameable + * thrownExpBottle + * thrownPotion + * tippedArrow + * tNTPrimed + * vehicle + * villager + * waterMob + * weather + * witch + * wither + * witherSkull + * wolf + * zombie + +## Blocks Module + +The `blocks` module provides easy access to all block types without having to use their [data values](http://minecraft.gamepedia.com/Data_values/Block_IDs). + +### Usage + +```javascript +blocks.oak +blocks.wool.green +``` + +### Examples + +```javascript +box( blocks.oak ); // creates a single oak wood block +box( blocks.sand, 3, 2, 1 ); // creates a block of sand 3 wide x 2 high x 1 long +box( blocks.wool.green, 2 ); // creates a block of green wool 2 blocks wide +``` + +There is also convenience array `blocks.rainbow` which is an array of the 7 colors of the rainbow (or closest +approximations). + +The blocks module is globally exported by the Drone module. + +## Recipes Module + +The `recipes` module provides convenience functions for adding and removing recipes from the game. + +The `recipes.add()` function takes an object with 3 keys as a parameter: + +* result: ItemStack the recipe will create +* ingredients: Object with key-value pairs denoting the letter that will represent each type of ingredient in the "shape" +* shape: Array that defines the shape of the recipe in the crafting table. It **must be** an array of 3 strings each with 3 characters, representing the 9 spaces in the crafting table. The first element is the top row, the second the middle row, and the third is the bottom row. Use spaces to represent empty slots in the table. + +### Usage + +```javascript +recipes.add( +{ + result: resultItem, + ingredients: {X: ingredientItem1, Y: ingedientItem2}, + shape: [" Y ", "YXY", " Y "] +}); +``` + +### Example + +```javascript +// Adds a recipe that can be used to craft a custom bow +// called the "Bow of Exploding" using a bow and TNT +var bow = items.bow(1); +var tnt = items.tnt(1); +var explodeBow = items.bow(1); + +var explodeBowMeta = explodeBow.itemMeta; +explodeBowMeta.displayName = "Bow of Exploding"; +explodeBowMeta.lore = ["Excite. Very boom."]; +explodeBow.itemMeta = explodeBowMeta; + +recipes.add( +{ + result: explodeBow, + ingredients: {B: bow, T: tnt}, + shape: [" ", "TB ", " "] +}); +``` + +## Inventory Module + +This module provides functions to add items to, remove items from and check the contents of a player or NPC's inventory. + +### Usage + +The `inventory` module is best used in conjunction with the items module. + +```javascript +// gives every player a cookie and a baked potato +utils.players(function(player){ + inventory(player) + .add( items.cookie(1) ) + .add( items.bakedPotato(1) ) +}); + +// give a player 6 cookies then take away 4 of them +inventory(player) + .add( items.cookie(6) ) + .remove ( items.cookie(4) ) + +// check if a player has any cookies +var hasCookies = inventory(player).contains( items.cookie(1) ); +``` + +The inventory module exposes a single function which when passed a player or NPC will return an object with 3 methods: + *NOTE: all methods expect a parameter of the type `org.bukkit.inventory.ItemStack` + so use the `items` module to construct items to pass into these methods + +* add : Adds items to the inventory +* remove : removes items from the inventory +* contains : checks to see if there is the specified type and amount of item in the inventory + +### Example + +```javascript +// When a player throws a snowball, adds a new one to their inventory +var onSnowballThrow = function(event) { + if (isSnowball(event.entity)) { + var player = event.entity.shooter; + inventory(player).add(items.snowBall(1)); + } +}; +events.projectileLaunch(onSnowballThrow); +``` + +## Action Module + +The `action` module can be used to reference the 5 different action types players can perform. + +### Usage + +```javascript +action.leftClickAir // refers to org.bukkit.event.block.Action.LEFT_CLICK_AIR +``` + +### Example + +```javascript +// Sends player a message if they right-click on a block +var onPlayerInteract = function(event) { + if (event.action == action.rightClickBlock) { + echo(event.player, "You right-clicked on a block!") + } +} +events.playerInteract(onPlayerInteract); +``` + +### Possible actions: + + * leftClickAir + * leftClickBlock + * rightClickAir + * rightClickBlock + * physical <--- physical action occurs when a player steps on a pressure plate + +## BlockFace Module + +The BlockFace module can be used to reference the different possible directions a block can be facing (for blocks like stairs and armor stands) + +### Usage + +```javascript +blockFace.south // refers to org.bukkit.block.BlockFace.SOUTH +``` + +### Example + +```javascript +// sets the direction bannerBlock is facing to "south" +// bannerBlock is a standing banner block +var bannerData = bannerBlock.state.data; +bannerData.facingDirection = blockFace.south; +bannerState.update(); +``` + +### Possible BlockFace directions: + + * down + * east + * eastNorthEast + * eastSouthEast + * north + * northEast + * northNorthEast + * northNorthWest + * northWest + * self + * south + * southEast + * southSouthEast + * southSouthWest + * southWest + * up + * west + * westNorthWest + * westSouthWest + +## Bukkit Module + +The `bukkit` module provides functions that are executed server-wide. + +The full list of functions can be found in the [Method Summary of the Bukkit Class](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Bukkit.html) + +### bukkit.broadcastMessage() + +The `bukkit.broadcastMessage()` function can be used to broadcast a message to all players on the server. + +#### Parameters + + * message: the message you want to send (string) + +#### Example + +```javascript +// sends the message "Welcome to the server!" to all players on the server +bukkit.broadcastMessage("Welcome to the server!"); +``` + +### bukkit.dispatchCommand() + +The `bukkit.dispatchCommand()` function can be used to execute a command as if it were sent from the server's console. + +NOTE: **Be careful when sending commands to the server, it will do anything you ask it to!** + +#### Parameters + + * sender: the sender of the command (CommandSender) + + NOTE: This will usually be the "console" referenced by `server.consoleSender` + * command: the command you want to execute (string) + +#### Example + +```javascript +// executes the command "time set 0" as if we typed "/time set 0" in game as OP +// or "time set 0" into the server console directly +bukkit.dispatchCommand(server.consoleSender, "time set 0"); +``` + +## Color Module + +Provides access to all possible colors in `org.bukkit.Color` + +NOTE: The "color" module is not to be confused with the "dyeColor" module. The "dyeColor" module is used for coloring dyes, cloth, and banners whereas the "color" module is used for coloring things like leather armor. + +### Usage +```javascript +color.red // references org.bukkit.Color.RED +``` + +### Example + +```javascript +// Sets the color of a pair of leather boots to red and gives them to "player" +var boots = items.leatherBoots(1); +var bootsMeta = boots.itemMeta; +bootsMeta.color = color.red; +boots.itemMeta = bootsMeta; +player.equipment.boots = boots; +``` + +### List of colors: + + * aqua + * black + * blue + * fuchsia + * gray + * green + * lime + * maroon + * navy + * olive + * orange + * purple + * red + * silver + * teal + * white + * yellow + +## DyeColor Module + +Provides access to all possible colors in `org.bukkit.DyeColor` + +NOTE: The "dyeColor" module is not to be confused with the "color" module. The "dyeColor" module is used for coloring dyes, cloth, and banners whereas the "color" module is used for coloring things like leather armor. + +### Usage +```javascript +dyeColor.blue // references org.bukkit.DyeColor.BLUE +``` + +### Example + +```javascript +// sets the dyeColor of bannerBlock to blue +// bannerBlock is a standing banner block +var bannerState = bannerBlock.state; +bannerState.baseColor = dyeColor.blue; +bannerState.update(); +``` + +### List of dye colors: + + * black + * blue + * brown + * cyan + * gray + * green + * lightblue + * lime + * magenta + * orange + * pink + * purple + * red + * silver + * white + * yellow + +## DamageCause Module + +Provides access to all possible causes of damage in `org.bukkit.event.entity.EntityDamageEvent.DamageCause` that could result in an EntityDamageEvent being fired. + +### Usage +```javascript +damageCause.fall // returns enum org.bukkit.event.entity.EntityDamageEvent.DamageCause.FALL +``` + +### Example + +```javascript +// prevents entities from taking falling damage +var onEntityDamage = function(event) { + if (event.cause == damageCause.fall) { + event.cancelled = true; + } +} +events.entityDamage(onEntityDamage); +``` + +### List of damage causes: + + * blockExplosion + * Damage caused by being in the area when a block explodes. + * contact + * Damage caused when an entity contacts a block such as a Cactus. + * custom + * Custom damage. + * dragonBreath + * Damage caused by a dragon breathing fire. + * drowning + * Damage caused by running out of air while in water + * entityAttack + * Damage caused when an entity attacks another entity. + * entityExplosion + * Damage caused by being in the area when an entity, such as a Creeper, explodes. + * fall + * Damage caused when an entity falls a distance greater than 3 blocks + * fallingBlock + * Damage caused by being hit by a falling block which deals damage + * fire + * Damage caused by direct exposure to fire + * fireTick + * Damage caused due to burns caused by fire + * flyIntoWall + * Damage caused when an entity runs into a wall. + * hotFloor + * Damage caused when an entity steps on Material.MAGMA. + * lava + * Damage caused by direct exposure to lava + * lightning + * Damage caused by being struck by lightning + * magic + * Damage caused by being hit by a damage potion or spell + * melting + * Damage caused due to a snowman melting + * poison + * Damage caused due to an ongoing poison effect + * projectile + * Damage caused when attacked by a projectile. + * starvation + * Damage caused by starving due to having an empty hunger bar + * suffocation + * Damage caused by being put in a block + * suicide + * Damage caused by committing suicide using the command "/kill" + * thorns + * Damage caused in retaliation to another attack by the Thorns enchantment. + * void + * Damage caused by falling into the void + * wither + * Damage caused by Wither potion effect + +## Effect Module + +Effects are sent to players' clients by the server and add visuals and/or sounds to the game. The `effect` module provides access to all effect enums in `org.bukkit.Effect`. [Spigot JavaDocs: Effect](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Effect.html) + +Use the `playEffect()` function to display the effects, as shown in the example below. + +### Usage +```javascript +effect.enderSignal // returns enum org.bukkit.Effect.ENDER_SIGNAL +``` + +### Example + +```javascript +// Displays the "mobspawnerFlames" visual effect when the player moves +var onPlayerMove = function(event) { + var player = event.player; + player.playEffect(player.location, effect.mobspawnerFlames, 5); +}; +events.playerMove(onPlayerMove); +``` + +### List of effects: + + * anvilBreak + * The sound played when an anvil breaks + * anvilLand + * The sound played when an anvil lands after falling + * anvilUse + * The sound played when an anvil is used + * batTakeoff + * Sound played by a bat taking off + * blazeShoot + * Sound of blaze firing. + * bowFire + * Sound of a bow firing. + * brewingStandBrew + * The sound played by brewing stands when brewing + * chorusFlowerDeath + * The sound played when a chorus flower dies + * chorusFlowerGrow + * The sound played when a chorus flower grows + * click1 + * A click sound. + * click2 + * An alternate click sound. + * cloud + * A puff of white smoke + * colouredDust + * Multicolored dust particles + * crit + * Critical hit particles + * doorClose + * Sound of a door closing. + * doorToggle + * Sound of a door opening. + * dragonBreath + * The sound/particles used by the enderdragon's breath attack. + * endGatewaySpawn + * The sound/particles caused by a end gateway spawning + * enderSignal + * An ender eye signal; a visual effect. + * enderdragonGrowl + * The sound of an enderdragon growling + * enderdragonShoot + * Sound of an enderdragon firing + * endereyeLaunch + * The sound played when launching an endereye + * explosion + * Explosion particles + * explosionHuge + * The biggest explosion particle effect + * explosionLarge + * A larger version of the explode particle + * extinguish + * Sound of fire being extinguished. + * fenceGateClose + * Sound of a door closing. + * fenceGateToggle + * Sound of a door opening. + * fireworkShoot + * The sound played when launching a firework + * fireworksSpark + * The spark that comes off a fireworks + * flame + * Fire particles + * flyingGlyph + * The symbols that fly towards the enchantment table + * footstep + * A small gray square + * ghastShoot + * Sound of ghast firing. + * ghastShriek + * Sound of ghast shrieking. + * happyVillager + * The particle that appears when trading with a villager + * heart + * The particle that appears when breading animals + * instantSpell + * A puff of white stars + * ironDoorClose + * Sound of a door closing. + * ironDoorToggle + * Sound of a door opening. + * ironTrapdoorClose + * Sound of a door closing. + * ironTrapdoorToggle + * Sound of a door opening. + * itemBreak + * The particles generated when a tool breaks. + * largeSmoke + * The smoke particles that appears on blazes, minecarts with furnaces and fire + * lavaPop + * The particles that pop out of lava + * lavadrip + * The lava drip particle that appears on blocks under lava + * magicCrit + * Blue critical hit particles + * mobspawnerFlames + * The flames seen on a mobspawner; a visual effect. + * note + * The note that appears above note blocks + * particleSmoke + * Smoke particles + * portal + * The particles shown at nether portals + * portalTravel + * The sound played when traveling through a portal + * potionBreak + * Visual effect of a splash potion breaking. + * potionSwirl + * Multicolored potion effect particles + * potionSwirlTransparent + * Multicolored potion effect particles that are slightly transparent + * recordPlay + * A song from a record. + * slime + * The particle shown when a slime jumps + * smallSmoke + * Small gray particles + * smoke + * A visual smoke effect. + * snowShovel + * White particles + * snowballBreak + * Snowball breaking + * spell + * A puff of white potion swirls + * splash + * Water particles + * stepSound + * Sound of a block breaking. + * tileBreak + * The particles generated while breaking a block. + * tileDust + * The particles generated while sprinting a block This particle requires a Material and data value so that the client can select the correct texture. + * trapdoorClose + * Sound of a trapdoor closing. + * trapdoorToggle + * Sound of a trapdoor opening. + * villagerPlantGrow + * Particles displayed when a villager grows a plant, data is the number of particles + * villagerThundercloud + * The particle that appears when hitting a villager + * voidFog + * Small gray particles + * waterdrip + * The water drip particle that appears on blocks under water + * witchMagic + * A puff of purple particles + * witherBreakBlock + * The sound played when a wither breaks a block + * witherShoot + * Sound of a wither shooting + * zombieChewIronDoor + * Sound of zombies chewing on iron doors. + * zombieChewWoodenDoor + * Sound of zombies chewing on wooden doors. + * zombieConvertedVillager + * The sound played when a villager is converted by a zombie + * zombieDestroyDoor + * Sound of zombies destroying a door. + * zombieInfect + * The sound played when a zombie infects a target + +## Enchantment Module + +Provides access to all enchantments in Minecraft that can be applied to equipment. Use the `addEnchant()` function to apply the enchantment to an item's ItemMeta. [Spigot JavaDocs: ItemMeta.addEnchant()](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/ItemMeta.html#addEnchant(org.bukkit.enchantments.Enchantment,%20int,%20boolean)) + +### Usage + +```javascript +enchantment.durability // returns the Field org.bukkit.enchantments.Enchantment.DURABILITY +``` + +### Example + +```javascript +// adds the "durability" enchantment to the "sword" +var sword = items.diamondSword(); +var swordMeta = sword.itemMeta; +swordMeta.addEnchant(enchantment.durability, 1, true); +sword.itemMeta = swordMeta; +``` + +### List of enchantments: + + * arrowDamage + * Provides extra damage when shooting arrows from bows + * arrowFire + * Sets entities on fire when hit by arrows shot from a bow + * arrowInfinite + * Provides infinite arrows when shooting a bow + * arrowKnockback + * Provides a knockback when an entity is hit by an arrow from a bow + * damageAll + * Increases damage against all targets + * damageArthropods + * Increases damage against arthropod targets + * damageUndead + * Increases damage against undead targets + * depthStrider + * Increases walking speed while in water + * digSpeed + * Increases the rate at which you mine/dig + * durability + * Decreases the rate at which a tool looses durability + * fireAspect + * When attacking a target, has a chance to set them on fire + * frostWalker + * Freezes any still water adjacent to ice / frost which player is walking on + * knockback + * All damage to other targets will knock them back when hit + * lootBonusBlocks + * Provides a chance of gaining extra loot when destroying blocks + * lootBonusMobs + * Provides a chance of gaining extra loot when killing monsters + * luck + * Decreases odds of catching worthless junk + * lure + * Increases rate of fish biting your hook + * mending + * Allows mending the item using experience orbs + * oxygen + * Decreases the rate of air loss whilst underwater + * protectionEnvironmental + * Provides protection against environmental damage + * protectionExplosions + * Provides protection against explosive damage + * protectionFall + * Provides protection against fall damage + * protectionFire + * Provides protection against fire damage + * protectionProjectile + * Provides protection against projectile damage + * silkTouch + * Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone) + * thorns + * Damages the attacker + * waterWorker + * Increases the speed at which a player may mine underwater + + +## EntityTypeCheck Module + +Provides a set of functions that can be used to check if an entity is of a certain type. For a list of all entity types in Minecraft, refer to [Spigot JavaDocs: EntityType](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html) + +### Usage + +```javascript +isChicken(entity) // returns "true" if "entity" is a chicken +``` + +### Example + +```javascript +// when a projectile hits something check to see if it is an "Arrow" +// if it is, create an explosion where it landed +function onProjectileHit(event) { + var projectile = event.entity; + var world = projectile.world; + if (isArrow(projectile)) { + projectile.remove(); + world.createExplosion(projectile.location, 5); + } +} +events.projectileHit(onProjectileHit); +``` + +## EntityType Module + +The entityType module provides access to all of the EntityType enums in `org.bukkit.entity.EntityType`. + +[Spigot JavaDocs: EntityType](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html) + +Often used as a parameter of methods like `World.spawnEntity()` to specify the type of entity that should be spawned. + +[Spigot JavaDocs: World.spawnEntity()](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#spawnEntity(org.bukkit.Location,%20org.bukkit.entity.EntityType)) + +### Usage + +```javascript +entityType.chicken // returns the enum org.bukkit.entity.EntityType.CHICKEN +``` + +### Example + +```javascript +// spawns a "chicken" entity at the target location +// when the player right-clicks on a block +var world = server.worlds.get(0); +var onPlayerInteract = function(event) { + if (event.action == action.rightClickBlock) { + var clickedBlockLoc = event.clickedBlock.location; + world.spawnEntity(clickedBlockLoc, entityType.chicken); + } +} +events.playerInteract(onPlayerInteract); +``` + +## File Module + +The `file` module provides functions for reading and writing persistent JSON data to files so that plugins that require it can maintain their state across server restarts or reloads. + +### file.load() + +Returns a string containing all text in the data file loaded. + +#### Parameters + +filename: string specifying the name of the file to load data from + +#### Usage + +```javascript +var rawData = file.load("data-file.json"); +``` + +### file.write() + +Saves the desired JSON data (as a string) to a file with the specified name. + +#### Parameters + +filename: string specifying the name of the file to write data to + +data: stringifyed JSON data to be written to the file + +#### Usage + +```javascript +file.write("data-file.json", '{"data": []}'); +``` + +### Example + +```javascript +exports.setWarp = function(label) { + + var rawData; + var data; + var warpLocations; + + try { + rawData = file.load("warping-data.json"); + data = JSON.parse(rawData); + warpLocations = data[0].warpLocations; + if (Object.keys(warpLocations).length === 0) { + warpLocations = []; + } + } + catch(err) { + file.write("warping-data.json", '{"warpLocations": []}'); + warpLocations = []; + } + + if (typeof(label) != "string") { + echo("Usage: /js setWarp(