sjavi4 / PlayerDoll

Fake Player Plugin for Spigot Paper Folia
38 stars 1 forks source link

Setting 'preserved-doll-name' seems to be ignored #95

Open seeruk opened 1 month ago

seeruk commented 1 month ago

Describe the bug In an attempt to mitigate the issue in #94 I was going to add all of the players on the whitelist for my server to the list of preserved Doll names. Unfortunately, the setting seems to be ignored and I can still create a Doll names in that list.

To Reproduce Steps to reproduce the behavior:

  1. Add some player names to the preserved-doll-name list
  2. Try to create a Doll with one of the names from that list
  3. Observe that they're still created anyway

Expected behavior Doll names in the preserved-doll-name should not be able to be created / spawned.

Server Setting State if you changed some uncommon settings i.e. Whitelist, Online-mode, specific server-mod settings

Setting of Doll Doll's current setting. From config or GUI. This might be helpful when clarifing the problem i.e. Hostility = true / Gravity: false

Screenshots or Videos If applicable, add screenshots or videos to help explain your problem.

Related Setup (If your problem is related to 3rd parties)

Context in code (If applicable)

Additional context Add any other context about the problem here.

sjavi4 commented 1 month ago

The names should not include doll-identifier, since there is no need to add the identifier in Create command. Also the identifier will automatically be discarded from input.

seeruk commented 1 month ago

I've tried to double-check this one, but maybe I'm just doing something wrong. Here's what is able to happen in-game:

https://imgur.com/a/yCBW2Vw

And here's my current config:

https://gist.github.com/seeruk/96cf1caf2d020edd1f2d793a34f157ed

And finally here are the permissions on the user I tried for playerdoll (the player is not opped either):

https://imgur.com/a/xwDrJX3

I didn't include the doll-identifier in any commands:

cubicoasis1_test  | [06:17:18 INFO]: Griun issued server command: /doll create Griun
cubicoasis1_test  | [06:17:18 INFO]: [PlayerDoll] Doll Config [Griun] Saved Successfully
cubicoasis1_test  | [06:17:23 INFO]: Griun issued server command: /doll spawn Griun
cubicoasis1_test  | [06:17:23 INFO]: [PlayerDoll] Doll client -Griun started
cubicoasis1_test  | [06:17:23 INFO]: [PlayerDoll] -Griun Wait for Login Listener
sjavi4 commented 1 month ago

Found the reason, there is a flaw on comparison between the list and the input. You can temporarily set the list to full lowercase to fix this problem.