feat: initial commit
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user