Major bug fixes, new features, and large optimizations.
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);
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);
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 (Text):
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 (Text):
items-Overwrite: world, world_the_end
Example of disabling all item overwrites in all worlds;
Code (Text):
items-Overwrite: false
Example of enabling all item overwrites in all worlds;
Code (Text):
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 (Text):
NewNBT-System: true
Custom Book Items have been completely rewritten and now have a new structure.
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 (Text):
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.