9
0
mirror of https://github.com/Auxilor/EcoArmor.git synced 2026-01-04 15:31:51 +00:00

Added enabled check for disabling effects

This commit is contained in:
Auxilor
2021-03-31 19:19:05 +01:00
parent 59fc22b58b
commit 8bf53bfefa

View File

@@ -102,6 +102,10 @@ public abstract class Effect<T> implements Listener {
* @param player The player.
*/
public final void disable(@NotNull final Player player) {
if (!this.isEnabled()) {
return;
}
enabledPlayers.remove(player.getUniqueId());
this.onDisable(player);