Skip to content

Commit

Permalink
Add/fix more regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Feb 4, 2016
1 parent 211a108 commit 63449e1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
Expand Up @@ -31,16 +31,20 @@ public class EntityDamagedScriptEvent extends BukkitScriptEvent implements Liste

// <--[event]
// @Events
// entity damaged (by <cause>) (in <area>) (with:<item>)
// <entity> damaged (by <cause>) (in <area>) (with:<item>)
// entity damages entity (in <area>) (with:<item>)
// entity damages <entity> (in <area>) (with:<item>)
// entity damaged by entity (in <area>) (with:<item>)
// entity damaged by <entity> (in <area>) (with:<item>)
// <entity> damages entity (in <area>) (with:<item>)
// <entity> damaged by entity (in <area>) (with:<item>)
// <entity> damaged by <entity> (in <area>) (with:<item>)
// <entity> damages <entity> (in <area>) (with:<item>)
// entity damaged (by <cause>) (in <area>)
// <entity> damaged (by <cause>) (in <area>)
// entity damages entity (in <area>)
// entity damages <entity> (in <area>)
// entity damaged by entity (in <area>)
// entity damaged by <entity> (in <area>)
// <entity> damages entity (in <area>)
// <entity> damaged by entity (in <area>)
// <entity> damaged by <entity> (in <area>)
// <entity> damages <entity> (in <area>)
//
// @Regex ^on [^\s]+ ((damages [^\s]+)|damaged( by [^\s]+)?)( in ((notable (cuboid|ellipsoid))|([^\s]+)))?$
//
// @Switch with <item>
//
// @Cancellable true
//
Expand Down
Expand Up @@ -34,7 +34,6 @@ public class EntityDeathScriptEvent extends BukkitScriptEvent implements Listene
//
// @Regex ^on [^\s]+ (death|dies)( in ((notable (cuboid|ellipsoid))|([^\s]+)))?$
//
//
// @Triggers when an entity dies.
//
// @Context
Expand Down
Expand Up @@ -35,6 +35,8 @@ public class EntityKilledScriptEvent extends BukkitScriptEvent implements Listen
// <entity> kills entity (in <area>)
// <entity> kills <entity> (in <area>)
//
// @Regex ^on [^\s]+ ((kills [^\s]+)|killed( by [^\s]+)?)( in ((notable (cuboid|ellipsoid))|([^\s]+)))?$
//
// @Cancellable true
//
// @Triggers when an entity is killed.
Expand Down
Expand Up @@ -29,6 +29,8 @@ public class PlayerDragsInInvScriptEvent extends BukkitScriptEvent implements Li
// player drags in inventory (in_area <area>)
// player drags (<item>) (in <inventory type>) (in_area <area>)
//
// @Regex ^on player drags( ^[\s]+)?(in [^\s]+)?( in_area ((notable (cuboid|ellipsoid))|([^\s]+)))?$
//
// @Triggers when a player drags in an inventory.
//
// @Context
Expand Down
Expand Up @@ -62,7 +62,7 @@ public static String doEvents(List<String> events, dNPC npc, dPlayer player, Map
// @Events
// server start
//
// @Regex ^server start$
// @Regex ^on server start$
//
// @Triggers when the server starts
//
Expand Down Expand Up @@ -97,7 +97,7 @@ public void run() {
// time changes (in <world>)
// time <0-23> in <world>
//
// @Regex ^time [^\s]+( in [^\s]+)$
// @Regex ^on time [^\s]+( in [^\s]+)$
//
// @Triggers when the current time changes in a world (once per mine-hour).
//
Expand Down Expand Up @@ -146,7 +146,7 @@ public void timeEvent() {
// <item> crafted
// <material> crafted
//
// @Regex ^[^\s]+ crafted$
// @Regex ^on [^\s]+ crafted$
//
// @Triggers when an item's recipe is correctly formed.
// @Context
Expand Down Expand Up @@ -264,7 +264,7 @@ else if (dItem.matches(determination)) {
// player (<click type>) clicks (<item>) (in <inventory type>) (with <material>)
// player (<click type>) clicks (<material>) (in <inventory type>) (with <material>)
//
// @Regex ^player( [^\s]+)? clicks [^\s]+( in [^\s]+)?( with [^\s]+)?$
// @Regex ^on player( [^\s]+)? clicks [^\s]+( in [^\s]+)?( with [^\s]+)?$
//
// @Triggers when a player clicks in an inventory.
// @Context
Expand Down Expand Up @@ -448,7 +448,7 @@ public void run() {
// player edits book
// player signs book
//
// @Regex ^player (edits|signs) book$
// @Regex ^on player (edits|signs) book$
//
// @Triggers when a player edits or signs a book.
// @Context
Expand Down Expand Up @@ -516,7 +516,7 @@ else if (dScript.matches(determination)) {
// player (<click type>) clicks block (with <item>)
// player stands on <pressure plate>
//
// @Regex ^player ((([^\s]+ )?clicks [^\s]+( with [^\s]+)?( in [^\s]+)?))|(stands on [^\s]+))$
// @Regex ^on player ((([^\s]+ )?clicks [^\s]+( with [^\s]+)?( in [^\s]+)?))|(stands on [^\s]+))( in ((notable (cuboid|ellipsoid))|([^\s]+)))?$
//
// @Triggers when a player clicks on a block or stands on a pressure plate.
// @Context
Expand Down

0 comments on commit 63449e1

Please sign in to comment.