mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-24 17:47:41 +01:00
Add a tab list handler to allow plugins to customize the tab list.
This commit is contained in:
parent
14e196e952
commit
4cef0b2395
@ -1,5 +1,6 @@
|
||||
package net.md_5.bungee.api;
|
||||
|
||||
import net.md_5.bungee.api.connection.Connection;
|
||||
import net.md_5.bungee.api.plugin.PluginManager;
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.util.Collection;
|
||||
|
47
api/src/main/java/net/md_5/bungee/api/TabListHandler.java
Normal file
47
api/src/main/java/net/md_5/bungee/api/TabListHandler.java
Normal file
@ -0,0 +1,47 @@
|
||||
package net.md_5.bungee.api;
|
||||
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
|
||||
public interface TabListHandler
|
||||
{
|
||||
|
||||
/**
|
||||
* Called when a player first connects to the proxy.
|
||||
*
|
||||
* @param player the connecting player
|
||||
*/
|
||||
public void onConnect(ProxiedPlayer player);
|
||||
|
||||
/**
|
||||
* Called when a player changes their connected server.
|
||||
*
|
||||
* @param player the player who changed servers
|
||||
*/
|
||||
public void onServerChange(ProxiedPlayer player);
|
||||
|
||||
/**
|
||||
* Called when a players ping changes.
|
||||
*
|
||||
* @param player the player who's ping changed
|
||||
* @param ping the player's new ping.
|
||||
*/
|
||||
public void onPingChange(ProxiedPlayer player, int ping);
|
||||
|
||||
/**
|
||||
* Called when a player disconnects.
|
||||
*
|
||||
* @param player the disconnected player
|
||||
*/
|
||||
public void onDisconnect(ProxiedPlayer player);
|
||||
|
||||
/**
|
||||
* Called when a list update packet is sent from server to client.
|
||||
*
|
||||
* @param player receiving this packet
|
||||
* @param name the player which this packet is relevant to
|
||||
* @param online whether the subject player is online
|
||||
* @param ping ping of the subject player
|
||||
* @return whether to send the packet to the client
|
||||
*/
|
||||
public boolean onListUpdate(ProxiedPlayer player, String name, boolean online, int ping);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package net.md_5.bungee.api;
|
||||
package net.md_5.bungee.api.connection;
|
||||
|
||||
/**
|
||||
* Represents a player physically connected to the world hosted on this server.
|
@ -1,4 +1,4 @@
|
||||
package net.md_5.bungee.api;
|
||||
package net.md_5.bungee.api.connection;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.md_5.bungee.api;
|
||||
package net.md_5.bungee.api.connection;
|
||||
|
||||
/**
|
||||
* Represents a user attempting to log into the proxy.
|
@ -1,4 +1,6 @@
|
||||
package net.md_5.bungee.api;
|
||||
package net.md_5.bungee.api.connection;
|
||||
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
|
||||
/**
|
||||
* Represents a player who's connection is being connected to somewhere else,
|
@ -1,7 +1,9 @@
|
||||
package net.md_5.bungee.api;
|
||||
package net.md_5.bungee.api.connection;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.md_5.bungee.api.Callback;
|
||||
import net.md_5.bungee.api.ServerPing;
|
||||
|
||||
/**
|
||||
* Represents a destination which this proxy might connect to.
|
@ -3,7 +3,7 @@ package net.md_5.bungee.api.event;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import net.md_5.bungee.api.Connection;
|
||||
import net.md_5.bungee.api.connection.Connection;
|
||||
import net.md_5.bungee.api.plugin.Cancellable;
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.md_5.bungee.api.event;
|
||||
|
||||
import lombok.Data;
|
||||
import net.md_5.bungee.api.PendingConnection;
|
||||
import net.md_5.bungee.api.connection.PendingConnection;
|
||||
import net.md_5.bungee.api.plugin.Cancellable;
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@ package net.md_5.bungee.api.event;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import net.md_5.bungee.api.Connection;
|
||||
import net.md_5.bungee.api.connection.Connection;
|
||||
import net.md_5.bungee.api.plugin.Cancellable;
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@ package net.md_5.bungee.api.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import net.md_5.bungee.api.Connection;
|
||||
import net.md_5.bungee.api.connection.Connection;
|
||||
|
||||
/**
|
||||
* An event which occurs in the communication between two nodes. It is not
|
||||
|
Loading…
Reference in New Issue
Block a user