API / Hooks

Feb 24, 2018 at 8:24 PM
API / Hooks
  • [​IMG]


    If you have any questions about anything feel free to send me a Direct Message.

    How does TokenEnchant work?
    Currently, setting TokenEnchant to true in your config.yml gives you access to the following;

    You can add any TokenEnchantment to the correct/corresponding item it is allowed to be placed on,
    TokenEnchantments work the same way as regular/default Minecraft enchants for ItemJoin it just simply piggybacks off the already created system.

    Using the already provided enchantments identifier you can create an item with several TokenEnchantments as such;

    Code (Text):
        enchantment: TokenEnchantName:PowerLevel, TokenEnchantName:PowerLevel, TokenEnchantName:PowerLevel, TokenEnchantName:PowerLevel
    You can even use regular Minecraft enchantments at the same time for example;

    Code (Text):
        enchantment: EXPLOSIVE:3, DISK:2, ARROW_DAMAGE:3, DAMAGE_ALL:5
    As you can see I have two token enchantments as well as two default Minecraft enchantments all on one item. The first two enchants as you can see are the token enchantments.

    Here is an example of these enchants on an item;
    Code (Text):
    items:
      any-text:
        id: BOW
        slot: 0
        enchantment: EXPLOSIVE:3, DISK:2, ARROW_DAMAGE:3, DAMAGE_ALL:5
        enabled-worlds: world_name_here, another_world_name


    How does PlaceholderAPI work?
    How do Placeholders work?
    ItemJoin supports PlaceholderAPI, meaning it can hook into the plugin and use those placeholders! You can use ANY of these placeholders, in all parts of ItemJoin. Such as, skull-owner, name, lore, book pages, commands, cooldown-messages, and more! Placeholders will be supported by all parts of ItemJoin!!

    If you do not use PlaceholderAPI, ItemJoin currently only has two placeholders by default; which is %player% and %hitplayer%. This will be expanded upon in the future but it is highly recommended that you use PlaceholderAPI, as it is so useful and has so many features!


    How does WorldGuard work?
    How can I get items in a certain region?

    ItemJoin supports WorldGuard, meaning that you can hook into the plugin and use certain regions. If you want to receive items upon entering, joining, respawning into that region it's really simple. Items that are given upon entering the region will be removed upon exiting it.

    You have to set WorldGuard to true in the config.yml, then set the enabled-regions per item, you can set multiple regions separated by commas. Lastly, you have to set the triggers to region-enter. You can make your items multipurpose saying you can receive them on join anywhere but you can also get them when entering a region, see the available triggers above to set up more than just a region-enter trigger.

    Here is an example of several items you can get when entering/joining into/respawning into region1 and region2;
    Code (Text):
    items:
     first-item:
       d: SKULL_ITEM
       slot: 0
       triggers: region-enter
       enabled-regions: region1, region2
     second-item:
       id: DIAMOND_SWORD
       slot: Arbitrary
       triggers: region-enter
       enabled-regions: region1, region2
     helmet-item:
       id: DIAMOND_HELMET
       slot: Helmet
       triggers: region-enter
       enabled-regions: region1, region2
     chestplate-item:
       id: 299
       slot: Chestplate
       triggers: region-enter, join, respawn, world-change
       enabled-regions: region1, region2
     leggings-item:
       id: DIAMOND_LEGGINGS
       slot: Leggings
       triggers: region-enter, join, respawn, world-change
       enabled-regions: region1, region2
     boots-item:
       id: LEATHER_BOOTS
       slot: Boots
       triggers: region-enter
       enabled-regions: region1, region2
    How can I remove items when entering a certain region?
    Using the settings for getting the items when entering a region all you have to do to remove an item when entering a region is to add the region-remove trigger. It is pretty simple.. You can also remove certain items in specific regions as well as give certain items in specific regions at the same time.

    This will remove the item upon entering a region listed under enabled-regions on the item then give the item back upon exiting the region.


    Example of removing items;
    Code (Text):
    items:
     first-item:
       d: SKULL_ITEM
       slot: 0
       triggers: region-remove
       enabled-regions: region1, region2
     second-item:
       id: DIAMOND_SWORD
       slot: Arbitrary
       triggers: region-remove
       enabled-regions: region1, region2



    How does HeadDatabase work?

    HeadDatabase is pretty simple to setup, this allows access to a whole lot of head textures, just simply set HeadDatabase to true in the config.yml.

    The only thing you have to do to get a custom HeadDatabase skull is to set the id of the item to SKULL_ITEM and add the line skull-texture: 'hdb-<head id>'.

    Example;
    Code (Text):
    items:
      skull-item:
        id: SKULL_ITEM
        slot: 0
        skull-texture: 'hdb-4320'
        enabled-worlds: world, world_nether, world_the_end



    How does Vault work?
    You can hook into vault to use your economy on ItemJoin's commands.
    Vault can be used to define the cost of running and ItemJoin command, and if you do not have enough in your balance you will receive an error message. This is one of the most simple API's to use. Simply add commands-cost: # to the item you want to charge a cost for running that command. Now every time a player runs that command it will attempt to withdraw that amount from their balance. In the example item below the user is charged $25 from their economy balance for sending themselves a message.

    Example;
    Code (Text):
    items:
      ultra-item:
        id: DIAMOND_SWORD
        slot: 0
        commands:
          multi-click:
            - 'message: &eYou were just charged to send yourself a message... How do you feel..?'
        commands-type: interact
        commands-cost: 25
        enabled-worlds: world

    How does AuthMe work?
    There is nothing here that the user needs to configure, just set AuthMe to true in the config.yml of ItemJoin.
    Items will be given after the player types the login command and fully registers to AuthMe.


    How does Multiverse-Core work?
    There is nothing here that the user needs to configure, just set Multiverse-Core to true in the config.yml of ItemJoin.
    This is only used for Multiverse-Inventories. ItemJoin already has multi-world support without this.


    How does Multiverse-Inventories work?
    There is nothing here that the user needs to configure, just set Multiverse-Inventory to true in the config.yml of ItemJoin.
    Easily set world inventories using ItemJoin. You can make it so you get the items on join and world change without clearing the players inventory! Very helpful with ItemJoin inventory management.


    How does PerWorldInventory work?
    There is nothing here that the user needs to configure, just set PerWorldInventory to true in the config.yml of ItemJoin.
    Easily set world inventories using ItemJoin. You can make it so you get the items on join and world change without clearing the players inventory! Very helpful with ItemJoin inventory management. I have recently seen this plugin start to pop up everywhere and it seems like an amazing alternative to Multiverse-Inventories.


    How does PerWorldPlugins work?
    There is nothing here that the user needs to configure, just set PerWorldPlugins to true in the config.yml of ItemJoin.
    It is not recommended to use this since ItemJoin is disabled in any world that are not defined under world-list but, ItemJoin does support PerWorldPlugins if you happen to have it running on your server for some reason and ItemJoin will be disabled in worlds that are not allowed by PerWorldPlugins and will not have any conflictions or errors.


    How does xInventories work?
    There is nothing here that the user needs to configure, just set xInventories to true in the config.yml of ItemJoin.
    Easily set world inventories using ItemJoin. You can make it so you get the items on join and world change without clearing the players inventory! Very helpful with ItemJoin inventory management.


    How does MyWorlds work?
    There is nothing here that the user needs to configure, just set MyWorld to true in the config.yml of ItemJoin.
    This is similar to Multiverse-Core, it will allow easy multi-world support, no real benefit or harm to ItemJoin.


    How does BetterNick work?
    There is nothing here that the user needs to configure, just set BetterNick to true in the config.yml of ItemJoin.
    If items for some reason end up breaking and you use this plugin, setting this to true could resolve issues with items not working properly. This allows ItemJoin to easily find your original player name and UUID if you are nicknamed using BetterNick.
  • Loading...
  • Loading...