mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
Add API for ambient mob spawn limit. Adds BUKKIT-2765
By: Travis Watkins <amaranth@ubuntu.com>
This commit is contained in:
parent
38f6b24c1c
commit
e4567e091b
@ -371,6 +371,10 @@ public final class Bukkit {
|
|||||||
return server.getWaterAnimalSpawnLimit();
|
return server.getWaterAnimalSpawnLimit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getAmbientSpawnLimit() {
|
||||||
|
return server.getAmbientSpawnLimit();
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isPrimaryThread() {
|
public static boolean isPrimaryThread() {
|
||||||
return server.isPrimaryThread();
|
return server.isPrimaryThread();
|
||||||
}
|
}
|
||||||
|
@ -648,6 +648,12 @@ public interface Server extends PluginMessageRecipient {
|
|||||||
*/
|
*/
|
||||||
int getWaterAnimalSpawnLimit();
|
int getWaterAnimalSpawnLimit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets user-specified limit for number of ambient mobs that can spawn in a chunk
|
||||||
|
* @returns The ambient spawn limit
|
||||||
|
*/
|
||||||
|
int getAmbientSpawnLimit();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the current {@link Thread} is the server's primary thread
|
* Returns true if the current {@link Thread} is the server's primary thread
|
||||||
*/
|
*/
|
||||||
@ -666,4 +672,4 @@ public interface Server extends PluginMessageRecipient {
|
|||||||
* @return The configured WarningState
|
* @return The configured WarningState
|
||||||
*/
|
*/
|
||||||
public WarningState getWarningState();
|
public WarningState getWarningState();
|
||||||
}
|
}
|
||||||
|
@ -983,6 +983,20 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|||||||
*/
|
*/
|
||||||
void setWaterAnimalSpawnLimit(int limit);
|
void setWaterAnimalSpawnLimit(int limit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the limit for number of ambient mobs that can spawn in a chunk in this world
|
||||||
|
* @returns The ambient spawn limit
|
||||||
|
*/
|
||||||
|
int getAmbientSpawnLimit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the limit for number of ambient mobs that can spawn in a chunk in this world
|
||||||
|
* <p />
|
||||||
|
* <b>Note:</b>
|
||||||
|
* If set to a negative number the world will use the server-wide spawn limit instead.
|
||||||
|
*/
|
||||||
|
void setAmbientSpawnLimit(int limit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play a Sound at the provided Location in the World
|
* Play a Sound at the provided Location in the World
|
||||||
* <p />
|
* <p />
|
||||||
|
Loading…
Reference in New Issue
Block a user