Skip to content

NPC Trait Updates#2833

Open
MC-Samuel wants to merge 8 commits into
DenizenScript:devfrom
MC-Samuel:npc-sitting-fix
Open

NPC Trait Updates#2833
MC-Samuel wants to merge 8 commits into
DenizenScript:devfrom
MC-Samuel:npc-sitting-fix

Conversation

@MC-Samuel

@MC-Samuel MC-Samuel commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Deprecated Denizen's SittingTrait, SleepingTrait, and SneakingTrait traits for Citizens' SitTrait, SleepTrait, and Sneak traits.

NPC will be updated to the new version when any of these traits are adjusted through mechanisms or the /npc command.

Fixes a bug reported at https://discord.com/channels/315163488085475337/1508455250594631794.

Requires CitizensDev/Citizens2#3321 to be merged first. This has been merged, but the build using this method (b4215) or higher is needed for MC 1.21+.

@MC-Samuel MC-Samuel marked this pull request as draft July 13, 2026 04:49
Entity entity = npc.getEntity();
if (entity instanceof Sittable) {
((Sittable) entity).setSitting(true);
if (npc.getEntity() instanceof Sittable sittable) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since this instanceof check is already made one time maybe you could use that one / be merged ?

@MC-Samuel MC-Samuel marked this pull request as ready for review July 13, 2026 19:31
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.

2 participants