ItemJoin Getting Started

Jul 4, 2018
ItemJoin Getting Started
  • [​IMG]


    If you feel like something is missing and needs to be added or clarified please Direct Message me and I will add it.

    If you are looking for features that have to do with hooking plugins into ItemJoin they have been moved, click here; https://www.spigotmc.org/wiki/api-hooks

    If you are having troubles setting up the items, you can put the item that you want to be given in your hand and type the command;
    /ItemJoin save <item-name> and it will save its self to the items.yml with a few default values to get you started!

    Note; Clear-Items: in the config.yml, All will clear any item in the player's inventory, ItemJoin will clear only ItemJoin items.
    [​IMG]

    How do you create an item?
    An Item is fairly simple to create, to create an item you must first list the world identifier. This is the name of the world that you want to receive these items in. The next identifier you must add is the item's identifier, to signify the creation of the items. Now you can simply list the name of the items you wish to create.

    The items must have an ID and SLOT to receive the item in game. You can also list the enabled-worlds you want each item in, or if you don't list the enabled worlds it will be given to all worlds by default. All of the features are optional and simply for greater configuration. Shown below is an example of creating three items.

    Here is an example of some items;
    Code (Text):
    items:
      any-text:
        id: 284
        slot: 0
        enabled-worlds: world_name_here, another_world_name
      another-item:
        id: SEEDS
        slot: 2
      wheat-item:
        id: WHEAT
        slot: 4
        enabled-worlds: world, world_nether, world_the_end
    Now I as I said you can add more options to your items to make them so much more custom.
    You can set a custom name, add lines of lore, enchantments, define custom permission nodes to receive the items, as well as the count/amount of each item you get. There is also an option to use data-value of an item, this is useful to get items such as wool.

    data-values are sometimes confusing as you would think you could just put it in the ID. Although you must put the data-value in its own section. Such as to get green wool you would need to set the ID to WOOL or 35, then set the data-value to 5 since green wool's data-value is 5.

    We also have durability, you set this to the amount of durability you want the item to have taken, such as if the item has 32 durability and you set the durability to 5 it will have 27 durability when you receive the item.

    Lastly, you can also 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 and If the item has a probability, only one of those items can be given. 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.


    [​IMG]

    Example of random items to be given (as shown in the example image);
    Code (Text):
    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


    As said all options are optional and can be removed if you do not want to use them in your item, you just must have the defining characteristics of an item, ID and Slot.

    Here is a list of all available options;
    Code (Text):
    items:
      ultra-item:
        id: DIAMOND_SWORD
        slot: 0
        name: '&bBlazefury'
        data-value: 0
        count: 1
        durability: 5
        lore:
          - '&7A god sword..'
          - '&7This is generations old!'
        commands:
          multi-click:
            - 'message: &eYou can send yourself custom messages!'
            - 'console: say You can even execute more than one command!'
            - 'player: say This is item slot 1'
            - 'say Hello world!'
          right-click:
            - 'console: gamemode 1 %player%'
            - 'message: &eYou have been set to creative mode.'
          left-click:
            - 'console: gamemode 3 %player%'
            - 'message: &eYou have been set to spectator mode.'
          multi-click-air:
            - 'message: &eThis will prevent commands from being executed when you click on blocks such as a sign.'
          right-click-air:
            - 'message: &eThis will prevent commands from being executed when you click on blocks such as a sign.'
          left-click-air:
            - 'message: &eThis will prevent commands from being executed when you click on blocks such as a sign.'
          inventory:
            - 'console: gamemode 2 %player%'
            - 'message: &eYou have been set to adventure mode.'
        enchantment: FIRE_ASPECT:3, DAMAGE_ALL:5, DAMAGE_UNDEAD:5, KNOCKBACK:8
        commands-type: interact, inventory
        commands-sequence: ALL, RANDOM
        commands-sound: BLOCK_NOTE_PLING
        commands-cost: 25
        commands-cooldown: 5
        cooldown-message: '&7[&eItemJoin&7] &a[%item%&a] &cis on cooldown for &a%timeleft% &cseconds..'
        probability: 25
        itemflags: inventory-modify, death-drops, unbreakable, disposable, count-lock, cancel-events, placement, hide-durability, hide-attributes, self-drops, first-join, CreativeBypass, AllowOpBypass
        triggers: join, respawn, world-change
        permission-node: 'itemjoin.ultra'
        enabled-regions: region1, region2
        enabled-worlds: world, world_nether, world_the_end
    How does the slot system work?
    The slot system consists of 35 Numerical slots and 6 Custom Name slots, 0 to 8 are the first 9 slots in your hot bar. Normally when you count you would not start with zero then count up from there, you would start with one. CraftBukkit / Spigot does not do this, they start out with zero first. So the first slot in your hot bar would really be slot zero.

    As for the physical inventory, the slot numbers start at the top left and increase to the right, as shown in the image below. Those slots are 9 to 35.

    To set an item in your armor slots you would simply type the name of the slot you would want it to be in. Helmet, Chestplate, Leggings, or Boots, If you want an item in your offhand you would do the same for this. Just put the slot as Offhand.

    There is also a slot option called Arbitrary, If an item is set to this, the item will be put in the FIRST available slot in the player's inventory, it will not remove any of the player's items in their inventory to place itself in that spot.

    You can also set multiple slots per item, just separate the slots by commas such as 1, 12, 13, Arbitrary, 3.


    Here is an example of the slots being used for various items;
    Code (Text):
    items:
     first-item:
       d: SKULL_ITEM
       slot: 0 #// This can be any number between 0 and 35, depending on the location you want it in the players inventory.
     second-item:
       id: DIAMOND_SWORD
       slot: Arbitrary
     helmet-item:
       id: DIAMOND_HELMET
       slot: Helmet
     chestplate-item:
       id: 299
       slot: Chestplate
     leggings-item:
       id: DIAMOND_LEGGINGS
       slot: Leggings
     boots-item:
       id: LEATHER_BOOTS
       slot: Boots
     offhand-item:
       id: SHIELD
       slot: Offhand
    [​IMG]


    How do I use the global items option?
    This is fairly simple to setup, all you have to do is add either All or Global to the enabled-worlds identifier. Then the items will be given in every world.

    Here is an example of global items;
    Code (Text):
    items:
      any-text:
        id: 284
        slot: 0
        enabled-worlds: Global
      wheat-item:
        id: WHEAT
        slot: 4
        enabled-worlds: All
     


    How do I setup and use commands?
    First off, we have to start by setting up the command actions. These will be the actions the player has to do to activate the commands.
    There are 4 types of executors: multi-click, right-click, left-click, inventory and physical.
    It is not recommended to use physical and it is disabled by default because this executes the command if a player steps on a pressure plate, hits a mob, opens a chest, or any other physical actions with that item in your hand it will run any commands it has.
    You can set it up as such to use all of the executors or you can remove the ones you don't want to use. See the example below for how the executors should be set up.

    As for the commands cooldowns, it is as simple as it gets! It sets the time in seconds that the items command will be on cooldown for. If the commands are on cooldown then it will send a cooldown message, sends the player the cooldown message when the item is on cooldown.

    There are also commands-sequence identifiers, you can 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".

    [​IMG]

    Example of a item with RANDOM commands (as shown in example image);
    Code (Text):
     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

    Finally, we have command instances. Commands can be executed by 4 instances; console, player, server, and message. If no instance is specified in the commands string, then by default it will be executed by the player.
    If you still do not understand what each do;
    console, executes the set command by console.
    op, executes the command as if the player executed it themselves, but ignoring all the permissions (as if they were Oped.
    player, executes the command as if the player executed it as themselves.
    server, sends the player to that directed server name. (Intended for use on switching server that are using BungeeCord).
    delay,
    executes the commands after this identifier, delayed by the specified amount of ticks.
    message, sends the player a custom message of your choosing.

    Here is an example of an item with a command;
    Code (Text):
    items:
      ultra-item:
        id: DIAMOND_SWORD
        slot: 0
        commands:
          multi-click:
            - 'message: &eYou can send yourself custom messages!'
            - 'console: say You can even execute more than one command!'
            - 'player: say I am executed by player'
            - 'op: say I am executed by player but I have all the permissions!'
            - 'delay: 100'
            - 'server: survival'
            - 'say I am executed by player since I dont have a executor...'
          right-click:
            - 'console: gamemode 1 %player%'
            - 'message: &eYou have been set to creative mode.'
          left-click:
            - 'console: gamemode 3 %player%'
            - 'message: &eYou have been set to spectator mode.'
          inventory:
            - 'console: gamemode 2 %player%'
            - 'message: &eYou have been set to adventure mode.'
        commands-type: interact, inventory
        commands-sequence: ALL, RANDOM
        commands-sound: BLOCK_NOTE_PLING
        commands-cost: 25
        commands-cooldown: 5
        cooldown-message: '&7[&eItemJoin&7] &a[%item%&a] &cis on cooldown for &a%timeleft% &cseconds..'
        enabled-worlds: world


    How do I set custom itemflags on an item?
    Itemflags allow HUGE modifications to the items. All you have to do to add itemflags to an item is adding the itemflags identifier to the item as shown below.

    These are custom itemflags, all itemflags with description are listed below, Itemflags are always being updated and added onto so check back here for updates!

    Currently available itemflags:
    vanilla - Allows the giving of default unmodified no-name 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.
    first-join - This will only give the item when joining the server for the first time, to get the item every time you join just remove this itemflag.
    ip-limit - This will only give the item after checking the IP of a player, so if someone has already joined and then joins with an alt the alt will not get the item, preventing players from loading up on free items. This will limit the item to the players IP address.
    unbreakable - Set the item as INDESTRUCTIBLE!
    hide-attributes - Hides ALL attributes, such as firework color, damage the item does, enchantments. (Hides everything from lore except the custom lore).
    hide-durability - Hides the durability bar from the item.
    placement - Prevents this item from being placed if it is a BLOCK, or if the item is being placed in an item-frame.
    inventory-modify - Prevents this item from being moved, placed in an item frame, or switched to offhand in the player's inventory.
    dynamic - This will allow the item to dynamically update every 100 ticks by default, changing any previous placeholder values to the now up-to-date values. See how to setup dynamic items below.
    animate - This will allow the item to animate between different name and lore iterations every 100 ticks by default, you can make the name of the item and/or the lore to anything you could want, between a different name entirely or just changing the color codes to create a cool effect. See how to setup animated items below.
    item-store - Prevents the storage of the item in a trapped chest, chest, enderchest, hopper, anvil, crafting table, shulker box, furnace, item frame, and minecart with chest.
    cancel-events - Prevents player from opening a chest while this item is in hand or any open-able items. Useful for canceling the event of opening a book to set custom book items.
    count-lock - Prevents the player from using all of the items. If the item is set to count: 32 then each time the player places the block item the stack will be refreshed back to 32.
    death-drops - Clears this item if it is dropped on the ground when the player dies.
    self-drops - Prevents the player from dropping this item, either clicking it out of inventory or using the drop key, usually (q).
    disposable - If a command is run from the item it will remove x1 of the item from the player's inventory.
    AllowOpBypass - This would allow the user IF THEIR OP to bypass most of these itemflags. It will work on ALL non-item modifying flags. This would NOT work on unbreakable, hide-attributes, stuff like that.
    CreativeBypass - This would allow the user IF THEY'RE IN CREATIVE MODE to bypass most of these itemflags. It will work on ALL non-item modifying flags. This would NOT work on unbreakable, hide-attributes, stuff like that.

    Here is an example of an item with all itemflags;
    Code (Text):
    items:
      ultra-item:
        id: DIAMOND_SWORD
        slot: 0
        itemflags: first-join, unbreakable, hide-attributes, hide-durability, placement, inventory-modify, cancel-events, count-lock, death-drops, self-drops, disposable, AllowOpBypass, CreativeBypass
        enabled-worlds: world
    How do I set custom triggers on an item?
    Triggers allow you to receive the items under certain conditions. All you have to do to add a trigger to an item, is add the triggers identifier to the item as shown below. If a trigger is not defined, the item will be given upon joining the server by default.

    These are custom triggers, all triggers with description are listed below.

    Current available triggers:
    join - This will give the item when the player logs into the server.
    respawn - This item will be given on respawn if a player dies.
    world-change - This item will be given when the player changes worlds. When you enter the world this item is allowed in it will be given.
    region-enter - This will give the item upon entering a region and remove it upon exiting, you must have WorldGuard set to true and have enabled-regions listed for the item.
    region-remove - This will remove the item upon entering a region and add it back upon exiting, you must have WorldGuard set to true and have enabled-regions listed for the item.
    disabled - This will prevent the item from being given on join, respawn, world-change, and region-enter. This is helpful if you only wish to get the item using /itemjoin get <item>.

    Here is an example of an item with all itemflags;
    Code (Text):
    items:
      ultra-item:
        id: DIAMOND_SWORD
        slot: 0
        triggers: join, respawn, world-change, region-enter
        enabled-regions: region1, region2
        enabled-worlds: world
      second-item:
        id: PAPER
        slot: 1
        triggers: disabled
        enabled-regions: region1, region2
        enabled-worlds: world
     

    Custom Placeholders by ItemJoin?
    These placeholders can be used in anything to do with ItemJoin, whether it is an items name/lore/command/etc. These are independent and added by ItemJoin, if you wish to have additional placeholders you will need to install and enable PlaceholderAPI in the config.yml.

    These placeholders I have added I call internal placeholders as they are only accessible by ItemJoin;
    %player% - Displays the player's current display name.
    %argsplayer% - Displays the other player's current display name for specific lang.yml messages.
    %argsplayer_world% - Displays the other player's current world for specific lang.yml messages.
    %player_kills% - Displays the player's current player vs player kill count.
    %mob_kills% - Displays the player's current mob kill count.
    %player_deaths% - Displays the player's current death count.
    %player_location% - Displays the player's current location (x, y, z).
    %player_health% - Displays the player's current health.
    %player_food% - Displays the player's current food level.


    How do I create Custom Books!?
    Custom books can get a bit complicated and tricky so bare with me.
    To begin creating your custom book you must set the ID to WRITTEN_BOOK. It must be that, it cannot be anything else. You have the option of adding an author if you would like by adding the author identifier.


    The way books are created have been completely rewritten, so now it is a lot easier. It is super simple, just like defining commands, however you will need to create an identifier for each page, below I used numbers to show that. Then you just have to list the page lines as you want.

    Custom books also support JSON events, along with support for 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)

    Simply to create a hover event, take the example event below and fill in the value to be what is shown when the player hovers above the text, then after that replace the text "What is your name?" with the custom text you wish to appear on the page. This line of text will be the one you have to hover on to show the value text.

    Example of a hover JSON event;
    Code (Text):
    <hover type="text" value="%player% of course!">"What is your name?"</hover>
    [​IMG]

    Here is an example of a custom book item;
    Code (Text):
    items:
      book-item:
        id: WRITTEN_BOOK
        slot: 0
        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!'
    How do I create custom fireworks?
    Your custom firework item's ID must be FIREWORK. If it is not this will not work.
    Each firework must have the firework identifier as shown below.
    You must specify what firework type you would like your firework to be. The available firework types are; BALL, BALL_LARGE, BURST, CREEPER, STAR.

    You also have the option of enabling / disabling flicker and trail from your firework. Flicker is if you want the particles after the explosion to sparkle and fade out. Trail is if you want your firework to leave a trail of misty smoke behind the fireworks path of trajectory.

    Next you must specify the power, the power represents the distance the firework will travel before it will explode. For example, 1 is fairly close to the ground, 2 is fairly high in the sky. It is recommended that you keep the power BELOW 2, as it will get really high up into the sky if it is set any higher than 2.

    Finally you must set the color identifier. Within the color identifier you can add as many colors as you want! These colors must be Dye colors. There available dye colors are; BLACK, BLUE, BROWN, CYAN, GRAY, GREEN, LIGHT_BLUE, LIME, MAGENTA, ORANGE, PINK, PURPLE, RED, SILVER, WHITE, YELLOW.
    You can see the list of dye colors here.

    Here is an example of a custom firework item;
    Code (Text):
    items:
      firework-item:
        id: FIREWORK
        slot: 0
        firework:
          type: CREEPER
          flicker: true
          trail: true
          power: 1
          colors: GRAY, WHITE, PURPLE, SILVER, GREEN


    How do I create custom maps?
    Custom maps are really simple and easy to setup! All you need to do is set the ID to MAP and add the custom-map-image identifier as shown below.

    Just put the image you want to be displayed on your map in the local ItemJoin folder, where the config files are located, and replace the default.png with the name of the png file.

    You must also set a map-id to the item, this id can only be 1 - 29. If it is above or below it will cause errors! If you have multiple custom maps you must set them to have different map-id's.

    NOTE: The map image must be NO LARGER than 128x128 pixels, this is a perfect fit for the map size. The image file you use must also be PNG.

    Here is an example of a custom map item;
    Code (Text):
    items:
      map-item:
        id: MAP
        slot: 0
        map-id: 1
        custom-map-image: 'default.png'

    How do I create custom skulls, (Player Heads)?
    Custom Player Heads are super simple to setup. Set the ID to SKULL_ITEM, and set the data-value to 3. The data-value being 3 means it is a player head.

    Finally just add the skull-owner identifier as shown below and put the name of the player you want to be displayed on the skull. In the example a placeholder %player% is shown. This means the player that gets the skull in their inventory will show their own skin! So everyone gets their own skull, with their own skin!

    Here is an example of a custom skull item;
    Code (Text):
    items:
      skull-item:
        id: SKULL_ITEM
        slot: 0
        name: '&b%player%'
        skull-owner: '%player%'
        data-value: 3

    How do I create my own custom skull textures, (Skull Textures)?
    Custom Skull Textures are super simple to setup, they work almost identically to Custom Player Skulls. Set the ID to SKULL_ITEM, and set the data-value to 3. The data-value being 3 means it is a player head.

    Finally just add the skull-texture identifier as shown below and put the texture code (encoded in Base64) that you want to be displayed on the skull.

    My system mainly works off of http://minecraft-heads.com, however, it will work for any URL as long as its encoded in Base64, as shown in the screenshots minecraft-heads.com already supplies the needed texture for you so not many people will have to worry about it. If you are using a skull-texture do not define a skull-owner, otherwise the item will not be given.

    Here is a random head I found at; minecraft-heads.com, copy the code supplied from them.

    [​IMG]

    This is the code I copied all spaced out so you can see what everything is.
    [​IMG]

    This is what you need from the code highlighted in red. Make sure you copy this.

    [​IMG]

    Paste the code as shown below into the skull-texture identifier.
    [​IMG]

    Shown working with the Cauldron as well as another random skull texture I found.
    [​IMG]

    Here is an example of a custom skull item using skull textures;
    Code (Text):
    items:
      skull-item:
        id: SKULL_ITEM
        slot: 0
        skull-texture: 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMGZlMzFlYWE4YThhZDhkZDhkN2FiOTZhODQyMzI5MDUzOWQzODdkODJkNDI2ODcwMWVjNjlkNDFhMWZjIn19fQ=='
        enabled-worlds: world, world_nether, world_the_end
        data-value: 3

    How do I create custom arrows?
    Custom Arrows are meant for making Tipped Arrows, these are the new 1.9 arrows with potion effects.
    All you have to do is set the id to TIPPED_ARROW, and add the potion-effect identifier, which is the effect given off by the arrow, the power; strength of the arrows potion effect, the default is 1 and there is no limit that I have found, Lastly would be the time; this is the time in seconds that the arrows effect will have on the target it is on in seconds, the default is set to 20 seconds. So formatting would look like this; Effect:LevelOfEffect:DurationInSeconds you can see below I did Wither 1 with 20 seconds of duration.

    Here is an example of a custom arrow item;
    Code (Text):
    items:
      arrow-item:
        id: TIPPED_ARROW
        slot: 0
        count: 16
        potion-effect: WITHER:1:20

    How do I create custom firework charges?
    This is a very simple feature but you can easily change the color of a firework charge using ItemJoin!
    Simply set the id to FIREWORK_CHARGE and add charge-color: ColorName and the firework charge will spawn in with that color.

    Here is an example of a custom firework charge item;
    Code (Text):
    items:
      charge-item:
        id: FIREWORK_CHARGE
        charge-color: BLUE
        slot: 0
        potion-effect: WITHER:1:20

    How do I create custom potions?
    Custom potions are simple to create. You just need to set the ID to POTION, SPLASH_POTION, or LINGERING_POTION and add the potion-effect identifier. Formatting goes as such Effect:LevelOfEffect:DurationInSeconds as you can see below I did Jump level 2 with 120 seconds of time applied to you upon drinking it.

    List of Potion Effect Types; Click here

    Here is an example of a custom potion item;
    Code (Text):
    items:
      potion-item:
        id: POTION
        slot: 0
        potion-effect: JUMP:2:120, INCREASE_DAMAGE:3:150, REGENERATION:1:160

    How do I create custom golden apples?
    Custom golden apples are apples that have custom potion effects. These work with both golden apples and notch apples. Just add the potion-effect identifier like the custom potions. Formatting goes as such Effect:LevelOfEffect:DurationInSeconds as you can see below I did Jump level 2 with 120 seconds of time applied to you upon drinking it.

    Here is an example of a custom golden apple item;
    Code (Text):
    items:
      golden-apple-item:
        id: GOLDEN_APPLE
        slot: 0
        potion-effect: JUMP:2:120, NIGHT_VISION:2:400, GLOWING:1:410, REGENERATION:1:160

    How do I create custom banners?
    To create custom banners, all you have to do is set your item's id to BANNER and add the banner-meta identifier as shown below.

    Format for the banner meta works as such, COLOR:PATTERN. You can add multiple Colors and Patterns to create some amazing effects, just separate them by commas. You can create almost anything if you set them in the right order.

    [​IMG]

    Here is the Banner Meta used to create the banner in the images;
    Code (Text):
        banner-meta: RED:HALF_HORIZONTAL, BLACK:RHOMBUS_MIDDLE, RED:STRIPE_TOP, WHITE:STRIPE_BOTTOM, BLACK:STRIPE_MIDDLE, WHITE:CIRCLE_MIDDLE

    Here is an example of a custom banner item;
    Code (Text):
    items:
      banner-item:
        id: BANNER
        slot: 0
        banner-meta: BLUE:BASE, WHITE:CREEPER
        enabled-worlds: world, world_nether, world_the_end

    How do I create custom dyed leather armor?
    Coloring leather armor is as simple as setting the id to leather helmet/chest/leggings/boots. Then just add the leather-color identifier as shown below.
    Format for changing leather color is leather-color: COLOR.

    Here is an example of a custom dyed leather armor item;
    Code (Text):
    items:
      leather-helmet:
        id: LEATHER_HELMET
        leather-color: BLUE
        slot: 0

    How do I create custom dynamic item?
    Dynamic items are items that update periodically when there is a change to the item(s) name or lore, that being mostly to do with placeholders, these could also be interpreted as "live" items.

    Creating an updating item is a little complex but becomes easier once you learn how to do the proper formatting. First off you will need to add the itemflag dynamic to the item. Once you do this you must specify a delay. If no delay is specified then the default delay will be 100 ticks which is every 5 seconds. If you want the name to update simply add <delay:TimeInTicks> to the beginning of the name you specified for the item. If you want to update the lore as well you will need to place <delay:TimeInTicks> in the first line of lore only, not in the additional lines. The name and lore can update at different ticks being completely independent of each other. Keep in mind that 20 ticks are equal to 1 second(s).

    Say I want to update the amount of players that are online every 120 ticks which is every 6 seconds. I would add <delay:120> at the beginning of the name shown in the example below. As you can see the <delay:120> does not actually appear in the items name.

    Next I want to update the current server up-time and players online every 20 ticks which is every 1 second(s), I would add <delay:20> to only the first line of the item's lore. As you can see shown in the GIF below it seamlessly updates the items lore counting the server's update up every second as if it was a clock.

    Note:
    If you have to update the item any faster (less than) 20 ticks and you are running Spigot, you will need to edit your spigot.yml in your server folder and set item-dirty-ticks to 1, this limitation does not exist in CraftBukkit so you will not have to worry about it. Also the lower you set the ticks the harsher it could be on your server performance, this has not been proven but logically it will depend on your server specs, if you have a computer with decent specs then you will be fine. It is not recommended to set your ticks any lower than 3 ticks otherwise there could be a decrease in server performance.

    Here is an example of a custom dynamically updated item;
    Code (Text):
    items:
      dynamic-item:
        id: WATCH
        slot: 0
        name: '<delay:120>&a%server_online% Player(s) Online'
        lore:
          - '<delay:20>&7Current Server Uptime Is; %server_uptime%'
          - '&7%server_online% player(s) online.' #// This line does not need a delay, as the delay is uses it the first line of the lore (above).
        itemflags: dynamic, inventory-modify, hide-attributes
        enabled-worlds: world, world_nether, world_the_end
    [​IMG]


    How do I create custom animated item?
    Animated items are items that update periodically when there is a change to the item(s) name or lore, the name and lore can change to anything you desire after each delay!

    Animated items are based off a similar structure as dynamic items, however these items can switch between the different name and lore iterations. First you are going to want to add the itemflag animate or animated to your item. Next you will want to create at least two lines in the name to iterate through, as shown below I had done 12 lines. I used numbers as an example since they are cleaner but you can call the line what ever you want just like the item's identifier structure. In each line specify a delay, if no delay is specified it will default to 100 ticks which is every 5 seconds. Simply add <delay:TimeInTicks> to the beginning of the name you specified for the item. If you want to animate the lore as well you will need to place <delay:TimeInTicks> in the first line of lore only for each iteration, not in the additional lines. The name and lore can animate at different ticks/speeds being completely independent of each other. Keep in mind that 20 ticks are equal to 1 second(s).

    Below you can see the new structure for changing the name and lore. Each line has a delay of 3 ticks, this delay takes effect after the first delay/name change. So say you are going from name 1: to name 2:, the delay would be the original delay + the 2nd delay, making it so the 2nd name change will take effect 3 ticks after the first name change is applied.

    Note: If you have to animate the item any faster (less than) 20 ticks and you are running Spigot, you will need to edit your spigot.yml in your server folder and set item-dirty-ticks to 1, this limitation does not exist in CraftBukkit so you will not have to worry about it. Also the lower you set the ticks the harsher it could be on your server performance, this has not been proven but logically it will depend on your server specs, if you have a computer with decent specs then you will be fine. It is not recommended to set your ticks any lower than 3 ticks otherwise there could be a decrease in server performance.

    Here is an example of a custom dyed leather armor item;
    Code (Text):
    items:
      animated-item:
        id: COMPASS
        slot: 0
        name:
          1: '<delay:3>&f&lSearch'
          2: '<delay:3>&b&lS&f&learch'
          3: '<delay:3>&b&lSe&f&larch'
          4: '<delay:3>&b&lSea&f&lrch'
          5: '<delay:3>&b&lSear&f&lch'
          6: '<delay:3>&b&lSearc&f&lh'
          7: '<delay:3>&b&lSearch'
          8: '<delay:3>&f&lS&b&learch'
          9: '<delay:3>&f&lSe&b&larch'
          10: '<delay:3>&f&lSea&b&lrch'
          11: '<delay:3>&f&lSear&b&lch'
          12: '<delay:3>&f&lSearc&b&lh'
        lore:
          1:
          - '<delay:3>&f&lColors!!!'
          2:
          - '<delay:3>&c&lC&f&lolors!!!'
          3:
          - '<delay:3>&c&lC&a&lo&f&llors!!!'
          4:
          - '<delay:3>&c&lC&a&lo&5&ll&f&lors!!!'
          5:
          - '<delay:3>&c&lC&a&lo&5&ll&3&lo&f&lrs!!!'
          6:
          - '<delay:3>&c&lC&a&lo&5&ll&3&lo&1&lr&f&ls!!!'
          7:
          - '<delay:3>&c&lC&a&lo&5&ll&3&lo&1&lr&e&ls&f&l!!!'
          8:
          - '<delay:3>&c&lC&a&lo&5&ll&3&lo&1&lr&e&ls&d&l!&f&l!!'
          9:
          - '<delay:3>&c&lC&a&lo&5&ll&3&lo&1&lr&e&ls&d&l!&a&l!&f&l!'
          10:
          - '<delay:3>&c&lC&a&lo&5&ll&3&lo&1&lr&e&ls&d&l!&a&l!&2&l!'
          11:
          - '<delay:3>&f&lC&a&lo&5&ll&3&lo&1&lr&e&ls&d&l!&a&l!&2&l!'
          12:
          - '<delay:3>&f&lCo&5&ll&3&lo&1&lr&e&ls&d&l!&a&l!&2&l!'
          13:
          - '<delay:3>&f&lCol&3&lo&1&lr&e&ls&d&l!&a&l!&2&l!'
          14:
          - '<delay:3>&f&lColo&1&lr&e&ls&d&l!&a&l!&2&l!'
          15:
          - '<delay:3>&f&lColor&e&ls&d&l!&a&l!&2&l!'
          16:
          - '<delay:3>&f&lColors&d&l!&a&l!&2&l!'
          17:
          - '<delay:3>&f&lColors!&a&l!&2&l!'
          18:
          - '<delay:3>&f&lColors!!&2&l!'
          19:
          - '<delay:3>&f&lColors!!!'
        itemflags: animate, death-drops
        triggers: join
        enabled-worlds: world

    Better example item;
    Code (Text):
      animated-item:
        id: SIGN
        slot: 0
        name:
          1: '<delay:20>&f&lStatistics'
          2: '<delay:40>&e&lS&f&lt&e&la&f&lt&e&li&f&ls&e&lt&f&li&e&lc&f&ls'
          3: '<delay:20>&b&lS&f&lt&b&la&f&lt&b&li&f&ls&b&lt&f&li&b&lc&f&ls'
          4: '<delay:40>&a&lS&f&lt&a&la&f&lt&a&li&f&ls&a&lt&f&li&a&lc&f&ls'
          5: '<delay:20>&d&lS&f&lt&d&la&f&lt&d&li&f&ls&d&lt&f&li&d&lc&f&ls'
          6: '<delay:40>&e&lS&f&lt&e&la&f&lt&e&li&f&ls&e&lt&f&li&e&lc&f&ls'
        lore:
          1:
          - '<delay:60>&cMob Kills: %mob_kills%'
          - '&cPlayer Kills: %player_kills%'
          2:
          - '<delay:60>&cDeaths: %player_deaths%'
          - '&cYour Location: %player_location%'
          3:
          - '<delay:60>&cHealth: %player_health%'
          - '&cFood Level: %player_food%'
        itemflags: death-drops, animate
        triggers: join, respawn, world-change
        enabled-worlds: world, world_nether, world_the_end
    (Note to self replace gif with a better gif xD).
    [​IMG]
  • Loading...
  • Loading...