mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-17 12:54:43 +02:00
stuff
This commit is contained in:
@ -225,7 +225,7 @@ public class Auto extends SubCommand {
|
||||
Claim.claimPlot(plr, plot, teleport, true);
|
||||
}
|
||||
}
|
||||
if (!MainUtil.mergePlots(worldname, MainUtil.getPlotSelectionIds(start, end), true)) {
|
||||
if (!MainUtil.mergePlots(worldname, MainUtil.getPlotSelectionIds(start, end), true, true)) {
|
||||
return false;
|
||||
}
|
||||
br = true;
|
||||
|
@ -40,8 +40,6 @@ import javax.script.ScriptEngineManager;
|
||||
import javax.script.ScriptException;
|
||||
import javax.script.SimpleScriptContext;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
|
@ -23,6 +23,7 @@ package com.intellectualcrafters.plot.commands;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.PS.SortType;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
@ -51,7 +52,7 @@ public class Home extends SubCommand {
|
||||
@Override
|
||||
public boolean onCommand(final PlotPlayer plr, String[] args) {
|
||||
|
||||
final ArrayList<Plot> plots = PS.get().sortPlotsByWorld(PS.get().getPlots(plr));
|
||||
final ArrayList<Plot> plots = PS.get().sortPlots(PS.get().getPlots(plr), SortType.CREATION_DATE, null);
|
||||
if (plots.size() == 1) {
|
||||
MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(0));
|
||||
return true;
|
||||
|
@ -20,21 +20,12 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.OfflinePlotPlayer;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.EconHandler;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.StringMan;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.plotsquared.general.commands.Argument;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
@ -38,7 +38,6 @@ import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.StringMan;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.plotsquared.general.commands.Argument;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
@CommandDeclaration(
|
||||
@ -212,7 +211,7 @@ public class Merge extends SubCommand {
|
||||
return;
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.SUCCESS_MERGE);
|
||||
MainUtil.mergePlots(world, plots, true);
|
||||
MainUtil.mergePlots(world, plots, true, true);
|
||||
MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);
|
||||
}
|
||||
MainUtil.sendMessage(accepter, C.MERGE_ACCEPTED);
|
||||
@ -241,7 +240,7 @@ public class Merge extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.SUCCESS_MERGE);
|
||||
MainUtil.mergePlots(world, plots, true);
|
||||
MainUtil.mergePlots(world, plots, true, true);
|
||||
MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);
|
||||
return true;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ package com.intellectualcrafters.plot.commands;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
@ -181,7 +181,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 = PS.get().getPlots(args[1]);
|
||||
final Map<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;
|
||||
|
@ -25,6 +25,7 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.PS.SortType;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
@ -67,10 +68,10 @@ public class Visit extends SubCommand {
|
||||
UUID user = UUIDHandler.getCachedUUID(args[0], null);
|
||||
if (user != null ) {
|
||||
// do plots by username
|
||||
plots = PS.get().sortPlots(PS.get().getPlots(user), null);
|
||||
plots = PS.get().sortPlots(PS.get().getPlots(user), SortType.CREATION_DATE, null);
|
||||
} else if (PS.get().isPlotWorld(args[0])) {
|
||||
// do plots by world
|
||||
plots = PS.get().sortPlots(PS.get().getPlots(args[0]).values(), null);
|
||||
plots = PS.get().sortPlots(PS.get().getPlots(args[0]).values(), SortType.CREATION_DATE, null);
|
||||
}
|
||||
else {
|
||||
Plot plot = MainUtil.getPlotFromString(plr, args[0], true);
|
||||
|
@ -20,7 +20,6 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
|
@ -30,6 +30,7 @@ import java.util.UUID;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.PS.SortType;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.config.Settings;
|
||||
import com.intellectualcrafters.plot.flag.Flag;
|
||||
@ -303,7 +304,7 @@ public class list extends SubCommand {
|
||||
|
||||
public void displayPlots(PlotPlayer player, List<Plot> plots, int pageSize, int page, String world, String[] args, boolean sort) {
|
||||
if (sort) {
|
||||
plots = PS.get().sortPlots(plots, world);
|
||||
plots = PS.get().sortPlots(plots, SortType.CREATION_DATE, world);
|
||||
}
|
||||
if (page < 0) {
|
||||
page = 0;
|
||||
|
Reference in New Issue
Block a user