in general

//" rel="noopener nofollow" target="_blank">" alt="[EN] English" title="[EN] English"> [HU] Magyar

Addons in general

Addons are ... plugins for this plugin : ) You can download some addons, they add more commands and stuff to the CleverCommand plugin. For example the serverside worldedit is also an addon, just inbuilt, so the plugin already contains its data. There are thirdparty plugins like BlockCommands, which adds the abbility to add command lines to a block, and if someone clicks on it the commands will be executed. The ZureHook addons is good for hooking CleverCommands and ZureZones together, so this plugin will be able to access the informations of zure zones, and use them as parameter in basic commands like teleport. Addons are good for so many things. Now there are only a few out there and less working, but by time there will be more, and I hope there will be addons which are not created by me, but by you too : )



To run plugins you MUST have clevercommand plugin on your server!

Download the .jar file of the addon, and place it in the "plugins\CleverCommand" folder instead of the "plugins" folder. When you're done you should restart your server, then the CleverCommand plugin will load all the addons from its folder.
To check the loaded addons use the /cc addons command.
For more addon information type /cc addon <name>


For Developers

Addons use an addon class, just like bukkit plugins you the JavaPlugin class. The class is called 'CCAddon' for this case. You must create at least one class in you .jar file, which extends this class. It will ask for the name of the plugin, the version number and so on. You can write the onEnabled and onDisable methods just like in the case of plugins. Which is different, that you must be able to get the CleverCommands plugin, and softly manipulate it as you want, and use its classes. There are methods in the CCAddon class which are must know:

  • .onRecognized() - this is called when the plugin detects you addon class
  • .onEnable() - called when all addons are recognised already in all .jar files
  • .onDisable() - when you addons should be turn off
  • .isEnabled() - response for is you addon enabled or not
  • .getPlugin() - returns the CleverCommand plugin kernel
  • .getCore() - you rather need this as the kernel, all the plugin stuff is in the core

The following informations are outdated, and features are out of use.

  • .onCleverCommand(...) - called when a /cc command is triggered and searches for executor in addons
  • .onCleverCommand_test(...) - called when a /cc test command is triggered and searches for executor in addons
  • use the AddonExecutor class for handle cc commands

Other stuff also have been changed about addons. A fast summary:

  • Use of addon.yml file is required!
    • name: <addon-name>
    • main: <path of your CCAddon class>
    • depend: <needed addon 1>, <needed addon 2> ..
      • Be warned! The needed addons are really addons and not plugins, about the needed plugins you must care in the code of your addon!

  • The cc command handling has been changed!
    • Instead of the abstract methods of the CCAddon class, a new thing handles the commands, namely the AddonExecutor class. Creating an object of it we can define the command executions, such as in the case of the bukkit Executor interface. To activate our command executor object do not forget to register it using the .register() method. The object also can be disconnected from the command system anytime you want calling the .unregister() method.


Posts Quoted:
Clear All Quotes