-
Notifications
You must be signed in to change notification settings - Fork 1
Handling player senders
Dalton edited this page Apr 24, 2022
·
4 revisions
Handling Player senders is done via functional interface method like so:
@CommandName(name = "help")
public class HelpCommand extends ApiCommand {
public HelpCommand(YourJavaPluginClass pluginInstance) { // If you dont want Dependency Injection, make the constructor empty
this.onPlayerSender((playerSent) -> {
Player player = playerSent.player();
List<String> args = playerSent.args();
}); // You can change onConsoleSender and onTabComplete here, check usages on the sidebar
}
}
Page written by: Dalton Burchard
- Your main class and you
- Editing API Settings (Optional)
- Creating an PluginInventory
- Creating Clickable items
- (Not added yet) Examples