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

Latest commit

 

History

History
56 lines (43 loc) · 1.55 KB

README.md

File metadata and controls

56 lines (43 loc) · 1.55 KB

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"));
    }
}