Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 10, 2023
1 parent ab355f0 commit 6ed5db9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ public class EntityTeleportedByPortalScriptEvent extends BukkitScriptEvent imple
public EntityTeleportedByPortalScriptEvent() {
registerCouldMatcher("<entity> teleported by portal");
registerSwitches("to", "portal_type");
this.<EntityTeleportedByPortalScriptEvent, WorldTag>registerDetermination("target_world", WorldTag.class, (evt, context, targetWorld) -> evt.event.setTargetWorld(targetWorld.getWorld()));
this.<EntityTeleportedByPortalScriptEvent>registerTextDetermination("remove_target_world", (evt) -> evt.event.setTargetWorld(null));
this.<EntityTeleportedByPortalScriptEvent, WorldTag>registerDetermination("target_world", WorldTag.class, (evt, context, targetWorld) -> {
evt.event.setTargetWorld(targetWorld.getWorld());
});
this.<EntityTeleportedByPortalScriptEvent>registerTextDetermination("remove_target_world", (evt) -> {
evt.event.setTargetWorld(null);
});
}

EntityPortalReadyEvent event;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public class BrewingStartsScriptEvent extends BukkitScriptEvent implements Liste

public BrewingStartsScriptEvent() {
registerCouldMatcher("brewing starts");
this.<BrewingStartsScriptEvent, DurationTag>registerDetermination("brew_time", DurationTag.class, (evt, context, time) -> evt.event.setTotalBrewTime(time.getTicksAsInt()));
this.<BrewingStartsScriptEvent, DurationTag>registerDetermination("brew_time", DurationTag.class, (evt, context, time) -> {
evt.event.setTotalBrewTime(time.getTicksAsInt());
});
}

public BrewingStartEvent event;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class PlayerConsumesScriptEvent extends BukkitScriptEvent implements List
// <context.hand> returns an ElementTag of the hand being used to consume the item. Can be either HAND or OFF_HAND. Requires a 1.19+ server.
//
// @Determine
// ItemTag to change the item being consumed.
// ItemTag to change the item being consumed. Use with caution, if the player is eating a stack of items, this will replace the entire stack.
//
// @Player Always.
//
Expand Down

0 comments on commit 6ed5db9

Please sign in to comment.