Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.



From Wiki
Jump to: navigation, search

3.3.0 is a massive update that contains a huge number of new features. There are a few things that are incompatible with the previous version, so you should carefully read this release notice before upgrading. If you are starting from scratch, there are (of course) no incompatibilities.

Update Breakages

  • include/read now require paths that are relative to the location of the current file. This should be an easy fix.
  • Your persistance database is in the wrong format. Unlike previous versions, you do not need to delete the database, you simply need to upgrade it. (Unless you're upgrading from before 3.2.0, in which case you still do need to delete the persistance.ser file, and then you're set.) If you have not used user aliases or persistance in the past, this step is unnecessary. Rename/copy/symlink your bukkit jar to bukkit.jar for this to work. From a command prompt, change to the plugins directory and run java -jar CommandHelper.jar --manager. This will launch the Data Manager, at which point you can run the upgrade command. Once this is complete, your data is now converted to the new format! Do not run the data manager while your server is up. In lieu of this, you may also simply delete your persistance.ser file, in which case all data will be lost, but it will re-create the db in the correct format in the future, without any interaction from you. Be sure to check out the other features in the data manager while you're there!
  • is_* (is_null(), is_integer(), etc) functions are slightly altered. Most people weren't using these functions, but if you were, you will want to check the API for information on the changes to this function.
  • pinv() and set_pinv() take different formatted arguments. Check the API for the new usage.
  • play-dirty mode is currently broken due to the new event system implementation. This will be fixed at a later date, but you may not need it any more, since plugins have all been updated now.

New Feature Overview

  • Colors work in the terminal now. The exception is if you're on a windows machine, in which case, no colors for you :( sorry. Also, CH has a cool new splash screen (you can disable it in the preferences).
  • Data Manager - You can now view the persistance data much easier, thanks to the data manager. Be sure to explore all the options. Read up on it at the page on the data manager.
  • Abstraction layer - While you won't see this directly, know that it's much easier to move CH from server type to server type, should bukkit or whatever other server mod become obsolete. This means that CH should live on past server mods, with your scripts safe from the changes!
  • Namespaces in persistance, and improved performance in persistance - Persistance is now much more efficient. In addition, namespace support has been implemented. If you namespace your data using periods, you can much more easily manipulate the data that has been stored. Be sure to re-read the API in the Persistance section, as all the functions have new features now.
  • Events added - Events are now here! Read up on the Events overview for basic information relating to all events, and check out the Event API for details on specific events, as well as what events are available. This list will continue to grow as more events are added!
  • ifelse and switch - Now it is much easier to chain if statements. Check out the wiki page on logic for more information.
  • Arrays are associative - Now you can store a value in an array not only with a numeric index, but you can also use strings! Many functions now use this feature, since it's much easier to read and use, but you need to be familiar with the changes for them to make sense. Check out the additional section in the wiki page on arrays
  • bitwise operations - binary operations! Check the API page for details.
  • Basic crypto functions - If you need to hash things, this is now possible.
  • import/export - Import and export work like the persistance functions, except they are in-memory only, and won't survive past server restarts (or /reloadaliases, for that matter). There are two modes of operation, so read the API carefully if you use these functions.
  • More defined data types, in addition to casting and converting functions - Data types were loosely defined before. Now the definition is well defined, and there are functions to help you manipulate this data.
  • Enchantment api - You can now control enchantments in a player's inventory
  • Sign api - Change the text of signs with functions! This function allows you to colorize the text on the sign as well, when used in combination with the color() function.
  • More math functions - Just about every math operation you could need is now implemented. Be sure to also check out the very cool expr() function, which should simplify complicated math formulas.
  • Basic entity control - You can now control entity health and tame wolves. This is just the first phase of more complex entity controls.
  • scriptas and has_permission - scriptas() allows you to run scripts as another player, similarly to how you can run a command as another player with runas(). has_permission() allows you to dynamically check to see if a player has an arbitrary permission or not.
  • data_name (reverse data_values)
  • More inventory controls - Previous versions had pinv and set_pinv, and that was all the control you needed to do whatever you like, but it is unwieldy, and complicated to use. These functions arguments have changed as well, but you can now use a few other functions to more easily do things: phas_item, pitem_slot, pgive_item, ptake_item. Check out the API for more information for each of these functions.
  • World time controls - Control the time in a world with the new world time functions.

API additions

Here's a full list of all the new functions. Check out the API for details on each:

Navigation menu