BentoBoxWorld / Limits

Limits blocks and entities on islands - for BentoBox
Eclipse Public License 2.0
8 stars 17 forks source link

Permissions its not work #117

Closed myavuzokumus closed 1 year ago

myavuzokumus commented 3 years ago

Screenshots image image

But when try place villager, said "You cannot exceed the limit of 2." image

Server Information:

[Please complete the following information:]

tastybento commented 3 years ago
Screen Shot 2020-12-22 at 9 22 26 AM

Hmm, I cannot replicate.

> pex user LSPVicky
[09:23:46 INFO]: '0764d8a9-9461-4961-84c7-3bb4e2c7f9dd/LSPvicky' is a member of:
[09:23:46 INFO]:    default (not ranked)
[09:23:46 INFO]: LSPvicky's permissions:
[09:23:46 INFO]: 1) bskyblock.island.limit.villager.12 (own)
[09:23:46 INFO]: 2) essentials.* (own)
[09:23:46 INFO]: 3) essentials.spawnmob.* (own)
[09:23:46 INFO]: 4) essentials.summon (own)
[09:23:46 INFO]: 5) bukkit.summon (own)
[09:23:46 INFO]: LSPvicky's options:
[09:23:46 INFO]:   name = "LSPvicky"

Maybe there is another config file or permission interfering or taking precedent? Please share your Limits configs and all your perms.

myavuzokumus commented 3 years ago

image

entitylimits:
  MINECART_CHEST: 5
  MINECART: 5
  IRON_GOLEM: 5
  CHICKEN: 30
  SHEEP: 30
  COW: 30
  MUSHROOM_COW: 15
  MINECART_HOPPER: 15
  SLIME: 5
  VINDICATOR: 15
  PHANTOM: 3
  ZOMBIE: 5
  CREEPER: 5
  SPIDER: 5
  SKELETON: 5
  ZOMBIFIED_PIGLIN: 5
  TURTLE: 5
  GUARDIAN: 5
  PUFFERFISH: 5
  COD: 5
  TROPICAL_FISH: 5
  SALMON: 5
  EVOKER: 5
  FOX: 5
  WITCH: 5
  ARMOR_STAND: 8
  ENDERMAN: 10
  HUSK: 15
  STRAY: 15
  POLAR_BEAR: 10
  BEE: 10
  ITEM_FRAME: 50
  DROWNED: 5
  ILLUSIONER: 5
  VILLAGER: 2
tastybento commented 3 years ago

Okay, so I'm guessing the config is overriding the permission. I'll check into this.

tastybento commented 3 years ago

Hmm, still works. What relevant permissions does your player have?

Screen Shot 2020-12-22 at 10 42 27 PM
tastybento commented 3 years ago

Wait - do you only have that permission that you showed? If so, I don't know why you are seeing that. Did it used to work for you? If so, which build did it break?

myavuzokumus commented 3 years ago

I don't know, my limit count does not increase even if I have op authorization or not. I using the versions I show in the first post.

The permissions on the picture and only this permissions have.

myavuzokumus commented 3 years ago

The problem is not only for the villagers, but for all entitys. Also I cannot increase the limit of blocks with permission.

boraoksuzoglu commented 3 years ago

Same problem. I gave permission to my player with that command. But isn't working.

/lp user playername permission settemp bskyblock.island.limit.dirt.10 true 50s

myavuzokumus commented 3 years ago

Could there be a problem between bentobox and luckperms? Because you are using permissionex and there is no problem.

wellnesscookie commented 3 years ago

I have no issues increasing the limits with LuckPerms for entities and blocks. Are you sure you are the owner of the island, and are you sure you relogged after giving the permission you need? It works for me just fine, for both entities and blocks.

myavuzokumus commented 3 years ago

Of course I'm sure. It is not possible for me to make such a mistake. So it is certain that there is a problem, but I am not sure what it is, other user stated that he has same problem.

Rubenicos commented 3 years ago

Same, I use Yatopia (mc 1.16.4) and LuckPerms. When I updated BentoBox and its addons to lastest build some users reported this error, incredibly everything worked again after a few hours.

tastybento commented 3 years ago

I tried with LuckPerms 5.2.76 and I found no problem. However, the user must log out and back in for permissions to be counted, or reset the island or become the owner of the island. This is not specific to LP, it is the same for any permissions plugin. So, please retest by setting a perm and then logging out and in and look at the limits GUI.

https://user-images.githubusercontent.com/4407265/104084541-bf6afb80-51fc-11eb-820f-3b5475526972.mp4

myavuzokumus commented 3 years ago

I did the same thing but nothing has changed. However, the limit does not increase.

myavuzokumus commented 3 years ago

config.zip Thats my config, Maybe there is a problem with the config file?

myavuzokumus commented 3 years ago

What tests should I do to solve this problem?

Fredthedoggy commented 3 years ago

Please Try To Recreate the Issue on Spigot / Paper, and give us our findings

zSteley commented 3 years ago

for me don't work permissions of limits, please fix this!

tastybento commented 3 years ago

@elmaslarry We cannot replicate it, sorry. See the above. If you want to help, then share your server information, addons, plugins and what specifically you are trying in terms of setting permissions.

zSteley commented 3 years ago

@tastybento i share with you a short clip while setting the permission in order to report the issue!

Link: https://youtu.be/s9jkepKzQU0

zSteley commented 3 years ago

in the clip there are information about server, addons, plugins and the proccess of setup the permissions

tastybento commented 3 years ago

I saw you go to the lobby and back after changing the permission, but I didn't see you log out and re-login to the server. Can you try that and see what happens?

zSteley commented 3 years ago

@tastybento same, don't work

zSteley commented 3 years ago

i tried going to lobby (that is another spigot server) also full rejoin the server and don't work

zSteley commented 3 years ago

any chance to fix?

tastybento commented 3 years ago

I don't know how to fix it, sorry. It works for me with LP so I can't replicate it. Do you have more than one permission for the player? Can you list all of them including any ranks? I could try and give you a debug build that'd say what permission you have, too.

zSteley commented 3 years ago

Yes! it's a live server, players have thousand of permissions per player and per group!

if you need my permission groups i can give you a link (private msg or somenthing?) @tastybento

Rubenicos commented 3 years ago

Maybe putting the priority of PlayerJoinEvent in lowest could fix this bug.

tastybento commented 3 years ago

Maybe putting the priority of PlayerJoinEvent in lowest could fix this bug.

Interesting. Why do you think that might help? Is there some other listener that might be canceling it?

tastybento commented 3 years ago

Yes! it's a live server, players have thousand of permissions per player and per group!

if you need my permission groups i can give you a link (private msg or somenthing?) @tastybento

Email a link to tastybento (at) wasteofplastic.com

Rubenicos commented 3 years ago

Interesting. Why do you think that might help? Is there some other listener that might be canceling it?

There may be the rare case where player.getEffectivePermissions() method does not get all player's permissions because it's used in PlayerJoinEvent with normal priority.

zSteley commented 3 years ago

wasteofplastic.com is not an email address ..

Fredthedoggy commented 3 years ago

tastybento (at) wasteofplastic.com

replace (at) with an @ symbol

zSteley commented 3 years ago

I sended you @tastybento my permissions setup via email! please check it and i hope you can find a solution because my permissions for limits don't work :S

tastybento commented 3 years ago

I set up my permission exactly like yours:

Screen Shot 2021-03-07 at 9 21 58 AM

You are a member of the default group:

Screen Shot 2021-03-07 at 9 23 34 AM

Here's mine:

Screen Shot 2021-03-07 at 9 24 12 AM Screen Shot 2021-03-07 at 9 24 37 AM

I tried with Limits 1.15.1 and everything works fine. So, on the assumption that maybe something is messing with the perm checks at login, I reworked the code to do a new perm check when a player runs the limits command.

Try 1.15.6 from the snapshots - https://ci.codemc.io/job/BentoBoxWorld/job/Limits/

If that doesn't work, then I'm going to fill it full of debug to report to the console what is happening so I can understand why you don't see the correct values. So, let me know!

zSteley commented 3 years ago

Okey i will test tomorrow on restart and give you the feedback!

zSteley commented 3 years ago

@tastybento Same behaivour with new limits addon that you send me, permissions don't work!

tastybento commented 3 years ago

Okay. That tells me that it isn’t to do with login. I will make a debug version for you tonight. We’ll find out what is going on!

zSteley commented 3 years ago

Okey, thanks! i find another issues in today update, my players lost their upgrades and if they use /is sethome in the end, they can't go back to their islands!

tastybento commented 3 years ago

Hey- i'm a bit busy at work so the debug version may be a bit late.

I don't know about upgrades, sorry. File a bug on the upgrades repo.

For setting home in nether - yes- that is a risk. There are plenty of warnings and you can disable it in the configuration. If they do, then they need to build a portal to get back.

zSteley commented 3 years ago

Thanks! please send me the debug version when you have for solve the issue!

tastybento commented 3 years ago

Limits-1.15.6-SNAPSHOT-DEBUG.jar.zip @elmaslarry Please try this version. Do the following, login, go to the world where you play, run the limits command. Copy the console output and paste it here. It will look something like this (the log should start with the line UUID of player:

[21:04:36 INFO]: UUID of player tastybento is 5988eecd-1dcd-4080-a843-785b62419abb
[21:04:36 INFO]: [BentoBox] DEBUG: Checking limit perms for tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm prefix : caveblock.island.limit.
[21:04:36 INFO]: [BentoBox] DEBUG: islandId CaveBlock03acc415-1fdc-4a82-af74-7e115f62909b
[21:04:36 INFO]: [BentoBox] DEBUG: Game mode CaveBlock
[21:04:36 INFO]: [BentoBox] DEBUG: Clearing current island perms limits tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Ignoring aoneblock.island.limits.hopper.100 tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm value = true
[21:04:36 INFO]: [BentoBox] DEBUG: Wrong prefix? true
[21:04:36 INFO]: [BentoBox] DEBUG: Ignoring aoneblock.island.limit.hopper.40 tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm value = true
[21:04:36 INFO]: [BentoBox] DEBUG: Wrong prefix? true
[21:04:36 INFO]: [BentoBox] DEBUG: Ignoring group.default tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm value = true
[21:04:36 INFO]: [BentoBox] DEBUG: Wrong prefix? true
[21:04:36 INFO]: [BentoBox] DEBUG: Ignoring aoneblock.island.limit.hopper.100 tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm value = true
[21:04:36 INFO]: [BentoBox] DEBUG: Wrong prefix? true
[21:04:36 INFO]: [BentoBox] DEBUG: Checking limit perms for tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm prefix : aoneblock.island.limit.
[21:04:36 INFO]: [BentoBox] DEBUG: islandId AOneBlockde6dd858-b78d-462d-81df-285bf8bde081
[21:04:36 INFO]: [BentoBox] DEBUG: Game mode AOneBlock
[21:04:36 INFO]: [BentoBox] DEBUG: Clearing current island perms limits tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Ignoring aoneblock.island.limits.hopper.100 tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm value = true
[21:04:36 INFO]: [BentoBox] DEBUG: Wrong prefix? true
[21:04:36 INFO]: [BentoBox] DEBUG: Syntax check on tastybento prem prefix aoneblock.island.limit. aoneblock.island.limit.hopper.40
[21:04:36 INFO]: [BentoBox] DEBUG: Everything good
[21:04:36 INFO]: [BentoBox] DEBUG: Checking formatting
[21:04:36 INFO]: [BentoBox] DEBUG: Value is 40
[21:04:36 INFO]: [BentoBox] DEBUG: Setting values
[21:04:36 INFO]: [BentoBox] DEBUG: Entgroup = null
[21:04:36 INFO]: [BentoBox] DEBUG: et = null
[21:04:36 INFO]: [BentoBox] DEBUG: m = HOPPER
[21:04:36 INFO]: [BentoBox] DEBUG: value = 40
[21:04:36 INFO]: [BentoBox] DEBUG: Setting material  limit HOPPER -1 40 40
[21:04:36 INFO]: [BentoBox] DEBUG: Ignoring group.default tastybento
[21:04:36 INFO]: [BentoBox] DEBUG: Perm value = true
[21:04:36 INFO]: [BentoBox] DEBUG: Wrong prefix? true
[21:04:36 INFO]: [BentoBox] DEBUG: Syntax check on tastybento prem prefix aoneblock.island.limit. aoneblock.island.limit.hopper.100
[21:04:36 INFO]: [BentoBox] DEBUG: Everything good
[21:04:36 INFO]: [BentoBox] DEBUG: Checking formatting
[21:04:36 INFO]: [BentoBox] DEBUG: Value is 100
[21:04:36 INFO]: [BentoBox] DEBUG: Setting values
[21:04:36 INFO]: [BentoBox] DEBUG: Entgroup = null
[21:04:36 INFO]: [BentoBox] DEBUG: et = null
[21:04:36 INFO]: [BentoBox] DEBUG: m = HOPPER
[21:04:36 INFO]: [BentoBox] DEBUG: value = 100
[21:04:36 INFO]: [BentoBox] DEBUG: Setting material  limit HOPPER 40 100 100
[21:04:36 INFO]: tastybento joined the game
[21:04:36 INFO]: tastybento[/127.0.0.1:51560] logged in with entity id 4628 at ([oneblock_world]0.40306930965291726, 81.0, -0.699999988079071)
[21:04:44 INFO]: tastybento issued server command: /ob limits
[21:04:44 INFO]: [BentoBox] DEBUG: Checking limit perms for tastybento
[21:04:44 INFO]: [BentoBox] DEBUG: Perm prefix : aoneblock.
[21:04:44 INFO]: [BentoBox] DEBUG: islandId AOneBlockde6dd858-b78d-462d-81df-285bf8bde081
[21:04:44 INFO]: [BentoBox] DEBUG: Game mode AOneBlock
[21:04:44 INFO]: [BentoBox] DEBUG: Clearing current island perms limits tastybento
[21:04:44 INFO]: [BentoBox] DEBUG: Syntax check on tastybento prem prefix aoneblock. aoneblock.island.limits.hopper.100
[21:04:44 INFO]: [BentoBox] DEBUG: Everything good
[21:04:44 INFO]: [BentoBox] DEBUG: Checking formatting
[21:04:44 INFO]: [BentoBox] DEBUG: Value is 100
[21:04:44 INFO]: [BentoBox] DEBUG: Setting values
[21:04:44 INFO]: [BentoBox] DEBUG: Entgroup = null
[21:04:44 INFO]: [BentoBox] DEBUG: et = null
[21:04:44 INFO]: [BentoBox] DEBUG: m = HOPPER
[21:04:44 INFO]: [BentoBox] DEBUG: value = 100
[21:04:44 INFO]: [BentoBox] DEBUG: Setting material  limit HOPPER -1 100 100
[21:04:44 INFO]: [BentoBox] DEBUG: Syntax check on tastybento prem prefix aoneblock. aoneblock.island.limit.hopper.40
[21:04:44 INFO]: [BentoBox] DEBUG: Everything good
[21:04:44 INFO]: [BentoBox] DEBUG: Checking formatting
[21:04:44 INFO]: [BentoBox] DEBUG: Value is 40
[21:04:44 INFO]: [BentoBox] DEBUG: Setting values
[21:04:44 INFO]: [BentoBox] DEBUG: Entgroup = null
[21:04:44 INFO]: [BentoBox] DEBUG: et = null
[21:04:44 INFO]: [BentoBox] DEBUG: m = HOPPER
[21:04:44 INFO]: [BentoBox] DEBUG: value = 40
[21:04:44 INFO]: [BentoBox] DEBUG: Setting material  limit HOPPER 100 100 40
[21:04:44 INFO]: [BentoBox] DEBUG: Ignoring group.default tastybento
[21:04:44 INFO]: [BentoBox] DEBUG: Perm value = true
[21:04:44 INFO]: [BentoBox] DEBUG: Wrong prefix? true
[21:04:44 INFO]: [BentoBox] DEBUG: Syntax check on tastybento prem prefix aoneblock. aoneblock.island.limit.hopper.100
[21:04:44 INFO]: [BentoBox] DEBUG: Everything good
[21:04:44 INFO]: [BentoBox] DEBUG: Checking formatting
[21:04:44 INFO]: [BentoBox] DEBUG: Value is 100
[21:04:44 INFO]: [BentoBox] DEBUG: Setting values
[21:04:44 INFO]: [BentoBox] DEBUG: Entgroup = null
[21:04:44 INFO]: [BentoBox] DEBUG: et = null
[21:04:44 INFO]: [BentoBox] DEBUG: m = HOPPER
[21:04:44 INFO]: [BentoBox] DEBUG: value = 100
[21:04:44 INFO]: [BentoBox] DEBUG: Setting material  limit HOPPER 100 100 100
[21:04:48 INFO]: tastybento lost connection: Disconnected
[21:04:48 INFO]: tastybento left the game
zSteley commented 3 years ago

Okey! thanks i test and i send you the results tomorrow on morning!

zSteley commented 3 years ago

@tastybento the results: https://paste.md-5.net/bejusosose.md

myavuzokumus commented 3 years ago
[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Syntax check on elmaslarry prem prefix bskyblock. bskyblock.island.limits.hopper.100
[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Everything good
[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Checking formatting
[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Value is 100
[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: LimitsPermCheckEvent was cancelled!

What mean this is it?

tastybento commented 3 years ago

[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Syntax check on elmaslarry prem prefix bskyblock. bskyblock.island.limits.hopper.100

[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Everything good

[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Checking formatting

[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: Value is 100

[08:48:54] [Server thread/INFO]: [BentoBox] DEBUG: LimitsPermCheckEvent was cancelled!

What mean this is it?

Looks like Upgrade. It is overriding the permission settings.

tastybento commented 3 years ago

I will look at the Upgrades add on. That is the reason. I remember that the author was canceling the event that limits uses so that all limits are set by the upgrades add-on. It looks like there is an incompatibility.

myavuzokumus commented 3 years ago

I will look at the Upgrades add on. That is the reason. I remember that the author was canceling the event that limits uses so that all limits are set by the upgrades add-on. It looks like there is an incompatibility.

This is ridiculous. How did I not think of it before? I hope the problem is due to this and it gets resolved.

zSteley commented 3 years ago

@tastybento Okey thanks, could you tag me when the issue will solved?

BONNe commented 3 years ago

@OverBrave or @elmaslarry I am not saying that the issue should not be solved, however, how do you use both: permission and upgrades at the same time? Do you have some things that are upgradable with addon, while others are just with permission? Or you want to have initial permissions that you later upgrade?