Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
/ VelocityHexLogger Public archive

Log Components into your Velocity console with HEX support

Notifications You must be signed in to change notification settings

4drian3d/VelocityHexLogger

Repository files navigation

VelocityHexLogger

WorkFlow Discord

Log Components into your Velocity console with HEX color support

Archived

The functionality of this library has already been implemented in Velocity directly

See PaperMC/Velocity#1022

Installation

plugins {
    java
    id("com.github.johnrengelman.shadow:shadow") version "8.1.1"
}

repositories {
  mavenCentral()
}

dependencies {
    implementation("io.github.4drian3d:velocityhexlogger:1.0.2")
}

tasks {
    relocate("io.github._4drian3d.velocityhexlogger", "your.package.velocityhexlogger")
    relocate("net.kyori.adventure.text.logger.slf4j", "your.package.component.logger")
}

Usage

@Plugin(id = "my-plugin")
public class MyVelocityPlugin {
    private final ProxyServer proxyServer;
    private final HexLogger hexLogger;
    
    @Inject
    public MyVelocityPlugin(ProxyServer proxyServer, HexLogger hexLogger) {
        this.proxyServer = proxyServer;
        this.hexLogger = hexLogger;
    }
    
    @Subscribe
    public void onProxyInitialization(ProxyInitializationEvent event) {
        hexLogger.info(MiniMessage.miniMessage().deserialize("<rainbow>Plugin Started"));
    }
}