Implement chat format support
continuous-integration/drone/push Build is passing Details

main
Bea 5 months ago
parent 3b744fe113
commit 36dd8afec1

@ -14,6 +14,10 @@ public class PlayerChatManager implements Listener
@EventHandler
public void onPlayerChat(AsyncPlayerChatEvent event)
{
String format = Cache.getConfiguration().getString("chat.format");
format = format.replace("{player}", "%s")
.replace("{message}", "%s");
event.setFormat(format);
int coolDown = Cache.getConfiguration().getInt("chat.cool-down", 3);
if(coolDown < 1) return; // disable this feature if cooldown is 0 or negative.

@ -10,4 +10,5 @@ island:
yaw: 0.0
pitch: 0.0
chat:
cool-down: 3
cool-down: 3
format: '§7{player} » {message}'
Loading…
Cancel
Save