feat: initial commit

This commit is contained in:
Leo
2026-05-07 13:03:19 +02:00
commit 0dd8bf34f6
2 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package com.leohabrom.velocity.customServerIcon;
import com.google.inject.Inject;
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.event.proxy.ProxyPingEvent;
import com.velocitypowered.api.plugin.Plugin;
import org.slf4j.Logger;
import java.net.InetSocketAddress;
@Plugin(id = "custom-server-icon", name = "Custom Server Icon", version = "1.0-SNAPSHOT",
url = "https://", description = "I did it!", authors = {"Me"})
public class CustomServerIcon {
@Inject
private Logger logger;
@Subscribe
public void onProxyInitialization(ProxyInitializeEvent event) {
System.out.println("Hello from Custom Server Icon");
// Plugin initialization logic goes here
}
@Subscribe
public void onProxyPing(ProxyPingEvent event) {
InetSocketAddress address = event.getConnection().getVirtualHost().orElse(null);
if (address != null) {
System.out.println(address.getHostName());
}
}
}