mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking
This commit is contained in:
commit
006d730185
@ -11,7 +11,7 @@ assignees: ''
|
||||
|
||||
<!--- ##### DO NOT REMOVE THIS TEMPLATE! YOUR ISSUE *WILL* FIT IN IT! ##### -->
|
||||
|
||||
# NOTICE:
|
||||
<!--- # NOTICE:
|
||||
```diff
|
||||
! PlotSquared for Minecraft Java Edition versions between 1.7 through to 1.12.2 are considered
|
||||
! legacy, and will receive limited to no support. Please consider upgrading to 1.13+ for
|
||||
@ -27,8 +27,9 @@ assignees: ''
|
||||
**Code contributions are to be done through [PRs](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request), tagging the specific issue ticket(s) if applicable.**
|
||||
|
||||
**[DISCORD INVITE LINK](https://discord.gg/cSMxtGn)** and please, for the love of the little sanity we have left, use the correct channels!
|
||||
-->
|
||||
|
||||
# BUG REPORT TEMPLATE:
|
||||
# Bug Report Template:
|
||||
<!--- Incomplete reports will most likely be marked as invalid, and closed, with few exceptions.-->
|
||||
## Required Information section:
|
||||
> ALL FIELDS IN THIS SECTION ARE REQUIRED, and must contain appropriate information
|
||||
@ -55,7 +56,9 @@ assignees: ''
|
||||
|
||||
### Server build info:
|
||||
<!--- Run /version in-game or in console & paste the full output here: -->
|
||||
``` paste here, between the tick marks, replacing this text ```
|
||||
```
|
||||
paste here, between the tick marks, replacing this text
|
||||
```
|
||||
|
||||
### WorldEdit/FAWE versions:
|
||||
<!--- Specify which plugin you are using, and add its version -->
|
||||
@ -76,7 +79,9 @@ assignees: ''
|
||||
<!--- Optional but recommended - issue "/plugins" in-game or in console and copy/paste the list -->
|
||||
|
||||
### Relevant console output, log lines, and/or screenshots:
|
||||
<!--- Please use in-line code insertion ( ```like this``` ) for short (20 lines or less) text blobs, or a paste service for large blobs -->
|
||||
<!--- Please use in-line code insertion
|
||||
```like this```
|
||||
for short (20 lines or less) text blobs, or a paste service for large blobs -->
|
||||
|
||||
### Additional relevant comments/remarks:
|
||||
<!--- Use this space to give us any additional information which may be relevant to this issue, such as: if you are using a Minecraft hosting provider; unusual installation environment; etc -->
|
||||
|
@ -92,10 +92,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass;
|
||||
@ -818,11 +820,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
return new BukkitPlotGenerator(generator);
|
||||
}
|
||||
|
||||
@Override public List<String> getPluginIds() {
|
||||
final List<String> names = new ArrayList<>();
|
||||
@Override public List<Map.Entry<Map.Entry<String, String>, Boolean>> getPluginIds() {
|
||||
List<Map.Entry<Map.Entry<String, String>, Boolean>> names = new ArrayList<>();
|
||||
for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
names.add(plugin.getName() + ';' + plugin.getDescription().getVersion() + ':' + plugin
|
||||
.isEnabled());
|
||||
Map.Entry<String, String> id = new AbstractMap.SimpleEntry<>(plugin.getName(), plugin.getDescription().getVersion());
|
||||
names.add(new AbstractMap.SimpleEntry<>(id, plugin.isEnabled()));
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user