Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission inconsistency for on join meta data check #120

Closed
Kryniowesegryderiusz opened this issue Feb 20, 2024 · 0 comments · Fixed by #121
Closed

Permission inconsistency for on join meta data check #120

Kryniowesegryderiusz opened this issue Feb 20, 2024 · 0 comments · Fixed by #121
Assignees
Labels
bug Something isn't working

Comments

@Kryniowesegryderiusz
Copy link

Kryniowesegryderiusz commented Feb 20, 2024

Expected behavior

Permission needed for border toggle command is [gamemode].border.toggle, but the meta data check looks for [addon-name].border.toggle

if (!e.getPlayer().hasPermission(addon.getPermissionPrefix() + IslandBorderCommand.BORDER_COMMAND_PERM)) {

https://github.com/BentoBoxWorld/BentoBox/blob/887f09c41b09a7d329ab7b0ce449f5398faefe80/src/main/java/world/bentobox/bentobox/api/addons/Addon.java#L435-L437

    public String getPermissionPrefix() {
        return this.getDescription().getName().toLowerCase(Locale.ENGLISH) + ".";
    }

The same is for border type check.

Observed/Actual behavior

Permissions are different. It should be stated on wiki or more preferably changed to same (command) permission as if you dont have permission to change something by command it should be default.

Steps/models to reproduce

N/A

BentoBox version

N/A

Plugin list

No response

Other

No response

@tastybento tastybento self-assigned this Feb 22, 2024
@tastybento tastybento added the bug Something isn't working label Feb 22, 2024
tastybento added a commit that referenced this issue Feb 22, 2024
@tastybento tastybento linked a pull request Feb 22, 2024 that will close this issue
tastybento added a commit that referenced this issue Feb 22, 2024
tastybento added a commit that referenced this issue Apr 20, 2024
* Version 4.2.2

* Added protection against console error spam if island size is zero.

If the protection range is 0 then the caluclations to teleport players
back into the border will result in infinite values and other
strangeness so this prevents that. This is an edge case and only really
happens when the island size has been set wrongly.

* Update README.md

* Fix perm issue #120 (#121)

* feat: detect mounted players on entity (#88)

---------

Co-authored-by: evlad <[email protected]>
tastybento added a commit that referenced this issue Nov 17, 2024
* Version 4.2.2

* Added protection against console error spam if island size is zero.

If the protection range is 0 then the caluclations to teleport players
back into the border will result in infinite values and other
strangeness so this prevents that. This is an edge case and only really
happens when the island size has been set wrongly.

* Update README.md

* Fix perm issue #120 (#121)

* feat: detect mounted players on entity (#88)

* Version 4.3.0

* Changes to work with 1.20.6. Has backwards compatibility. (#125)

* Fix imports

* Update zh-CN.yml (#127)

* Latvian translationa (#128)

* Translate lv.yml via GitLocalize

* Translate lv.yml via GitLocalize

---------

Co-authored-by: mt-gitlocalize <[email protected]>
Co-authored-by: tastybento <[email protected]>

* Add explicit bordertype command (#130)

* Add explicit bordertype command

* Add perm to addon.yml and make it default to off

* Remove unused method.

* 131 null to location (#132)

* Version 4.3.1

* Add defensive code for null to's #131

* If border is off, then don't move player back.

* Update to MC 1.21.3 and codemc updates (#134)

---------

Co-authored-by: evlad <[email protected]>
Co-authored-by: Minecraft_15 <[email protected]>
Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com>
Co-authored-by: mt-gitlocalize <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants