Skip to content

Commit

Permalink
fix steps on matching everything, improve warden event meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Feb 4, 2023
1 parent 7da248a commit 6de5e25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Expand Up @@ -27,7 +27,7 @@ public class EntityStepsOnScriptEvent extends BukkitScriptEvent implements Liste
//
// @Cancellable true
//
// @Triggers when an entity steps onto a specific block material. For players, use <@link event player steps on block>.
// @Triggers when a non-player entity steps onto a specific block material. For players, use <@link event player steps on block>.
//
// @Context
// <context.entity> returns an EntityTag of the entity stepping onto the block.
Expand Down Expand Up @@ -62,7 +62,13 @@ public EntityStepsOnScriptEvent() {

@Override
public boolean couldMatch(ScriptPath path) {
return !path.eventLower.startsWith("player");
if (!super.couldMatch(path)) {
return false;
}
if (path.eventLower.startsWith("player")) {
return false;
}
return true;
}

@Override
Expand Down
Expand Up @@ -25,7 +25,7 @@ public class WardenChangesAngerLevelScriptEvent extends BukkitScriptEvent implem
//
// @Location true
//
// @Triggers when a warden changes its anger level.
// @Triggers when a warden changes its anger level. (In practice, only fires when increasing).
//
// @Player when the entity who triggered the change is a player.
//
Expand All @@ -35,7 +35,7 @@ public class WardenChangesAngerLevelScriptEvent extends BukkitScriptEvent implem
// <context.entity> returns the EntityTag of the warden which changed its anger level.
// <context.new_anger> returns an ElementTag(Number) of the new anger level.
// <context.old_anger> returns an ElementTag(Number) of the old anger level.
// <context.target> returns the EntityTag who triggered the change (if any).
// <context.target> returns the EntityTag who triggered the change (if any). (In practice, always present).
//
// @Determine
// "ANGER:" + ElementTag(Number) to set the value of the anger level. Value must be between 0 and 150.
Expand Down

0 comments on commit 6de5e25

Please sign in to comment.