This commit is contained in:
boy0001 2014-12-29 00:47:35 +11:00
parent 85c638362b
commit bcd113146b
11 changed files with 32 additions and 25 deletions

View File

@ -189,10 +189,8 @@ import org.bukkit.entity.Player;
} else {
lastPlot = false;
}
System.out.print("UNOWNED: " + start);
final PlotId end = new PlotId((start.x + size_x) - 1, (start.y + size_z) - 1);
if (isUnowned(world, start, end)) {
System.out.print("LAST PLOT: " + start);
for (int i = start.x; i <= end.x; i++) {
for (int j = start.y; j <= end.y; j++) {
final Plot plot = PlotHelper.getPlot(world, new PlotId(i, j));

View File

@ -43,11 +43,23 @@ public enum Command {
/**
*
*/
UNCLAIM("unclaim"),
DEBUGROADREGEN("debugroadregen"),
/**
*
*/
DEBUGROADREGEN("debugroadregen"),
REGENALLROADS("regenallroads"),
/**
*
*/
DEBUGLOADTEST("debugloadtest"),
/**
*
*/
DEBUGSAVETEST("debugsavetest"),
/**
*
*/
UNCLAIM("unclaim"),
/**
*
*/

View File

@ -31,6 +31,7 @@ import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.PlayerFunctions;
import com.intellectualcrafters.plot.util.PlotHelper;
import com.intellectualcrafters.plot.util.UUIDHandler;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Location;
@ -172,7 +173,7 @@ public class DebugClaimTest extends SubCommand {
}
} else {
PlayerFunctions.sendMessage(plr, "This debug command can only be executed by console as it has been deemed unsafe if abused.");
PlayerFunctions.sendMessage(plr, "&6This command can only be executed by console as it has been deemed unsafe if abused.");
}
return true;
}

View File

@ -63,6 +63,7 @@ public class DebugClear extends SubCommand {
HybridPlotManager manager = (HybridPlotManager) PlotMain.getPlotManager(world);
manager.clearPlotExperimental(Bukkit.getWorld(world), plot, false);
PlotMain.sendConsoleSenderMessage("Plot " + plot.getId().toString() + " cleared.");
PlotMain.sendConsoleSenderMessage("&aDone!");
}
}
}
@ -83,6 +84,7 @@ public class DebugClear extends SubCommand {
assert plot != null;
HybridPlotManager manager = (HybridPlotManager) PlotMain.getPlotManager(plr.getWorld());
manager.clearPlotExperimental(plr.getWorld(), plot, false);
PlayerFunctions.sendMessage(plr, "&aDone!");
// sign

View File

@ -24,6 +24,7 @@ package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PlotMain;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.util.PlayerFunctions;
import org.bukkit.entity.Player;
import java.lang.reflect.Field;
@ -34,7 +35,7 @@ import java.lang.reflect.Field;
public class DebugLoadTest extends SubCommand {
public DebugLoadTest() {
super(Command.DEBUGCLAIMTEST, "This debug command will force the reload of all plots in the DB", "debugloadtest", CommandCategory.DEBUG, false);
super(Command.DEBUGLOADTEST, "This debug command will force the reload of all plots in the DB", "debugloadtest", CommandCategory.DEBUG, false);
}
@Override
@ -50,7 +51,7 @@ public class DebugLoadTest extends SubCommand {
PlotMain.sendConsoleSenderMessage("&3===END OF STACKTRACE===");
}
} else {
PlayerFunctions.sendMessage(plr, "This debug command can only be executed by console as it has been deemed unsafe if abused.");
PlayerFunctions.sendMessage(plr, "&6This command can only be executed by console as it has been deemed unsafe if abused..");
}
return true;
}

View File

@ -25,14 +25,8 @@ import com.intellectualcrafters.plot.PlotMain;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.generator.HybridPlotManager;
import com.intellectualcrafters.plot.generator.HybridPlotWorld;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.PlayerFunctions;
import com.intellectualcrafters.plot.util.PlotHelper;
import com.intellectualcrafters.plot.util.UUIDHandler;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.entity.Player;

View File

@ -25,6 +25,7 @@ import com.intellectualcrafters.plot.PlotMain;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.util.PlayerFunctions;
import org.bukkit.entity.Player;
import java.util.ArrayList;
@ -35,7 +36,7 @@ import java.util.ArrayList;
public class DebugSaveTest extends SubCommand {
public DebugSaveTest() {
super(Command.DEBUGCLAIMTEST, "This debug command will force the recreation of all plots in the DB", "debugsavetest", CommandCategory.DEBUG, false);
super(Command.DEBUGSAVETEST, "This debug command will force the recreation of all plots in the DB", "debugsavetest", CommandCategory.DEBUG, false);
}
@Override
@ -46,7 +47,7 @@ public class DebugSaveTest extends SubCommand {
DBFunc.createPlots(plots);
DBFunc.createAllSettingsAndHelpers(plots);
} else {
PlayerFunctions.sendMessage(plr, "This debug command can only be executed by console as it has been deemed unsafe if abused.");
PlayerFunctions.sendMessage(plr, "This debug command can only be executed by console as it has been deemed unsafe if abused");
}
return true;
}

View File

@ -48,7 +48,7 @@ public class MainCommand implements CommandExecutor, TabCompleter {
*/
public static final String MAIN_PERMISSION = "plots.use";
private final static SubCommand[] _subCommands = new SubCommand[]{new CreateRoadSchematic(), new RegenAllRoads(), new DebugRoadRegen(), new DebugClear(), new Ban(), new Unban(), new OP(), new DEOP(), new Claim(), new Paste(), new Copy(), new Clipboard(), new Auto(), new Home(), new Visit(), new TP(), new Set(), new Clear(), new Delete(), new SetOwner(), new Denied(), new Helpers(), new Trusted(), new Info(), new list(), new Help(), new Debug(), new Schematic(), new plugin(), new Inventory(), new Purge(), new Reload(), new Merge(), new Unlink(), new Kick(), new Setup(), new Rate(), new DebugClaimTest(), new Inbox(), new Comment(), new Database(), new Unclaim(), new Swap(), new MusicSubcommand()};
private final static SubCommand[] _subCommands = new SubCommand[]{new DebugSaveTest(), new DebugLoadTest(), new CreateRoadSchematic(), new RegenAllRoads(), new DebugClear(), new Ban(), new Unban(), new OP(), new DEOP(), new Claim(), new Paste(), new Copy(), new Clipboard(), new Auto(), new Home(), new Visit(), new TP(), new Set(), new Clear(), new Delete(), new SetOwner(), new Denied(), new Helpers(), new Trusted(), new Info(), new list(), new Help(), new Debug(), new Schematic(), new plugin(), new Inventory(), new Purge(), new Reload(), new Merge(), new Unlink(), new Kick(), new Setup(), new Rate(), new DebugClaimTest(), new Inbox(), new Comment(), new Database(), new Unclaim(), new Swap(), new MusicSubcommand(), new DebugRoadRegen()};
public final static ArrayList<SubCommand> subCommands = new ArrayList<SubCommand>() {
{

View File

@ -44,7 +44,7 @@ import org.bukkit.entity.Player;
public class RegenAllRoads extends SubCommand {
public RegenAllRoads() {
super(Command.DEBUGROADREGEN, "Regenerate all road schematic in your current chunk", "debugroadregen", CommandCategory.DEBUG, false);
super(Command.REGENALLROADS, "Regenerate all road schematic in your current chunk", "regenallroads", CommandCategory.DEBUG, false);
}
@Override

View File

@ -61,8 +61,8 @@ import java.util.HashSet;
@SuppressWarnings("deprecation") public class HybridPlotManager extends PlotManager {
public RegionWrapper CURRENT_PLOT_CLEAR;
public HashMap<ChunkLoc, HashMap<Short, Short>> GENERATE_BLOCKS;
public HashMap<ChunkLoc, HashMap<Short, Byte>> GENERATE_DATA;
public HashMap<ChunkLoc, HashMap<Short, Short>> GENERATE_BLOCKS = new HashMap<>();
public HashMap<ChunkLoc, HashMap<Short, Byte>> GENERATE_DATA = new HashMap<>();
private int task;
private static boolean UPDATE = false;
@ -222,7 +222,6 @@ import java.util.HashSet;
HybridPlotWorld plotworld = (HybridPlotWorld) PlotMain.getWorldSettings(world);
if (!plotworld.ROAD_SCHEMATIC_ENABLED) {
System.out.print("REGEN ROAD DISABLED");
return false;
}

View File

@ -200,7 +200,6 @@ public class YamlTranslationFile extends TranslationFile {
}
if (this.map == null) {
this.map = new HashMap<String, String>();
System.out.println("Was null...");
}
for (final Map.Entry<String, String> objects : this.map.entrySet()) {
final String key = objects.getKey();