EssentialsX

EssentialsX

2M Downloads

Wrong arguments in VanishStatusChangeEvent (VanishCommand)

ByteExceptionM opened this issue ยท 1 comments

commented

Type of bug

Other unexpected behaviour

/ess version output

[02:44:14 INFO]: Server version: 1.16.5-R0.1-SNAPSHOT git-Paper-629 (MC: 1.16.5)
[02:44:14 INFO]: EssentialsX version: 2.18.1.0
[02:44:14 INFO]: LuckPerms version: 5.3.30
[02:44:14 INFO]: Vault version: 1.7.3-b131
[02:44:14 INFO]: ChestShop version: 3.11 (build 213)

Server startup log

Not relevant

EssentialsX config files

Not relevant

Error log (if applicable)

Not relevant

Bug description

In the following class the variables are swapped:

final VanishStatusChangeEvent vanishEvent = new VanishStatusChangeEvent(sender.isPlayer() ? ess.getUser(sender.getPlayer()) : null, user, enabled);

I have checked other events for example FlyStatusChangeEvent and GodStatusChangeEvent, that inherit StatusChangeEvent and I think that the variable "affected" has been swapped with "controller" here

final FlyStatusChangeEvent event = new FlyStatusChangeEvent(user, sender.isPlayer() ? ess.getUser(sender.getPlayer()) : null, enabled);

final GodStatusChangeEvent godEvent = new GodStatusChangeEvent(user, sender.isPlayer() ? ess.getUser(sender.getPlayer()) : null, enabled);

Already created a pr which is ready to get merged

Steps to reproduce

See bug description

Expected behaviour

See bug description

Actual behaviour

See bug description

commented

Duplicate of #2604