Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
Added Difficulty API.
Dieser Commit ist enthalten in:
Ursprung
3a224266c4
Commit
7c5007c016
@ -34,6 +34,7 @@ import org.bukkit.TreeType;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
import org.bukkit.Difficulty;
|
||||
|
||||
public class CraftWorld implements World {
|
||||
private final WorldServer world;
|
||||
@ -578,6 +579,14 @@ public class CraftWorld implements World {
|
||||
world.savingDisabled = !value;
|
||||
}
|
||||
|
||||
public void setDifficulty(Difficulty difficulty) {
|
||||
this.getHandle().difficulty = difficulty.getValue();
|
||||
}
|
||||
|
||||
public Difficulty getDifficulty() {
|
||||
return Difficulty.getByValue(this.getHandle().difficulty);
|
||||
}
|
||||
|
||||
public boolean hasStorm() {
|
||||
return world.worldData.hasStorm();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren