-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Resolved Player is always null #300
Comments
IIRC popFirstArg can only return null if you annotate the parameter with Player player = Bukkit.getPlayerExact(context.popFirstArg());
// if player == null throw exception
return skillManager.getPlayer(player); |
Thanks for the reply I will try that. Another question? How can I use placeholders inside my language translations? |
It would return a Player if you had Player in the command's parameters. For the placeholders question see this example:
|
Thanks for the awesome framework.
I have a question about the context resolver and how it treats players?
I have the problem that my resolved player is always null and I am unable to find any documentation on how exactly context resolvers work.
I have the following command with two custom resolvers
SkilledPlayer
andSkill
:The player I get from
context.getResolvedArg(Player.class) is always null and the
context.popFirstArg()` also sometimes returns null and I do not know why.The executed command is
/rcs add Silthus test
whereSilthus
is the player name andtest
the skill identifier.What do I need to change for my use case?
The text was updated successfully, but these errors were encountered: