mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 12:29:16 +00:00
feat: abstraction of PlayerCosmetic... styled events
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.hibiscusmc.hmccosmetics.api;
|
||||
|
||||
import com.hibiscusmc.hmccosmetics.user.CosmeticUser;
|
||||
import org.bukkit.event.Event;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a cosmetic user related event
|
||||
*/
|
||||
public abstract class CosmeticUserEvent extends Event {
|
||||
protected CosmeticUser user;
|
||||
|
||||
public CosmeticUserEvent(@NotNull final CosmeticUser who) {
|
||||
user = who;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the user involved in this event
|
||||
*
|
||||
* @return User who is involved in this event
|
||||
*/
|
||||
@NotNull
|
||||
public final CosmeticUser getUser() {
|
||||
return user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user