From ff83931a3fb0fc31b0f45649959e60cc1ee395b6 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 20 Sep 2020 19:42:13 +0100 Subject: [PATCH 01/11] Fix plot grant --- .../main/java/com/plotsquared/core/command/Grant.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Grant.java b/Core/src/main/java/com/plotsquared/core/command/Grant.java index 2d41da2e3..dd4add2c9 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Grant.java +++ b/Core/src/main/java/com/plotsquared/core/command/Grant.java @@ -36,6 +36,7 @@ import com.plotsquared.core.util.Permissions; import com.plotsquared.core.util.task.RunnableVal; import com.plotsquared.core.util.task.RunnableVal2; import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.uuid.UUIDMapping; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -76,8 +77,8 @@ public class Grant extends Command { } else if (throwable != null || uuids.size() != 1) { MainUtil.sendMessage(player, Captions.INVALID_PLAYER); } else { - final UUID uuid = uuids.toArray(new UUID[0])[0]; - MainUtil.getPersistentMeta(uuid, + final UUIDMapping uuid = uuids.toArray(new UUIDMapping[0])[0]; + MainUtil.getPersistentMeta(uuid.getUuid(), "grantedPlots", new RunnableVal() { @Override public void run(byte[] array) { if (arg0.equals("check")) { // check @@ -99,11 +100,11 @@ public class Grant extends Command { String key = "grantedPlots"; byte[] rawData = Ints.toByteArray(amount); - PlotPlayer online = PlotSquared.imp().getPlayerManager().getPlayerIfExists(uuid); + PlotPlayer online = PlotSquared.imp().getPlayerManager().getPlayerIfExists(uuid.getUuid()); if (online != null) { online.setPersistentMeta(key, rawData); } else { - DBFunc.addPersistentMeta(uuid, key, rawData, replace); + DBFunc.addPersistentMeta(uuid.getUuid(), key, rawData, replace); } } } From 8c4bb4140a3f288f311c49d50fc95d4d7b48328c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 20 Sep 2020 19:51:54 +0100 Subject: [PATCH 02/11] 5.13.6 --- Bukkit/pom.xml | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 5d2f060bc..32c8c96e8 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -21,7 +21,7 @@ com.plotsquared PlotSquared-Core - 5.13.5 + 5.13.6 compile diff --git a/build.gradle b/build.gradle index c55f5f6e8..0c34173a8 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { git = Grgit.open(dir: new File(rootDir.toString() + "/.git")) } -def ver = "5.13.5" +def ver = "5.13.6" def versuffix = "" ext { if (project.hasProperty("versionsuffix")) { From 89318be5f497ed977969579e3ab5048882270a36 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 29 Sep 2020 15:53:23 +0100 Subject: [PATCH 03/11] Apply e2f9b4245b9f7168fc38d9cb10cd05efcb42fe05 to paper listener too --- .../plotsquared/bukkit/listener/PaperListener.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java index e3995d9df..9b676c7b4 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java @@ -221,19 +221,22 @@ public class PaperListener implements Listener { } Plot plot = location.getOwnedPlotAbs(); if (plot == null) { + EntityType type = event.getType(); if (!area.isMobSpawning()) { - EntityType type = event.getType(); switch (type) { case DROPPED_ITEM: if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { - event.setShouldAbortSpawn(true); event.setCancelled(true); - break; + return; } case PLAYER: return; } - event.setShouldAbortSpawn(true); + if (type.isAlive()) { + event.setCancelled(true); + } + } + if (!area.isMiscSpawnUnowned() && !type.isAlive()) { event.setCancelled(true); } return; From 2f5ce6715430c08d43434767ac53214a66819bb6 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 29 Sep 2020 15:55:08 +0100 Subject: [PATCH 04/11] add back setShouldAbortSpawn --- .../java/com/plotsquared/bukkit/listener/PaperListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java index 9b676c7b4..0413802e7 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java @@ -226,6 +226,7 @@ public class PaperListener implements Listener { switch (type) { case DROPPED_ITEM: if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { + event.setShouldAbortSpawn(true); event.setCancelled(true); return; } @@ -233,10 +234,12 @@ public class PaperListener implements Listener { return; } if (type.isAlive()) { + event.setShouldAbortSpawn(true); event.setCancelled(true); } } if (!area.isMiscSpawnUnowned() && !type.isAlive()) { + event.setShouldAbortSpawn(true); event.setCancelled(true); } return; From 95f509d33781ede09a266babb7e764bff93d0498 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 2 Oct 2020 15:08:14 +0100 Subject: [PATCH 05/11] Stop forcing loiwercase world names --- .../main/java/com/plotsquared/core/setup/CommonSetupSteps.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java b/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java index 0a8c7ba9a..f2ff58dd2 100644 --- a/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java +++ b/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java @@ -282,7 +282,7 @@ public enum CommonSetupSteps implements SetupStep { private static boolean isValidWorldName(String s) { return s.chars().allMatch((i) -> { - return i == 95 || i == 45 || i >= 97 && i <= 122 || i >= 48 && i <= 57 || i == 46; + return i == 95 || i == 45 || i >= 97 && i <= 122 || i >= 65 && i <= 90 || i >= 48 && i <= 57 || i == 46; }); } } From 81d0bf6f047e2c774c4b3c7a3b8c2263d466fb7f Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Sat, 3 Oct 2020 21:53:58 +0200 Subject: [PATCH 06/11] Prevent blocks from getting waterlogged In some cases, the PlayerInteractEvent doesn't cancel right clicks on blocks that can be waterlogged --- .../bukkit/listener/PlayerEventListener.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java index 8392591b5..c5bcfd8c9 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java @@ -82,6 +82,7 @@ import org.bukkit.FluidCollisionMode; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; +import org.bukkit.block.data.Waterlogged; import org.bukkit.command.PluginCommand; import org.bukkit.entity.ArmorStand; import org.bukkit.entity.Entity; @@ -1070,9 +1071,16 @@ public class PlayerEventListener extends PlotListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBucketEmpty(PlayerBucketEmptyEvent event) { BlockFace bf = event.getBlockFace(); - Block block = - event.getBlockClicked().getLocation().add(bf.getModX(), bf.getModY(), bf.getModZ()) - .getBlock(); + final Block block; + // if the block can be waterlogged, the event might waterlog the block + // sometimes + if (event.getBlockClicked().getBlockData() instanceof Waterlogged) { + block = event.getBlockClicked(); + } else { + block = event.getBlockClicked().getLocation() + .add(bf.getModX(), bf.getModY(), bf.getModZ()) + .getBlock(); + } Location location = BukkitUtil.getLocation(block.getLocation()); PlotArea area = location.getPlotArea(); if (area == null) { From 6e2f738d8634b6d529e69d7d936c4a1528a6766a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sun, 4 Oct 2020 13:23:11 +0200 Subject: [PATCH 07/11] Stop relying on maxim's repo as it's very unreliable. --- Bukkit/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index 4fa93fbb6..54645acad 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -12,6 +12,7 @@ repositories { url = "https://papermc.io/repo/repository/maven-public/" } maven { url = "https://ci.ender.zone/plugin/repository/everything/" } + maven { url = "https://mvn.intellectualsites.com/content/repositories/releases" } maven { url = "https://mvn.intellectualsites.com/content/repositories/snapshots" } maven { url = "https://repo.wea-ondara.net/repository/public/" } maven { url = "http://repo.mvdw-software.be/content/groups/public/" } @@ -27,7 +28,6 @@ dependencies { implementation("org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT") compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.2.0-SNAPSHOT") { exclude(module: "bukkit") - } compile("io.papermc:paperlib:1.0.4") implementation("net.kyori:text-adapter-bukkit:3.0.3") @@ -42,7 +42,7 @@ dependencies { implementation("net.alpenblock:BungeePerms:4.0-dev-106") compile("se.hyperver.hyperverse:Core:0.6.0-SNAPSHOT"){ transitive = false } compile('com.sk89q:squirrelid:1.0.0-SNAPSHOT'){ transitive = false } - compile('be.maximvdw:MVdWPlaceholderAPI:3.1.1-SNAPSHOT'){ transitive = false } + compile('be.maximvdw:MVdWPlaceholderAPI:3.1.1'){ transitive = false } } sourceCompatibility = 1.8 From 56e6922279d1571f02e73bfdaed49287cf1aaad4 Mon Sep 17 00:00:00 2001 From: Aurora Date: Sun, 4 Oct 2020 13:10:32 +0200 Subject: [PATCH 08/11] Remove BungeePerms UUID fetcher --- Bukkit/build.gradle | 2 - Bukkit/pom.xml | 6 -- .../com/plotsquared/bukkit/BukkitMain.java | 15 ---- .../bukkit/uuid/BungeePermsUUIDService.java | 85 ------------------- 4 files changed, 108 deletions(-) delete mode 100644 Bukkit/src/main/java/com/plotsquared/bukkit/uuid/BungeePermsUUIDService.java diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index 54645acad..b0c628c5c 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -14,7 +14,6 @@ repositories { maven { url = "https://ci.ender.zone/plugin/repository/everything/" } maven { url = "https://mvn.intellectualsites.com/content/repositories/releases" } maven { url = "https://mvn.intellectualsites.com/content/repositories/snapshots" } - maven { url = "https://repo.wea-ondara.net/repository/public/" } maven { url = "http://repo.mvdw-software.be/content/groups/public/" } mavenLocal() } @@ -39,7 +38,6 @@ dependencies { implementation("net.ess3:EssentialsX:2.18.0") { exclude(group: "io.papermc", module: "paperlib") } - implementation("net.alpenblock:BungeePerms:4.0-dev-106") compile("se.hyperver.hyperverse:Core:0.6.0-SNAPSHOT"){ transitive = false } compile('com.sk89q:squirrelid:1.0.0-SNAPSHOT'){ transitive = false } compile('be.maximvdw:MVdWPlaceholderAPI:3.1.1'){ transitive = false } diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 32c8c96e8..04de1ebca 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -182,12 +182,6 @@ - - net.alpenblock - BungeePerms - 4.0-dev-106 - runtime - junit junit diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java index 4f149d126..e3f9f05da 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -58,7 +58,6 @@ import com.plotsquared.bukkit.util.BukkitTaskManager; import com.plotsquared.bukkit.util.BukkitUtil; import com.plotsquared.bukkit.util.SetGenCB; import com.plotsquared.bukkit.util.UpdateUtility; -import com.plotsquared.bukkit.uuid.BungeePermsUUIDService; import com.plotsquared.bukkit.uuid.EssentialsUUIDService; import com.plotsquared.bukkit.uuid.LuckPermsUUIDService; import com.plotsquared.bukkit.uuid.OfflinePlayerUUIDService; @@ -291,16 +290,6 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< luckPermsUUIDService = null; } - final BungeePermsUUIDService bungeePermsUUIDService; - if (Settings.UUID.SERVICE_BUNGEE_PERMS && - Bukkit.getPluginManager().getPlugin("BungeePerms") != null) { - bungeePermsUUIDService = new BungeePermsUUIDService(); - PlotSquared - .log(Captions.PREFIX + "(UUID) Using BungeePerms as a complementary UUID service"); - } else { - bungeePermsUUIDService = null; - } - final EssentialsUUIDService essentialsUUIDService; if (Settings.UUID.SERVICE_ESSENTIALSX && Bukkit.getPluginManager().getPlugin("Essentials") != null) { essentialsUUIDService = new EssentialsUUIDService(); @@ -335,10 +324,6 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< impromptuPipeline.registerService(luckPermsUUIDService); backgroundPipeline.registerService(luckPermsUUIDService); } - if (bungeePermsUUIDService != null) { - impromptuPipeline.registerService(bungeePermsUUIDService); - backgroundPipeline.registerService(bungeePermsUUIDService); - } if (essentialsUUIDService != null) { impromptuPipeline.registerService(essentialsUUIDService); backgroundPipeline.registerService(essentialsUUIDService); diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/BungeePermsUUIDService.java b/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/BungeePermsUUIDService.java deleted file mode 100644 index 4de1bdb92..000000000 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/BungeePermsUUIDService.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * _____ _ _ _____ _ - * | __ \| | | | / ____| | | - * | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| | - * | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | - * | | | | (_) | |_ ____) | (_| | |_| | (_| | | | __/ (_| | - * |_| |_|\___/ \__|_____/ \__, |\__,_|\__,_|_| \___|\__,_| - * | | - * |_| - * PlotSquared plot management system for Minecraft - * Copyright (C) 2020 IntellectualSites - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.plotsquared.bukkit.uuid; - -import com.plotsquared.core.uuid.UUIDMapping; -import com.plotsquared.core.uuid.UUIDService; -import net.luckperms.api.model.user.UserManager; -import org.bukkit.Bukkit; -import org.bukkit.plugin.RegisteredServiceProvider; -import org.jetbrains.annotations.NotNull; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import net.alpenblock.bungeeperms.BungeePerms; -import net.alpenblock.bungeeperms.io.UUIDPlayerDB; - -/** - * UUID service that uses the BungeePerms API - */ -public class BungeePermsUUIDService implements UUIDService { - - private final BungeePerms bp; - - public BungeePermsUUIDService() { - final RegisteredServiceProvider provider = Bukkit.getServicesManager().getRegistration(BungeePerms.class); - if (provider != null) { - this.bp = provider.getProvider(); - } else { - throw new IllegalStateException("BungeePerms is not available"); - } - } - - @Override @NotNull public List getNames(@NotNull final List uuids) { - final List mappings = new ArrayList<>(uuids.size()); - final UUIDPlayerDB uuiddb = BungeePerms.getInstance().getPermissionsManager().getUUIDPlayerDB(); - for (final UUID uuid : uuids) { - try { - final String username = uuiddb.getPlayerName(uuid); - if (username != null) { - mappings.add(new UUIDMapping(uuid, username)); - } - } catch (final Exception ignored) {} - } - return mappings; - } - - @Override @NotNull public List getUUIDs(@NotNull final List usernames) { - final List mappings = new ArrayList<>(usernames.size()); - final UUIDPlayerDB uuiddb = BungeePerms.getInstance().getPermissionsManager().getUUIDPlayerDB(); - for (final String username : usernames) { - try { - final UUID uuid = uuiddb.getUUID(username); - if (username != null) { - mappings.add(new UUIDMapping(uuid, username)); - } - } catch (final Exception ignored) {} - } - return mappings; - } - -} From e6237d68d0c7da55654f59ec32c45b6c2178de5d Mon Sep 17 00:00:00 2001 From: Aurora Date: Sun, 4 Oct 2020 13:12:47 +0200 Subject: [PATCH 09/11] Also remove BungeePerms from the config --- .../main/java/com/plotsquared/core/configuration/Settings.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/configuration/Settings.java b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java index 81ac560bf..9e98808c2 100644 --- a/Core/src/main/java/com/plotsquared/core/configuration/Settings.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java @@ -268,8 +268,6 @@ public class Settings extends Config { public static boolean SERVICE_BUKKIT = true; @Comment("Whether the EssentialsX service is enabled") public static boolean SERVICE_ESSENTIALSX = true; - @Comment("Whether the BungeePerms service is enabled") - public static boolean SERVICE_BUNGEE_PERMS = true; } From a210f523a5a74e42725e6a928ef9b7df658b926f Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Sun, 4 Oct 2020 18:19:29 +0200 Subject: [PATCH 10/11] Add more information to debugpaste --- Bukkit/pom.xml | 2 +- .../com/plotsquared/bukkit/BukkitMain.java | 21 +++++++++++------ .../java/com/plotsquared/core/IPlotMain.java | 2 +- .../plotsquared/core/command/DebugPaste.java | 23 +++++++------------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 04de1ebca..7c288d6da 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -87,7 +87,7 @@ be.maximvdw MVdWPlaceholderAPI - 3.1.1-SNAPSHOT + 3.1.1 compile diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java index e3f9f05da..c28c38995 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -1149,14 +1149,21 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< return new BukkitPlotGenerator(world, generator); } - @Override public List, Boolean>> getPluginIds() { - List, Boolean>> names = new ArrayList<>(); - for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) { - Map.Entry id = new AbstractMap.SimpleEntry<>(plugin.getName(), - plugin.getDescription().getVersion()); - names.add(new AbstractMap.SimpleEntry<>(id, plugin.isEnabled())); + @Override public String getPluginList() { + StringBuilder msg = new StringBuilder(); + Plugin[] plugins = Bukkit.getServer().getPluginManager().getPlugins(); + msg.append("Plugins (").append(plugins.length).append("): \n"); + for (Plugin p : plugins) { + msg.append(" - ").append(p.getName()).append(":").append("\n") + .append(" • Version: ").append(p.getDescription().getVersion()).append("\n") + .append(" • Enabled: ").append(p.isEnabled()).append("\n") + .append(" • Main: ").append(p.getDescription().getMain()).append("\n") + .append(" • Authors: ").append(p.getDescription().getAuthors()).append("\n") + .append(" • Load Before: ").append(p.getDescription().getLoadBefore()).append("\n") + .append(" • Dependencies: ").append(p.getDescription().getDepend()).append("\n") + .append(" • Soft Dependencies: ").append(p.getDescription().getSoftDepend()).append("\n"); } - return names; + return msg.toString(); } @Override public Actor getConsole() { diff --git a/Core/src/main/java/com/plotsquared/core/IPlotMain.java b/Core/src/main/java/com/plotsquared/core/IPlotMain.java index 190457ef3..2ac8910f3 100644 --- a/Core/src/main/java/com/plotsquared/core/IPlotMain.java +++ b/Core/src/main/java/com/plotsquared/core/IPlotMain.java @@ -282,7 +282,7 @@ public interface IPlotMain

extends ILogger { */ @NotNull IndependentPlotGenerator getDefaultGenerator(); - List, Boolean>> getPluginIds(); + String getPluginList(); Actor getConsole(); diff --git a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java index 299f6ddfa..3928b9fff 100644 --- a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java @@ -91,28 +91,21 @@ public class DebugPaste extends SubCommand { .append("\n"); b.append("online_mode: ").append(!Settings.UUID.OFFLINE).append(';') .append(!Settings.UUID.OFFLINE).append('\n'); - b.append("Plugins:"); - for (Map.Entry, Boolean> pluginInfo : PlotSquared - .get().IMP.getPluginIds()) { - Map.Entry 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); - } + b.append(PlotSquared.get().IMP.getPluginList()); b.append("\n\n# YAY! Now, let's see what we can find in your JVM\n"); Runtime runtime = Runtime.getRuntime(); RuntimeMXBean rb = ManagementFactory.getRuntimeMXBean(); - b.append("Uptime: ").append( - TimeUnit.MINUTES.convert(rb.getUptime(), TimeUnit.MILLISECONDS) + " minutes") + b.append("Uptime: ") + .append(TimeUnit.MINUTES.convert(rb.getUptime(), TimeUnit.MILLISECONDS)) + .append(" minutes") .append('\n'); b.append("JVM Flags: ").append(rb.getInputArguments()).append('\n'); - b.append("Free Memory: ").append(runtime.freeMemory() / 1024 / 1024 + " MB") + b.append("Free Memory: ").append(runtime.freeMemory() / 1024 / 1024).append(" MB") .append('\n'); - b.append("Max Memory: ").append(runtime.maxMemory() / 1024 / 1024 + " MB") + b.append("Max Memory: ").append(runtime.maxMemory() / 1024 / 1024).append(" MB") + .append('\n'); + b.append("Total Memory: ").append(runtime.totalMemory() / 1024 / 1024).append(" MB") .append('\n'); - b.append("Total Memory: ").append(runtime.totalMemory() / 1024 / 1024 + " MB").append('\n'); b.append("Available Processors: ").append(runtime.availableProcessors()).append('\n'); b.append("Java Name: ").append(rb.getVmName()).append('\n'); b.append("Java Version: '").append(System.getProperty("java.version")) From b55d836871b9a3ddae678ed29c3c32b5bb62d9a8 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 7 Oct 2020 11:59:44 +0100 Subject: [PATCH 11/11] 5.13.7 --- Bukkit/pom.xml | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 7c288d6da..a9cf4c54f 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -21,7 +21,7 @@ com.plotsquared PlotSquared-Core - 5.13.6 + 5.13.7 compile diff --git a/build.gradle b/build.gradle index 0c34173a8..2f0fb1056 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { git = Grgit.open(dir: new File(rootDir.toString() + "/.git")) } -def ver = "5.13.6" +def ver = "5.13.7" def versuffix = "" ext { if (project.hasProperty("versionsuffix")) {