mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-06 20:42:55 +00:00
Shorten class name (refactor if necessary)
This commit is contained in:
parent
4926cae53e
commit
289527b8e5
98 changed files with 748 additions and 754 deletions
|
@ -20,7 +20,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotSquared;
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.Location;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
|
@ -58,7 +58,7 @@ public class SchematicCmd extends SubCommand {
|
|||
switch (arg) {
|
||||
case "paste": {
|
||||
if (plr == null) {
|
||||
PlotSquared.log(C.IS_CONSOLE.s());
|
||||
PS.log(C.IS_CONSOLE.s());
|
||||
return false;
|
||||
}
|
||||
if (!Permissions.hasPermission(plr, "plots.schematic.paste")) {
|
||||
|
@ -134,7 +134,7 @@ public class SchematicCmd extends SubCommand {
|
|||
SchematicHandler.manager.pasteStates(schematic, plot, 0, 0);
|
||||
sendMessage(plr, C.SCHEMATIC_PASTE_SUCCESS);
|
||||
SchematicCmd.this.running = false;
|
||||
PlotSquared.getInstance().TASK.cancelTask(SchematicCmd.this.task);
|
||||
PS.get().TASK.cancelTask(SchematicCmd.this.task);
|
||||
return;
|
||||
}
|
||||
final int end = Math.min(start + 5000, blen);
|
||||
|
@ -155,7 +155,7 @@ public class SchematicCmd extends SubCommand {
|
|||
}
|
||||
case "test": {
|
||||
if (plr == null) {
|
||||
PlotSquared.log(C.IS_CONSOLE.s());
|
||||
PS.log(C.IS_CONSOLE.s());
|
||||
return false;
|
||||
}
|
||||
if (!Permissions.hasPermission(plr, "plots.schematic.test")) {
|
||||
|
@ -198,7 +198,7 @@ public class SchematicCmd extends SubCommand {
|
|||
MainUtil.sendMessage(null, "&cNeed world arg. Use &7/plots sch exportall <world>");
|
||||
return false;
|
||||
}
|
||||
final HashMap<PlotId, Plot> plotmap = PlotSquared.getInstance().getPlots(args[1]);
|
||||
final HashMap<PlotId, Plot> plotmap = PS.get().getPlots(args[1]);
|
||||
if ((plotmap == null) || (plotmap.size() == 0)) {
|
||||
MainUtil.sendMessage(plr, "&cInvalid world. Use &7/plots sch exportall <world>");
|
||||
return false;
|
||||
|
@ -215,8 +215,8 @@ public class SchematicCmd extends SubCommand {
|
|||
return false;
|
||||
}
|
||||
else {
|
||||
PlotSquared.log("&3PlotSquared&8->&3Schemaitc&8: &7Mass export has started. This may take a while.");
|
||||
PlotSquared.log("&3PlotSquared&8->&3Schemaitc&8: &7Found &c" + plotmap.size() + "&7 plots...");
|
||||
PS.log("&3PlotSquared&8->&3Schemaitc&8: &7Mass export has started. This may take a while.");
|
||||
PS.log("&3PlotSquared&8->&3Schemaitc&8: &7Found &c" + plotmap.size() + "&7 plots...");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -250,11 +250,11 @@ public class SchematicCmd extends SubCommand {
|
|||
world = args[1];
|
||||
final String[] split = args[2].split(";");
|
||||
final PlotId i = new PlotId(Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
||||
if ((PlotSquared.getInstance().getPlots(world) == null) || (PlotSquared.getInstance().getPlots(world).get(i) == null)) {
|
||||
if ((PS.get().getPlots(world) == null) || (PS.get().getPlots(world).get(i) == null)) {
|
||||
MainUtil.sendMessage(null, "&cInvalid world or id. Use &7/plots sch save <world> <id>");
|
||||
return false;
|
||||
}
|
||||
p2 = PlotSquared.getInstance().getPlots(world).get(i);
|
||||
p2 = PS.get().getPlots(world).get(i);
|
||||
} catch (final Exception e) {
|
||||
MainUtil.sendMessage(null, "&cInvalid world or id. Use &7/plots sch save <world> <id>");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue