public Message createStuff() {
return Messages.of("HI").builder().color(TextColors.GREEN).build();
}
public Text createNewStuff() {
return Texts.of("HI").builder().color(TextColors.GREEN).build();
}
We’ve actually added a new way to create Text instances to make it easier when creating simple messages. This looks similar to code written for Bukkit. For example, this code on Bukkit:
player.sendMessage(ChatColor.RED + "You don't have permission for this command");
Can be written like this on Sponge:
player.sendMessage(Texts.of(TextColors.RED, "You don't have permission for this command"));
Additionally I would like to point out you should not use methods only to create static Text instances like in the examples posted above. Instead, Text instances are perfect to use as static (constant) instances, for example like this:
public static final Text NO_PERMISSION = of(TextColors.RED, "You don't have permission for this command");
// Somewhere in the code
player.sendMessage(NO_PERMISSION);
In that case right click the root project folder, go into the Maven submenu of the context menu that appears then click “Update Project” then make sure the “Update Snapshots” box is checked and press the “OK” button.
Also, yes, most people seem to use eclipse, but you really never know.
Yes it is true. Sorry for sounding snide. I tend to use netbeans too but have voided from it this time around because it has quite the CPU issues with Mac.