Custom Items API

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

 

 

 

 

 

 

WHAT CAN THIS API DO?

 

Commands:

  • /ci help - Shows some help about this API
  • /ci list - Lists all registered custom items
  • /ci give [id] - Gives an item with the given ID to you.
  • /ci give [player] [id] <amount> - Gives <amount> items with the given ID to the player

 

 

 

 

 

 

 

HOW TO USE THIS API

 

 

What is this API doing?

 

With this API everybody can easily create more or less complex new items. Obviously you cannot really create new Items but you can give every existing item a buch of new functions.

 

 

So, how do I use this?

First you should add the .jar-file of this API as a plugin to your server.  This is needed so your plugin, extending CustomItemsAPI will work.

Now you can add this API to your project's build path just like you added your spigot/bukkit file before.

Dont forget to depend CustomItemsAPI in your plugin.yml using

depend: CustomItemsAPI

 

 

That's it! Now you can start coding!


 

 

Fine, but how do I create new items now?

 

Creating a new CustomItem is quite simple:

CustomItem item = new CustomItem(Material.STICK);

 

 

This just creates a simple stick which can actually do nothing.

Let's add some listeners to it:

item.setItemCollectListener((ItemCollectEventArgs args); {
    args.getPlayer().sendMessage("You just collected an awesome item!"); });

item.setItemEntityBeatListener((ItemEntityBeatEventArgs args); { 
    args.getEntity().damage(42); 
});

 

 

 If you collect our cool new item now, you will get a message. If you hit a monster, a player or any other living creature with it, that creature will get 42 damage!

 

But...

To make it working you need to register this item:

item.register();

  

 This finds automatically a unique and unused ID and registeres the item.

 

 

What if I have more questions?

There will be a wikia-page soon...

 

  

 Everybody is allowed to use this API as a dependency for his/her own plugins.


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    267962
  • Created
    May 20, 2017
  • Last Released File
    May 21, 2017
  • Total Downloads
    798
  • License

Categories

Members

Recent Files