Skip to content

feat: implement Essentials module with TPA command functionality#27

Open
Foxof7207 wants to merge 4 commits into
Rothes:masterfrom
Foxof7207:master
Open

feat: implement Essentials module with TPA command functionality#27
Foxof7207 wants to merge 4 commits into
Rothes:masterfrom
Foxof7207:master

Conversation

@Foxof7207
Copy link
Copy Markdown

No description provided.

@Rothes Rothes self-assigned this May 16, 2026

override fun onEnable() {}

data class Lang(
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This can be moved to Tpa feature, so tpa prefix on key can be simplified.
Put a empty class Lang(): ConfigurationPart here.

object Tpa : CommonFeature<FeatureToggle.DefaultTrue, Unit>() {

// target -> requester
private val pendingRequests = mutableMapOf<UUID, UUID>()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Potential memory leak. Consider using a Cache, or remove keys on player disconnect.


@Command("tpaccept [requester]")
@ShortPerm
fun tpaccept(sender: User, requester: Player?) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think you can set a default value for requester param, to pendingRequests[sender.uuid],
So it's possible not to call Bukkit.getPlayer() ?

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.

2 participants