Closed neomoth closed 5 months ago
May need some slight tweaking, unsure how you want to handle this, and the CodeFactor thing is pointing out some stuff but also I barely know how Kotlin works in the first place. Just wanted to address these issues as they were causing issues for the server I manage.
Hello! Thanks a lot for the pr. I've been extremely busy lately and I've had no time to work on the plugin. It's extremely appreciated.
I'll just check the code a bit in a few minutes, and tell you if there are any changes you should make.
@neomoth If you are busy I can fix these problems myself don't worry, I just reported these to make them clear since it could help you get better at kotlin
I've made the requested changes, I had changed so much due to not being familiar with kotlin syntax and wasn't aware I could have avoided the whole needing to check for null situation by just altering the original flags.any
return statement lol.
Also, I updated on browser due to being a tad busy, so I can't test if this actually works though I assume it does and can test in a couple of hours just in case.
thanks for the fixes! Once you are done with the testing I'll merge this and publish an update
Oh that's a problem.
Operator '==' cannot be applied to 'Boolean' and 'StateFlag.State'
Just replace containerQuery.testState
with containerQuery.queryState
Ohhh i see. One moment.
Fixed, had to actually rewind and commit again because apparently it really didn't feel like using my correct credentials on this machine so it had used a different name and email for the commit lol. Tested and it works, I'm able to use a jukebox deopped in the __global__
region.
Thanks again for the pr!
Addresses the following issue/feature request by adding the requested permission node:
285
Addresses the fact that the WorldGuard integration does not account for unset flags that don't have a default permission (CHEST_ACCESS does not have a default value when unset, meaning by default players cannot use jukeboxes.) This is done via altering the flag check to allow returning
null
, and explicitly check that the returned result is equal tofalse
.