1.16.1 Hex Death Messages

Discussion in 'Spigot Plugin Development' started by Sullivan_Bognar, Jun 30, 2020 at 8:34 PM.

  1. Hello all, I am trying to add a new feature to my plugin, which will be RGB death messages. I don't know if this is even possible, because there is still a lot of cloudiness of how it works, at least to me. It would be helpful if someone could explain to me the basics of it and tell me if I could utilize it in a death message or not. Thanks!
  2. Hey there! Feel free to take a look at my resource named Prisma: https://www.spigotmc.org/resources/prisma.80713/

    It’s extremely easy to hook into for developers and allows for server owners to setup color codes that can be applied across any plugin that hooks into them. My plugins are being updated to utilize the resource, and I know some others are too such as I believe DisplayShop as an example!
    • Useful Useful x 1
  3. It is only present within the BungeeCord chat API as md_5 states on the main page however you can still access and use this within Spigot. Cool stuff.

    Code (Java):
    final Player player = ....
    final String deathMessage = net.md_5.bungee.api.ChatColor.of("#1CDF98") + "Oh no you died";

    Put the hex code into a formatter and you get a turquoise color. You can also use Java color for this. More can be found here for this
    • Informative Informative x 1
  4. Alright, I'm about to get to work. Thanks, everyone!