ItemJoin

ItemJoin

157k Downloads

Admins get notified of failure to overwrite items on login.

mibby opened this issue · 3 comments

commented

@RockinChaos Admins are getting notified they can't overwrite items on join despite not having permission for that item when they have a full inventory hotbar. This is most likely coming from an item I have that has a join trigger and specific slot assigned. This item should only be given to my Guest group, normal members no longer get the item on join once they become a member.

  server-info:
    id: WRITTEN_BOOK
    slot: 0
    name: '&b&l&nServer Info'
    author: '&f&lEos&b&lCraft'
    lore:
      - '&7'
      - '&7Welcome book containing server info.'
    pages:
      1:
      - '&8&nWelcome to &8&l&nEosCraft&8&n!'
      - ''
      - 'raw: ,{"text":"» ","color":"black","bold":true},{"text":"Visit Website","color":"gold","clickEvent":{"action":"open_url","value":"https://www.eoscraftmc.com/"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to visit our website."}]}},"bold":false}'
      - 'raw: ,{"text":"» ","color":"black","bold":true},{"text":"Join Discord","color":"dark_blue","clickEvent":{"action":"open_url","value":"https://discord.gg/artgxgs"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to join our discord."}]}},"bold":false}'
      - 'raw: ,{"text":"» ","color":"black","bold":true},{"text":"View Rules","color":"dark_green","clickEvent":{"action":"open_url","value":"https://www.eoscraftmc.com/rules/"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to view our rules."}]}},"bold":false}'
      - 'raw: ,{"text":"» ","color":"black","bold":true},{"text":"Vote for Rewards","color":"light_purple","clickEvent":{"action":"open_url","value":"https://www.eoscraftmc.com/vote/"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to vote for rewards."}]}},"bold":false}'
      - 'raw: ,{"text":"» ","color":"black","bold":true},{"text":"Browse Map","color":"dark_aqua","clickEvent":{"action":"open_url","value":"https://www.eoscraftmc.com/map/"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to open our map."}]}},"bold":false}'
      - ''
      - ''
      - '&0To request help, use &4/helpop&0, browse &7/help&0, or ask around!'
      2:
      - '&8&nAbout Us'
      - ''
      - '&0EosCraft is one of the longest running minecraft servers originating back to August of 2010.'
      - ''
      - '&0Administrated by mature and reliable staff members, we are always looking to expand and build upon our amazing community.'
      3:
      - '&8&nFeatures'
      - ''
      - '&0Although primarily survival focused, we house many additional fun features~'
      - ''
      - '&6Creative Plots &0• &dMcMMO'
      - '&bPainting &0• &9Casino'
      - '&2Events &0• &5Customs'
      - '&aMinigames &0& More!'
      - ''
      - '&c&oBe sure to ask &c&oaround for more info!'
      4:
      - '&8&nGetting Started'
      - ''
      - '&0To begin your adventure, you must first pass our new player introduction to become a &b&lMember&0.'
      - ''
      - '&0Once done, you will be brought to our spawn hub where you can find various NPCs, warps, & randomly teleport to a location!'
    itemflags: dynamic
    triggers: first-join, join
    permission-node: 'itemjoin.custom.serverbook'
    enabled-worlds: All

To Reproduce
Steps to reproduce the behavior:

  1. Inherit a wildcard flag such as * in your permissions.
  2. Login with stuff in your hotbar.
  3. Get error outputted to you in chat.
    Failed to give you 1 items, you are not allowed to overwrite items!

Admins have the permission itemjoin.custom.serverbook negated so they shouldn't be getting the item on join. I have also negated itemjoin.custom.* in their permissions.

- itemjoin.custom.*:
    value: false
- itemjoin.custom.serverbook:
    value: false

Perhaps it might be coming from the itemjoin.use permission check?

Expected behavior
No message.

Screenshots
link

Pastebin
items.yml
https://paste.ubuntu.com/p/6KmDF93fMM/

config.yml
https://paste.ubuntu.com/p/BvXPrK9K9W/

Additional context
Using ItemJoin dev 411. This does not happen with ItemJoin dev 384.

commented

This bug has been officially fixed in the release of ItemJoin v5.0.7.
You can grab it here; Download: https://www.spigotmc.org/resources/itemjoin.12661/download?version=354306

Please read the changelog as the documentation has not been updated yet;
https://github.com/RockinChaos/ItemJoin/wiki/Recent-Changes

commented

Okay so, I was able to replicate this issue. I also had the issue in dev 384 so not sure how it was working for you.

Do note, Obtain-Items-OP must be set to true for this to work. (Requires OP players to have perms to get the items). -- I notice this is true in your config.yml, just stating a fact for knowledge.

There were quite a few bugs with permissions so hopefully, this cleans things up a bit.

Fixed Snapshot; http://ci.craftationgaming.com/job/ItemJoin/413/

Let me know!

PS: THANK YOU for the great bug writeup! This is a model example of what requests should look like.

commented

I also had the issue in dev 384 so not sure how it was working for you.

It might have existed but might have been because the issue only occurs one time on first login with a new database.db entry. Additional logins didn't seem to reproduce the overwrite warning. Deleting the database.db file and logging in again does have the problem occurring again.

I'll update snapshot builds, hopefully the issue is finally taken care of. :)