-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
@@ -6,6 +6,6 @@ | |||
"defaultRequire": 0 | |||
}, | |||
"mixins": [ | |||
|
|||
"feature.status.MixinServerPlayer" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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 } |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
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, |
No description provided.