#758: Add missing server properties methods from 1.19

By: Doc <nachito94@msn.com>
This commit is contained in:
Bukkit/Spigot 2022-06-18 20:48:59 +10:00
parent f786e8cff4
commit 3cdd9f03ce
2 changed files with 56 additions and 0 deletions

View File

@ -1007,6 +1007,26 @@ public final class Bukkit {
server.setSpawnRadius(value);
}
/**
* Gets whether the server should send a preview of the player's chat
* message to the client when the player sends a message
*
* @return true if the server should send a preview, false otherwise
*/
public static boolean shouldSendChatPreviews() {
return server.shouldSendChatPreviews();
}
/**
* Gets whether the server only allow players with Mojang-signed public key
* to join
*
* @return true if only Mojang-signed players can join, false otherwise
*/
public static boolean isEnforcingSecureProfiles() {
return server.isEnforcingSecureProfiles();
}
/**
* Gets whether the Server hide online players in server status.
*
@ -1368,6 +1388,17 @@ public final class Bukkit {
return server.createMerchant(title);
}
/**
* Gets the amount of consecutive neighbor updates before skipping
* additional ones.
*
* @return the amount of consecutive neighbor updates, if the value is
* negative then the limit it's not used
*/
public static int getMaxChainedNeighborUpdates() {
return server.getMaxChainedNeighborUpdates();
}
/**
* Gets user-specified limit for number of monsters that can spawn in a
* chunk.

View File

@ -853,6 +853,22 @@ public interface Server extends PluginMessageRecipient {
*/
public void setSpawnRadius(int value);
/**
* Gets whether the server should send a preview of the player's chat
* message to the client when the player types a message
*
* @return true if the server should send a preview, false otherwise
*/
public boolean shouldSendChatPreviews();
/**
* Gets whether the server only allow players with Mojang-signed public key
* to join
*
* @return true if only Mojang-signed players can join, false otherwise
*/
public boolean isEnforcingSecureProfiles();
/**
* Gets whether the Server hide online players in server status.
*
@ -1156,6 +1172,15 @@ public interface Server extends PluginMessageRecipient {
@NotNull
Merchant createMerchant(@Nullable String title);
/**
* Gets the amount of consecutive neighbor updates before skipping
* additional ones.
*
* @return the amount of consecutive neighbor updates, if the value is
* negative then the limit it's not used
*/
int getMaxChainedNeighborUpdates();
/**
* Gets user-specified limit for number of monsters that can spawn in a
* chunk.