-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
[WIP] Add kick message expr #7658
base: dev/feature
Are you sure you want to change the base?
Conversation
OMG I literally had this issue today and this PR was made like the second I found it. What are the odds. |
Annotations need proper skript version needs to be updated, hence the WIP |
This PR should target dev/feature, not master |
This comment was marked as resolved.
This comment was marked as resolved.
Any additions should use |
@RequiredPlugins("xxx Paper 1.16.5+") | ||
@Since("xxx 2.8.0") | ||
@Events("Kick") | ||
public class ExprKickMessage extends SimpleExpression<String> { |
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 class needs to follow the proper code conventions re: method order, using finals in parameters, annotation placement.
But more importantly, this should probably be part of ExprMessage itself.
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.
working on the method order;
I don't think it should be part of ExprMessage
, its not really a message that appears in chat. The reason why I named it ExprKickMessage
is because kick reason was already taken
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.
there's no ExprKickReason, though?
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.
... good point, but then the class name would be ExprKickReason
while the actual pattern is kick message
and I thought that was worse
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 would the pattern stay as kick message? shouldn't it be kick reason too?
@Fusezion |
Hmm, alright. |
@sovdeeth If you have a class name recommendation let me know because its very ambiguous overall |
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.
I know Sovde already mentioned about the coding conventions, so I won't do anything related to that.
} | ||
} |
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.
} | |
} | |
} | |
} |
Co-authored-by: Efnilite <[email protected]>
In my opinion, rather than creating another expression, this should probably just be merged in with: |
Co-authored-by: SirSmurfy2 <[email protected]>
Co-authored-by: SirSmurfy2 <[email protected]>
Co-authored-by: SirSmurfy2 <[email protected]>
Co-authored-by: SirSmurfy2 <[email protected]>
@ShaneBeee ExprMessage is what gets sent in chat, no? This is for what gets displayed on the player's screen |
ohh ok gotcha. Anyways, wont your expression collide with |
@ShaneBeee It does, currently, I'm not sure how to resolve it. My friends and people here has obviously said that all of this is ambiguous and I am leaving it up to maintainers to decide on the pattern and name I originally wanted to name the class |
Co-authored-by: Efnilite <[email protected]>
public class ExprKickMessage extends SimpleExpression<String> implements EventRestrictedSyntax { | ||
|
||
static { | ||
Skript.registerExpression(ExprKickMessage.class, String.class, ExpressionType.SIMPLE, "kick (message|reason)"); |
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.
Skript.registerExpression(ExprKickMessage.class, String.class, ExpressionType.SIMPLE, "kick (message|reason)"); | |
Skript.registerExpression(ExprKickMessage.class, String.class, ExpressionType.SIMPLE, "(display[ed]|on-screen) kick (message|reason)"); |
there should be a way to differentiate the chat kick message from this one
import ch.njol.skript.doc.*; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
@Name("Kick Message") |
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.
@Name("Kick Message") | |
@Name("On-screen Kick Message") |
@Efnilite I'm guessing that the expression pattern is final? (I don't know if you have discussed with others) |
Just providing my two cents, I would prefer going with Efy's changes here as that not only fixes conflictions but is descriptive enough that players can tell the difference between this and it's counter part |
if you have better suggestions feel free to use them, we just need to make sure its different |
I'll leave this open for a bit just in case someone wants to pitch in. personally I don't care what the pattern is as long as its usable |
Description
Implement kick message getting and setting
Target Minecraft Versions: Not known yet
Related Issues:
https://discord.com/channels/135877399391764480/1332620961328926790