Home›Java›Mods›RainbowText [API]
Need to create RainbowText fast? This is for you.
Example: (With the help of BossBarAPI and a loop that runs every 2 ticks)
[​IMG]

What is it?

It's a simple API where you can create rainbow text. You can even change the place that rainbow starts at (Make it look animated on a BossBar or other)

Setup:

Just download the jar and put it in your plugins folder (on your server) and in your build path (on you IDE)

Usage:

Code (Text):
RainbowText text = new RainbowText("Your text that you want here");
You can even make it look animated by setting where the first color of the rainbow will start: (This will move the rainbow to the left)
Code (Text):
text.moveRainbow();
You can also do: (This will move the rainbow to the right
Code (Text):
text.moveRainbowRight();
Now if you want to do something more advanced you can do:
Code (Text):
text.setPlace(int place);
Doing that will set the start of the first color. The default is 0 and the max is 9.

Now, to get the rainbow text, you can do:
Code (Text):
text.getText()
to get the original text you can do:
Code (Text):
text.getOriginalText()
If you would like to view the Rainbow array you can do:
Code (Text):
text.getRainbow()
you can set the rainbow array only by a constructor:
Code (Text):
RainbowText(String text, List<String> rainbowArray)
If you would like your text to be bold you can create the RainbowText like:
Code (Text):
new RainbowText(String text, ChatColor.BOLD.toString())
Please post all bugs or errors (No bugs should come with this) on the discussion page.

If you feel that it would be faster and simpler, you can use the one class that handles everything which can be found here:
NEW CLASS: http://pastebin.com/y8uyTYAR

http://pastebin.com/WLh9mkbs (old original class)


If you do copy and paste that code please give at least minimal credit. (If the plugin is public)

Image of outcome:
[​IMG]

Code that created the above: (Please note the colors are outdated)
Code (Text):
RainbowText text = new RainbowText("This is some rainbow text. You can make it as long as you want.");
p.sendMessage(text.getText());
text.moveRainbow();
p.sendMessage(text.getText());
text.moveRainbow();
p.sendMessage(text.getText());
RainbowText text2 = new RainbowText("As you see above, you can even change where the rainbow starts.");
text2.setPlace(9);
p.sendMessage(text2.getText());
Plugins using this:
* https://www.spigotmc.org/resources/rainbowbar.20733/
PM me or ask me in the discussion page to put yours here. Feel free to use the pastebin version but if you do, please give me credit and tell me.

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

RainbowText [API] is a free Minecraft Java mod. Downloaded 689 times (via Spigot). Download it and open it directly in the game.

Explore more