forked from SteamWar/SteamWar
Add GameModeConfig#Schematic#ReplacementsWithoutBlockUpdates
Add GameModeConfig#Schematic#ReplacementsWithBlockUpdates
This commit is contained in:
@@ -45,6 +45,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@@ -179,18 +180,24 @@ public class FightSchematic extends StateDependent {
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
if(!Config.GameModeConfig.Schematic.ReplaceObsidianBedrock || Config.mode == ArenaMode.PREPARE)
|
||||
if (Config.mode == ArenaMode.PREPARE) {
|
||||
return;
|
||||
}
|
||||
|
||||
FreezeWorld freezer = null;
|
||||
if(!Config.GameModeConfig.Schematic.ReplaceWithBlockupdates)
|
||||
if (!Config.GameModeConfig.Schematic.ReplacementsWithoutBlockUpdates.isEmpty()) {
|
||||
freezer = new FreezeWorld();
|
||||
|
||||
replaceSync(Material.OBSIDIAN, Material.TNT);
|
||||
replaceSync(Material.BEDROCK, Material.SLIME_BLOCK);
|
||||
|
||||
if(!Config.GameModeConfig.Schematic.ReplaceWithBlockupdates)
|
||||
}
|
||||
for (Map.Entry<Material, Material> replacement : Config.GameModeConfig.Schematic.ReplacementsWithoutBlockUpdates.entrySet()) {
|
||||
replaceSync(replacement.getKey(), replacement.getValue());
|
||||
}
|
||||
if (freezer != null) {
|
||||
freezer.disable();
|
||||
}
|
||||
|
||||
for (Map.Entry<Material, Material> replacement : Config.GameModeConfig.Schematic.ReplacementsWithBlockUpdates.entrySet()) {
|
||||
replaceSync(replacement.getKey(), replacement.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public void pasteTeamName(){
|
||||
|
||||
Reference in New Issue
Block a user