Plugin Development | Episode 8 | Custom Tablist

Channel:
Subscribers:
45
Published on ● Video Link: https://www.youtube.com/watch?v=EIJE-LGfv5Y



Duration: 16:48
99 views
5


Minecraft-Development Intellij Plugin: https://plugins.jetbrains.com/plugin/8327-minecraft-development

If you wanted to use hexcodes and the & symbol here is the code, just replace the previous translate with:
public static String translate(String message) {
// checks if server version is 1.16 or above, if not, just tries to use &
try {
Class.forName("net.md_5.bungee.api.ChatColor").getMethod("of", String.class);
message = message.replaceAll("&#", "#");
Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}");
Matcher matcher = pattern.matcher(message);

while (matcher.find()) {
String color = message.substring(matcher.start(), matcher.end());
message = message.replace(color, net.md_5.bungee.api.ChatColor.of(color) + "");
matcher = pattern.matcher(message);
}
} catch (Exception e) {
// Server version is below 1.16
return ChatColor.translateAlternateColorCodes('&', message);
}
return ChatColor.translateAlternateColorCodes('&', message);
}

In This Video I Will Show You How To:
How to create a loop.
How to set the header/footer of the playerlist of 1 or all players.
How to set colour codes.

My Spigot resources:
https://www.spigotmc.org/resources/authors/pizzathatcodes.896980/

My BuiltByBit resources (more updated/better):
https://builtbybit.com/search/2986624/

GooberMC discord server (where I'm usually at):
https://discord.gg/5NauEbDxNe

Any Issues, questions or concerns, please DM (Direct Message) me or leave a comment of the issue.
Discord: PizzaLover#8261 / pizzaclient







Tags:
Minecraft
Coding
Development
Plugin
Plugin Development
Minecraft Development
Minecraft Coding
Minecraft Plugin
Tablist
Minecraft Tab
Tab Plugin