mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-26 04:25:37 +01:00
Add hunger API, bump protocol to 5
This commit is contained in:
parent
e0f9344d20
commit
8370a72776
@ -641,7 +641,7 @@ public class MVWorld implements MultiverseWorld {
|
||||
return this.keepSpawnInMemory;
|
||||
}
|
||||
|
||||
private void setHunger(boolean hunger) {
|
||||
public void setHunger(boolean hunger) {
|
||||
this.hunger = hunger;
|
||||
config.setProperty("worlds." + this.name + ".hunger", this.hunger);
|
||||
saveConfig();
|
||||
|
@ -44,7 +44,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
|
||||
private final static int Protocol = 4;
|
||||
private final static int Protocol = 5;
|
||||
|
||||
@Override
|
||||
public String dumpVersionInfo(String buffer) {
|
||||
|
@ -234,5 +234,10 @@ public interface MultiverseWorld {
|
||||
*/
|
||||
public void setHunger(boolean hungerEnabled);
|
||||
|
||||
public void
|
||||
/**
|
||||
* Gets whether or not the hunger level of players will go down in a world.
|
||||
*
|
||||
* @return True if it will go down, false if it will remain steady.
|
||||
*/
|
||||
public boolean getHunger();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user