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.

Add withPermission(String) to Arguments

See original GitHub issue

Please describe your suggestion A clear and concise description of what the suggestion is.

Please add withPermission(String) to the Argument class. Every single time I use withPermission in my code, I have to include CommandPermission.fromString() as well, which is just very verbose. Having a convenience method in the Argument class that quietly does this conversion for me would make my code much more readable

Please supply examples of the desired inputs and outputs arguments.add(new PlayerArgument("player").withPermission(CommandPermission.fromString(Perm.MAXHEALTH_OTHER))); would become arguments.add(new PlayerArgument("player").withPermission(Perm.MAXHEALTH_OTHER)); which is much more readable and contains only the useful code.

Just want something like this in Argument class public final Argument withPermission(String permissionString) { return this.withPermission(CommandPermission.fromString(permissionString)); }

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
JorelAlicommented, Oct 18, 2020

Sure thing, can do 👍

0reactions
JorelAlicommented, Oct 18, 2020

@469512345 Version 5.1 of the CommandAPI has been released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chmod and Permission Strings - Progress Community
Each of the 3 groups define permission parameters for different users. The first set pertains to the owner, the second to the group...
Read more >
How to Use UNIX and Linux File Permissions - UNC ITS
Introduction. This document explains how directory and file permissions on a UNIX or Linux machine are set and can be changed by the...
Read more >
How to specify a permission as an access argument?
As I understand for a menu access argument I must specify a permission. So, let say there is a permission for "Profile: Create...
Read more >
add-permission — AWS CLI 2.9.6 Command Reference
This operation adds a statement to a resource-based permissions policy for the ... --cli-input-yaml (string) Reads arguments from the JSON string provided.
Read more >
Passing arguments when asking for permissions (Android 6)
requestPermissions((Activity) context, new String[]{Manifest.permission. ... Edit: I added a check for the permission before calling the method again.
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