mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking
This commit is contained in:
@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IPlotMain extends ILogger {
|
||||
|
||||
@ -244,7 +245,7 @@ public interface IPlotMain extends ILogger {
|
||||
*/
|
||||
@NotNull IndependentPlotGenerator getDefaultGenerator();
|
||||
|
||||
List<String> getPluginIds();
|
||||
List<Map.Entry<Map.Entry<String, String>, Boolean>> getPluginIds();
|
||||
|
||||
Actor getConsole();
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ import java.util.zip.ZipInputStream;
|
||||
if (Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS) {
|
||||
try {
|
||||
if (this.IMP.initWorldEdit()) {
|
||||
PlotSquared.debug(IMP.getPluginName() + " hooked into WorldEdit.");
|
||||
PlotSquared.log(Captions.PREFIX + "&6" + IMP.getPluginName() + " hooked into WorldEdit.");
|
||||
this.worldedit = WorldEdit.getInstance();
|
||||
WorldEdit.getInstance().getEventBus().register(new WESubscriber());
|
||||
if (Settings.Enabled_Components.COMMANDS) {
|
||||
@ -317,7 +317,7 @@ import java.util.zip.ZipInputStream;
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
PlotSquared.log(Captions.ENABLED.f(IMP.getPluginName()));
|
||||
PlotSquared.log(Captions.PREFIX + Captions.ENABLED.f(IMP.getPluginName()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,6 +21,7 @@ import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.RuntimeMXBean;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste",
|
||||
@ -54,12 +55,11 @@ public class DebugPaste extends SubCommand {
|
||||
b.append("online_mode: ").append(UUIDHandler.getUUIDWrapper()).append(';')
|
||||
.append(!Settings.UUID.OFFLINE).append('\n');
|
||||
b.append("Plugins:");
|
||||
for (String id : PlotSquared.get().IMP.getPluginIds()) {
|
||||
String[] split = id.split(":");
|
||||
String[] split2 = split[0].split(";");
|
||||
String enabled = split.length == 2 ? split[1] : "unknown";
|
||||
String name = split2[0];
|
||||
String version = split2.length == 2 ? split2[1] : "unknown";
|
||||
for (Map.Entry<Map.Entry<String, String>, Boolean> pluginInfo : PlotSquared.get().IMP.getPluginIds()) {
|
||||
Map.Entry<String, String> nameVersion = pluginInfo.getKey();
|
||||
String name = nameVersion.getKey();
|
||||
String version = nameVersion.getValue();
|
||||
boolean enabled = pluginInfo.getValue();
|
||||
b.append("\n ").append(name).append(":\n ").append("version: '")
|
||||
.append(version).append('\'').append("\n enabled: ").append(enabled);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ import java.util.concurrent.CompletableFuture;
|
||||
if (plot.removeMember(uuid)) {
|
||||
EventUtil.manager.callMember(player, plot, uuid, false);
|
||||
}
|
||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, args[0]);
|
||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, player.getName());
|
||||
} else {
|
||||
MainUtil.sendMessage(player, Captions.REMOVED_PLAYERS, 1);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class Settings extends Config {
|
||||
|
||||
@Comment("Show additional information in console") public static boolean DEBUG = false;
|
||||
@Comment({"The big annoying text that appears when you enter a plot",
|
||||
"For a single plot: `/plot flag set titles false`", "For just you: `/plot toggle titles`"})
|
||||
"For a single plot: `/plot flag set titles false`", "For just you: `/plot toggle titles`", "For all plots: Add `titles: false` in the worlds.yml flags block"})
|
||||
public static boolean TITLES = true;
|
||||
|
||||
@Create // This value will be generated automatically
|
||||
@ -331,7 +331,7 @@ public class Settings extends Config {
|
||||
true;
|
||||
@Comment("The UUID cacher is used to resolve player names") public static boolean
|
||||
UUID_CACHE = true;
|
||||
@Comment("The plugin auto updater") public static boolean UPDATER = true;
|
||||
@Comment("The plugin auto updater will notify you if updates are available.") public static boolean UPDATER = true;
|
||||
@Comment("Stores user metadata in a database") public static boolean PERSISTENT_META = true;
|
||||
@Comment("Optimizes permission checks") public static boolean PERMISSION_CACHE = true;
|
||||
@Comment("Optimizes block changing code") public static boolean BLOCK_CACHE = true;
|
||||
|
@ -700,7 +700,7 @@ public abstract class PlotArea {
|
||||
PlotId max = getMax();
|
||||
if (TYPE == 2) {
|
||||
center = new PlotId(MathMan.average(min.x, max.x), MathMan.average(min.y, max.y));
|
||||
plots = Math.max(max.x - min.x, max.y - min.y) + 1;
|
||||
plots = Math.max(max.x - min.x + 1, max.y - min.y + 1) + 1;
|
||||
if (start != null) {
|
||||
start = new PlotId(start.x - center.x, start.y - center.y);
|
||||
}
|
||||
@ -717,7 +717,7 @@ public abstract class PlotArea {
|
||||
PlotId currentId = new PlotId(center.x + start.x, center.y + start.y);
|
||||
Plot plot = getPlotAbs(currentId);
|
||||
if (plot != null && plot.canClaim(player)) {
|
||||
setMeta("lastPlot", currentId);
|
||||
setMeta("lastPlot", start);
|
||||
return plot;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user