Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Paper's kick function for kick command if using Paper. #2482

Merged

Conversation

BreadcrumbIsTaken
Copy link
Contributor

This lets formatting like colors and translation in the kick message.

Changes:

  • update to autoExecute.
  • remove the targets, target, and players prefixes in favor of no prefix.

Requested by Darwin

Comment on lines 53 to 57
if (Denizen.supportsPaper) {
PaperAPITools.instance.kickPlayer(player.getPlayerEntity(), reason);
return;
}
player.getPlayerEntity().kickPlayer(reason);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the check here, can just call PaperAPITools#kickPlayer as it has both a default implementation (which will be used on Spigot servers) and a Paper implementation

@BreadcrumbIsTaken
Copy link
Contributor Author

Done

@mcmonkey4eva mcmonkey4eva merged commit 4c020a0 into DenizenScript:dev Jun 4, 2023
@BreadcrumbIsTaken BreadcrumbIsTaken deleted the paper_kick_function branch June 4, 2023 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants