forked from EssentialsX/Essentials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVanishStatusChangeEvent.java
More file actions
33 lines (28 loc) · 1.13 KB
/
VanishStatusChangeEvent.java
File metadata and controls
33 lines (28 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package net.ess3.api.events;
import net.ess3.api.IUser;
import org.bukkit.event.HandlerList;
/**
* Fired when a player's vanish status changes due to the /vanish command.
* <p>
* For other cases where the player's vanish status changes, you should listen on PlayerJoinEvent and
* check with {@link IUser#isVanished()}.
*
* <b>WARNING: The values of {@link #getAffected()} and {@link #getController()} are inverted due to
* a long-standing parameter swap. {@link #getAffected()} returns the command sender (null for console),
* and {@link #getController()} returns the player whose vanish status changed.</b>
*
* @see <a href="https://github.com/EssentialsX/Essentials/issues/2604">#2604</a>
*/
public class VanishStatusChangeEvent extends StatusChangeEvent {
private static final HandlerList handlers = new HandlerList();
public VanishStatusChangeEvent(final IUser affected, final IUser controller, final boolean value) {
super(affected, controller, value);
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}