Open momoservertw opened 4 years ago
Okay so currently I have added all requested features for no.3 (Recipes, Mobs-Drop. and Blocks-Drop) available in the latest snapshot for testing; http://ci.craftationgaming.com/job/ItemJoin/430/
Here is how you should set up each use-case (you can do this in the /itemjoin menu
WAY easier.)
mobs-item:
id: IRON_SWORD
slot: ARBITRARY
name: '&cStolen Sword'
lore:
blocks-item:
id: DIAMOND_BLOCK
slot: ARBITRARY
name: '&aSurprise!'
mobs-drop:
recipe:
recipe-item:
id: BEDROCK
slot: ARBITRARY
name: '&6Essence'
lore:
- '&7Shhhh don''t tell anyone...'
recipe:
# X Stands for Air, do NOT include X in the 'ingredients' below.
- 'XGX' # First row in the crafting table
- 'IDI' # Second row in the crafting table
- 'XGX' # Third row in the crafting table
ingredients:
# Format: LETTER:ITEMID
- 'G:GOLD_INGOT' # G Stands for Gold Ingot.
- 'I:IRON_INGOT' # I Stands for Iron Ingot.
- 'D:DIAMOND' # D Stands for Diamond, you can use any letter here and the ITEMID can be numerical.
triggers: DISABLED
Additional info can be found here; https://github.com/RockinChaos/ItemJoin/wiki/DevLog
Snapshot b509 now contains the requested (5. Better Commands). Link; http://ci.craftationgaming.com/job/ItemJoin/509/
Things to note; 1.) Shift-Middle-Click could not be implemented as it is never detected server or client-side. 2.) Creative Mode has been entirely separated from the commands and now has it's own command action since creative mode has been known to be buggy. Something to note about this though is that if this action is defined, any creative mode action will trigger the command as it cannot tell the difference between left/right-click, shifting, or middle-click. This is because MD_5 hardcoded creative mode to always output that the place is left-clicking.
Here are the current command actions, these changes are reflected in the DevLog.
multi-click
will no longer function.Interact
- Actions performed with the player's inventory closed, usually with the item in their hand.Inventory
- Actions performed with the player's inventory open, usually clicking the item with their cursor.left
or right
clicking a block
or the air
with the item in their hand.left
or right
clicking the air
with the item in their hand.left
or right
clicking a block
with the item in their hand.left
clicking a block
or the air
with the item in their hand.left
clicking the air
with the item in their hand.left
clicking a block
with the item in their hand.right
clicking a block
or the air
with the item in their hand.right
clicking the air
with the item in their hand.right
clicking a block
with the item in their hand.middle-mouse
, left
, right
, shift-left
, shift-right
clicking the item in their inventory.middle-mouse
clicking the item in their inventory.creative mode
and clicks
the item in their inventory, any click action
will trigger this event.left
clicking the item in their inventory.right
clicking the item in their inventory.shift-left
clicking the item in their inventory.shift-right
clicking the item in their inventory.swapping
the item on their cursor
with the item in their inventory.receives
the item for every x second(s) for every x number of times. holding
the item. equipping
the item into an armor slot
.unequipping
the item from an armor slot
.player holding
the item in their inventory dies
.steps on a pressure plate
, hits a mob
, opens a chest
, or any other physical actions with that item in the player's hand.Also note, commands-type
has been removed.
Another update, the Snapshot b603 now contains (6. Conditions for Each Command Execution) and (1. Custom disposable conditions.) as well as trigger-conditions
.
Link; https://ci.craftationgaming.com/job/ItemJoin/603/
These can be defined as a list or single object, the fail message is also optional. For the action to perform you only need to have met ONE of the conditions listed.
1.) Disposable conditions are exactly as described above, simply define them as such;
disposable-conditions:
- '%mypet_has_pet%:equal:true'
- '%other_placeholder%:notequal:VALUE'
- '%other_placeholder%:over:100'
- '%other_placeholder%:under:200'
disposable-fail-message: '&cYou need to summon your pet.'
I wasn't quite sure if you wanted this to PREVENT the command from executing, from what I can tell above is that you want it to execute but not consume under certain conditions so I made the consumption of the item independent from the command execution.
2.) Command conditions are also exactly as described above, however, they do not share a single fail message, you can define individual ones for each condition TYPE, such as interact-conditions
can have an interact-fail-message
or inventory-left
can have an inventory-left-fail-message
inventory-left-conditions:
- '%mypet_has_pet%:equal:true'
- '%other_placeholder%:notequal:VALUE'
- '%other_placeholder%:over:100'
- '%other_placeholder%:under:200'
inventory-left-fail-message: '&cYou need to summon your pet.'
3.) Triggers now can be defined with a condition, (these are shared so it is essentially the condition requirement to GET the item), the ij get
command respects these requirements.
trigger-conditions:
- '%mypet_has_pet%:equal:true'
- '%other_placeholder%:notequal:VALUE'
- '%other_placeholder%:over:100'
- '%other_placeholder%:under:200'
trigger-fail-message: '&cYou need to summon your pet.'
Enjoy!
Thanks for adding lots of feature~ The condition idea is very wonderful. But I test the interact condition is not work correctly.
This is the test video: https://youtu.be/ncw8pcXYayI
The test configuration: https://pastebin.com/4XRW6RYt
Paper version: git-Paper-439 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT) ItemJoin version: v5.1.1-SNAPSHOT-b603 (Video) ItemJoin version: v5.1.1-SNAPSHOT-b660
Wish you have a nice day. >.0
Thanks for adding lots of feature~ The condition idea is very wonderful. But I test the interact condition is not work correctly.
This is the test video: https://youtu.be/ncw8pcXYayI
The test configuration: https://pastebin.com/4XRW6RYt
Paper version: git-Paper-439 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT) ItemJoin version: v5.1.1-SNAPSHOT-b603 (Video) ItemJoin version: v5.1.1-SNAPSHOT-b660
Wish you have a nice day. >.0
Apologies, I completely forgot to implement Placeholder translation.
The latest snapshot should fix this issue. Please NOTE though, this snapshot contains major changes, notably I have refactored conditions to now end in an S such as interact-condition
is now interact-conditions
. This was done as it was confusing people since it is technically a listed object. Lastly, the commands
identifier was removed for listing commands.
So commands which resembled;
commands:
interact-right:
- 'player: deluxemenus open navigation4'
Should now look like;
interact-right:
- 'player: deluxemenus open navigation4'
Do make sure you implement proper YAML formatting as when you remove the commands
node there is two spaces in-front of the interact-right node you need to remove.
PS: Thanks for the donation from earlier, I updated the pages to reflect your new contribution amount :)
Link: https://ci.craftationgaming.com/job/ItemJoin/663/ Remember to remove your old ItemJoin.jar file.
Added custom foods as request in the latest snapshot. They use the existing system that the custom apples use so simply define them using the potion-effects
option.
Example; potion-effects: JUMP:2:120, NIGHT_VISION:2:400, GLOWING:1:410, REGENERATION:1:160
This will work for All consumable foods and for skull items.
Do note this previously was called potion-effect
but is now refactored to be potion-effects
Link; https://ci.craftationgaming.com/job/ItemJoin/716/ Remember to remove your old ItemJoin.jar file
Last up... better random commands!
ItemJoin is very powerful and efficiency now. There may no any important things to do. If you want to add more feature, you can look at it. Thank you for spending a lot of time updating ItemJoin.
~1. Custom disposable conditions.~ [ COMPLETED ] Only some situation will execute commands and consume that item. It can be very useful to create a special item for other plugin. For example, a pet skill ticket. If player has a pet, it will change his pet's skill. Otherwise it will show a failure message.
Some placeholder equal null. You need to check it, if the value equal "". %other_placeholder%:equal:
~2. More triggers.~ [ COMPLETED ]
3. Random commands. More custom way to select a command.
This is an example
~4. Custom food~ [ COMPLETED ] ItemJoin can custom the golden apple, but it will be more interesting if we can add any potion effect by click a custom item like a skull 'Apple Cake'. And using less CPU performance if we directly using the Spigot API, not commands. The potion effect's format could be the golden apple's.
~5. Better Commands~ [ COMPLETED ] I am using the menu plugin "BossShopPro" which has some great command types. You can refer to it~ The command type of inventory will be more abundant!
In addition, is it possible to add the "Middle-Click" when players use the mouse wheel. And it may be clearer to distinguish the Click action from the Inventory action?
~6. Conditions for Each Command Execution~ [ COMPLETED ] Examples;
fail-message: '&cYou need to summon your pet.'