Skip to content
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

Use perm issue #389

Open
HexedHero opened this issue Jun 15, 2019 · 5 comments
Open

Use perm issue #389

HexedHero opened this issue Jun 15, 2019 · 5 comments
Assignees

Comments

@HexedHero
Copy link

PlayerVaultsX Version

Run /version playervaults and give us your output.
4.1.2

Server Version

Run /version and give us your output.
Paper-86 (1.14.2)

Logs

Give use your logs by going to logs/latest.log.
Not log related

Details

Please explain the problem.
"playervaults.commands.use"
doesn't work.

When you do /pv 1 for example and you have the permission for one vault but the use perm removed/negated, u can still open the vault when you shouldn't be open to because this is made for a signs only thing.

I looked into the code and I think when you do the command it skips the check for the perm.
the /pv command is meant to call
public static boolean openOwnVault(Player player, String arg, boolean isCommand)
because its run from a command but instead of calls and thus skips the use perm check
public static boolean openOwnVault(Player player, String arg)

@HexedHero
Copy link
Author

it's actually a very simple fix.

The method using the perm check isn't even being used anymore so remove it and add
if (sender.hasPermission("playervaults.commands.use")) {
return true;
}

to the checkPerms method, done!

@spitfire12
Copy link

where

@drtshock
Copy link
Owner

I see, you're looking for people to use vaults through signs only. I worry this would break how most people use this so might need to implement in a less friendly for signs way as to not break for everyone else. Will take a look soon.

@drtshock drtshock self-assigned this Jul 15, 2019
@Roos-Skywalker
Copy link

Yes, I also want to use this plugin with vault signs only. I wanted to buy it to create a more immersive bank and give players a reason to return to the city to access their stash.

@mbax
Copy link
Collaborator

mbax commented Aug 9, 2022

I'll be evaluating how the sign stuff works in 5.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants