Denizen Script Events


Events are a way to listen to things that happened on your server and respond to them through a script. These usually pair with 'world' script containers.
Learn about how events work in The Beginner's Guide.


Showing 3 out of 390 events...

Categories:

Player | Depenizen



Category: Player


Nameplayer places block
Event Lines player places block
player places <item>
Triggerswhen a player places a block.
Example
on player places block:
Example
after player places torch using:off_hand:
Example
on player places cactus against:sand:
Example
# This example process the event only if the player places any block that isn't tnt.
on player places block type:!tnt:
- announce "<player.name> has placed a block that isn't TNT. Lucky!"
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesusing:<hand_type> to only process the event if the player is using the specified hand type (HAND or OFF_HAND).
against:<location> to only process the event if block that this new block is being placed against matches the specified LocationTag matcher.
type:<material> to only process the event if the block placed matches the MaterialTag matcher input.
Contexts<context.location> returns the LocationTag of the block that was placed.
<context.material> returns the MaterialTag of the block that was placed.
<context.old_material> returns the MaterialTag of the block that was replaced.
<context.item_in_hand> returns the ItemTag of the item in hand.
<context.hand> returns the name of the hand that the block was in (HAND or OFF_HAND).
<context.against> returns the LocationTag of the block this block was placed against.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesBlockScriptEvent.java#L18

Nameplayer places hanging
Event Lines player places <hanging>
Triggerswhen a hanging entity (painting or itemframe) is placed.
Generated Exampleson player places hanging:
after player places hanging:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesitem:<item> to only process the event when the hangable item matches the given ItemTag matcher.
Contexts<context.hanging> returns the EntityTag of the hanging.
<context.location> returns the LocationTag of the block the hanging was placed on.
<context.item> returns the ItemTag that was placed.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesHangingScriptEvent.java#L17



Category: Depenizen


Namecrackshot player places landmine
Event Lines crackshot player places landmine
Triggerswhen a player places a landmine.
Generated Examplesafter crackshot player places landmine:
on crackshot player places landmine:
Has PlayerAlways - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.landmine> returns the EntityTag for the landmine.
GroupDepenizen
RequiresDepenizen, CrackShot
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/crackshot/CrackShotPlayerPlacesLandmineEvent.java#L14