mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 23:26:45 +01:00
fixes
This commit is contained in:
parent
85c638362b
commit
bcd113146b
@ -189,10 +189,8 @@ import org.bukkit.entity.Player;
|
|||||||
} else {
|
} else {
|
||||||
lastPlot = false;
|
lastPlot = false;
|
||||||
}
|
}
|
||||||
System.out.print("UNOWNED: " + start);
|
|
||||||
final PlotId end = new PlotId((start.x + size_x) - 1, (start.y + size_z) - 1);
|
final PlotId end = new PlotId((start.x + size_x) - 1, (start.y + size_z) - 1);
|
||||||
if (isUnowned(world, start, end)) {
|
if (isUnowned(world, start, end)) {
|
||||||
System.out.print("LAST PLOT: " + start);
|
|
||||||
for (int i = start.x; i <= end.x; i++) {
|
for (int i = start.x; i <= end.x; i++) {
|
||||||
for (int j = start.y; j <= end.y; j++) {
|
for (int j = start.y; j <= end.y; j++) {
|
||||||
final Plot plot = PlotHelper.getPlot(world, new PlotId(i, j));
|
final Plot plot = PlotHelper.getPlot(world, new PlotId(i, j));
|
||||||
|
@ -43,11 +43,23 @@ public enum Command {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
UNCLAIM("unclaim"),
|
DEBUGROADREGEN("debugroadregen"),
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
DEBUGROADREGEN("debugroadregen"),
|
REGENALLROADS("regenallroads"),
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
DEBUGLOADTEST("debugloadtest"),
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
DEBUGSAVETEST("debugsavetest"),
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UNCLAIM("unclaim"),
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -31,6 +31,7 @@ import com.intellectualcrafters.plot.object.*;
|
|||||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||||
import com.intellectualcrafters.plot.util.PlotHelper;
|
import com.intellectualcrafters.plot.util.PlotHelper;
|
||||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -172,7 +173,7 @@ public class DebugClaimTest extends SubCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ public class DebugClear extends SubCommand {
|
|||||||
HybridPlotManager manager = (HybridPlotManager) PlotMain.getPlotManager(world);
|
HybridPlotManager manager = (HybridPlotManager) PlotMain.getPlotManager(world);
|
||||||
manager.clearPlotExperimental(Bukkit.getWorld(world), plot, false);
|
manager.clearPlotExperimental(Bukkit.getWorld(world), plot, false);
|
||||||
PlotMain.sendConsoleSenderMessage("Plot " + plot.getId().toString() + " cleared.");
|
PlotMain.sendConsoleSenderMessage("Plot " + plot.getId().toString() + " cleared.");
|
||||||
|
PlotMain.sendConsoleSenderMessage("&aDone!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,6 +84,7 @@ public class DebugClear extends SubCommand {
|
|||||||
assert plot != null;
|
assert plot != null;
|
||||||
HybridPlotManager manager = (HybridPlotManager) PlotMain.getPlotManager(plr.getWorld());
|
HybridPlotManager manager = (HybridPlotManager) PlotMain.getPlotManager(plr.getWorld());
|
||||||
manager.clearPlotExperimental(plr.getWorld(), plot, false);
|
manager.clearPlotExperimental(plr.getWorld(), plot, false);
|
||||||
|
PlayerFunctions.sendMessage(plr, "&aDone!");
|
||||||
|
|
||||||
// sign
|
// sign
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ package com.intellectualcrafters.plot.commands;
|
|||||||
import com.intellectualcrafters.plot.PlotMain;
|
import com.intellectualcrafters.plot.PlotMain;
|
||||||
import com.intellectualcrafters.plot.database.DBFunc;
|
import com.intellectualcrafters.plot.database.DBFunc;
|
||||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
@ -34,7 +35,7 @@ import java.lang.reflect.Field;
|
|||||||
public class DebugLoadTest extends SubCommand {
|
public class DebugLoadTest extends SubCommand {
|
||||||
|
|
||||||
public DebugLoadTest() {
|
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
|
@Override
|
||||||
@ -50,7 +51,7 @@ public class DebugLoadTest extends SubCommand {
|
|||||||
PlotMain.sendConsoleSenderMessage("&3===END OF STACKTRACE===");
|
PlotMain.sendConsoleSenderMessage("&3===END OF STACKTRACE===");
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -25,14 +25,8 @@ import com.intellectualcrafters.plot.PlotMain;
|
|||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
import com.intellectualcrafters.plot.generator.HybridPlotManager;
|
import com.intellectualcrafters.plot.generator.HybridPlotManager;
|
||||||
import com.intellectualcrafters.plot.generator.HybridPlotWorld;
|
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.PlayerFunctions;
|
||||||
import com.intellectualcrafters.plot.util.PlotHelper;
|
|
||||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ import com.intellectualcrafters.plot.PlotMain;
|
|||||||
import com.intellectualcrafters.plot.database.DBFunc;
|
import com.intellectualcrafters.plot.database.DBFunc;
|
||||||
import com.intellectualcrafters.plot.object.Plot;
|
import com.intellectualcrafters.plot.object.Plot;
|
||||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -35,7 +36,7 @@ import java.util.ArrayList;
|
|||||||
public class DebugSaveTest extends SubCommand {
|
public class DebugSaveTest extends SubCommand {
|
||||||
|
|
||||||
public DebugSaveTest() {
|
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
|
@Override
|
||||||
@ -46,7 +47,7 @@ public class DebugSaveTest extends SubCommand {
|
|||||||
DBFunc.createPlots(plots);
|
DBFunc.createPlots(plots);
|
||||||
DBFunc.createAllSettingsAndHelpers(plots);
|
DBFunc.createAllSettingsAndHelpers(plots);
|
||||||
} else {
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class MainCommand implements CommandExecutor, TabCompleter {
|
|||||||
*/
|
*/
|
||||||
public static final String MAIN_PERMISSION = "plots.use";
|
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>() {
|
public final static ArrayList<SubCommand> subCommands = new ArrayList<SubCommand>() {
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ import org.bukkit.entity.Player;
|
|||||||
public class RegenAllRoads extends SubCommand {
|
public class RegenAllRoads extends SubCommand {
|
||||||
|
|
||||||
public RegenAllRoads() {
|
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
|
@Override
|
||||||
|
@ -61,8 +61,8 @@ import java.util.HashSet;
|
|||||||
@SuppressWarnings("deprecation") public class HybridPlotManager extends PlotManager {
|
@SuppressWarnings("deprecation") public class HybridPlotManager extends PlotManager {
|
||||||
|
|
||||||
public RegionWrapper CURRENT_PLOT_CLEAR;
|
public RegionWrapper CURRENT_PLOT_CLEAR;
|
||||||
public HashMap<ChunkLoc, HashMap<Short, Short>> GENERATE_BLOCKS;
|
public HashMap<ChunkLoc, HashMap<Short, Short>> GENERATE_BLOCKS = new HashMap<>();
|
||||||
public HashMap<ChunkLoc, HashMap<Short, Byte>> GENERATE_DATA;
|
public HashMap<ChunkLoc, HashMap<Short, Byte>> GENERATE_DATA = new HashMap<>();
|
||||||
private int task;
|
private int task;
|
||||||
private static boolean UPDATE = false;
|
private static boolean UPDATE = false;
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ import java.util.HashSet;
|
|||||||
else {
|
else {
|
||||||
ChunkLoc loc = chunks.get(0);
|
ChunkLoc loc = chunks.get(0);
|
||||||
|
|
||||||
PlotMain.sendConsoleSenderMessage("Updating .mcr: " + loc.x + ", "+loc.z + "(aprrox 256 chunks)");
|
PlotMain.sendConsoleSenderMessage("Updating .mcr: " + loc.x + ", "+loc.z + " (aprrox 256 chunks)");
|
||||||
PlotMain.sendConsoleSenderMessage("Remaining regions: "+chunks.size());
|
PlotMain.sendConsoleSenderMessage("Remaining regions: "+chunks.size());
|
||||||
|
|
||||||
regenerateChunkChunk(world, loc);
|
regenerateChunkChunk(world, loc);
|
||||||
@ -222,7 +222,6 @@ import java.util.HashSet;
|
|||||||
|
|
||||||
HybridPlotWorld plotworld = (HybridPlotWorld) PlotMain.getWorldSettings(world);
|
HybridPlotWorld plotworld = (HybridPlotWorld) PlotMain.getWorldSettings(world);
|
||||||
if (!plotworld.ROAD_SCHEMATIC_ENABLED) {
|
if (!plotworld.ROAD_SCHEMATIC_ENABLED) {
|
||||||
System.out.print("REGEN ROAD DISABLED");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,6 @@ public class YamlTranslationFile extends TranslationFile {
|
|||||||
}
|
}
|
||||||
if (this.map == null) {
|
if (this.map == null) {
|
||||||
this.map = new HashMap<String, String>();
|
this.map = new HashMap<String, String>();
|
||||||
System.out.println("Was null...");
|
|
||||||
}
|
}
|
||||||
for (final Map.Entry<String, String> objects : this.map.entrySet()) {
|
for (final Map.Entry<String, String> objects : this.map.entrySet()) {
|
||||||
final String key = objects.getKey();
|
final String key = objects.getKey();
|
||||||
|
Loading…
Reference in New Issue
Block a user