Skip to content

Commit

Permalink
list ping event: add context.client_protocol_version
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 27, 2020
1 parent 75096de commit 0275526
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -35,6 +35,9 @@ public ObjectTag getContext(String name) {
else if (name.equals("version_name")) {
return new ElementTag(((PaperServerListPingEvent) event).getVersion());
}
else if (name.equals("client_protocol_version")) {
return new ElementTag(((PaperServerListPingEvent) event).getClient().getProtocolVersion());
}
return super.getContext(name);
}

Expand Down
Expand Up @@ -38,6 +38,7 @@ public class ListPingScriptEvent extends BukkitScriptEvent implements Listener {
// <context.address> returns the IP address requesting the list.
// <context.protocol_version> returns the protocol ID of the server's version (only on Paper).
// <context.version_name> returns the name of the server's version (only on Paper).
// <context.client_protocol_version> returns the client's protocol version ID (only on Paper).
//
// @Determine
// ElementTag(Number) to change the max player amount that will show.
Expand Down

0 comments on commit 0275526

Please sign in to comment.