commit 0dd8bf34f6354f74ec851c93e4b4e1363df458bd Author: Leo Date: Thu May 7 13:03:19 2026 +0200 feat: initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9dc0a80 --- /dev/null +++ b/.gitignore @@ -0,0 +1,57 @@ +# Created by https://www.toptal.com/developers/gitignore/api/java,gradle +# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* + +### Gradle ### +.gradle +**/build/ +!src/**/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Avoid ignore Gradle wrappper properties +!gradle-wrapper.properties + +# Cache of project +.gradletasknamecache + +# Eclipse Gradle plugin generated files +# Eclipse Core +.project +# JDT-specific (Eclipse Java Development Tools) +.classpath + +### Gradle Patch ### +# Java heap dump +*.hprof + +# End of https://www.toptal.com/developers/gitignore/api/java,gradle \ No newline at end of file diff --git a/src/main/java/com/leohabrom/velocity/customServerIcon/CustomServerIcon.java b/src/main/java/com/leohabrom/velocity/customServerIcon/CustomServerIcon.java new file mode 100644 index 0000000..f2cd292 --- /dev/null +++ b/src/main/java/com/leohabrom/velocity/customServerIcon/CustomServerIcon.java @@ -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()); + } + } +}