Replace blocks without blockupdates
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
8f7d3c74b7
Commit
0f9480f69e
@ -67,6 +67,7 @@ public class Config {
|
||||
public static final boolean TeamBlueRotate;
|
||||
public static final boolean ReplaceObsidian;
|
||||
public static final boolean ReplaceBedrock;
|
||||
public static final boolean ReplaceWithBlockupdates;
|
||||
|
||||
//team parameter
|
||||
public static final String TeamRedName;
|
||||
@ -156,6 +157,7 @@ public class Config {
|
||||
boolean rotate = config.getBoolean("Schematic.Rotate");
|
||||
ReplaceObsidian = config.getBoolean("Schematic.ReplaceObsidian");
|
||||
ReplaceBedrock = config.getBoolean("Schematic.ReplaceBedrock");
|
||||
ReplaceWithBlockupdates = config.getBoolean("Schematic.ReplaceWithBlockupdates");
|
||||
|
||||
TeamRedPrefix = config.getString("Output.TeamRedPrefix");
|
||||
TeamBluePrefix = config.getString("Output.TeamBluePrefix");
|
||||
|
@ -384,16 +384,22 @@ public class FightTeam implements IFightTeam{
|
||||
Location minPoint = new Location(world, cornerX, cornerY, cornerZ);
|
||||
Location maxPoint = new Location(world, (cornerX + Config.SchemsizeX), (cornerY + Config.SchemsizeY), (cornerZ + Config.SchemsizeZ));
|
||||
|
||||
FreezeWorld freezer = null;
|
||||
if(!Config.ReplaceWithBlockupdates)
|
||||
freezer = new FreezeWorld();
|
||||
|
||||
for(int x = minPoint.getBlockX(); x <= maxPoint.getBlockX(); x++) {
|
||||
for(int z = minPoint.getBlockZ(); z <= maxPoint.getBlockZ(); z++) {
|
||||
for(int y = minPoint.getBlockY(); y <= maxPoint.getBlockY(); y++) {
|
||||
|
||||
Block block = world.getBlockAt(x, y, z);
|
||||
if(block.getType() == target)
|
||||
block.setType(replacement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!Config.ReplaceWithBlockupdates)
|
||||
HandlerList.unregisterAll(freezer);
|
||||
}
|
||||
|
||||
private void setTeamColor(Team team, ChatColor color){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren