mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-11-18 17:29:56 +00:00
Check for essentials.warp.list
permission on /warp
tab complete (#1378)
This commit is contained in:
parent
518a43db9c
commit
301a3a72df
1 changed files with 1 additions and 2 deletions
|
@ -114,8 +114,7 @@ public class Commandwarp extends EssentialsCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<String> getTabCompleteOptions(final Server server, final User user, final String commandLabel, final String[] args) {
|
protected List<String> getTabCompleteOptions(final Server server, final User user, final String commandLabel, final String[] args) {
|
||||||
if (args.length == 1) {
|
if (args.length == 1 && user.isAuthorized("essentials.warp.list")) {
|
||||||
// Should we be checking "essentials.warp.list" here?
|
|
||||||
return new ArrayList<>(ess.getWarps().getList());
|
return new ArrayList<>(ess.getWarps().getList());
|
||||||
} else if (args.length == 2 && (user.isAuthorized("essentials.warp.otherplayers") || user.isAuthorized("essentials.warp.others"))) {
|
} else if (args.length == 2 && (user.isAuthorized("essentials.warp.otherplayers") || user.isAuthorized("essentials.warp.others"))) {
|
||||||
//TODO: Remove 'otherplayers' permission.
|
//TODO: Remove 'otherplayers' permission.
|
||||||
|
|
Loading…
Reference in a new issue