mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Use fireTick game rule only in 1.13+; resolves #785
This commit is contained in:
parent
ca8ded0788
commit
3ed39ba92f
@ -19,6 +19,7 @@ package de.erethon.dungeonsxl.world;
|
||||
import de.erethon.caliburn.CaliburnAPI;
|
||||
import de.erethon.caliburn.item.ExItem;
|
||||
import de.erethon.caliburn.item.VanillaItem;
|
||||
import de.erethon.commons.compatibility.Internals;
|
||||
import de.erethon.commons.compatibility.Version;
|
||||
import de.erethon.commons.misc.BlockUtil;
|
||||
import de.erethon.commons.misc.FileUtil;
|
||||
@ -407,7 +408,9 @@ public class DGameWorld extends DInstanceWorld implements GameWorld {
|
||||
}
|
||||
|
||||
getWorld().setDifficulty(getRules().getState(GameRule.DIFFICULTY));
|
||||
getWorld().setGameRule(org.bukkit.GameRule.DO_FIRE_TICK, getRules().getState(GameRule.FIRE_TICK));
|
||||
if (Internals.isAtLeast(Internals.v1_13_R1)) {
|
||||
getWorld().setGameRule(org.bukkit.GameRule.DO_FIRE_TICK, getRules().getState(GameRule.FIRE_TICK));
|
||||
}
|
||||
|
||||
isPlaying = true;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
package de.erethon.dungeonsxl.world;
|
||||
|
||||
import de.erethon.commons.chat.MessageUtil;
|
||||
import de.erethon.commons.compatibility.Internals;
|
||||
import de.erethon.commons.compatibility.Version;
|
||||
import de.erethon.commons.misc.FileUtil;
|
||||
import de.erethon.dungeonsxl.DungeonsXL;
|
||||
@ -201,7 +202,9 @@ public class DResourceWorld implements ResourceWorld {
|
||||
|
||||
FileUtil.copyDir(folder, instanceFolder, DungeonsXL.EXCLUDED_FILES);
|
||||
instance.world = Bukkit.createWorld(WorldCreator.name(name).environment(getWorldEnvironment())).getName();
|
||||
instance.getWorld().setGameRule(GameRule.DO_FIRE_TICK, false);
|
||||
if (Internals.isAtLeast(Internals.v1_13_R1)) {
|
||||
instance.getWorld().setGameRule(GameRule.DO_FIRE_TICK, false);
|
||||
}
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("dynmap")) {
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "dynmap pause all");
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "dmap worldset " + name + " enabled:false");
|
||||
|
Loading…
Reference in New Issue
Block a user