Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Asleepp edited this page Jun 12, 2024 · 4 revisions

Very Brief Advice

If you haven't already, It's highly suggested that you have some experience with Skript before reading this guide, If you truly see an issue, like a Critical error in your console, please report it in the Issues tab of this repository :)

Now then, onto the basics.

Getting a Custom Item

In skript-itemsadder, getting an item made from ItemsAdder is very easy:

Heres an example of how you would do it:

command giveitem:
    trigger:
        give player itemsadder item "namespace:id"

Its that simple.

You may also notice the namespace:id in a string, this is the id of the item from ItemsAdder, you'll see this method appear in a lot of other places all around the addon. Remember that you MUST provide your namespace AND id, otherwise it will not work.

If you would like to find your namespace/id, you may use the in-game /iagive [...] commands, or checking the configuration of the item/font image/etc.

Getting a Font Image

It's practically the exact same thing, execpt... *drum roll please*... You do it for a font image instead!

If you're still confused, here's an example:

command jumpscare <player>:
   trigger:
       send font image "jumpscare:boo" to arg-1

Wow! How simple was that?

skript-itemsadder 1.6 and above

But, hey, whats this? If you're using skript-itemsadder 1.6 and above, the plugin will actually automatically generate an item alias for you upon loading the addon, which you can edit in the aliases.yml that the plugin also generates upon startup.

Unfortunately, ItemsAdder only provides me a method to get the items, and nothing else. So, you are going to be using strings for font images :(

And of course, you'll still be able to use strings to get your items. Using aliases is optional (but looks a lot better). However, this may change in the future.

Events.

Ah, events, we love them. and skript-itemsadder has many of them. Although they might all look the same, they actually do various different things in the world of ItemsAdder, but first we shall cover the custom block based events.

Custom Block Break

Just judging from the name alone, it should be pretty obvious what this event is looking for. This event calls when a custom block has been broken in the world. Heres an example:

on break of custom itemsadder block:
   send "Wow! You broke a custom block" to player

You may also specify a block in the syntax to make it so the event doesn't listen to all the blocks being broken. Heres another example, except we specify the block that the event listens for:

on break of custom itemsadder block "itemsadder:sapphire_ore":
   if player's tool isn't netherite pickaxe:
       cancel event 
       send "&cWoah! You can't mine this without a Netherite Pickaxe." to player

Custom Block Interact

Just like the last one, this event is easily distinguishable by name, and should be pretty obvious what it does. It listens for whenever something interacts with a custom block. Heres an example:

on interact with itemsadder block:
   send "Wow! You just interacted with a custom block" to player

Just like the last one, You may also specify a block in the syntax to make it so the event doesn't listen to all the blocks being interacted with.

on interact with itemsadder block "itemsadder:grove_log":
   give player 4 of itemsadder item "itemsadder:grove_planks"

But, unlike the last one, you can use a seperate condition to get the block face that the player has interacted with, which can make for some pretty cool interaction mechanics.

on interact with itemsadder block "itemsadder:grove_log":
   if clicked block face is south:
      send "&4HEY! &fWhy are you doing that?" to player

Custom Block Place

It might sound crazy, but this event is also like the last 2 events we've talked about, except this one listens for the placing of custom blocks (shocker!). Sadly, this one doesn't have any cool feature like Custom Block Interact. Think of it like the breaking event, but in reverse!

on place of custom itemsadder block:
   cancel event
   send "&cCan't do that mate!" to player