xBlazeCore is a compilation of development libraries that add a large amount of tools for users. Some parts of this plugin were created by other people, and I have tried my best to acknowledge the contributors. If you believe that part of this plugin was designed by you, then PLEASE contact me directly, and I will try to resolve the issue. Resolutions include; Giving Credit where Credit is Due, Removal of Portions of the Plugin, etc. This is a library used by many of the plugins that I have developed, and is usually a dependency for said plugins. I will try to keep a running list of plugins that use this library below. Once this plugin is completely finalized, I will be releasing the source code on Github, and I will provide a link here. A the moment there is no "JavaDoc" documentation for the use of xBlazeCore, however, I plan to incorporate documentation into newer releases. I was also forced to (Thank you bukkit... lol) to include some documentation before my plugin could be released. I have included some rough demonstrations of the plugin below. My hopes are that you are able to figure out as much about the plugin as you can on your own. I will DEFINITELY be including more documentation as the plugin develops.
There is very little to no documentation on this plugin. Why is that? The reason why that is is because this is a library I use for my own custom plugins. I require help to add documentation to the plugin. If anyone can analyze the plugin, and create documentation it would be greatly appreciated. I shall be adding Documentation as I add Features.
The Following is a list of the the Utility Classes, and Types. They each have embedded Java Documentation. Like all of my plugins, the information.txt inside the Jar file will give you Markdown of what exactly the plugin does.
Classes:
package net.xblaze.xBlazePlugin; import net.xblaze.xBlazeCore.api.util.ConsoleManager; import org.bukkit.plugin.java.JavaPlugin; public class BlazeTemplate extends JavaPlugin { public ConsoleManager console = new ConsoleManager(); @Override public void onEnable() { console.logInfo(this, "has been enabled successfully!"); } @Override public void onDisable() { console.logInfo(this, "has been disabled successfully!"); } }
The above code will result in the following in the Console (This Except from Multicraft is partially modified. This Excerpt demonstrates multiple plugins using the API.)
[Server] INFO Disabling xBlazePDA v1.0.5 [Server] INFO ==xBlazePDA== has been disabled successfully! [Server] INFO Disabling xBlazeSign v1.0.0 [Server] INFO ==xBlazeSign== has been disabled successfully! [Server] INFO Disabling xBlazeCore v1.1.0 [Server] INFO ==xBlazeCore== Plugin has been disabled successfully! [Server] INFO Loading xBlazeCore v1.1.0 [Server] INFO Loading xBlazeSign v1.0.0 [Server] INFO Loading xBlazePDA v1.0.5 [Server] INFO Enabling xBlazeCore v1.1.0 [Server] INFO ==xBlazeCore== Plugin has been enabled successfully! [Server] INFO Enabling xBlazeSign v1.0.0 [Server] INFO ==xBlazeSign== has been enabled successfully! [Server] INFO Enabling xBlazePDA v1.0.5 [Server] INFO ==xBlazePDA== has been enabled successfully!
package net.xblaze.xBlazePlugin; import net.xblaze.xBlazeCore.api.errors.InsufficentPermissions; import net.xblaze.xBlazeCore.api.util.PermissionsManager; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class CommandManagerDemo implements CommandExecutor { private PermissionsManager perms = new PermissionsManager(); public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){ Player player = (Player) sender; if(cmd.getName().equalsIgnoreCase("helloworld")) { try { perms.hasPermission(player, "xblazecore.example"); player.sendMessage("Hello World!"); return true; } catch (InsufficentPermissions ignore) {} } return false; } }
The code above will do one of two things depending on if the Player has the permission. If the player has the specified permission (xblazecore.example) then they will get a message saying: Hello World. Otherwise, if they do not have the permission, they will get: "You do not have the required permission: xblazecore.example"
package net.xblaze.xBlazePlugin; import net.xblaze.xBlazeCore.api.util.ItemManager; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; public class ItemManagerDemo { Player p = Bukkit.getPlayer("Notch"); public ItemManagerDemo() { ItemStack item = new ItemStack(Material.BAKED_POTATO); /* * This will replace the item currently in the * player's hand with the ItemStack that you * specify. (Item that WAS in the hand will be * placed into the next available slot.) */ ItemManager.hold(p, item); /* * This will replace the the slot specified of * the player's inventory with the ItemStack * that you specify. (Once again the item * already in slot will be relocated.) */ ItemManager.replace(p, 4, item); } }
This utility makes it easy to create and modify Item Menus. The documentation for this section is not quite complete yet, because the MenuManager is being revised often. Kindly wait for 2 weeks to get documentation on this part of the plugin, or decompile the jar to figure out the inner workings. This software IS open sourced, however it is licenced. I give you the right to decompile the program, however I am not releasing the right to modify or distribute it without proper copyrights. Thanks ;)
Best Regards, xBlazeTECH - Keep Plugin Along... ;)