What's new
ItemJoin

ItemJoin v5.0.3



Please Note: Upon updating, the old en-lang.yml and config.yml file will be saved and a new one will be generated.

Also Note: Upon the reset of these config files, permissions to obtain items will be disabled by DEFAULT. This means all players will get any item despite lack of permissions. In order to use permissions, you will need to enable it in your config.yml--Permissions.Obtain-Items set this to true. I did this because I am tired of people asking why ItemJoin isn't working when they first install the plugin.

We have been stuck on version 6 of our configuration files for almost a year now so it is time for a little rework of the ugly config(s) layout. These changes will now allow me to easily add new features without the need for future config resets. Currently, there are no plans to reset the items.yml so that will stay on version 6.

Changelog


Added:
  • You can now specify [close] for all player, console, op, and default commands to close the player's inventory once the command is executed. This specifically closes the executing player's inventory, so despite it being executed by the console, it will close the player's inventory since obviously console does not have an inventory.
  • Example item using this feature;
  • Code:
      example-item:
        id: FIREWORK_STAR
        slot: 0
        count: 6
        charge-color: BLUE
        commands:
          multi-click:
            - 'player: menu'
            - 'player: [close]'
        commands-type: interact
        commands-sound: BLOCK_NOTE_BLOCK_PLING
        itemflags: item-store, death-drops, self-drops, hide-attributes, disposable
        triggers: join, respawn, world-change
        enabled-worlds: world, world_nether, world_the_end
  • New Clear-Items delay (Delay-Tick). #202
    • Resolves issues with PerWorldInventory.
  • Implemented new MapMeta changes once again.
  • New Overwrite Itemflag
    • Allows the specified item that is given this itemflag to overwrite any item in the player's inventory.
    • This is like the itemsOverwrite in the items.yml (rather it is item specific).
    • This itemflag will take priority over the itemsOverwrite boolean.
  • New Time_Stamp row to the SQL Database. #199
    • Obviously old items will be marked with a NULL timestamp.
    • This is added to all first-join, first-world, and ip-limits items as well as first-command players.
    • Primarily useful via viewing the SQL Database but later will be implemented into ItemJoin's features.


  • New Metrics support.
    • This can be disabled in the config.yml; General.Metrics-Logging: false.
    • When this is set to false, server data will not be sent.
    • When this is set to true, this anonymous sends data collected on your server to bStats so I (the developer) can see a various amount of variables. Such as; Player Count, Number of Servers, Java Versions, Server Versions, Etc. All of this is anonymous and does not send anything identifying about you or your server, to see what is logged view the stats page here; https://bstats.org/plugin/bukkit/ItemJoin
    • I encourage everyone to keep this set to true, as this will help me increase the quality of the plugin. and supported Minecraft versions.

Fixed:
  • /itemjoin getOnline command missing messages.
  • /itemjoin removeOnline command missing messages.
  • /itemjoin autoupdate command not even working due to dev-bukkit update.
  • Database issues in versions below Minecraft v1.13 (being unable to load database information into ram).
  • An issue with items.yml getting bugged with the original generation file changes.
    • This would happen if the config.yml or en-lang.yml was regenerated after you made changes to the items.yml, causing it to think that you are generating a new items.yml.
  • PlaceholderAPI issues.
  • /ItemJoin Reload command issues.
  • Issues with disposable items not functioning properly on versions below Minecraft v1.9.
  • Bug with arbitrary items not functioning properly.
    • If any of your arbitrary items have broken they will not be fixed until a new one is generated.
  • Mojang API connecting issues.

Changed:
  • Soft-depend list in the plugin.yml to reflect the actual optional dependencies that ItemJoin supports. #201
    • Was missing HeadDatabase and
    • Multiverse has been changed to Multiverse-Core.
  • Completely rewrote the updater class.
  • Messages have been completely rewritten and are now handled completely different.
  • en-Lang is now on version 7.
    • The English Language file has been completely rewritten and will now support easy language file changes. This making it less likely that this will be reset again in the future.
    • Remember the old language file will be saved in the ItemJoin folder before generating a new one.
  • config.yml is now on version 7.
    • The configuration settings have completely been rewritten and many have different names. This change will make it less likely that the config file will be reset again in the future.
    • Remember the old config file will be saved in the ItemJoin folder before generating a new one.
  • First-Join and First-World can now be defined under triggers instead of itemflags if chosen.
    • Defining them under triggers will have certain effects.
    • First-Join automatically applies the Join trigger.
    • First-World automatically applies the Join and WorldSwitch trigger.




Please see the documentation page if you need any help with these new updates!
If you have any ideas or requests that you would like to see in ItemJoin's future please submit a feature request.




Changelog

Added:
  • New first-world itemflag.
    • This will give the specified item once per world for each player.
  • Ability to protect first-join and first-world items from being affected by the Clear-Items in the config.yml.
    • If this is set to true it will protect all first-join and first-world items from being cleared from the player's inventory if the ItemJoin option is selected.
    • Simply add this to your config.yml;
    • Code:
      Protect-SpecialItems: true
  • Data-value identifier for the /itemjoin info command.
    • If you are using a version of Minecraft less than 1.13, it will now correctly display the data-value when using the info command.
    • This is temporarily a raw text output and will be added to the language file in the next update or two when the rework to the language file is pushed to the release branch.
  • Support for the new HeadDatabaseAPI changes.
    • HeadDatabase should now function properly once more!
  • New vanilla-status itemflag.
    • Applying this itemflag to an item will allow any item with the vanilla itemflag retain its functionality to ItemJoin without applying any NBTTags to the item.
    • This is useful for trying to implement items being used by other plugins so they can retain their functionality while also (not being given on every join).

Fixed:
  • HUGE memory leak with database files.
    • Every time the player would commit an action it would open and close the database connection causing a massive memory leak and high timing reports.
    • Everything has now been committed to memory so there will be no more memory leaks and a noticeable lag decrease.
  • Issues with the World System allowing items that were not defined for certain worlds accidentally ending up on the defined list.
  • Bug with skull-owners using the %player% variable #195.
  • Bug with items using the dynamic itemflag not working properly.
  • Bug with item commands not executing properly.
    Bug with first-world purge command not working.
  • Major bugs with the VaultAPI integration.
    • Also compiled with the new release of Vault-1.7.1.
  • Minor disposable item bug #196.
  • ItemCommand interacts bug #197.
  • HeadDatabase items forgetting that they are ItemJoin items.
  • Bug with vanilla items.
  • Random errors with the fail count message.

Changed:
  • The current first-join itemflag.
    • This now only gives the item on the first time joining the server, if you want to limit it to the first time on each specific world use the first-world itemflag.
  • The /itemjoin save command will now properly save the data-value for versions of Minecraft less than 1.13.
  • The database file has been completely rewritten with better accessibility, there should be no changes to current database files.
  • Cleaned up some useless code for better readability.




Please see the documentation page if you need any help with these new updates!
If you have any ideas or requests that you would like to see in ItemJoin's future please submit a feature request.





Changelog


Added:
  • Map items now support GIF images (Animated).
  • Support for the new Vault API (1.13).
  • ReAdded the ItemJoinAPI.
    • It magically disappeared in the v5.0.0, whoops!
  • Once again, updated support for WorldGuards API revisions... #192
    • Stop removing methods and simply deprecate them, please and thanks!

Fixed:
  • Issues with Vault balance and new Economy plugins.
  • Errors with book items when they have no pages defined.
  • Ip-limit / first-join bug in debugging mode.
    • If the item was already given on first-join it would send a debug message as well as an actual message to the player saying it failed to give the item.
  • OPCommands-Permissions in the config.yml.
    • Was accidentally using the Items-Permissions in the config.yml instead of OPCommands.
  • An issue where, if enabled-worlds were not defined for an item it would default to disabled.
    • Now it correctly defaults to all worlds being enabled.
  • An issue where, if triggers were not defined for an item it would default to disabled.
    • Now it correctly defaults to on JOIN being the default trigger.
  • An issue where you were unable to specify multiple map items, each having a different rendered image.
  • An issue with commands where if two executors were defined at the same time both would execute upon committing an action that was defined under one of the two executors.
  • An issue with YAMLGenerator breaking the items.yml upon loading for the first time.
  • An issue with Crafting Slot items not playing friendly with GUI plugins, this would create ghost items.

Changed:
  • Rewrote map image functionality to resolve issues with images not appearing.
  • Compressed image files so the ItemJoin.jar file is a smaller size.




Please see the documentation page if you need any help with these new updates!
If you have any ideas or requests that you would like to see in ItemJoin's future please submit a feature request.





Notes: I will be taking a short break after posting this update to spend time with family so the documentation will take a few days to update. Also, I know this update did not include the in-game GUI creator. The framework rewrite has taken up the majority of my time but this should allow future expansion in ItemJoins future. This new framework update was written because of the in-game GUI creator requirements, as ItemJoin lacked the capability of implementing it in the version two adaptation of ItemJoins framework.

Also, it seems like only a few people have bug tested this new release version of ItemJoin, so if anyone finds any bugs or issues please report it as soon as possible to the GitHub issues section.



Changelog


Added:
  • New Framework defined as ItemJoin v3.
    • This is huge and took so long to develop as it was created with the intention of having future expandability upon the new platform without hitting and major limitations in the plugin's code.
  • Support for the new WorldGuard API #186.
    • Updated to support new BlockVectors.
  • Support for the new WorldEdit API #186.
    • Updated to support new BlockVectors.
  • A new system for the item-store itemflag #190.
    • Item-Store now supports the Crafting Table.
  • New item-craftable itemflag #184.
    • This will block the usage of the specified ItemJoin item in a crafting recipe via the crafting table or the players own personal crafting menu. If an item using this itemflag is placed in either of those following locations the item will be automatically moved back to the first available slot of the player's inventory.
  • New item-repairable itemflag #184.
    • This will block the usage of the specified ItemJoin item in an anvil repair recipe.
    • If this itemflag is also used on a consumable recipe item such as a diamond the itemflag will still prevent the repair of an item.
  • Additional support for the item-store itemflag #183.
    • The item-store itemflag has the new addition blocking the storing of the specified ItemJoin item in droppers, dispensers, item-stands, llama chests, and donkey chests.
  • Command /itemjoin getOnline <item> #308398.
    • This will get the specified ItemJoin item for all players that are currently online.
  • Command /itemjoin getOnline <item> <amount> #308398.
    • This will get the specified amount of the ItemJoin item for all players that are currently online.
  • Command /itemjoin removeOnline <item> #308398.
    • This will remove the specified ItemJoin item from all players that are currently online.
  • Additional modifier <count> for the /itemjoin get <item> command(s) #188.
    • Example#1: /itemjoin get <item> <amount> - Gives the said amount of the item to the player, this bypasses the hasItem restriction.
    • Example#2: /itemjoin get <item> <player> <amount> - Gives the said amount of the item to the player, this bypasses the hasItem restriction.
  • New always-give itemflag #188.
    • This will always give the specified ItemJoin item when a player acts upon one of the defined triggers such as on join.
    • This itemflag also has a dual functionality, allowing the hasItem restriction bypass on the regular /itemjoin get <item> and /itemjoin get <item> <player> with no amount being specified.
  • New allow-modifications itemflag #308398.
    • Allows the item to still function as a normal ItemJoin item if the ENCHANTMENTS, BOOK PAGES, NAME, LORE, and item COUNT are modified by the player or a plugin.
  • New Prevent-InventoryModify global setting in the config.yml.
    • Prevents the movement of items in a players inventory.
  • New enabled-prevent-worlds global setting in the config.yml.
    • You can now specify ALL, GLOBAL, or specific worlds separated by commas for the prevent-settings to have effect in the specified world(s).
  • Support for animated Material ID's, Data-Values, and Material Names.
    • If the animate itemflag is specified the item can now change its material to any specified material upon a delay interval.
    • An example item of glass panes changing colors;
    • Code:
        filler-pane-item-example:
          id:
            1: '<delay:40>BLACK_STAINED_GLASS_PANE'
            2: '<delay:20>BLUE_STAINED_GLASS_PANE'
            3: '<delay:20>GREEN_STAINED_GLASS_PANE'
            4: '<delay:20>MAGENTA_STAINED_GLASS_PANE'
            5: '<delay:20>ORANGE_STAINED_GLASS_PANE'
            6: '<delay:20>RED_STAINED_GLASS_PANE'
          slot: Arbitrary, Arbitrary, Arbitrary, Arbitrary
          name: '&f'
          itemflags: inventory-modify, placement, animate
          triggers: join, world-change
          enabled-worlds: world, world_nether, world_the_end
  • .Hexacolor support for leather-color on dyed armor.
    • A usage example of the hexcolor string;
    • Code:
          leather-color: f4d0ec
  • Support for animated skull-owners.
    • You can now animate between different skull-owners.
    • Code:
        skull-item-example1:
          id: PLAYER_HEAD
          slot: 0
          skull-texture:
            1: '%player%'
            2: 'RockinChaos'
            3: 'Notch'
          itemflags: animate
          triggers: join, respawn, world-change
          enabled-worlds: world, world_nether, world_the_end
  • Support for animated skull-textures.
    • You can now animate between different skull-textures (including support for HeadDatabase, via hdb-ID)
    • Code:
        skulldb-item-example:
          id: PLAYER_HEAD
          slot: 0
          name: '&fCyclone'
          skull-texture:
            1: '<delay:100>eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMGZlMzFlYWE4YThhZDhkZDhkN2FiOTZhODQyMzI5MDUzOWQzODdkODJkNDI2ODcwMWVjNjlkNDFhMWZjIn19fQ=='
            2: '<delay:100>eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTYxZGZkZGE3MTAyMmJmYWQ3OWVhYmJmYTU2YTE1MTE2NDdiMjAyYWQxMTM2ZmY5N2UzMWEwNmRiYWMxMGVjYiJ9fX0='
            3: '<delay:100>eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGFmNjJkNjJkMGE5MzZmMDdmZGZjMWM2MDcyMTY4NzVjOTkzZTViZWViY2U5NTNlOWM4NzI0YTI1ZmNiYTBiYyJ9fX0='
          lore:
            - '&7This is a custom textured skull.'
            - '&7'
            - '&7You can create your own skull texture'
            - '&7and apply it to a skull item!'
          itemflags: inventory-modify, death-drops, self-drops, animate
          triggers: join, respawn, world-change
          enabled-worlds: world, world_nether, world_the_end
  • Support for dynamically updated skull-owners and skull-textures
    • In the event that a skin texture changes this will be useful.
    • An example item;
    • Code:
        skull-item-example:
          id: PLAYER_HEAD
          slot: 0
          skull-owner: '%player%'
          itemflags: animate
          triggers: join, respawn, world-change
          enabled-worlds: world, world_nether, world_the_end
  • New ability to limit items to a specific gamemode.
    • If a limit-mode is set to a specific item, the player will only be given the items if they are in the defined gamemode upon an action defined by the triggers.
    • An example item that you can only get in SURVIVAL and ADVENTURE mode;
    • Code:
        arrow-item-example1:
          id: ARROW
          slot: 0
          name: '&fArrow'
          count: 32
          limit-modes: SURVIVAL, ADVENTURE
          triggers: join, respawn, world-change
          enabled-worlds: world, world_nether, world_the_end
  • New GAMEMODE-SWITCH trigger.
    • This works well with the limit-modes identifier, however, it will work without it.
    • If the player switches to a gamemode that is not defined in the limit-mode this trigger will remove the item from the player's inventory.
    • If the player is missing an item that is defined by the limit-modes it will be given if they are switching to the correct gamemode.
    • An example item that you can only get in and if you switch to CREATVE mode;
    • Code:
        arrow-item-example:
          id: ARROW
          slot: 0
          name: '&fArrow'
          limit-modes: CREATIVE
          triggers: JOIN, GAMEMODE-SWITCH
          enabled-worlds: world, world_nether, world_the_end
  • JSON Books now can support raw data inputs.
    • If you have raw JSON data you can now put that as a page line to appear, for example, this would be useful for clickable hover text as shown in the example below.
    • Simply add the "raw: " identifier and paste the raw JSON data, this can include the ["" or exclude it. Please note that this only works for each separate line on each book page.
    • Code:
        book-item-example:
          id: WRITTEN_BOOK
          slot: 0
          name: '&c&nCreating a Book'
          author: '&bItemJoin'
          lore:
            - '&7'
            - '&7This magical book is given on join!'
          pages:
            1:
            - 'raw: ["",{"text":"I am a hidden text!","color":"yellow","clickEvent":{"action":"open_url","value":"https://www.spigotmc.org/resources/itemjoin.12661/"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to visit the spigot page.","color":"blue"}]}}}]'
  • Support for Crafting item slots.
    • Crafting item slots will now be defined as such; CRAFTING[0], CRAFTING[1], CRAFTING[2], CRAFTING[3], CRAFTING[4].
    • Crafting slot identifiers can also support C[#] or C(#) instead of CRAFTING[#], as shown in the available slots image depicting C[#].
    • Example items using crafting slots;
    • Code:
        diamond-item:
          id: DIAMOND
          slot: CRAFTING[1]
          itemflags: death-drops, self-drops
          triggers: join
          enabled-worlds: world, world_nether, world_the_end
        iron-item:
          id: IRON_INGOT
          slot: CRAFTING[2]
          itemflags: death-drops, self-drops
          triggers: join
          enabled-worlds: world, world_nether, world_the_end
        gold-item:
          id: GOLD_INGOT
          slot: CRAFTING[3]
          itemflags: death-drops, self-drops
          triggers: join
          enabled-worlds: world, world_nether, world_the_end
        redstone-item:
          id: REDSTONE
          slot: CRAFTING[4]
          itemflags: death-drops, self-drops
          triggers: join
          enabled-worlds: world, world_nether, world_the_end
  • Updated available slots to support the crafting slots.


Fixed:
  • Animated items no longer have the requirement of needing both the item name and lore to animate.
    • If an item name was defined to animate and the item lore was undefined or not set to animate it would cause issues including console errors.
  • ServerSwitch defined in an items command would not send you to the server.
    • With the current identifier 'server:' there is now a 'serverswitch:' identifier.
  • Disposable items not functioning correctly #180, #185.
  • Bug with the item-store itemflag not blocking items if they were a non-block item when being placed in the instance of an item-frame.
  • Bug with the /itemjoin info command not correctly listing the items Material name.
  • Minor bug with offline skull owners.
    • Now requests data from Mojang directly and obtains the players UUID to generate the texture plating.

Changed:
  • Removed the data-value identifier.
    • The data-value for legacy Minecraft will now be combined in the item's id via 'ID:VALUE'.




Please see the documentation page if you need any help with these new updates!
If you have any ideas or requests that you would like to see in ItemJoin's future please submit a feature request.







If you are reading this far then the following information should apply to you. ItemJoin has and always will be an all-in-one supported plugin for all versions of Minecraft. The 1.13 Aquatic update was not actually very damaging to any of ItemJoin's core code. It only had a few errors when checking for certain item id's such as skull items as well as since 1.13 does not have ItemID's, ItemJoin as of 1.13 will not support them. However, if you are running a lesser server version 1.7 - 1.12, ItemID's will continue to function as normal. This "backward compatibility" for ItemID's has been tested but not every item has been tested so if there is a bug found such as not receiving the correct item please inform me. ItemID's on Minecraft 1.13 will continue to function with ItemJoin but I highly recommend moving away from the use of this method as it can have the potential to break as spigot is updated.

So in essence, ItemJoin is marked in the plugin.yml as fully compliant to the 1.13 api-version which allowed me to easily program backward compatibility for 1.7 - 1.12. So it is simply still an easy drag and drop for any version of Minecraft from 1.7 - 1.13 and there are no values that need to be changed other than adjusting the items in the items.yml accordingly to have the correct Material. As of posting this update, I am also looking to fix up the documentation page to include each individual Minecraft versions documentations for spigot listed so you can see what Materials, Enchants, Sounds, Effects, etc, are available for each specific version. This will most likely be in the form of links found on the main page that redirect to these specific versions. Hopefully, this gives those who are interested an insight into what is going on. If you have any questions feel free to contact me.​



Changelog


Added:
  • Support for Minecraft v1.13 Aquatic Update!
    • Despite md_5's statement that plugins will not be backward compatible, I am still continuing to design ItemJoin as an all-in-one backward compatible plugin. Therefore, this version supports Minecraft 1.13 as well as 1.12, 1.11, 1.10, 1.9, 1.8, and 1.7.
  • Updated WorldGuard dependency.
    • Now Support WorldGuard 7.0.0 and above.
    • Also supports backward compatability for WorldGuard versions below 7.0.0.
  • Specific items.yml files for each major Minecraft version.
    • When a new items.yml is generated it will generate a version specific to the Minecraft server version you are running so you will get the full tutorial of items rather than a bunch of errors in console stating to remove non-supported items for that version of Minecraft.
    • Much clean...
  • /ItemJoin get <item> command permissions.
    • You can now toggle this on, which is off by default in the config.yml. Simply set GetItem-Permissions to true.


If you are using a config or en-lang file before this update and wish to use this new feature you will need to add the following to your config.yml and en-lang.yml respectively;
Config.yml;
Code:
GetItem-Permissions: false
en-lang.yml Messages;
Code:
givenNoPerms: '&4You do not meet the permission requirement to receive the item %item%.'
givenToPlayerNoPerms: '&4%argsplayer% &4does not meet the permission requirement to receive the item %item%.'
givenAllNoPerms: '&4You were missing permissions for an item so not all items were given.'
givenAllPlayerNoPerms: '&4%argsplayer% &4was missing permissions for an item so not all items were given.'

  • New command /ItemJoin info.
    • This will determine the item's information of what you are holding.
    • I have implemented this to make it easier to look up the Material of the item you are holding via in-game rather than looking it up in spigots documentations.
    • Currently Material is the only option but this will expand as needed.
If you intend to use this new command you will need to add the following in your en-lang.yml if you have a previously generated one;
Code:
itemInfo: '&aItem Material_TYPE; &b%item_type%'
noItemInHand: '&cYou are not holding an item in your hand!'
  • Option to disable the inventory bypass permission in the config.yml for those who use the * permission.
    • InventoryBypass-Permission: false to the config.yml
  • Full support for special characters.
    • YAML files have been converted to UTF-8 to better support a larger variety of special characters.
  • Support for JSON open_url.
    • You can now add clickable links to your JSON books.
Code:
<hover type="open_url" value="https://www.spigotmc.org/resources/itemjoin.12661/">"Click to view ItemJoin."</hover>
  • Support for JSON run_command.
    • You can now add clickable text to run commands.
Code:
<hover type="run_command" value="/say ItemJoin is so AMAZING!">"Click to run a Command."</hover>

Fixed:
  • Placement itemflag not working for skull items.
  • Placement itemflag not working when placing non-block items in item-frames.
  • Console command errors when executing /itemjoin get <item> <player>
  • Removeall command messages not being received correctly.
  • RemoveAll command errors when executing as console.
  • Splash Potions not being enabled in Minecraft v1.8.8.
  • GameProfile bugs with Skull Items in Minecraft v1.7.
    • Minecraft v1.7 does not support offline skull owners, therefore the player specified as the skull owner will need to have previously joined the server in order to receive the player's skin.
Changed:
  • ItemID's as of Minecraft v1.13 is no longer supported, if you use a lesser version of Minecraft [v1.7 - v1.12] then ItemID's will continue to function.
    • ItemID's have been removed from Minecraft as well as Spigot/Craftbukkit's API as of the v1.13 Aquatic Update.
    • ItemID's in Minecraft v1.13 will technically still work using the conversion method I have added but it is recommended to switch away from old ItemID's as soon as possible. I have added this conversion method to prevent your items.yml from blowing up when you upgrade an old config file to v1.13.
    • Again please note; I really recommend no longer using item id's with ItemJoin as it can cause issues, more specifically you receiving the wrong item or no item at all.
  • Updated configuration files to have the correct data-values and material names to function normally on Minecraft v1.13.
  • Completely reworked the Items Commands to optimize performance.
  • Completely reworked map items to optimize performance and to fix rendering issues.
    • Map_ID's will no longer be used because of this, now uses the next available map-id to prevent map-id conflictions with other plugins.
    • Map items will no longer have their image flicker when another player joins the server.
    • Map items will no longer have their image permanently disappear when another player joins the server.



Please see the documentation page if you need any help with these new updates!
If you have any ideas or requests that you would like to see in ItemJoin's future please submit a feature request.



This update has taken quite a while and contains a lot of bug fixes, new features, and large optimizations.
You will notice that most of the changes in this build are bug fixes. The next release should be the major release for Minecraft 1.13 update in the following couple of weeks, really depends on when we get hints that its release date is approaching.

Please note not all of these changes will appear in the documentation right away. I tried to provide as much information as I could in the update's changelog. I will be working over the next few days to update the documentation to reflect these changes.



Changelog


Added:
  • New database.db file, this will now be the hub for all data-storing by ItemJoin.
    • All of the first-join and ip-limit data has been moved to here.
    • Currently, first-join, ip-limit, enabled/disabled players, and first-join commands are stored here. As more features get added more data will be stored in this file.
    • Contains all needed info such as first-joins, ip-limits, global message first-join usages, and first command uses for items. (one-use identifier).
    • All first-join.yml data and ip-limit.yml data (if any exist) will be automatically moved onto the database.db file without losing data upon starting the server. Once the conversion is complete those two YAML files will be backed up under /ItemJoin/backup encase a reversion was needed.
  • New command(s) /itemjoin enable and /itemjoin disable - Globally enable/disable the use of ItemJoin for all users in all worlds.
  • New command(s) /itemjoin enable <player> and /itemjoin disable <player> - Enables/Disables the use of ItemJoin items for that user.
  • New command(s) /itemjoin enable <player> <world> and /itemjoin disable <player> <world> - Enables/Disables the use of ItemJoin items for that user in that specific world.
  • New Item Probabilities identifier to the items.yml, you can now define certain items with a probability to be put into a lottery, then the item that won will be given to the player.
    • Items that do not have probabilities defined will be automatically given to the player.
    • If the item has a probability, only one of those items can be given.
    • You can define items with an without probability to be given together in a friendly manner.
    • Items probability are based on weight rather than a percentage, so you can use any number as long as it is a positive integer.
    • If you define any item(s) without a probability, the item(s) will be given along with the item that wins the probability roll.
    • This also works for adding additional slots, so if the item that was chosen has multiple slots those multiple slots will be given if its a multi-slot item.



Example of random items to be given (as shown in the example image);
Code:
items:
  sword-of-a-god:
    id: DIAMOND_SWORD
    slot: 0
    name: '&eYou have been chosen..'
    probability: 15
    triggers: join, world-change
    enabled-worlds: world, world_nether, world_the_end
  herobrine-apple:
    id: GOLDEN_APPLE
    slot: 0
    name: '&cHerobrine Apple'
    probability: 55
    enabled-worlds: world, world_nether, world_the_end
  filler-pane-item-four:
    id: DIAMOND_PICKAXE
    slot: 0
    name: '&fUseless Pickaxe'
    probability: 110
    triggers: join, world-change
    enabled-worlds: world, world_nether, world_the_end



  • New commands-sequence identifier to the items.yml, you can now specify either RANDOM or ALL to either execute one of the commands RANDOMly given an even percentage between each command or execute ALL commands (normally). There is also the option to execute the commands as SEQUENTIAL, however, this technically doesn't do anything different it just executes the commands in order.
    • Note; you do not have to add commands-sequence if you just simply want all the commands to execute as normal in a "sequential order".

Example of a item with RANDOM commands (as shown in example image);
Code:
 random-item:
    id: EMERALD
    slot: 0
    name: '&aRandomizer'
    commands:
      multi-click:
        - 'message: &eCOMMAND 1'
        - 'message: &eCOMMAND 2'
        - 'message: &eCOMMAND 3'
        - 'message: &eCOMMAND 4'
        - 'message: &eCOMMAND 5'
    commands-type: interact, inventory
    commands-sound: BLOCK_NOTE_PLING
    commands-sequence: RANDOM
    commands-cooldown: 5
    cooldown-message: '&7[&eItemJoin&7] &a[%item%&a] &cis on cooldown for &a%timeleft% &cseconds..'
    triggers: join, respawn, world-change, region-enter
    permission-node: 'itemjoin.ultra'
    enabled-worlds: world, world_nether, world_the_end


Example of a item with ALL commands;
Code:
  allcmds-item:
    id: EMERALD
    slot: 0
    name: '&aAll Commands'
    commands:
      multi-click:
        - 'console: gamemode 1 %player%'
        - 'message: &eYou have been set to creative mode.'
    commands-type: interact, inventory
    commands-sound: BLOCK_NOTE_PLING
    commands-sequence: ALL
    commands-cooldown: 5
    cooldown-message: '&7[&eItemJoin&7] &a[%item%&a] &cis on cooldown for &a%timeleft% &cseconds..'
    triggers: join, respawn, world-change, region-enter
    permission-node: 'itemjoin.ultra'
    enabled-worlds: world, world_nether, world_the_end



  • New ItemJoinAPI, You can now as a plugin developer give all ItemJoin items to a player by hooking into ItemJoin's new API.
    • The new API is located under me.RockinChaos.itemjoin.ItemJoinAPI, there is currently only one method; me.RockinChaos.itemjoin.ItemJoinAPI.getAllItems(player)
    • If you wish to see a method added feel free to submit a request on GitHub!
  • New Permission itemjoin.bypass.inventorymodify - Allows the player to bypass the itemflag inventory-modify if the item has said itemflag.
    • Players will be able to freely move items with this permission.

  • New %argsplayer_world% placeholder for specific en-lang.yml messages.

  • New vanilla itemflag - Allows the giving of default unmodified no-name items.
    • With this vanilla itemflag certain itemflags will still work such as; (list itemflags)
    • Commands will also work with vanilla items.
    • Please note if you choose to use commands, all other vanilla items that are the same material type will act like ItemJoin items since they are regular vanilla items and ItemJoin cannot determine the difference between them. That being; they will still execute commands and if you had inventory-modify itemflag on those items would not be movable.

  • New command /itemjoin purge - Deletes all data and resets the database file.
    • This will not cause any issues, it just simply resets all the player data from the database file, such as all first-join players, ip-limit, enabled/disabled players, and first-join commands.

  • New command /itemjoin purge first-join <player> - Deletes all data for first-join itemflag for that player from the database file.

  • New command /itemjoin purge ip-limits <player> - Deletes all data for ip-limit itemflag for that player from the database file.

  • OPItems-Permissions to the config.yml - Setting this to true will require ops to have each item's permissions in order to receive them.

  • OPCommands-Permissions to the config.yml - Setting this to true will require ops to have each commands permissions or itemjoin.all or itemjoin.* in order to use each command. Ops will not get each command by default if this is set to true.
    • itemjoin.(reload, updates, autoupdate, creator, purge, save, get, get.others, remove, remove.others, enable, enable.others, disable, disable.others, list) are no longer given to oped players by default, you will now have to set OPCommands-Permissions in the config.yml to false to allow ops to get these commands by default (however this is the default selected setting, setting it to true will require ops to be given these permissions).

  • With the addition of the new commands, multiple new help pages have been added to /itemjoin help.

  • The following has been added to the en-lang.yml.
    • If you are interested in using any of the new commands mentioned above or the new items-gui creator, it is recommended to add these to your lang file.

Needs to be added;
Code:
databasePurged: '&aYou have purged the database file of %purgedata%!'
databasePurgeWarn: '&aPurging the database will delete &cALL &a%purgedata%.'
databasePurgeConfirm: '&aYou have 5 seconds to type &e%command% &aagain to confirm you wish to purge the database.'
databasePurgeTimeOut: '&cYou did not confirm the database purge within 5 seconds, purge canceled!'
enabledForPlayerWorld: '&aYou have &eenabled &7[&e%world%&7] items &afor &e%player%&a.'
enabledForOtherWorld: '&a%player% has &eenabled &7[&e%world%&7] items for you.'
enabledForPlayerWorldFailed: '&4You have already &eenabled &7[&e%world%&7] items &4for &e%player%&4.'
disabledForPlayerWorld: '&aYou have &edisabled &7[&e%world%&7] items &afor &e%player%&a.'
disabledForOtherWorld: '&a%player% has &eenabled &7[&e%world%&7] items for you.'
disabledForPlayerWorldFailed: '&4You have already &edisabled &7[&e%world%&7] items &4for &e%player%&4.'
enabledForPlayer: '&aYou have &eenabled &aall items for &e%player%&a.'
enabledForOther: '&a%player% has &eenabled &aall items for you.'
enabledForPlayerFailed: '&4Items have already been &eenabled &4for &e%player%&4.'
disabledForPlayer: '&aYou have &edisabled &aall items for &e%player%&a.'
disabledForOther: '&a%player% has &edisabled &aall items for you.'
disabledForPlayerFailed: '&4Items have already been &edisabled &4for &e%player%&4.'
enabledGlobal: '&aYou have &eenabled &aall items for &eall players&a.'
enabledGlobalFailed: '&4Items have already been &eenabled &4for &eall players&4.'
disabledGlobal: '&aYou have &edisabled &aall items for &eall players&a.'
disabledGlobalFailed: '&4Items have already been &edisabled &4for &eall players&4.'


Fixed:
  • Console errors with Paper Spigot, mostly when sending ItemJoin messages.
    • This also was a common occurrence on Spigot/Bukkit (1.12) #157.
  • Random bug with count-lock on items that cannot be used or placed #155.
  • Issue with custom book items removing certain commas or spaces randomly.
  • Permission issue with itemjoin.world.* not working with LuckPerms, it was being recognized as itemjoin.craftworld{name=world_lobby}.* #162.
  • Issues with CustomPermissions.
  • Issue with NoSuchMethodError in Minecraft 1.8-1.8.8, mainly persisting with item frames.
  • Errors when using /itemjoin get item <player>.
  • Issues where commands would still execute when clicking an object managed by another plugin, such as a ServerSign. #163.
  • Issues with commands and placeholder updating when returning a non-existent player. #161.
  • Issues with world names that have spaces in them.
    • Items would not appear. ex; 'Cool World' instead of 'Cool_World' which is usually the proper format.
  • Items not being "unique" enough.
    • Added another NbtTag that contains the items identifier from the items.yml.
    • If you had more than one item defined in the same slot it would execute commands from the wrong item. Usually, it would use the command from the first item defined in the slot even if that item is not the item being executed.
  • Bug with an item executing another items commands if it had the same slot as the other item, sort-of related to the items not being "unique" enough.
  • Bug with commands multi-executing if you spammed both right and left click at the same time.
  • Bug with commands in adventure mode, if you were to left click specifically on a block the command would not execute. It is now set to listen for a players arm swing in adventure mode only.
  • Clear-Items not working if set to ItemJoin only items, issue had occurred with the new NbtTag System being implemented.
  • Versions of Minecraft below 1.8 causing items to disappear if you were to click them in creative mode.
    • Was more of an issue with the server rather than ItemJoin since there was a lot of bugs in Minecraft 1.8 that never got fixed, so I created a workaround for ItemJoin.
  • Issue with /itemjoin get <item> not working if you had already had first-join the server and it had the first-join itemflag.
    • Same issue occurred with count-lock and placement itemflag items.
    • This bug would prevent you from getting the item in general.
  • Bug with /itemjoin get <player> <item> and a few other en-lang.yml messages not sending the items name correctly if it was an animated item.
  • Bug with /itemjoin remove <player> <item> and a few other en-lang.yml messages not sending the items name correctly if it was an animated item.
  • Issues similar to LuckPerms, permissions for all other similar permission plugins have been fixed. Permissions will now correctly register.
  • NBTData for the NewNBT System on only Minecraft 1.8 throwing a lot of errors, somehow Material.AIR was getting in there!
  • A bug with items-Overwrite where if you didn't get the item because there was an item that couldn't be overwritten it will no-longer put you on the first-join list until you get the item.
    • To better clarify, if you are unable to receive the first-join item you will no longer be written to the database file as if you had received it.
  • Another bug with items-Overwrite to where if you already got the first join item and another item is placed in that slot it would say cannot overwrite when you cant even receive the item anyway because you already first joined. So that message is fixed and will no longer appear.
  • Other random command errors.

Changed:
  • The items-Overwrite in the items.yml can now be specified per-world instead of globally. Simply remove the true/false statement and put the name or world or world(s) separated by a comma.
    • All worlds that are defined will be the worlds that ItemJoin can overwrite items in.
Example of overwriting in specific worlds;
Code:
items-Overwrite: world, world_the_end
Example of disabling all item overwrites in all worlds;
Code:
items-Overwrite: false
Example of enabling all item overwrites in all worlds;
Code:
items-Overwrite: true
  • The NewNBT-System implementation was cleaned up and should function a lot better now.
    • If you are not using the NewNBT-System I really recommend switching to it especially if you are using ItemJoin for more advanced inventory modifications.
Code:
NewNBT-System: true
  • Custom Book Items have been completely rewritten and now have a new structure.
    • Custom books now support JSON events #146.
    • Books support all PlaceholderAPI placeholders, as well as default ItemJoin internal placeholders.
    • NOTE; JSON events such as hover/etc will not work on MC 1.7 and below as Minecraft does not support it for books. (Text Components)


Example of a custom book item;
Code:
  book-item:
    id: WRITTEN_BOOK
    slot: 6
    name: '&c&nCreating a Book'
    author: '&bItemJoin'
    lore:
      - '&7'
      - '&7This magical book is given on join!'
    pages:
      1:
      - '&bYou can get this book on join!'
      - '&aThis book also supports &ccolor codes!'
      - ''
      - '&cHow do custom books work?'
      - ''
      - '&0You can set an &cauthor&0'
      - '&0as shown in the items.yml'
      - '&0I set it to &bItemJoin.'
      - ''
      - '<hover type="text" value="%player% of course!">"What is your name?"</hover>'
      2:
      - '&cHow do you create a new page?'
      - ''
      - '&0As displayed to the left in the items.yml'
      - '&0Create a number to specify the new page number.'
      - '&cMakesure you put each number in order as shown.'
      - '&cCreating new pages should be pretty'
      - '&cstraight forward for copying and pasting.'
      - '&bItemJoin &0by RockinChaos!'
    enabled-worlds: world


Removed:
  • The itemjoin.WorldName.* and itemjoin.WorldName.Name from the plugin.yml as it did nothing but cause issues with certain permission plugins.
    • Please note these permissions are still utilized by ItemJoin and in order to get items you will need to use these permissions as such; itemjoin.yourworldname.* or for specific items itemjoin.yourworldname.itemname.
    • I had removed these from the plugin.yml because they were just placeholder permissions that were just an example and aren't permanent permissions as they constantly change based on your worlds name and items name. These specific permissions are handled within ItemJoins code rather than the plugin.yml. I hope that makes sense..
  • The first-join.yml - If you already have a first-join.yml generated the old info will be converted to the database.db and no data will be lost.
    • All converted data will be backed up under /ItemJoin/backup encase a reversion was needed.
  • The ip-limit.yml - If you already have a ip-limit.yml generated the old info will be converted to the database.db and no data will be lost.
    • All converted data will be backed up under /ItemJoin/backup encase a reversion was needed.


Please see the documentation page if you need any help with these new updates!
If you have any ideas or requests that you would like to see in ItemJoin's future please submit a feature request.