drtshock / PlayerVaults

Player vaults for player players.
GNU General Public License v3.0
89 stars 123 forks source link

Use perm issue #389

Open HexedHero opened 5 years ago

HexedHero commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

where

drtshock commented 5 years ago

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.

Roos-Skywalker commented 2 years ago

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 commented 2 years ago

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