Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New <context.hand> tag for EntityResurrect event. #2617

Merged
merged 5 commits into from May 17, 2024

Conversation

heypr
Copy link
Contributor

@heypr heypr commented May 3, 2024

case "entity" -> entity;
case "hand" -> {
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_19)) {
yield event.getHand() != null ? new ElementTag(event.getHand().name(), true) : null;
Copy link
Member

Choose a reason for hiding this comment

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

elementtag has an enum constructor

@@ -25,6 +28,7 @@ public class EntityResurrectScriptEvent extends BukkitScriptEvent implements Lis
//
// @Context
// <context.entity> returns the EntityTag being resurrected.
// <context.hand> returns a ElementTag of which hand the totem was in during resurrection, if any. Can be either HAND or OFF_HAND. Available only on MC 1.19+.
Copy link
Member

Choose a reason for hiding this comment

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

an, but also no need to specify ElementTag

@mcmonkey4eva mcmonkey4eva merged commit 5ecb388 into DenizenScript:dev May 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants