mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-15 19:34:43 +00:00
Custom Effects and Player Events API
This commit is contained in:
1 parent
f91f9b43ba
commit
5a8246f728
4 files changed
+168
No files matched your search
@@ -0,0 +1,58 @@
|
||||
package noppes.npcs.api.handler;
|
||||
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.ICustomEffect;
|
||||
|
||||
public interface IStatusEffectHandler {
|
||||
|
||||
ICustomEffect createEffect(String name);
|
||||
|
||||
ICustomEffect getEffect(String name);
|
||||
|
||||
void deleteEffect(String name);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param player Player
|
||||
* @param id ID of Status Effect -- Only DBC Addon
|
||||
* @return True if Player has Effect
|
||||
*/
|
||||
boolean hasEffect(IPlayer player, int id);
|
||||
|
||||
boolean hasEffect(IPlayer player, ICustomEffect effect);
|
||||
|
||||
/**
|
||||
*
|
||||
* -1 : Does not have effect
|
||||
* -100 : Has infinite effect
|
||||
*
|
||||
* @param player Player
|
||||
* @param id ID of Status Effect -- Only DBC Addon
|
||||
* @return Effect Time
|
||||
*/
|
||||
int getEffectDuration(IPlayer player, int id);
|
||||
|
||||
int getEffectDuration(IPlayer player, ICustomEffect effect);
|
||||
|
||||
/**
|
||||
* @param player Player
|
||||
* @param id ID of Status Effect
|
||||
* @param duration Duration of Effect in Seconds | -100 : Has infinite effect
|
||||
* @param level Level of Effect [Some effects not affected by level]
|
||||
*/
|
||||
void applyEffect(IPlayer player, int id, int duration, byte level);
|
||||
|
||||
void applyEffect(IPlayer player, ICustomEffect effect, int duration, byte level);
|
||||
|
||||
/**
|
||||
* @param player Player
|
||||
* @param id ID of Status Effect
|
||||
*/
|
||||
void removeEffect(IPlayer player, int id);
|
||||
|
||||
void removeEffect(IPlayer player, ICustomEffect effect);
|
||||
|
||||
void clearEffects(IPlayer player);
|
||||
|
||||
ICustomEffect saveEffect(ICustomEffect customEffect);
|
||||
}
|
||||
Reference in new issue
Block a user