mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 18:47:40 +01:00
Add getTPS method
This commit is contained in:
parent
978feffa80
commit
376251dab7
2 changed files with 21 additions and 0 deletions
paper-api/src/main/java/org/bukkit
|
@ -2132,6 +2132,17 @@ public final class Bukkit {
|
|||
return server.getEntity(uuid);
|
||||
}
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Gets the current server TPS
|
||||
* @return current server TPS (1m, 5m, 15m in Paper-Server)
|
||||
*/
|
||||
@NotNull
|
||||
public static double[] getTPS() {
|
||||
return server.getTPS();
|
||||
}
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Get the advancement specified by this key.
|
||||
*
|
||||
|
|
|
@ -1815,6 +1815,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|||
@Nullable
|
||||
Entity getEntity(@NotNull UUID uuid);
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Gets the current server TPS
|
||||
*
|
||||
* @return current server TPS (1m, 5m, 15m in Paper-Server)
|
||||
*/
|
||||
@NotNull
|
||||
public double[] getTPS();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Get the advancement specified by this key.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue