Update to version 8+

Update to version 8+

Since version 8 there are changes in config files format, to do a smooth update i recommend the following procedure:

  • stop your craftbukkit server
  • backup and delete your *.yml files in <craftbukkit dir>/plugins/MyPortals, you can rename or move
  • start and your server again to regenerate the new default config files
  • manually restore your old configs to new config.yml file preserving the new format, specially "allowedWorlds" section
  • for data.yml, split the lines "portalOwner;portalName" in to separate lines, preserving format, enclosing empty strings with single quotes
  • you can also migrate some translation you had to new locale-LANG.yml file if applies

In Windows:

If you use notepad++ you can update all your data.yml file in one step by using the "Replace..." dialog like this

upgrade data.yml with noptepad++

details:

  • find what = ;(.*)
  • replace with = \n- '\1' (note the space after the dash, and single quotes)
  • make sure you have selected "regular expression"
  • click "replace all" button

In Linux:

with linux you can update all your data.yml file in one step by using the "sed" command:

  • cd <Craftbukkit dir>/plugins/MyPortals
  • sed -i 's/;(.*)/\n- '\''\1'\''/g' data.yml

note the space before the dash and the use of single quotes

EXPLANATION

if you are not familiar with regular expressions, this is the meaning of all these weird characters, in bash you can concatenate strings and print escaped quotes

  • find what = a semicolon, followed by any character (.) repeated any times (*), captured it in memory with parenthesis
  • replace with = a newline (\n), followed by a dash, a space, a single quote, the first captured expression in previous step (\1), and another single quote