Skip to content

Setting past anger level actually sets new anger level #70

@sovdeeth

Description

@sovdeeth

Describe the bug
ExprWardenEventAnger returns Integer for acceptChange when setting past anger level, but actually changes the new anger level instead.

To Reproduce

return mode == Changer.ChangeMode.SET ? new Class[]{Integer.class} : null;

@Override
public void change(@NotNull Event e, Object @NotNull [] delta, Changer.@NotNull ChangeMode mode) {
if (delta[0] instanceof Integer integer)
((WardenAngerChangeEvent) e).setNewAnger(integer);
}

Expected behavior
For a parse error to appear or the old anger level to be set.

Screenshots
If applicable, add screenshots to help explain your problem.

/sk info:

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Area: Lusk (Skript)Takes place in the 'skript' module. More specifically in the skript implementation.Priority: LowCan wait.Status: PlannedPlanned for implementation. Not waiting on other features or changes to be implemented.Type: EnhancementImprovements to a already existing features.

Projects

Status

Accepted

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions