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

Status Feature #4

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Status Feature #4

wants to merge 3 commits into from

Conversation

DinoMarlir
Copy link
Owner

No description provided.

@DinoMarlir DinoMarlir self-assigned this Jun 21, 2024
@DinoMarlir DinoMarlir added the enhancement New feature or request label Jun 21, 2024
@DinoMarlir DinoMarlir linked an issue Jun 21, 2024 that may be closed by this pull request
@@ -6,6 +6,6 @@
"defaultRequire": 0
},
"mixins": [

"feature.status.MixinServerPlayer"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't register server side mixins on the common side

import java.io.File

val json = Json {
prettyPrint = true
Copy link
Contributor

Choose a reason for hiding this comment

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

you may want to add isLenient = true

serverPlayer: ServerPlayer,
cir: CallbackInfoReturnable<Component>
) {
logger.info("LOL CALLED")
Copy link
Contributor

Choose a reason for hiding this comment

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

Either make it a logger.debug() or remove it

requiresPermissionLevel(2) //TODO: Optional LuckPerms Implementation
argument<String>("status") { statusArgument ->
suggestList {
statusList.filter { !it.name.contains(" ") }.map { it.name }
Copy link
Contributor

Choose a reason for hiding this comment

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

Why? Just set the argument to StringArgumentType.greedyString() in order to deal with spaces

runs {
if (!statusList.map { it.name }.contains(statusArgument())) return@runs
playerStatusMap[source.playerOrException] = statusList.first { it.name == statusArgument() }
source.sendSystemMessage(Component.literal("Your status is now '${statusArgument()}'.")) // TODO: translateable
Copy link
Contributor

Choose a reason for hiding this comment

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

Please consider using the same component builder in all places.

}

@Serializable
data class Status(
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be a HashMap instead.

@mathearbeit76
Copy link
Contributor

would be better to mark the PR as a draft

@DinoMarlir
Copy link
Owner Author

would be better to mark the PR as a draft

@mathearbeit76 yeah, thank you for your review, I have new ideas for a status system so I am going to recode that,

@DinoMarlir DinoMarlir marked this pull request as draft July 4, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

status feature like in craft attack
2 participants