ASkyBlock Color Changing Island Level.

Discussion in 'Spigot Plugin Help' started by LimTheLime, Jun 1, 2017.

  1. So i've been researching for a plugin on how to make the island level change color on a specific number, let's just say im on LEVEL.0 so my color is white, and then when i reach the LEVEL.500 it goes to color Yellow, and then when i reached the LEVEL.1000 my color will be changing in to Orange and etc. . .

    This is a struggle for me since i tried using an AutoRank to do this. setting up the Requirements on the Paths.yml . and then making a GROUPS in the PermissionsEx. and then im using the EssentialsChat to hanldle the Placeholder for the ASkyBlock. but that's a fail.

    So i just want someone to Give me some guidance or an idea on this one cause this is giving me a headache.

    Thank you in advanced :D who ever will reply on this thread :D
     
  2. Did you find a solution - sorry for the necro post mods, but I really want to know if there is a free plugin out there that will do this.
     
  3. You could have opened your another thread instead of using one from 3 years..
    But anyways, it is possible with the Javascript expansion of PlaceholderAPI, I don't really have time right now but I'll try to show you later
     
    • Informative Informative x 1
  4. Hey, I'm back ! and I may have forgotten a bit the thread x) thank you for giving me an emoji or else I wouldn't have remembered lol
    So here's what you need to do:
    - do /papi ecloud download Javascript
    - do /papi reload
    - go into your PlaceholderAPI folder which is in your plugins folder
    - open javascript_placeholders.yml
    - add this at the bottom of the file
    Code (YAML):
    isLevel:
      file
    : isLevel.js
    - then go in the javascripts folder which is in your PlaceholderAPI folder
    - create a file called isLevel.js and add this in it
    Code (Text):
    var level = "%askyblock_level%";

    function isLevel() {
        if (level >= 10000)
            return "&c" + level ;
        if (level >= 1000)
            return "&6" + level ;
     
        else if (level >= 500)
            return "&e" + level ;

        else if (level >= 100)
            return "&a" + level ;

        else
            return "&f" + level ;
    }

    isLevel();
    - do /papi reload and you're done ! You can now use %javascript_isLevel% instead of %askyblock_level% everywhere PlaceholderAPI is supported.

    It will show the level:
    - in red if you have 10 000 levels or more,
    - in orange if you have between 9999-1000 levels,
    - in yellow if you have 999-500 levels, in green if you have 499-100 levels,
    - and in white if you have 99 or less
     
    • Informative Informative x 1
    • Useful Useful x 1
  5. Ooh, thank you very much for your effort in this tutorial, really appreciate it <3
     
    • Friendly Friendly x 1