summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index d4c23515..beb87eb6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -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();
}