Ghost-chu / QuickShop-Reremake

QuickShop is a shop plugin that allows players to easily sell/buy any items from a chest without any commands. In fact, none of the commands that QuickShop provides are ever needed by a player.
GNU General Public License v3.0
102 stars 145 forks source link

[BUG] Remove command description if the player does not have permission #910

Closed SrBedrock closed 3 years ago

SrBedrock commented 3 years ago

Describe the bug:

Players without permission for /qs removeall, /qs info and /qs about can see the command with /qs help

To Reproduce:

Steps to reproduce the behavior:

  1. Remove quickshop.removeall, quickshop.removeall.self, quickshop.removeall.others, quickshop.about and quickshop.about from players.

  2. Use /qs help

Expected behavior:

Players do not see command descriptions that they do not have permission.

Screenshots:

image

Ghost-chu commented 3 years ago

We won't show command help/tabcomplete if player had no permissions. Cannot reproduce this issue on test server, check your permission configuration.

To troubleshooting permissions issue, you can use /qs debug to enable debug logger and see permissions verbose.

SrBedrock commented 3 years ago

I performed the test after activating the debug with /qs debug

QuickShop version: 4.0.7.10 LuckPerms version: 5.3.21

Permission check by LuckPerms:

Player Koyote using the /qs about:

Player Koyote using the /qs removeall:

Player Koyote using the /qs removeall Koyote:

Player Koyote using the /qs removeall ThiagoROX:

Additional context when disabling debug mode::

[QuickShop] Loading shops from the database...
[QuickShop] Used 0ms to fetch all shops from the database.
[QuickShop] Successfully loaded 5904 shops! (Used 2174ms, Avg 0ms per shop)
[QuickShop] 5903 shops will load after chunk have loaded, 0 shops will load after the world has loaded.
[QuickShop] Registering Listeners...
[QuickShop] Cleaning MsgUtils...
[QuickShop] Cleaning purchase messages from the database that are over a week old...
[QuickShop] QuickShop Loaded! 2429 ms.
[QuickShop] Log actions is enabled, actions will log in the qs.log file!
[QuickShop] Registering GriefPrevention integration
[QuickShop] Registering WorldGuard integration
Modo Developer desativado. Recarregando QuickShop.
[QuickShop] Registering bStats metrics...
[QuickShop] You have disabled mertics, Skipping...
[QuickShop] Using economy system: Essentials Economy
[⚡] Tick #55048 lasted 2453.4 ms. (4806.78% increase from avg)
SrBedrock commented 3 years ago

New server with:

image

Command /qs paste: https://paste.ubuntu.com/p/7mhpH4yr8B/


Command /qs:

image


TabComplete /qs remove...:

image


Command /qs removeall:

image


TabComplete /qs removeall ...:

image


Command /qs removeall ThiagoROX:

image


Ghost-chu commented 3 years ago

/qs removeall and /qs removeall <player> is two different command.

---Original--- From: @.> Date: Wed, Apr 14, 2021 16:51 PM To: @.>; Cc: @.>;"State @.>; Subject: Re: [Ghost-chu/QuickShop-Reremake] [BUG] Remove command description if the player does not have permission (#910)

New server with:

Command /qs:

TabComplete /qs remove...:

Command /qs removeall:

TabComplete /qs removeall ...:

Command /qs removeall ThiagoROX:

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

Ghost-chu commented 3 years ago

Please provide link created by command /qs paste

Ghost-chu commented 3 years ago

Yes, /qs reload will cause server lag because it will unload and load again plugin self to reloading.

Ghost-chu commented 3 years ago

also we recommend get support through our discord server because this issue seems too complex.

SrBedrock commented 3 years ago

I contacted via discord and my problem will be solved, thanks