Recommended Build & Update Guide (1.7.10 - 1.13.2)

Discussion in 'CommandHelper' started by PseudoKnight, Jan 13, 2015.

  1. PseudoKnight

    PseudoKnight Well-Known Member Developer

    Recommended Builds
    [CommandHelper v3.3.4 for 1.14]
    These builds support Spigot 1.14 (in addition to 1.13.2). This is currently only recommended for testing until 1.14 becomes stable, which shouldn't happen until 1.14.1 or later.

    [CommandHelper v3.3.4 for 1.13.2]
    This is currently the latest recommended build for Spigot 1.13.2 if you want the best stability. The latest builds still support 1.13.2, but some big changes were made under the hood that may have introduced some currently undiscovered bugs.

    Binary downloads are no longer available for Minecraft versions older than 1.13.2, but you can build from source from the last time CH supported that version.

    [CommandHelper v3.3.2]
    This version supports Craftbukkit, Spigot and Paper servers for MC versions: 1.7.10 - 1.12.2
    See the bug tracker for known issues
    Update Guide
    Updating to new builds of CommandHelper can sometimes require updates to your scripts and/or extensions. This is not always obvious by the commit messages. Below is a reverse chronological guide to help you with some of these changes to quickly update your code.
    [Spigot 1.14]
    The following breaking changes exist:

    - Villager professions have completely changed.
    - The "creationradius" and "searchradius" in entity_portal_travel and player_portal_travel have been removed.
    - Ocelots can no longer be tamed or sit.
    - The following materials are removed but will be converted in legacy item arrays or when using set_block(): CACTUS_GREEN, DANDELION_YELLOW, ROSE_RED, SIGN, WALL_SIGN.
    - TIPPED_ARROW and LINGERING_POTION entity types no longer exist and will be converted to ARROW and SPLASH_POTION respectively.
    - The server name from get_server_info() is no longer supported. It doesn't exist in vanilla anymore.

    As always, if you used CHNaughty, you'll have to update again for new Minecraft versions:
    - CHNaughty: 3.11.0

    [CommandHelper 3.3.4 build #3603]
    These extension builds are updated for changes made in CH build #3603, though older builds should mostly work still since this only affects logging. Any extensions not listed here are not affected by these changes.

    - SKCompat: 3.0.1 build #19
    - CHVirtualChests: 1.0.7 build #8
    - CHFiles: 2.2.3 build #9
    - CHDiscord: 1.3.0 build #14
    - CHSpigot: 2.0.2 build #9
    - CHJavascript: 1.0.3 build #7
    - CHIRC: not available

    [CommandHelper 3.3.4]
    All extensions must be updated to be compatible with CH 3.3.4. This is a list of extensions versions that are compatible with the changes made in CommandHelper.
    NOTE: It is almost always recommended to use the latest builds unless you're using old versions of MC, CH, or respective plugins.

    - CHVirtualChests: 1.0.7
    - CHSpigot: 2.0.1
    - CHDynmap: 1.1.4
    - CHCitizens: 1.1.8
    - CHPlotSquared: 1.0.2
    - CHStargate: 2.0.2
    - CHGriefPrevention: 1.2.2
    - CHWorldGuard: 1.1.2 (region_change event only)
    - CHNaughty: 3.10.3
    - CHDisguises: 0.0.2
    - CHFiles: 2.2.3
    - CHPlaceholderAPI: 2.2.3
    - CHPaper: 0.2.2
    - CHGCC: 1.0.3
    - CHPython: 1.0.3
    - CHJavascript: 1.0.3
    - CHGroovy: 1.0.3
    - SKCompat: 3.0.1
    - CHVault: 2.1.2
    - CHPerms: 3.0.1
    - CHDiscord: 1.3.0-SNAPSHOT
    - CHIRC: 0.0.1
    - CHServerCommunication: not updated
    - CHVotifierListener: not updated
    - CHHTTPd: not updated
    - LaterEvents: not updated
    - CHPex: not updated
    - CHLogblock: not updated

    [Spigot 1.13.2]
    Block/item numeric ids are no longer guaranteed to be accurate and many material names are changed, though these will be temporarily supported as inputs to functions for some time. This has several consequences that you'll need to address in your scripts.

    Item Array Format Changes
    While you can still input old item arrays, the output of item functions and events has been changed to reflect changes in Minecraft.

    Where previously you might get an item array object in this format:
    {name: BOW, type: 262, data: 81, qty: 1, enchants: {{elevel: 1, etype: DURABLITY}},
    meta: {display: null, lore: null, enchants: {{elevel: 1, etype: DURABILITY}},
    unbreakable: false, flags: {}, repair: 1}}
    Now it will return an array object in this format:
    {name: BOW, qty: 1, meta: {damage: 81, display: null, lore: null, unbreakable: false,
    enchants: {unbreaking: {elevel: 1, etype: DURABILITY}}, flags: {}, repair: 1}}
    Note that the keys "type", "data" and "enchants" were removed from the parent array. The old "type" numeric id has been replaced by "name". The "data" value is only relevant for item durability now, so this was moved into the meta array under the key "damage", and is only present if the item is damageable. (ie. if max durability is above 0) The "enchants" key was redundant to the one in the meta array, and its format has been modified to reflect how you can't have more than one enchantment of the same type. It now uses minecraft names for enchantment keys too, to be easier to use. (old names and format are still accepted)

    Some specific item meta keys have changed as well. For banners, "basecolor" has been removed as it's defined by the banner item name. (eg. "RED_BANNER") Similarly, spawn eggs no longer have the "spawntype" key because that's defined by the material name too. (eg. "BAT_SPAWN_EGG") The map "data" key has been replaced with a meta key "mapid".

    Many material names under the key "name" have been changed, but will always be converted as long as they don't have a name conflict. Most critically, you should probably address any item array with the "data" key, as these best indicate possible conversion problems. For any hard-coded item arrays, delete the "type" and "data" keys (their presence indicates a legacy item array and will be attempted to be converted) and rename the "name" key to the new material name. The new materials names are the same as in the Minecraft wiki and in-game, but they are also listed here. You can move the damage value into the meta array if needed. A convenience function convert_legacy_item() will take an old item array and output a new item array. This is useful for updating items that might be stored in a persistence database. The function data_name() now accepts old material names, ids and string formats and converts them to modern material names. This is useful for conversion of databases or maybe user input.

    Biome Names Changed
    These now better reflect their minecraft names. If you use get|set_biome() functions, you can look up these new enums with reflect_pull('enum', 'BiomeType') or in the documentation.

    Painting Names Changed
    Two paintings just had a space added to them: BURNING_SKULL and DONKEY_KONG.

    Item/Block String Format Deprecated
    The "0:0" format is no longer guaranteed to be accurate, so it's deprecated wherever it's used. In most cases you will be warned on compile time if you use these anywhere. If not, you will be warned in the log at runtime, but the item/block will be attempted to be converted. Notably, get|set_block_at() has been deprecated for get|set_block(). If you need to read or write block data, the get|set_blockdata_string() functions are available until further functionality is added. These use the same format as vanilla block commands.

    Changed DyeColor "SILVER" to "LIGHT_GRAY"
    This now matches vanilla and material names to be easier to use. SILVER is still accepted and will be converted, but is discouraged.

    Recipe Keys Required
    Recipes now require a key to be added, where previously it was optional and randomly generated. This should just be a unique name describing the recipe you're adding. (eg. 'key': 'ice_to_packed_ice') Recipe ingredients, of course, should use item arrays instead of the string formats.

    CommandBlock Changes
    In addition the vanilla changes to commands, they no longer automatically process selectors for plugin commands. You will have to implement them yourself if you need this behavior. Though I'm thinking of creating an extension for this or something.

    Event Removals
    Tab_complete_chat is removed because clients no longer send these to the server. Player_prelogin_event is removed because it was deprecated in Bukkit due to syncing issues, and it's mostly redundant to player_login.

    Sound Changes
    Pre-1.9 sound names are all removed and some post 1.9 sounds have been updated to reflect 1.13. However, these will not cause scripts to fail. Instead, it will warn in the log and continue running. play_named_sound() always behaved like this, but silently. play_sound() will now simply warn you if the sound didn't play because the name is incorrect. You can refer the Minecraft wiki or this bukkit page for the complete list. You can also use reflect_pull('enum', 'Sound') to get the list in a script.

    Event Data Changes
    The following events' prefilters, event data, and/or mutable data were updated: piston_retract, piston_extend, block_break, block_place, block_burn, block_ignite, block_from_to, block_dispense, block_grow, note_play, block_fade, item_despawn, item_spawn, item_drop, item_pickup, entity_change_block, entity_interact, inventory_click, inventory_drag, item_swap, player_interact, and vehicle_collide. While some of these are obvious or may not affect you, please refer to the event documentation to update your prefilters and which keys you're reading from. A common theme is "item" prefilters are changed to "itemname", and like "block" keys and prefilters, now use the material name instead of the item/block string format. (eg. "0:0") In a special case in player_interact, if you want to check if they didn't click a block, check where "block" equals null. These are sensible but extensive changes, so I may add a list here later. Searching for "data" in general or "item" in prefilters will help fix a lot of them.

    Other Changes
    There are a number of other changes, but less critical to this guide. If you focus on the above changes, everything else will be easier.

    Extension Compatibility
    These extensions need to be updated to support CommandHelper 3.3.3 and Minecraft 1.13. If not included in this list, it probably does not need to be updated.

    - SKCompat: 3.0.0
    - CHSpigot: 2.0.0
    - CHCitizens: 1.1.7
    - CHVirtualChests: 1.0.6 (or use CH builtin virtual inventories)
    - CHNaughty: 3.10.2
    - CHWorldGuard: 1.1.1 (region_change event)
    - CHLogBlock in progress
    - CH-mcMMO: not updated

    [CommandHelper Build #3246]
    - CHAdvanced: will not be updated
    CHAdvanced no longer supports build 3246 or higher. The server_command event is now built into the CommandHelper core. The file list function can be replaced by CHFiles extension or equivalent.
    [Spigot 1.12.1]
    CommandBlocks now call aliases without needing /runalias. So if you have an alias for a vanilla command and CommandBlocks that use the vanilla command, it may break. A manual fix is to add the "minecraft:" prefix to those commands in the affected CommandBlocks. (eg. /fill to /minecraft:fill) Note: this does NOT affect CommandBlocks that already use /runalias or vanilla commands that do not have aliases.
    [Spigot 1.11.2]
    You can no longer set_exp() above 100. In 1.11.2, setting exp to exactly 100 will now give that player a new level and reset exp to 0%. Set to 99 to avoid this.
    [Spigot 1.11]
    Minecraft changed entity subtypes to be their own entity type. You may need to search for instances of "guardian", "skeleton", "zombie", and "horse". Changing an entity's subtype using set_entity_spec() is no longer supported. Also if you're checking for an entity type in an event bind, you'll need to update that to include a list of all subtypes. (Example: instead of "HORSE" you'll need to check for "HORSE", "MULE", "DONKEY", "ZOMBIE_HORSE", "SKELETON_HORSE", and/or "LLAMA".)
    [Spigot 1.9]
    One or two player_interact events will fire now with the addition of the off_hand. If two, it's one for each hand. If one, it might be the main_hand or off_hand. Some scripts need to be considered for double event firing. Any script that looks at the item array will need to be updated for off hand support.
    [CommandHelper 3.3.2]
    These extensions versions are when they added compatibility with CH 3.3.2. Refer to 3.3.3 and 3.3.4 lists to figure out the last versions that are compatible with 3.3.2.
    NOTE: It is almost always recommended to use the latest builds unless you're using old versions of MC, CH, or respective plugins.

    - CHServerCommunication: 0.0.2
    - SKCompat: 2.0.0
    - CHVault: 2.0.0
    - CHPerms: 2.0.0
    - CHVirtualChests: 1.0.5
    - CHSpigot: 1.4.3
    - CHDynmap: 1.1.3
    - CHCitizens: 1.1.5
    - CHPlotSquared: 0.1.1
    - CHStargate: 1.0.2
    - CHVotifierListener: 1.0.2
    - CHGCC: 1.0.2
    - CHPython: 1.0.2
    - CHJavascript: 1.0.2
    - CHGroovy: 1.0.2
    - CH-mcMMO: 0.1.0
    - CHDangerous: 1.0.2
    - CHHTTPd: 0.0.2
    - CHGriefPrevention: 1.2.1
    - CHPex: 1.1.1
    - CHTag: 1.0.2
    - CHBarAPI: 1.0.1
    - CHPluginManager: 1.1.0
    - CHWorldGuard: 1.1.0
    - CHLogblock: 0.1.1
    Last edited: Apr 30, 2019
    jb_aero likes this.
  2. Jason Krause

    Jason Krause Member

    Thanks for this PseudoKnight.
  3. spudsrus

    spudsrus Member

    Thanks PseudoKnight, this is super handy!

    Do you have any ballpark estimate on getting CHWorldGuard running on 3.3.1 build 3042 and above?
  4. PseudoKnight

    PseudoKnight Well-Known Member Developer

    Started working on some changes for someone else. Finished it just for you. It should now also fire on teleports, vehicle enter, vehicle move. This should make it more reliable for certain uses.
  5. spudsrus

    spudsrus Member