Delay doesn't affect on respawn and on world change
llaurenss opened this issue ยท 24 comments
When I join a skywars game and leave the items are invisible and they become visible when i click on them.
Video:
https://www.youtube.com/watch?v=b1UrdgsjBJw&feature=youtu.be
This bug is really anoying but i understand if you can't fix it because the plugin isn't made for this.
Config:
#// <>==<>==<> ItemJoin's Custom Items On Join, by RockinChaos <>==<>==<> //#
#// See a list of variables for ItemJoin here: http://dev.bukkit.org/bukkit-plugins/itemjoin/pages/documentation //#
#// See https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html for item names! //#
#// See this enchantments page for the correct enchant name. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html //#
#// Need some more help with item slots? See the Documentations page for a more in-depth tutorial. http://dev.bukkit.org/bukkit-plugins/itemjoin/pages/documentation //#
#// For per-world support this best works with Multiverse-Inventories! http://dev.bukkit.org/bukkit-plugins/multiverse-inventories //#
#// Otherwise you will need to set clear-on-world-changed to true if you want to get the new items when you change worlds. //#
#// Then you will need to add give-on-modifiers (world-changed) to each item to receive the new items. //#
items-Version: 2
world-list: #// This is the list of worlds that have custom items on join. //#
- spawn
#// For every world listed in the world-list, you need to make a section for it. //#
spawn:
items:
Ranked-Item:
id: 276 #// Now supports item ID's! //#
slot: 0
data-value: 0
name: '&aRanked Selector'
commands:
- 'ranked'
commands-action: RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK, LEFT_CLICK_AIR, LEFT_CLICK_BLOCK
First-Join-Item: false
prevent-modifiers:
- 'placement'
- 'inventory-modify'
- 'death-drops'
- 'self-drops'
- 'cancel-events'
- 'item-damage-living'
- 'item-damage-blocks'
- 'AllowOpBypass'
- 'CreativeBypass'
give-on-modifiers:
- 'respawn'
- 'world-changed'
- 'AllowOpBypass'
- 'CreativeBypass'
Unranked-Item:
id: 272 #// Now supports item ID's! //#
slot: 1
data-value: 0
name: '&aUnranked Selector'
commands:
- 'unranked'
commands-action: RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK, LEFT_CLICK_AIR, LEFT_CLICK_BLOCK
First-Join-Item: false
prevent-modifiers:
- 'placement'
- 'inventory-modify'
- 'death-drops'
- 'self-drops'
- 'cancel-events'
- 'item-damage-living'
- 'item-damage-blocks'
- 'AllowOpBypass'
- 'CreativeBypass'
give-on-modifiers:
- 'respawn'
- 'world-changed'
- 'AllowOpBypass'
- 'CreativeBypass'
Leave-Item:
id: 35 #// Now supports item ID's! //#
slot: 2
data-value: 14
name: '&cLeave the waiting quene!'
commands:
- 'battle leave'
commands-action: RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK, LEFT_CLICK_AIR, LEFT_CLICK_BLOCK
First-Join-Item: false
prevent-modifiers:
- 'placement'
- 'inventory-modify'
- 'death-drops'
- 'self-drops'
- 'cancel-events'
- 'item-damage-living'
- 'item-damage-blocks'
- 'AllowOpBypass'
- 'CreativeBypass'
give-on-modifiers:
- 'respawn'
- 'world-changed'
- 'AllowOpBypass'
- 'CreativeBypass'
Sorry for the late reply, can you send your config.yml? I think this can be fixed from your side easily.
This seems like it needs to be more delayed because the SkyWars plugin is overriding ItemJoin (player.updateInventory()). If, in the config.yml the *Delay: * 2 is not set to 2 try setting it to 2 (seconds), otherwise try increasing the delay by 1 second and keep retrying to see how long it has to wait to give the items without them being invisible. I would have thought 2 seconds would be the butter spot for plugins such as SkyWars but the delay should not have to be any longer than 4 seconds. Let me know what you find out. This is not optimal but its currently the only work around with the SkyWars plugin,
The delay in the config is set to 2 seconds. And when i set it to 4 seconds it still spawns the items directly and the skywars plugin overriding the itemjoins items. The delay is only working on joining not on world changing i think.
sorry for my bad english
Here is my config:
#// <>==<>==<> ItemJoin's Settings, by RockinChaos <>==<>==<> //#
config-Version: 2
Language: 'English' #// English is currently the only support language at the moment! //#
CheckforUpdates: true #// Disable this if you dont want to be notified if there is an update. //#
PlaceholderAPI: false #// Only use this if PlaceholderAPI is installed on your server. Set to false else-wise. Required plugin restart when changed. //#
Multiverse-Core: false #// Using the Multiverse plugin? Enable this for complete use of all plugin features. Required plugin restart when changed. //#
Multiverse-Inventories: false #// Only used for plugin information. Set to false if you do not use it. Required plugin restart when changed. //#
#// Global-Settings for items. //#
Global-Settings: #// Global Settings, for each world listed under world-list. These will take effect in them. //#
Prevention:
prevent-pickups: false #// Prevents picking up of any item //#
AllowOPBypass: false #// Ignores these settings under Prevention if you are OP //#
CreativeBypass: false #// Ignores these settings under Prevention if you are in creative mode. //#
Clear-On:
clear-on-join: false #// Clears the players inventory upon entering the server. (Before items are given). //#
clear-on-world-change: false #// Clears the players inventory upon changing worlds. (Before items are given). //#
AllowOPBypass: false #// Ignores these settings under Clear-On if you are OP //#
First-Join:
FirstJoin-Mode-Enabled: false #// Set to true if you wish to use First-Join-Item: true per item! (This allows the use of the First Join options). //#
Get-Items:
ItemJoin-Specific-Items: true #// This meaning, these items are specific to ItemJoin and cannot be renamed to. Usually you would disable this if you had another plugin that hooks into ItemJoin items. //#
Delay: 2 #// Set to 0 to disable. Recommended is 2 especially if you use First-Join! (This is in Seconds.) //#
The delay is for everything not just getting item on join. Its for any time you receive items. Can you try even longer seconds like 10? lol I still do not understand how this plugin is overriding ItemJoin.
I have set the delay to 10 seconds and when i kill myself the items spawn immediately
https://www.youtube.com/watch?v=dcR_d0VvkUI&feature=youtu.be
same happens to world changing
https://youtu.be/Vnm68pnRMtA
The delay only affects when joining
https://youtu.be/bdveVCVJqW0
Nice trick, the delay is there. It exists and is coded in to work but its somehow... skipping it!? I have tested and I see this too. I will do some more testing and get back to you when I have a fixed SNAPSHOT build.
EDIT: Ah... Just noticed it.. It is using my old int format (division) instead of my new multiplication format. So instead of it being 10 seconds its being 10/1000 so 0.01 of a second... lawl. You would literally have to set the delay to be 10000 for it to be 10 seconds... The reason this is not the case for JoinItem is because it uses the new format.
I will have a snapshot for you ASAP!
http://www.mediafire.com/download/dy24xnw27lmdodd/ItemJoin.jar
ItemJoin v2.9-SNAPSHOT.
*Fixed > *
Clear-On-Changed-World.
Few bugs.
Delay issues with respawn & world-changed,
Fixed some case sensitivity issues.
Fixed some FirstJoin issues.
Sometimes when people are joining the server, the itemjoins items become normal items. this only happens when people join and i think is random.
I still do not understand what you are meaning. Do they not have custom lore set? Custom name? or it something else?
can you re-post your items.yml and config.yml in pastebin and send them too me. Also are there any console errors? What worlds are you trying to get the items to run commands in?
after a few secconds the items stop working sorry for my bad english D:
here is a video
https://www.youtube.com/watch?v=3K-Esod2kU0&feature=youtu.be
nothing shows up in the console
at 0:30 you can see that the items stop working
Interesting... If you are alone on the server (the last person to log in) do the items still work.
Do me a favor and try testing the items for a bit by yourself then have your friend join and then test the items yourself again. If they stop working when your friend logs in I think i know what the problem would be.
I tested it and you were right. When i am alone on the server the items are working. And when someone joins they stop working
Is this only with ItemJoin v2.9-SNAPSHOT? Or does this happen to v2.8 as well?
Oh my god.. Thank you so much for finding this bug. Turns out when I fixed FirstJoin for ItemJoin v2.8 I set it to clear the hash-map storing the players instead of removing the players on join. This has been corrected. The Media Fire download addresses this issue.
http://www.mediafire.com/download/f40dsczs2rkpurs/ItemJoin.jar
When I'm using multiverse-inventories and Trainingpvp and I join a game I get the itemjoins item in the game. This doesn't happen when i don't use multiverse-inventories.
video
https://youtu.be/jwEctQAdOKc
at 0:10 you can see that i have the itemjoins but i don't want that
Edit: for some reason when I die in that world using the trainingpvp plugin he will get the items in the wrong world
Sweet. If you have any other problems feel free to reopen this. Have a fantastic day!