mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
fix: fix custom bot action api, refactor
This commit is contained in:
@@ -39,7 +39,7 @@ public interface Bot extends Player {
|
||||
* @param action bot action
|
||||
*/
|
||||
@org.jetbrains.annotations.ApiStatus.Experimental
|
||||
void addAction(@NotNull BotAction action);
|
||||
void addAction(@NotNull BotAction<?> action);
|
||||
|
||||
/**
|
||||
* Get the copy action in giving index
|
||||
@@ -48,7 +48,7 @@ public interface Bot extends Player {
|
||||
* @return Action of that index
|
||||
*/
|
||||
@org.jetbrains.annotations.ApiStatus.Experimental
|
||||
BotAction getAction(int index);
|
||||
BotAction<?> getAction(int index);
|
||||
|
||||
/**
|
||||
* Get action size
|
||||
|
||||
@@ -21,13 +21,13 @@ public interface CustomBotAction extends BotAction<CustomBotAction> {
|
||||
boolean doTick(Bot bot);
|
||||
|
||||
/**
|
||||
* Created a new action instance.
|
||||
* Created a new action instance from command.
|
||||
*
|
||||
* @param player player who create this action
|
||||
* @param args passed action arguments
|
||||
* @return a new action instance with given args
|
||||
*/
|
||||
@Nullable CustomBotAction getNew(@Nullable Player player, String[] args);
|
||||
@Nullable CustomBotAction fromCommand(Player player, String[] args);
|
||||
|
||||
/**
|
||||
* Requests a list of possible completions for a action argument.
|
||||
|
||||
Reference in New Issue
Block a user