diff --git a/.github/auto-comment.yml b/.github/auto-comment.yml index f7584d42e..38721ffb9 100644 --- a/.github/auto-comment.yml +++ b/.github/auto-comment.yml @@ -6,10 +6,3 @@ issueOpened: > Failure to do so will prevent us from resolving the issue in a timely manner. Please note that suggestions are now to be submitted to https://git.io/fN5B4 rather than this issue tracker! - -pullRequestOpened: > - Thank your for raising your pull request. - - Please make sure you have followed our contributing guidelines and to take an extra look at the code to make sure that it is functional! - - We will review it as soon as possible! diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 000000000..22c3d6c65 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,24 @@ +name: Java CI + +on: + push: + branches: + - breaking + - master + pull_request: + branches: + - breaking + - master + +jobs: + test: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Test with Gradle + run: ./gradlew clean build diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index de4ca4e9b..997ec15c0 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -48,10 +48,10 @@ shadowJar { include(dependency(":Core")) // update notification stuff include(dependency("com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT")) - include(dependency("com.squareup.retrofit2:retrofit:2.4.0")) - include(dependency("com.squareup.okhttp3:okhttp:3.14.0")) - include(dependency("com.squareup.okio:okio:2.2.2")) - include(dependency("org.jetbrains.kotlin:kotlin-stdlib:1.3.30")) + include(dependency("com.squareup.retrofit2:retrofit:2.6.2")) + include(dependency("com.squareup.okhttp3:okhttp:4.2.2")) + include(dependency("com.squareup.okio:okio:2.4.1")) + include(dependency("org.jetbrains.kotlin:kotlin-stdlib:1.3.50")) include(dependency("io.papermc:paperlib:1.0.2")) include(dependency("net.kyori:text-adapter-bukkit:3.0.3")) } diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java index 9596a25e9..272d09056 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java @@ -702,7 +702,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain + " is using Offline Mode UUIDs either because of user preference, or because you are using an old version of " + "Bukkit"); } else { - PlotSquared.log(Captions.PREFIX + " " + getPluginName() + " is using online UUIDs"); + PlotSquared.log(Captions.PREFIX + "" + getPluginName() + " is using online UUIDs"); } if (Settings.UUID.USE_SQLUUIDHANDLER) { return new SQLUUIDHandler(wrapper); diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java index 421be5e1b..a80aa6b73 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java @@ -2039,13 +2039,14 @@ import java.util.regex.Pattern; if (type == Material.AIR) { type = offType; } + // in the following, lb needs to have the material of the item in hand i.e. type + lb = new BukkitLazyBlock(PlotBlock.get(type.toString())); if (type.isBlock()) { location = BukkitUtil .getLocation(block.getRelative(event.getBlockFace()).getLocation()); eventType = PlayerBlockEventType.PLACE_BLOCK; break; } - lb = new BukkitLazyBlock(PlotBlock.get(type.toString())); if (type.toString().toLowerCase().endsWith("egg")) { eventType = PlayerBlockEventType.SPAWN_MOB; } else { diff --git a/Bukkit/src/main/resources/plugin.yml b/Bukkit/src/main/resources/plugin.yml index 0dbd861e0..c2e1350e4 100644 --- a/Bukkit/src/main/resources/plugin.yml +++ b/Bukkit/src/main/resources/plugin.yml @@ -6,6 +6,7 @@ load: STARTUP description: > Easy, yet powerful Plot World generation and management. authors: [Citymonstret, Empire92, MattBDev, dordsor21] +website: https://github.com/IntellectualSites/ softdepend: [BarAPI, CameraAPI, Vault] loadbefore: [MultiWorld, Multiverse-Core] depend: [WorldEdit] diff --git a/Core/build.gradle b/Core/build.gradle index 90a33b8d2..bc7737b71 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -4,20 +4,20 @@ repositories { def textVersion = "3.0.2" dependencies { - implementation("org.yaml:snakeyaml:1.23") - implementation("com.google.code.gson:gson:2.8.0") { + implementation("org.yaml:snakeyaml:1.25") + implementation("com.google.code.gson:gson:2.8.6") { because("Minecraft uses GSON 2.8.0") force = true } - implementation("org.projectlombok:lombok:1.18.8") + implementation("org.projectlombok:lombok:1.18.10") compileOnly("org.projectlombok:lombok:1.18.8") testCompileOnly("org.projectlombok:lombok:1.18.8") annotationProcessor("org.projectlombok:lombok:1.18.8") testAnnotationProcessor("org.projectlombok:lombok:1.18.8") implementation("com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT") - implementation("com.squareup.okhttp3:okhttp:3.14.0") - implementation("com.squareup.okio:okio:2.2.2") - implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.30") + implementation("com.squareup.okhttp3:okhttp:4.2.2") + implementation("com.squareup.okio:okio:2.4.1") + implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.50") } sourceCompatibility = 1.8 diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java index e9471e6e7..9ea6d7bdd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java @@ -24,9 +24,9 @@ import java.util.List; import java.util.stream.Collectors; @CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste", - description = "Upload settings.yml, worlds.yml, PlotSquared.use_THIS.yml and your latest.log to https://athion.net/ISPaster/paste", - permission = "plots.debugpaste", category = CommandCategory.DEBUG) public class DebugPaste - extends SubCommand { + description = "Upload settings.yml, worlds.yml, PlotSquared.use_THIS.yml your latest.log and Multiverse's worlds.yml (if being used) to https://athion.net/ISPaster/paste", + permission = "plots.debugpaste", category = CommandCategory.DEBUG, confirmation = true, requiredType = RequiredType.NONE) +public class DebugPaste extends SubCommand { private static String readFile(@NonNull final File file) throws IOException { final List lines; @@ -115,6 +115,15 @@ import java.util.stream.Collectors; "&cSkipping PlotSquared.use_THIS.yml because it's empty"); } + try { + final File MultiverseWorlds = + new File(PlotSquared.get().IMP.getDirectory(), "../Multiverse-Core/worlds.yml"); + incendoPaster + .addFile(new IncendoPaster.PasteFile("MultiverseCore/worlds.yml", readFile(MultiverseWorlds))); + } catch (final IOException ignored) { + MainUtil.sendMessage(player, "&cSkipping Multiverse worlds.yml because the plugin is not in use"); + } + try { final String rawResponse = incendoPaster.upload(); final JsonObject jsonObject = diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java index c03a0b82c..b1e239c78 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java @@ -26,7 +26,7 @@ public class Settings extends Config { @Final public static String COMMIT; // These values are set from P2 before loading @Final public static String PLATFORM; // These values are set from P2 before loading - @Comment("Show additional information in console") public static boolean DEBUG = true; + @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`"}) public static boolean TITLES = true; @@ -256,10 +256,10 @@ public class Settings extends Config { public static final class Done { - @Comment("Require a done plot to download") public static boolean REQUIRED_FOR_DOWNLOAD = + @Comment("Require a plot marked as done to download") public static boolean REQUIRED_FOR_DOWNLOAD = false; - @Comment("Only done plots can be rated") public static boolean REQUIRED_FOR_RATINGS = false; - @Comment("Restrict building when a plot is done") public static boolean RESTRICT_BUILDING = + @Comment("Only plots marked as done can be rated") public static boolean REQUIRED_FOR_RATINGS = false; + @Comment("Restrict building when a plot is marked as done") public static boolean RESTRICT_BUILDING = false; @Comment("The limit being how many plots a player can claim") public static boolean COUNTS_TOWARDS_LIMIT = true; @@ -269,14 +269,15 @@ public class Settings extends Config { public static final class Chat { @Comment("Sometimes console color doesn't work, you can disable it here") public static boolean CONSOLE_COLOR = true; - @Comment("Should chat be interactive") public static boolean INTERACTIVE = true; + @Comment("Should the chat be interactive?") public static boolean INTERACTIVE = true; } @Comment("Relating to how many plots someone can claim ") public static final class Limit { @Comment("Should the limit be global (over multiple worlds)") public static boolean GLOBAL = false; - @Comment("The range of permissions to check e.g. plots.plot.127") public static int + @Comment({"The max. range of permissions to check e.g. plots.plot.127", "The value covers the range to check only, you need to assign the permission to players/groups still", + "Modifying the value does NOT change the amount of plots players can claim"}) public static int MAX_PLOTS = 127; } @@ -291,7 +292,7 @@ public class Settings extends Config { @Comment("Teleport to your plot on death") public static boolean ON_DEATH = false; @Comment("Teleport to your plot on login") public static boolean ON_LOGIN = false; @Comment("Teleport to your plot on claim") public static boolean ON_CLAIM = true; - @Comment("Add a teleportation delay to all commands") public static int DELAY = 0; + @Comment("Add a delay to all teleport commands") public static int DELAY = 0; @Comment("The visit command is ordered by world instead of globally") public static boolean PER_WORLD_VISIT = false; } @@ -322,7 +323,7 @@ public class Settings extends Config { @Comment( - {"Enable or disable part of the plugin", "Note: A cache will use some memory if enabled"}) + {"Enable or disable parts of the plugin", "Note: A cache will use some memory if enabled"}) public static final class Enabled_Components { // Group the following values into a new config section @Comment("The database stores all the plots") public static boolean DATABASE = true; @Comment("Events are needed to track a lot of things") public static boolean EVENTS = true; @@ -339,7 +340,7 @@ public class Settings extends Config { @Comment("Allow WorldEdit to be restricted to plots") public static boolean WORLDEDIT_RESTRICTIONS = true; @Comment("Allow economy to be used") public static boolean ECONOMY = true; - @Comment("Send anonymous usage statistics. Bukkit only setting.") public static boolean + @Comment("Send anonymous usage statistics to bStats. Bukkit only setting.") public static boolean METRICS = true; @Comment("Expiry will clear old or simplistic plots") public static boolean PLOT_EXPIRY = false; @@ -355,7 +356,7 @@ public class Settings extends Config { @Comment("Actively purge invalid database entries") public static boolean DATABASE_PURGER = false; @Comment("Delete plots when a player is banned") public static boolean BAN_DELETER = false; - @Comment("Prevent possibly unsafe blocks from being used in plot components") + @Comment({"Prevent possibly unsafe blocks from being used in plot components", "Can be bypassed with `/plot debugallowunsafe`"}) public static boolean PREVENT_UNSAFE = true; } } diff --git a/README.md b/README.md index 09c241a1b..5a23753a2 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,17 @@ Suggestions are welcome! We have a separate issue tracker for suggestions, that * [HoloPlots](https://www.spigotmc.org/resources/holoplots.4880/) # Sponsors -

-

-

-

+


+IntelliJ IDEA is a Java integrated development environment (IDE) for developing computer software. It is developed by JetBrains and our top used development tool. Every aspect of IntelliJ IDEA is specifically designed to maximize developer productivity. +Together, the powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience.

+


+YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. +YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor. We are using YourKit to profile the performance of our plugins.

+


+Athion is the result of the merging of two of the oldest creative servers around in the community – Mithrintia and Pwego-Insomnia – fusing together to perfect a creative experience like no other to develop and harness your skills.

+


+Welcome to the Builders's Refuge. The refuge is a passion project we started to accommodate professional Minecraft builders who are looking for a personal or commercial space to build and create art. We offer premium services at no charge along with a network of other builders and resources to help you become successful. +

+


+The AJGaming Network is a modded and vanilla network. Either delve into magic on our magic servers, fight your enemies on our hardcore PvP modpacks or have a good time on our vanilla servers. The mods for our modpacks are handpicked by suggestions from our community making sure we can crate packs you love to play. +

diff --git a/build.gradle b/build.gradle index 3d83a509b..667ba16f8 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { } configurations.all { resolutionStrategy { - force("org.ow2.asm:asm:7.1") + force("org.ow2.asm:asm:7.2") force("org.jetbrains:annotations:17.0.0") } } @@ -75,7 +75,7 @@ subprojects { because("Minecraft uses Guava 21 as of 1.13") } compileOnly("org.jetbrains:annotations:17.0.0") - compileClasspath("org.projectlombok:lombok:1.18.8") + compileClasspath("org.projectlombok:lombok:1.18.10") testCompileOnly("org.projectlombok:lombok:1.18.8") annotationProcessor("org.projectlombok:lombok:1.18.8") testAnnotationProcessor("org.projectlombok:lombok:1.18.8")