RedProtect Anti-Grief

RedProtect Anti-Grief

73.3k Downloads

[BUG] "lyes / laccept" always shows a claim limit error

eryw opened this issue ยท 2 comments

commented

Describe the bug
Regular users in survival mode always got the "You reach the limit of claims allowed in this world" error message when sending the "/rp lyes" command after getting an addleader request.

To Reproduce

  1. Install RedProtect with the default config.
  2. With two players logged in, the first player creates a new region.
  3. The first player sends the command "/rp addleader secondplayer".
  4. The second player accepts the add leader request by sending the command "/rp lyes" and will see the error.

Expected behavior
The second player should be added as a leader in the region created by the first player.

  • Server: Paper version 1.21.4
  • Plugin Version: RedProtect-8.1.3-SNAPSHOT-b451-Spigot.jar
  • Java Version: Java 21

Additional context
Not sure if I'm looking at the correct file. Looks like the comparison between the claim limit and the claim used should be reversed.

if (RedProtect.get().getPermissionHandler().getPlayerClaimLimit(player) >= (RedProtect.get().getRegionManager().getRegions(VictimUUID, r.getWorld()).size() + 1)) {

commented

Whats the output when that secondplayer use the command /rp claimlimit?

This message means the user has no limit to have more regions, both owning or added in regions.

commented

The output is "RPs claimed: 0/20"