Minecraft 25w20a protocol support
This commit is contained in:
@@ -31,6 +31,12 @@
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-dialog</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-event</artifactId>
|
||||
|
@@ -12,6 +12,7 @@ import net.md_5.bungee.api.SkinConfiguration;
|
||||
import net.md_5.bungee.api.Title;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
import net.md_5.bungee.api.dialog.Dialog;
|
||||
import net.md_5.bungee.api.event.ServerConnectEvent;
|
||||
import net.md_5.bungee.api.score.Scoreboard;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -390,4 +391,23 @@ public interface ProxiedPlayer extends Connection, CommandSender
|
||||
* @return the brand of the client, or null if not received yet
|
||||
*/
|
||||
String getClientBrand();
|
||||
|
||||
/**
|
||||
* Clear the player's open dialog.
|
||||
*
|
||||
* @throws IllegalStateException if the players version is not at least
|
||||
* 1.21.6
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
void clearDialog();
|
||||
|
||||
/**
|
||||
* Show a dialog to the player.
|
||||
*
|
||||
* @param dialog the dialog to show
|
||||
* @throws IllegalStateException if the players version is not at least
|
||||
* 1.21.6
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
void showDialog(Dialog dialog);
|
||||
}
|
||||
|
@@ -0,0 +1,43 @@
|
||||
package net.md_5.bungee.api.event;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.plugin.Cancellable;
|
||||
import net.md_5.bungee.api.plugin.Event;
|
||||
|
||||
/**
|
||||
* Called after a {@link ProxiedPlayer} runs a custom action from a chat event
|
||||
* or form submission.
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CustomClickEvent extends Event implements Cancellable
|
||||
{
|
||||
|
||||
/**
|
||||
* Map key containing the form action, if available.
|
||||
*/
|
||||
public static final String ACTION_KEY = "action";
|
||||
//
|
||||
/**
|
||||
* Player who clicked.
|
||||
*/
|
||||
private final ProxiedPlayer player;
|
||||
/**
|
||||
* Custom action ID.
|
||||
*/
|
||||
private final String id;
|
||||
/**
|
||||
* Form data, may be null. If a form submission, usually contains a key
|
||||
* {@link ACTION_KEY} with the ID of the relevant submission action.
|
||||
*/
|
||||
private final Map<String, String> data;
|
||||
/**
|
||||
* Cancelled state.
|
||||
*/
|
||||
private boolean cancelled;
|
||||
}
|
Reference in New Issue
Block a user