Add hunger API, bump protocol to 5

This commit is contained in:
Eric Stokes 2011-10-09 11:48:09 -06:00
parent e0f9344d20
commit 8370a72776
3 changed files with 8 additions and 3 deletions

View File

@ -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();

View File

@ -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) {

View File

@ -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();
}