question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Annotation request: Player only.

See original GitHub issue
@Subcommand("command")
@PlayerOnly
public void onMyCommand(CommandSender sender) {}

or

@Subcommand("command")
@Only(Sender.PLAYER)
public void onMyCommand(CommandSender sender) {}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Williambraeckycommented, Apr 29, 2017

You don’t need an annotation for this, this can already be achieved by putting Player as the first command argument: @Subcommand("foo") public void myCommand(Player sender, Foor bar) {}

1reaction
aikarcommented, Apr 29, 2017

This is also why we have OnlinePlayer class - it’s the counterpart when looking up another player, since Player is considered “The sender”

I still need to document that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to annotate to require individual elements of requestBody ...
I have a spring (boot) server and want to generate the openapi spec from the annotations with springdoc. I have a request with...
Read more >
error: Class names are only accepted if annotation processing ...
Now, let's solve the problem (error: Class names, 'FirstProgram', are only accepted if annotation processing is explicitly requested) by including .java ...
Read more >
Tweet annotations - Twitter Developers
Tweet annotations offer a way to understand contextual information about the Tweet itself. Though 100% of Tweets are reviewed, due to the contents...
Read more >
Investigating the Impact of Annotation Interfaces on Player ...
Our findings indicate that annotation interfaces reduced frustration, quickened communication, and helped players engage in col- laborative planning, which ...
Read more >
Spring Boot Annotations - Javatpoint
Spring Boot Annotations with features, project, starter project wizard, cli, application, annotations, dm, ... It marks a class as a web request handler....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found