Package org.yuemi.mmomechanics.api
Interface MmoMechanicsApi
public interface MmoMechanicsApi
Main API interface for accessing MMO Mechanics features and executing skills.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCasts a skill on behalf of the entity with the specified UUID.@NotNull SkillExecutorGets the active skill executor instance.booleanisFeatureEnabled(@NotNull org.bukkit.entity.Player player) Checks if the player has permission to use mechanics features.@NotNull StringparsePlaceholders(@Nullable Target target, @NotNull String text) Parses PlaceholderAPI placeholders for the target recipient player.voidsendMessage(@NotNull org.bukkit.entity.Player player, @NotNull String message) Sends a formatted chat message to a player, supporting PlaceholderAPI expansion.
-
Method Details
-
sendMessage
void sendMessage(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String message) Sends a formatted chat message to a player, supporting PlaceholderAPI expansion.- Parameters:
player- the recipient playermessage- the message to send
-
isFeatureEnabled
boolean isFeatureEnabled(@NotNull @NotNull org.bukkit.entity.Player player) Checks if the player has permission to use mechanics features.- Parameters:
player- the player to check- Returns:
- true if enabled, false otherwise
-
getSkillExecutor
Gets the active skill executor instance.- Returns:
- the skill executor
-
parsePlaceholders
@NotNull @NotNull String parsePlaceholders(@Nullable @Nullable Target target, @NotNull @NotNull String text) Parses PlaceholderAPI placeholders for the target recipient player.- Parameters:
target- the target context recipienttext- the text to parse placeholders on- Returns:
- the parsed placeholder text
-
castSkill
Casts a skill on behalf of the entity with the specified UUID.- Parameters:
casterUuid- the UUID of the casting entityskillId- the ID of the skill to execute- Returns:
- true if the skill was successfully cast, false otherwise
-