You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[14:31:50] [Server thread/INFO]: Server version: 1.14.2-R0.1-SNAPSHOT git-Spigot-df0eb25-f2757f9 (MC: 1.14.2)
[14:31:50] [Server thread/INFO]: EssentialsX version: 2.16.1.125
[14:31:50] [Server thread/INFO]: PermissionsEx version: 1.23.4
[14:31:50] [Server thread/INFO]: Vault version: 1.7.1-b91
[14:31:50] [Server thread/INFO]: You are running unsupported plugins!
[14:31:50] [Server thread/INFO]: You are running an unsupported server version!
Details
Description
I've made custom vanishing command (which just sends 'player left' message on vanish), and I've encountered the following problem: when issuing /v <player> in console, VanishStatusChangeEvent#getAffected is null, while VanishStatusChangeEvent#getController is the <player>.
Steps to reproduce
Here's the code I use in my command which is using EssentialsX API:
@EventHandlerpublicvoidonPlayerVanishStatusChange(VanishStatusChangeEventevent) {
booleanvanished = event.getValue();
Playerplayer = event.getAffected().getBase();
PlayerFakeLogonEventplayerFakeLogonEvent;
if (vanished) {
playerFakeLogonEvent = newPlayerFakeLeaveEvent(player);
} else {
playerFakeLogonEvent = newPlayerFakeJoinEvent(player);
}
// PlayerFakeLogonEvent is my custom event for showing join/quit messages upon vanish/unvanishBukkit.getPluginManager().callEvent(playerFakeLogonEvent);
}
Expected behavior /v <player> triggered in the game (not in console) makes VanishStatusChangeEvent#getAffected return target player, and makes VanishStatusChangeEvent#getController return command issuer.
The text was updated successfully, but these errors were encountered:
In my opinion it would still be good to add an event with the correct signature, and deprecate the old one. That way it can slowly be phased out, and by the time a big milestone is reached most plugins are hopefully using/updated to use the updated event.
Information
Full output of
/ess version
:Details
Description
I've made custom vanishing command (which just sends 'player left' message on vanish), and I've encountered the following problem: when issuing
/v <player>
in console,VanishStatusChangeEvent#getAffected
is null, whileVanishStatusChangeEvent#getController
is the<player>
.Steps to reproduce
Here's the code I use in my command which is using EssentialsX API:
Expected behavior
/v <player>
triggered in the game (not in console) makesVanishStatusChangeEvent#getAffected
return target player, and makesVanishStatusChangeEvent#getController
return command issuer.The text was updated successfully, but these errors were encountered: