Hey there everyone, this is my first tutorial and I want to teach you all on how to make your own API. I have just made my own API which you can have a look at: TitlesAPI You should know on how to make a basic framework of a plugin. My main class is: me.AdityaTD.TestAPI.API After you have made your class do this: Code: public static void sendMessage(Player player, String message){ player.sendMessage(message); } I have made a Message Function for a player. If you want to use it in your other plugin, you need to set API plugin in your build path as same as you added bukkit. After That: Code: public void onJoin(PlayerJoinEvent event){ API.sendMessage(event.getPlayer(), ChatColor.GOLD + "This is a test API implementation"); } I have made a new plugin and I have made a PlayerJoinEvent so when a player joins my plugin would implement my API to send a message. It's that simple. If you have any further questions or suggestions then comment them below. Subscribe to my YouTube: www.youtube.com/user/adityatripathidelhi Thank You!
@ChipDev There is more to making an API than making methods, quite a bit more to be honest. However, what @AdityaTD has covered here is indeed "how to make a method and call it an API". If it's helpful to anyone, then they shouldn't be making plugins.
@ChipDev And I'll bet at least that amount use an apostrophe in "APIs" even though they probably shouldn't @AdityaTD This isn't how to make an API. It needs to be more advanced to even be considered a "basic API". APIs consist of design decisions, and various other things... you know, interfaces and whatnot. Heck, the I in API stands for interface! So, this is not an API tutorial. This is a "how to make a method" tutorial.
There's no point in making a tutorial THAT basic... You don't seem to understand what an API is either. If you want to make a tutorial on how to make an API, at least know what you'll be talking about, and give a better example.. BTW your Youtube channel is completely unrelated to programming, why bother advertise for it?
Your example is not an API. Its a useless wrapper method basically. If you want an example of an API, take a look at WorldEdit, WorldGuard, or even CraftBukkit as well.
Thread locked. Really nothing to add here. Java is a Requirement for Bukkit. And APIs on its own are already part of Java, however this is not even an API.