Plugin Development | Episode 8 | Custom Tablist
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
Other Videos By PizzaClient
2024-06-29 | Plugin Development | Episode 8 | Custom Tablist |
2024-02-01 | Coding Minecraft Plugins |
2024-01-31 | Playing Lethal Company Stream 4 |
2024-01-31 | Playing Lethal Company Stream 3 |
2024-01-28 | Playing Lethal Company Stream 2.1 |
2024-01-28 | Playing Lethal Company Stream 2 |
2024-01-26 | Playing Lethal Company Stream 1 |
2024-01-06 | Playing Raft Stream 4 |
2024-01-05 | Playing Raft Stream 3 |
2024-01-04 | Playing Raft Stream 2 |
2024-01-03 | Playing Raft 1.1 (Stream Disconnect) |
2024-01-03 | Playing Raft |
2023-05-28 | Playing SkyFactory 4 part 8 |
2023-05-27 | Playing SkyFactory 4 part 7.5 |
2023-05-27 | Playing SkyFactory 4 part 7 |
2023-05-25 | Playing SkyFactory 4 part 6 |
2023-05-23 | Playing SkyFactory 4 part 5 |
2023-05-22 | Playing SkyFactory 4 part 4 |
2023-05-21 | Playing SkyFactory 4 part 3 |
2023-05-21 | Playing SkyFactory 4 part 2 |
2023-05-20 | Playing SkyFactory 4 |