Skip to content

Commit

Permalink
Start world event meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Aug 26, 2013
1 parent 9121870 commit e96822d
Showing 1 changed file with 46 additions and 0 deletions.
Expand Up @@ -167,6 +167,24 @@ public static String doEvents(List<String> eventNames, dNPC npc, Player player,
// BLOCK EVENTS
/////////////////

// <--[event]
// @Events
// player breaks block
// player breaks <block>
// player breaks block with <item>
// player breaks <block> with <item>
//
// @Triggers when a player breaks a block.
// @Context
// <context.location> will return the location the block was broken at.
// <context.type> will return the material of the block that was broken.
//
// @Determine
// CANCELLED to stop the block from breaking.
// NOTHING to make the block drop no items.
// dList(dItem) to make the block drop a specified list of items.
//
// -->
@EventHandler
public void blockBreak(BlockBreakEvent event) {

Expand Down Expand Up @@ -230,6 +248,20 @@ else if (Argument.valueOf(determination).matchesArgumentList(dItem.class)) {
}
}

// <--[event]
// @Events
// block burns
// <block> burns
//
// @Triggers when a block is destroyed by fire.
// @Context
// <context.location> will return the location the block was burned at.
// <context.type> will return the material of the block that was burned.
//
// @Determine
// CANCELLED to stop the block from being destroyed.
//
// -->
@EventHandler
public void blockBurn(BlockBurnEvent event) {

Expand All @@ -247,6 +279,20 @@ public void blockBurn(BlockBurnEvent event) {
event.setCancelled(true);
}

// <--[event]
// @Events
// block ignites
// <block> ignites
//
// @Triggers when a block is destroyed by fire.
// @Context
// <context.location> will return the location the block was burned at.
// <context.type> will return the material of the block that was burned.
//
// @Determine
// CANCELLED to stop the block from being destroyed.
//
// -->
@EventHandler
public void blockIgnite(BlockIgniteEvent event) {

Expand Down

1 comment on commit e96822d

@aufdemrand
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far so good!

Please sign in to comment.