diff --git a/.gitignore b/.gitignore index 68823d640..24f46cd56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,143 +1,144 @@ -### Others ### -*.cmd -*.sh -*.prefs -Sponge/build -Core/build -Bukkit/build -Nukkit/build - -### Maven ### -/mvn -/target/lib -/target/maven-archiver -/target/classes -/target/maven-status -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties -out/ - - -### Java ### -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.war -*.ear - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - - -### Intellij ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm - -*.iml - -## Directory-based project format: -.idea/ -# if you remove the above rule, at least ignore the following: - -# User-specific stuff: -# .idea/workspace.xml -# .idea/tasks.xml -# .idea/dictionaries -# .idea/shelf - -# Sensitive or high-churn files: -# .idea/dataSources.ids -# .idea/dataSources.xml -# .idea/sqlDataSources.xml -# .idea/dynamic.xml -# .idea/uiDesigner.xml - -# Gradle: -# .idea/gradle.xml -# .idea/libraries -.gradle - -# Mongo Explorer plugin: -# .idea/mongoSettings.xml - -## File-based project format: -*.ipr -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - - -### Eclipse ### -*.pydevproject -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath - -# Eclipse Core -.project - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# CDT-specific -.cproject - -# JDT-specific (Eclipse Java Development Tools) -.classpath - -# Java annotation processor (APT) -.factorypath - -# PDT-specific -.buildpath - -# sbteclipse plugin -.target - -# TeXlipse plugin -.texlipse - -# STS (Spring Tool Suite) -.springBeans -/target/ -Nukkit/build/classes/ -Nukkit/build/dependency-cache/ -checkstyle.xml -classes/ -p2error.txt -*.bat -Nukkit/build/resources/main/plugin.yml -docs/ +### Others ### +*.cmd +*.sh +*.prefs +Sponge/build +Core/build +Bukkit/build +Nukkit/build +buildSrc/ + +### Maven ### +/mvn +/target/lib +/target/maven-archiver +/target/classes +/target/maven-status +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +out/ + + +### Java ### +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm + +*.iml + +## Directory-based project format: +.idea/ +# if you remove the above rule, at least ignore the following: + +# User-specific stuff: +# .idea/workspace.xml +# .idea/tasks.xml +# .idea/dictionaries +# .idea/shelf + +# Sensitive or high-churn files: +# .idea/dataSources.ids +# .idea/dataSources.xml +# .idea/sqlDataSources.xml +# .idea/dynamic.xml +# .idea/uiDesigner.xml + +# Gradle: +# .idea/gradle.xml +# .idea/libraries +.gradle + +# Mongo Explorer plugin: +# .idea/mongoSettings.xml + +## File-based project format: +*.ipr +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + + +### Eclipse ### +*.pydevproject +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath + +# Eclipse Core +.project + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Java annotation processor (APT) +.factorypath + +# PDT-specific +.buildpath + +# sbteclipse plugin +.target + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans +/target/ +Nukkit/build/classes/ +Nukkit/build/dependency-cache/ +checkstyle.xml +classes/ +p2error.txt +*.bat +Nukkit/build/resources/main/plugin.yml +docs/ diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index 39b165b03..6ef2cb0d1 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -46,7 +46,7 @@ processResources { //noinspection GroovyAssignabilityCheck jar.archiveFileName = "PlotSquared-Bukkit-${project.parent.version}.jar" -jar.destinationDirectory = file("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-Bukkit/" + project.parent.version) +jar.destinationDirectory = file("../mvn/com/plotsquared/PlotSquared-Bukkit/" + project.parent.version) task createPom { doLast { pom { @@ -55,14 +55,14 @@ task createPom { artifactId = "PlotSquared-Bukkit" version = rootProject.version } - }.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-Bukkit/${project.parent.version}/PlotSquared-Bukkit-${project.parent.version}.pom") + }.writeTo("../mvn/com/plotsquared/PlotSquared-Bukkit/${project.parent.version}/PlotSquared-Bukkit-${project.parent.version}.pom") pom { project { groupId = rootProject.group artifactId = "PlotSquared-Bukkit" version = "latest" } - }.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-Bukkit/latest/PlotSquared-Bukkit-latest.pom") + }.writeTo("../mvn/com/plotsquared/PlotSquared-Bukkit/latest/PlotSquared-Bukkit-latest.pom") .writeTo("pom.xml") } } @@ -70,8 +70,8 @@ task createPom { task copyFiles { doLast { copy { - from("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-Bukkit/${project.parent.version}/") - into("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-Bukkit/latest/") + from("../mvn/com/plotsquared/PlotSquared-Bukkit/${project.parent.version}/") + into("../mvn/com/plotsquared/PlotSquared-Bukkit/latest/") include("PlotSquared-Bukkit*.jar") rename("PlotSquared-Bukkit-${project.parent.version}.jar", "PlotSquared-Bukkit-latest.jar") } @@ -86,9 +86,9 @@ shadowJar { include(dependency("net.kyori:text-adapter-bukkit:3.0.3")) include(dependency("org.bstats:bstats-bukkit:1.7")) } - relocate('net.kyori.text', 'com.github.intellectualsites.plotsquared.formatting.text') - relocate("io.papermc.lib", "com.github.intellectualsites.plotsquared.bukkit.paperlib") - relocate("org.bstats", "com.github.intellectualsites.plotsquared.metrics") + relocate('net.kyori.text', 'com.plotsquared.formatting.text') + relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib") + relocate("org.bstats", "com.plotsquared.metrics") archiveFileName = "${parent.name}-${project.name}-${parent.version}.jar" destinationDirectory = file "../target" } diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index d4336411e..6ff4a11e6 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - com.github.intellectualsites.plotsquared + com.plotsquared PlotSquared-Bukkit latest @@ -19,7 +19,7 @@ compile - com.github.intellectualsites.plotsquared + com.plotsquared Core unspecified compile diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitVersion.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitVersion.java deleted file mode 100644 index cb2ada5b6..000000000 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitVersion.java +++ /dev/null @@ -1,30 +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.github.intellectualsites.plotsquared.bukkit.util; - -public class BukkitVersion { - public static int[] v1_13_2 = {1, 13, 2}; -} diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChunkManager.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitChunkManager.java similarity index 92% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChunkManager.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/BukkitChunkManager.java index 4e6085b71..3104c47d3 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChunkManager.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitChunkManager.java @@ -23,26 +23,26 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit; -import com.github.intellectualsites.plotsquared.bukkit.BukkitMain; -import com.github.intellectualsites.plotsquared.bukkit.object.entity.EntityWrapper; -import com.github.intellectualsites.plotsquared.bukkit.object.entity.ReplicatingEntityWrapper; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.AugmentedUtils; -import com.github.intellectualsites.plotsquared.plot.listener.WEExtent; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotLoc; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.bukkit.entity.EntityWrapper; +import com.plotsquared.bukkit.entity.ReplicatingEntityWrapper; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.generator.AugmentedUtils; +import com.plotsquared.core.listener.WEExtent; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.location.PlotLoc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.RegionUtil; +import com.plotsquared.core.util.entity.EntityCategories; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.bukkit.BukkitWorld; import com.sk89q.worldedit.math.BlockVector2; @@ -71,13 +71,13 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Semaphore; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ANIMAL; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ENTITY; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MISC; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MOB; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MONSTER; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_VEHICLE; import static com.google.common.base.Preconditions.checkNotNull; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_ANIMAL; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_ENTITY; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MISC; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MOB; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MONSTER; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_VEHICLE; public class BukkitChunkManager extends ChunkManager { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitCommand.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitCommand.java similarity index 83% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitCommand.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/BukkitCommand.java index 48af59d4a..6f907a620 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitCommand.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitCommand.java @@ -23,12 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit; -import com.github.intellectualsites.plotsquared.bukkit.commands.DebugUUID; -import com.github.intellectualsites.plotsquared.plot.commands.MainCommand; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.bukkit.command.DebugUUID; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.command.MainCommand; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.player.PlotPlayer; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -73,12 +74,12 @@ public class BukkitCommand implements CommandExecutor, TabCompleter { if (args.length == 0) { return Collections.singletonList("plots"); } - Collection objects = MainCommand.getInstance().tab(player, args, s.endsWith(" ")); + Collection objects = MainCommand.getInstance().tab(player, args, s.endsWith(" ")); if (objects == null) { return null; } List result = new ArrayList<>(); - for (com.github.intellectualsites.plotsquared.commands.Command o : objects) { + for (com.plotsquared.core.command.Command o : objects) { result.add(o.toString()); } return result.isEmpty() ? null : result; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java similarity index 85% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java index c942706d9..e9cb28a85 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -23,75 +23,73 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit; +package com.plotsquared.bukkit; -import com.github.intellectualsites.plotsquared.bukkit.generator.BukkitPlotGenerator; -import com.github.intellectualsites.plotsquared.bukkit.listeners.ChunkListener; -import com.github.intellectualsites.plotsquared.bukkit.listeners.EntitySpawnListener; -import com.github.intellectualsites.plotsquared.bukkit.listeners.PlayerEvents; -import com.github.intellectualsites.plotsquared.bukkit.listeners.SingleWorldListener; -import com.github.intellectualsites.plotsquared.bukkit.listeners.WorldEvents; -import com.github.intellectualsites.plotsquared.bukkit.placeholders.PlaceholderFormatter; -import com.github.intellectualsites.plotsquared.bukkit.placeholders.Placeholders; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitChatManager; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitChunkManager; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitCommand; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitEconHandler; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitHybridUtils; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitInventoryUtil; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitSchematicHandler; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitSetupUtils; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitTaskManager; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.bukkit.util.SetGenCB; -import com.github.intellectualsites.plotsquared.bukkit.util.UpdateUtility; -import com.github.intellectualsites.plotsquared.bukkit.util.block.BukkitLocalQueue; -import com.github.intellectualsites.plotsquared.bukkit.uuid.DefaultUUIDWrapper; -import com.github.intellectualsites.plotsquared.bukkit.uuid.FileUUIDHandler; -import com.github.intellectualsites.plotsquared.bukkit.uuid.LowerOfflineUUIDWrapper; -import com.github.intellectualsites.plotsquared.bukkit.uuid.OfflineUUIDWrapper; -import com.github.intellectualsites.plotsquared.bukkit.uuid.SQLUUIDHandler; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.IPlotMain; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.ChatFormatter; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.HybridGen; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.listener.PlotListener; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.object.chat.PlainChatManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SingleWorldGenerator; -import com.github.intellectualsites.plotsquared.plot.util.ChatManager; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.ConsoleColors; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.PremiumVerification; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandlerImplementation; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.QueueProvider; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.bukkit.generator.BukkitPlotGenerator; +import com.plotsquared.bukkit.listener.ChunkListener; +import com.plotsquared.bukkit.listener.EntitySpawnListener; +import com.plotsquared.bukkit.listener.PlayerEvents; +import com.plotsquared.bukkit.listener.SingleWorldListener; +import com.plotsquared.bukkit.listener.WorldEvents; +import com.plotsquared.bukkit.placeholder.PlaceholderFormatter; +import com.plotsquared.bukkit.placeholder.Placeholders; +import com.plotsquared.bukkit.util.BukkitChatManager; +import com.plotsquared.bukkit.util.BukkitEconHandler; +import com.plotsquared.bukkit.generator.BukkitHybridUtils; +import com.plotsquared.bukkit.util.BukkitInventoryUtil; +import com.plotsquared.bukkit.schematic.BukkitSchematicHandler; +import com.plotsquared.bukkit.util.BukkitSetupUtils; +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.queue.BukkitLocalQueue; +import com.plotsquared.bukkit.util.uuid.DefaultUUIDWrapper; +import com.plotsquared.bukkit.util.uuid.FileUUIDHandler; +import com.plotsquared.bukkit.util.uuid.LowerOfflineUUIDWrapper; +import com.plotsquared.bukkit.util.uuid.OfflineUUIDWrapper; +import com.plotsquared.bukkit.util.uuid.SQLUUIDHandler; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.IPlotMain; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.ChatFormatter; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.generator.HybridGen; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.generator.IndependentPlotGenerator; +import com.plotsquared.core.listener.PlotListener; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaTerrainType; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.SetupObject; +import com.plotsquared.core.plot.message.PlainChatManager; +import com.plotsquared.core.plot.world.PlotAreaManager; +import com.plotsquared.core.plot.world.SinglePlotArea; +import com.plotsquared.core.plot.world.SinglePlotAreaManager; +import com.plotsquared.core.generator.SingleWorldGenerator; +import com.plotsquared.core.util.ChatManager; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.ConsoleColors; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.InventoryUtil; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.PremiumVerification; +import com.plotsquared.core.util.ReflectionUtils; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.uuid.UUIDHandlerImplementation; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.queue.QueueProvider; +import com.plotsquared.core.util.uuid.UUIDWrapper; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.WorldEditPlugin; import com.sk89q.worldedit.extension.platform.Actor; @@ -129,8 +127,8 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import static com.github.intellectualsites.plotsquared.plot.util.PremiumVerification.getUserID; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass; +import static com.plotsquared.core.util.PremiumVerification.getUserID; +import static com.plotsquared.core.util.ReflectionUtils.getRefClass; public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain { @@ -411,7 +409,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain case MINECART_TNT: case BOAT: if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) { - com.github.intellectualsites.plotsquared.plot.object.Location + com.plotsquared.core.location.Location location = BukkitUtil.getLocation(entity.getLocation()); Plot plot = location.getPlot(); if (plot == null) { @@ -468,7 +466,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain PlotId originalPlotId = (PlotId) meta.get(0).value(); if (originalPlotId != null) { - com.github.intellectualsites.plotsquared.plot.object.Location + com.plotsquared.core.location.Location pLoc = BukkitUtil.getLocation(entity.getLocation()); PlotArea area = pLoc.getPlotArea(); if (area != null) { @@ -487,7 +485,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain } } else { //This is to apply the metadata to already spawned shulkers (see EntitySpawnListener.java) - com.github.intellectualsites.plotsquared.plot.object.Location + com.plotsquared.core.location.Location pLoc = BukkitUtil.getLocation(entity.getLocation()); PlotArea area = pLoc.getPlotArea(); if (area != null) { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/ArrayWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/ArrayWrapper.java similarity index 98% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/ArrayWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/chat/ArrayWrapper.java index eae790aa9..41aaf4451 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/ArrayWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/ArrayWrapper.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.chat; +package com.plotsquared.bukkit.chat; import org.apache.commons.lang.Validate; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/FancyMessage.java b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/FancyMessage.java similarity index 99% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/FancyMessage.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/chat/FancyMessage.java index f2b8389dd..173d49e95 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/FancyMessage.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/FancyMessage.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.chat; +package com.plotsquared.bukkit.chat; import com.google.gson.JsonArray; import com.google.gson.JsonElement; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/JsonRepresentedObject.java b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/JsonRepresentedObject.java similarity index 96% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/JsonRepresentedObject.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/chat/JsonRepresentedObject.java index 8ca51a31b..3fc315a72 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/JsonRepresentedObject.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/JsonRepresentedObject.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.chat; +package com.plotsquared.bukkit.chat; import com.google.gson.stream.JsonWriter; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/JsonString.java b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/JsonString.java similarity index 97% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/JsonString.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/chat/JsonString.java index 0fb68447e..68b5706bb 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/JsonString.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/JsonString.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.chat; +package com.plotsquared.bukkit.chat; import com.google.gson.stream.JsonWriter; import org.bukkit.configuration.serialization.ConfigurationSerializable; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/MessagePart.java b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/MessagePart.java similarity index 99% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/MessagePart.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/chat/MessagePart.java index 8b8e1b886..14b0784c4 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/MessagePart.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/MessagePart.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.chat; +package com.plotsquared.bukkit.chat; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/Reflection.java b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/Reflection.java similarity index 99% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/Reflection.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/chat/Reflection.java index d0bf41103..fd3b65e10 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/Reflection.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/Reflection.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.chat; +package com.plotsquared.bukkit.chat; import org.bukkit.Bukkit; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/TextualComponent.java b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/TextualComponent.java similarity index 99% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/TextualComponent.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/chat/TextualComponent.java index c735c57c2..2a47fcc37 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/chat/TextualComponent.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/chat/TextualComponent.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.chat; +package com.plotsquared.bukkit.chat; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/commands/DebugUUID.java b/Bukkit/src/main/java/com/plotsquared/bukkit/command/DebugUUID.java similarity index 88% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/commands/DebugUUID.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/command/DebugUUID.java index 4facee9fd..94b3e6604 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/commands/DebugUUID.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/command/DebugUUID.java @@ -23,30 +23,30 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.commands; +package com.plotsquared.bukkit.command; -import com.github.intellectualsites.plotsquared.bukkit.uuid.DatFileFilter; -import com.github.intellectualsites.plotsquared.bukkit.uuid.DefaultUUIDWrapper; -import com.github.intellectualsites.plotsquared.bukkit.uuid.LowerOfflineUUIDWrapper; -import com.github.intellectualsites.plotsquared.bukkit.uuid.OfflineUUIDWrapper; -import com.github.intellectualsites.plotsquared.commands.Argument; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.CommandCategory; -import com.github.intellectualsites.plotsquared.plot.commands.RequiredType; -import com.github.intellectualsites.plotsquared.plot.commands.SubCommand; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.bukkit.util.uuid.DatFileFilter; +import com.plotsquared.bukkit.util.uuid.DefaultUUIDWrapper; +import com.plotsquared.bukkit.util.uuid.LowerOfflineUUIDWrapper; +import com.plotsquared.bukkit.util.uuid.OfflineUUIDWrapper; +import com.plotsquared.core.command.Argument; +import com.plotsquared.core.command.CommandDeclaration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.command.CommandCategory; +import com.plotsquared.core.command.RequiredType; +import com.plotsquared.core.command.SubCommand; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.util.uuid.UUIDWrapper; import com.google.common.collect.Sets; import java.io.File; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/AgeableStats.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/AgeableStats.java similarity index 95% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/AgeableStats.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/AgeableStats.java index c359be262..5b9e5ace5 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/AgeableStats.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/AgeableStats.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; class AgeableStats { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/ArmorStandStats.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ArmorStandStats.java similarity index 95% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/ArmorStandStats.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/ArmorStandStats.java index ae20a16a6..8c49e1f2a 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/ArmorStandStats.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ArmorStandStats.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; class ArmorStandStats { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/EntityBaseStats.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/EntityBaseStats.java similarity index 95% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/EntityBaseStats.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/EntityBaseStats.java index 8dd98aebb..6a99e7771 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/EntityBaseStats.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/EntityBaseStats.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; class EntityBaseStats { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/EntityWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/EntityWrapper.java similarity index 97% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/EntityWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/EntityWrapper.java index e1b7198c9..b95986a81 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/EntityWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/EntityWrapper.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; import lombok.Getter; import lombok.NonNull; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/HorseStats.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/HorseStats.java similarity index 95% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/HorseStats.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/HorseStats.java index 7e726e44c..af97ac055 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/HorseStats.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/HorseStats.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; import org.bukkit.entity.Horse; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/LivingEntityStats.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/LivingEntityStats.java similarity index 96% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/LivingEntityStats.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/LivingEntityStats.java index 15f931462..cbad9f8f8 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/LivingEntityStats.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/LivingEntityStats.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffect; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/ReplicatingEntityWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java similarity index 99% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/ReplicatingEntityWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java index 0f9f49fb8..a873ebb8e 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/ReplicatingEntityWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; +import com.plotsquared.core.PlotSquared; import org.bukkit.Art; import org.bukkit.DyeColor; import org.bukkit.Location; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/TameableStats.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/TameableStats.java similarity index 95% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/TameableStats.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/TameableStats.java index 531c3a798..b844495ac 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/TameableStats.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/TameableStats.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; import org.bukkit.entity.AnimalTamer; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/TeleportEntityWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/TeleportEntityWrapper.java similarity index 97% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/TeleportEntityWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/entity/TeleportEntityWrapper.java index e3f254cb5..45613a751 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/entity/TeleportEntityWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/TeleportEntityWrapper.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.entity; +package com.plotsquared.bukkit.entity; -import com.github.intellectualsites.plotsquared.bukkit.BukkitMain; +import com.plotsquared.bukkit.BukkitMain; import org.bukkit.Chunk; import org.bukkit.Location; import org.bukkit.World; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/PlotBlockPopulator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BlockStatePopulator.java similarity index 79% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/PlotBlockPopulator.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/generator/BlockStatePopulator.java index a05d24090..e41fb8b6e 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/PlotBlockPopulator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BlockStatePopulator.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.generator; +package com.plotsquared.bukkit.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.object.ChunkWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.generator.IndependentPlotGenerator; +import com.plotsquared.core.location.ChunkWrapper; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; import java.util.Random; import org.bukkit.Chunk; import org.bukkit.World; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/BukkitAugmentedGenerator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitAugmentedGenerator.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/BukkitAugmentedGenerator.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitAugmentedGenerator.java index 81e3b9d3e..ff158f295 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/BukkitAugmentedGenerator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitAugmentedGenerator.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.generator; +package com.plotsquared.bukkit.generator; -import com.github.intellectualsites.plotsquared.plot.generator.AugmentedUtils; +import com.plotsquared.core.generator.AugmentedUtils; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitHybridUtils.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitHybridUtils.java similarity index 90% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitHybridUtils.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitHybridUtils.java index 75b6e4dd1..2cf4a3b8b 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitHybridUtils.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitHybridUtils.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.generator; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; +import com.plotsquared.core.generator.HybridUtils; public class BukkitHybridUtils extends HybridUtils { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/BukkitPlotGenerator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java similarity index 90% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/BukkitPlotGenerator.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java index df99e3bc8..9caaa37ca 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/BukkitPlotGenerator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java @@ -23,19 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.generator; +package com.plotsquared.bukkit.generator; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.bukkit.util.block.GenChunk; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.object.ChunkWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SingleWorldGenerator; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.bukkit.queue.GenChunk; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.generator.IndependentPlotGenerator; +import com.plotsquared.core.location.ChunkWrapper; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.generator.SingleWorldGenerator; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; import com.sk89q.worldedit.math.BlockVector2; import lombok.Getter; import org.bukkit.World; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/DelegatePlotGenerator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java similarity index 85% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/DelegatePlotGenerator.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java index 126d26ca2..633fc289f 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/DelegatePlotGenerator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java @@ -23,16 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.generator; +package com.plotsquared.bukkit.generator; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.generator.IndependentPlotGenerator; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; import com.sk89q.worldedit.bukkit.BukkitAdapter; import java.util.Random; import org.bukkit.World; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/ChunkListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ChunkListener.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/ChunkListener.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/listener/ChunkListener.java index 303ea742f..ab8df40c4 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/ChunkListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ChunkListener.java @@ -23,16 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.listeners; +package com.plotsquared.bukkit.listener; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.RefClass; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.RefField; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.RefMethod; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.util.ReflectionUtils.RefClass; +import com.plotsquared.core.util.ReflectionUtils.RefField; +import com.plotsquared.core.util.ReflectionUtils.RefMethod; +import com.plotsquared.core.util.task.TaskManager; import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; import org.bukkit.Chunk; @@ -55,7 +55,7 @@ import org.bukkit.event.world.ChunkUnloadEvent; import java.lang.reflect.Method; import java.util.HashSet; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass; +import static com.plotsquared.core.util.ReflectionUtils.getRefClass; @SuppressWarnings("unused") public class ChunkListener implements Listener { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/EntitySpawnListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java similarity index 92% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/EntitySpawnListener.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java index 4570e0fc2..21a30f02a 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/EntitySpawnListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.listeners; +package com.plotsquared.bukkit.listener; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; import io.papermc.lib.PaperLib; import org.bukkit.Chunk; import org.bukkit.World; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/ForceFieldListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ForceFieldListener.java similarity index 87% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/ForceFieldListener.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/listener/ForceFieldListener.java index f1456f803..0f96ac45b 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/ForceFieldListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ForceFieldListener.java @@ -23,16 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.listeners; +package com.plotsquared.bukkit.listener; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ForcefieldFlag; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.implementations.ForcefieldFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.Permissions; import com.google.common.collect.Iterables; import org.bukkit.entity.Player; import org.bukkit.util.Vector; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java similarity index 94% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java index b49e9bf5e..7a1899da7 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java @@ -23,86 +23,86 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.listeners; +package com.plotsquared.bukkit.listener; import com.destroystokyo.paper.MaterialTags; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.bukkit.util.UpdateUtility; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnimalAttackFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnimalCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnimalInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BlockBurnFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BlockIgnitionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BlockedCmdsFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.CoralDryFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DenyTeleportFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DisablePhysicsFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DropProtectionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.EntityCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ExplosionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.GrassGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HangingBreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HangingPlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HostileAttackFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HostileCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HostileInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.IceFormFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.IceMeltFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.InstabreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.InvincibleFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ItemDropFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.KelpGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.LiquidFlowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscBreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MobCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MobPlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MycelGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PlayerInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PveFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PvpFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.RedstoneFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.SnowFormFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.SnowMeltFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.SoilDryFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.TamedAttackFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.TamedInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.UntrustedVisitFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.UseFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehicleBreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehicleCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehicleUseFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VillagerInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VineGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeWrapper; -import com.github.intellectualsites.plotsquared.plot.listener.PlayerBlockEventType; -import com.github.intellectualsites.plotsquared.plot.listener.PlotListener; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotHandler; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotInventory; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.EntityUtil; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.RegExUtil; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.bukkit.util.UpdateUtility; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.flag.implementations.AnimalAttackFlag; +import com.plotsquared.core.plot.flag.implementations.AnimalCapFlag; +import com.plotsquared.core.plot.flag.implementations.AnimalInteractFlag; +import com.plotsquared.core.plot.flag.implementations.BlockBurnFlag; +import com.plotsquared.core.plot.flag.implementations.BlockIgnitionFlag; +import com.plotsquared.core.plot.flag.implementations.BlockedCmdsFlag; +import com.plotsquared.core.plot.flag.implementations.BreakFlag; +import com.plotsquared.core.plot.flag.implementations.CoralDryFlag; +import com.plotsquared.core.plot.flag.implementations.DenyTeleportFlag; +import com.plotsquared.core.plot.flag.implementations.DisablePhysicsFlag; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.flag.implementations.DropProtectionFlag; +import com.plotsquared.core.plot.flag.implementations.EntityCapFlag; +import com.plotsquared.core.plot.flag.implementations.ExplosionFlag; +import com.plotsquared.core.plot.flag.implementations.GrassGrowFlag; +import com.plotsquared.core.plot.flag.implementations.HangingBreakFlag; +import com.plotsquared.core.plot.flag.implementations.HangingPlaceFlag; +import com.plotsquared.core.plot.flag.implementations.HostileAttackFlag; +import com.plotsquared.core.plot.flag.implementations.HostileCapFlag; +import com.plotsquared.core.plot.flag.implementations.HostileInteractFlag; +import com.plotsquared.core.plot.flag.implementations.IceFormFlag; +import com.plotsquared.core.plot.flag.implementations.IceMeltFlag; +import com.plotsquared.core.plot.flag.implementations.InstabreakFlag; +import com.plotsquared.core.plot.flag.implementations.InvincibleFlag; +import com.plotsquared.core.plot.flag.implementations.ItemDropFlag; +import com.plotsquared.core.plot.flag.implementations.KelpGrowFlag; +import com.plotsquared.core.plot.flag.implementations.LiquidFlowFlag; +import com.plotsquared.core.plot.flag.implementations.MiscBreakFlag; +import com.plotsquared.core.plot.flag.implementations.MiscCapFlag; +import com.plotsquared.core.plot.flag.implementations.MiscInteractFlag; +import com.plotsquared.core.plot.flag.implementations.MobCapFlag; +import com.plotsquared.core.plot.flag.implementations.MobPlaceFlag; +import com.plotsquared.core.plot.flag.implementations.MycelGrowFlag; +import com.plotsquared.core.plot.flag.implementations.PlaceFlag; +import com.plotsquared.core.plot.flag.implementations.PlayerInteractFlag; +import com.plotsquared.core.plot.flag.implementations.PveFlag; +import com.plotsquared.core.plot.flag.implementations.PvpFlag; +import com.plotsquared.core.plot.flag.implementations.RedstoneFlag; +import com.plotsquared.core.plot.flag.implementations.SnowFormFlag; +import com.plotsquared.core.plot.flag.implementations.SnowMeltFlag; +import com.plotsquared.core.plot.flag.implementations.SoilDryFlag; +import com.plotsquared.core.plot.flag.implementations.TamedAttackFlag; +import com.plotsquared.core.plot.flag.implementations.TamedInteractFlag; +import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag; +import com.plotsquared.core.plot.flag.implementations.UseFlag; +import com.plotsquared.core.plot.flag.implementations.VehicleBreakFlag; +import com.plotsquared.core.plot.flag.implementations.VehicleCapFlag; +import com.plotsquared.core.plot.flag.implementations.VehicleUseFlag; +import com.plotsquared.core.plot.flag.implementations.VillagerInteractFlag; +import com.plotsquared.core.plot.flag.implementations.VineGrowFlag; +import com.plotsquared.core.plot.flag.types.BlockTypeWrapper; +import com.plotsquared.core.listener.PlayerBlockEventType; +import com.plotsquared.core.listener.PlotListener; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotHandler; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.PlotInventory; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.EntityUtil; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.RegExUtil; +import com.plotsquared.core.util.entity.EntityCategories; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.world.block.BlockType; import io.papermc.lib.PaperLib; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/SingleWorldListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/SingleWorldListener.java similarity index 89% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/SingleWorldListener.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/listener/SingleWorldListener.java index 4146c7fad..6faed38fe 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/SingleWorldListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/SingleWorldListener.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.listeners; +package com.plotsquared.bukkit.listener; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.plot.world.PlotAreaManager; +import com.plotsquared.core.plot.world.SinglePlotAreaManager; +import com.plotsquared.core.util.ReflectionUtils; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.World; @@ -42,7 +42,7 @@ import org.bukkit.plugin.Plugin; import java.lang.reflect.Field; import java.lang.reflect.Method; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass; +import static com.plotsquared.core.util.ReflectionUtils.getRefClass; @SuppressWarnings("unused") public class SingleWorldListener implements Listener { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/WorldEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/WorldEvents.java similarity index 83% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/WorldEvents.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/listener/WorldEvents.java index f9097bddd..e963f35c9 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/WorldEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/WorldEvents.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.listeners; +package com.plotsquared.bukkit.listener; -import com.github.intellectualsites.plotsquared.bukkit.generator.BukkitPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; +import com.plotsquared.bukkit.generator.BukkitPlotGenerator; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.plot.world.PlotAreaManager; +import com.plotsquared.core.plot.world.SinglePlotAreaManager; import org.bukkit.World; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/placeholders/PlaceholderFormatter.java b/Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/PlaceholderFormatter.java similarity index 87% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/placeholders/PlaceholderFormatter.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/PlaceholderFormatter.java index 46960be2e..d10268f6a 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/placeholders/PlaceholderFormatter.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/PlaceholderFormatter.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.placeholders; +package com.plotsquared.bukkit.placeholder; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.config.ChatFormatter; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.core.configuration.ChatFormatter; +import com.plotsquared.core.player.PlotPlayer; import me.clip.placeholderapi.PlaceholderAPI; import org.bukkit.entity.Player; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/placeholders/Placeholders.java b/Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/Placeholders.java similarity index 95% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/placeholders/Placeholders.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/Placeholders.java index 404e2d941..c228dd898 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/placeholders/Placeholders.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/Placeholders.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.placeholders; +package com.plotsquared.bukkit.placeholder; -import com.github.intellectualsites.plotsquared.bukkit.BukkitMain; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.bukkit.BukkitMain; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.uuid.UUIDHandler; import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.expansion.PlaceholderExpansion; import org.bukkit.Bukkit; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitOfflinePlayer.java b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitOfflinePlayer.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitOfflinePlayer.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitOfflinePlayer.java index e62bcfdb6..8f46d3636 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitOfflinePlayer.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitOfflinePlayer.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object; +package com.plotsquared.bukkit.player; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; +import com.plotsquared.core.player.OfflinePlotPlayer; import org.bukkit.OfflinePlayer; import org.jetbrains.annotations.NotNull; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitPlayer.java b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitPlayer.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java index 95db61cbf..c4b3951e0 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitPlayer.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java @@ -23,19 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object; +package com.plotsquared.bukkit.player; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.PlotWeather; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.plot.PlotWeather; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.uuid.UUIDHandler; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.world.item.ItemType; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/BukkitLocalQueue.java b/Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitLocalQueue.java similarity index 94% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/BukkitLocalQueue.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitLocalQueue.java index d22f042cd..9c8b38dd9 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/BukkitLocalQueue.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitLocalQueue.java @@ -23,14 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util.block; +package com.plotsquared.bukkit.queue; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitBlockUtil; -import com.github.intellectualsites.plotsquared.bukkit.object.schematic.StateWrapper; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.BasicLocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil; +import com.plotsquared.bukkit.schematic.StateWrapper; +import com.plotsquared.bukkit.util.BukkitBlockUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.queue.BasicLocalBlockQueue; +import com.plotsquared.core.util.BlockUtil; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.WorldEdit; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/GenChunk.java b/Bukkit/src/main/java/com/plotsquared/bukkit/queue/GenChunk.java similarity index 92% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/GenChunk.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/queue/GenChunk.java index 205d02b5e..77cb4de45 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/GenChunk.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/queue/GenChunk.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util.block; +package com.plotsquared.bukkit.queue; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitBlockUtil; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.plot.object.ChunkWrapper; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.world.PatternUtil; +import com.plotsquared.bukkit.util.BukkitBlockUtil; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.location.ChunkWrapper; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; +import com.plotsquared.core.util.PatternUtil; import com.google.common.base.Preconditions; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.function.pattern.Pattern; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitSchematicHandler.java b/Bukkit/src/main/java/com/plotsquared/bukkit/schematic/BukkitSchematicHandler.java similarity index 96% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitSchematicHandler.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/schematic/BukkitSchematicHandler.java index 1ca9d5766..9705b894d 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitSchematicHandler.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/schematic/BukkitSchematicHandler.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.schematic; -import com.github.intellectualsites.plotsquared.bukkit.object.schematic.StateWrapper; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.queue.LocalBlockQueue; import com.sk89q.jnbt.*; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.platform.Capability; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/schematic/StateWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/schematic/StateWrapper.java similarity index 98% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/schematic/StateWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/schematic/StateWrapper.java index 77372a111..e68bcfca4 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/schematic/StateWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/schematic/StateWrapper.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object.schematic; +package com.plotsquared.bukkit.schematic; -import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; +import com.plotsquared.bukkit.util.BukkitUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; import com.sk89q.jnbt.ByteTag; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitBlockUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitBlockUtil.java similarity index 97% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitBlockUtil.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitBlockUtil.java index 0c4450bde..a46688819 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitBlockUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitBlockUtil.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.object; +package com.plotsquared.bukkit.util; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.world.block.BlockState; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChatManager.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitChatManager.java similarity index 80% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChatManager.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitChatManager.java index 69f028b81..6d8650622 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChatManager.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitChatManager.java @@ -23,16 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.chat.FancyMessage; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.ChatManager; +import com.plotsquared.bukkit.chat.FancyMessage; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.ChatManager; import org.bukkit.ChatColor; import java.util.Arrays; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitEconHandler.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEconHandler.java similarity index 89% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitEconHandler.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEconHandler.java index 1384ba5f6..1efd7fea5 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitEconHandler.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEconHandler.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitOfflinePlayer; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; +import com.plotsquared.bukkit.player.BukkitOfflinePlayer; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.EconHandler; import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.permission.Permission; import org.bukkit.Bukkit; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitInventoryUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java similarity index 92% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitInventoryUtil.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java index d03d96519..7c3c8a985 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitInventoryUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotInventory; -import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.core.plot.PlotInventory; +import com.plotsquared.core.plot.PlotItemStack; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.InventoryUtil; import com.sk89q.worldedit.bukkit.BukkitAdapter; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitSetupUtils.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitSetupUtils.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitSetupUtils.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitSetupUtils.java index cff0384cf..26f70fc4d 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitSetupUtils.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitSetupUtils.java @@ -23,18 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.generator.BukkitPlotGenerator; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; +import com.plotsquared.bukkit.generator.BukkitPlotGenerator; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.SetupObject; +import com.plotsquared.core.util.SetupUtils; import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; import org.bukkit.Chunk; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitTaskManager.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitTaskManager.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitTaskManager.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitTaskManager.java index b8f6ed646..b797708f2 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitTaskManager.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitTaskManager.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.BukkitMain; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.bukkit.BukkitMain; +import com.plotsquared.core.util.task.TaskManager; import org.bukkit.Bukkit; public class BukkitTaskManager extends TaskManager { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java similarity index 95% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java index a834d5f25..779d15361 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java @@ -23,23 +23,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.BukkitMain; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.StringComparison; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil; +import com.plotsquared.bukkit.BukkitMain; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.StringComparison; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.util.BlockUtil; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.bukkit.BukkitWorld; import com.sk89q.worldedit.regions.CuboidRegion; @@ -101,7 +101,6 @@ import java.util.UUID; import java.util.function.Consumer; import java.util.function.IntConsumer; - @SuppressWarnings({"unused", "WeakerAccess"}) public class BukkitUtil extends WorldUtil { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/OfflinePlayerUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/OfflinePlayerUtil.java similarity index 84% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/OfflinePlayerUtil.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/OfflinePlayerUtil.java index fbeb4c9aa..3fd2e99af 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/OfflinePlayerUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/OfflinePlayerUtil.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; @@ -34,15 +34,15 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.UUID; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.callConstructor; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.callMethod; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getCbClass; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getField; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getNmsClass; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getUtilClass; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.makeConstructor; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.makeField; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.makeMethod; +import static com.plotsquared.core.util.ReflectionUtils.callConstructor; +import static com.plotsquared.core.util.ReflectionUtils.callMethod; +import static com.plotsquared.core.util.ReflectionUtils.getCbClass; +import static com.plotsquared.core.util.ReflectionUtils.getField; +import static com.plotsquared.core.util.ReflectionUtils.getNmsClass; +import static com.plotsquared.core.util.ReflectionUtils.getUtilClass; +import static com.plotsquared.core.util.ReflectionUtils.makeConstructor; +import static com.plotsquared.core.util.ReflectionUtils.makeField; +import static com.plotsquared.core.util.ReflectionUtils.makeMethod; public class OfflinePlayerUtil { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/SendChunk.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/SendChunk.java similarity index 87% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/SendChunk.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/SendChunk.java index 503f59110..6cc879bc3 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/SendChunk.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/SendChunk.java @@ -23,19 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.RefClass; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.RefConstructor; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.RefField; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.RefMethod; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.ReflectionUtils.RefClass; +import com.plotsquared.core.util.ReflectionUtils.RefConstructor; +import com.plotsquared.core.util.ReflectionUtils.RefField; +import com.plotsquared.core.util.ReflectionUtils.RefMethod; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; import com.sk89q.worldedit.math.BlockVector2; import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; @@ -49,7 +49,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map.Entry; -import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass; +import static com.plotsquared.core.util.ReflectionUtils.getRefClass; /** * An utility that can be used to send chunks, rather than using bukkit code diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/SetGenCB.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/SetGenCB.java similarity index 89% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/SetGenCB.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/SetGenCB.java index 5462c13d3..bd77fe27d 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/SetGenCB.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/SetGenCB.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.bukkit.generator.BukkitAugmentedGenerator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; +import com.plotsquared.bukkit.generator.BukkitAugmentedGenerator; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.util.SetupUtils; import org.bukkit.World; import org.bukkit.generator.ChunkGenerator; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/UpdateUtility.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/UpdateUtility.java similarity index 90% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/UpdateUtility.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/UpdateUtility.java index bc22d66f2..bc11af3f5 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/UpdateUtility.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/UpdateUtility.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.util; +package com.plotsquared.bukkit.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; import org.bukkit.Bukkit; import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; @@ -60,7 +60,8 @@ public class UpdateUtility implements Listener { connection.setRequestMethod("GET"); spigotVersion = (new BufferedReader(new InputStreamReader(connection.getInputStream()))).readLine(); } catch (IOException e) { - PlotSquared.log(Captions.PREFIX + "&cUnable to check for updates because: " + e); + PlotSquared.log( + Captions.PREFIX + "&cUnable to check for updates because: " + e); this.cancel(); return; } @@ -78,4 +79,4 @@ public class UpdateUtility implements Listener { } }.runTaskTimer(this.javaPlugin, 0L, 12000L); } -} \ No newline at end of file +} diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/DatFileFilter.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/DatFileFilter.java similarity index 96% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/DatFileFilter.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/DatFileFilter.java index 168161186..65657fbff 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/DatFileFilter.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/DatFileFilter.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.uuid; +package com.plotsquared.bukkit.util.uuid; import java.io.File; import java.io.FilenameFilter; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/DefaultUUIDWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/DefaultUUIDWrapper.java similarity index 84% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/DefaultUUIDWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/DefaultUUIDWrapper.java index b67a4bdf6..a2898ee91 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/DefaultUUIDWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/DefaultUUIDWrapper.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.uuid; +package com.plotsquared.bukkit.util.uuid; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitOfflinePlayer; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.bukkit.player.BukkitOfflinePlayer; +import com.plotsquared.bukkit.player.BukkitPlayer; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.uuid.UUIDWrapper; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.jetbrains.annotations.NotNull; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/FileUUIDHandler.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/FileUUIDHandler.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/FileUUIDHandler.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/FileUUIDHandler.java index 02391c30f..c5620ffa1 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/FileUUIDHandler.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/FileUUIDHandler.java @@ -23,32 +23,29 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.uuid; +package com.plotsquared.bukkit.util.uuid; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandlerImplementation; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; import com.google.common.collect.HashBiMap; import com.google.common.collect.Sets; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.uuid.UUIDHandlerImplementation; +import com.plotsquared.core.util.uuid.UUIDWrapper; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.NBTInputStream; import com.sk89q.jnbt.Tag; -import java.io.BufferedInputStream; -import java.io.FileNotFoundException; -import java.util.Map; -import java.util.zip.GZIPInputStream; import org.bukkit.Bukkit; import org.bukkit.World; +import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -57,7 +54,9 @@ import java.nio.file.Files; import java.util.HashMap; import java.util.HashSet; import java.util.List; +import java.util.Map; import java.util.UUID; +import java.util.zip.GZIPInputStream; public class FileUUIDHandler extends UUIDHandlerImplementation { diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/LowerOfflineUUIDWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/LowerOfflineUUIDWrapper.java similarity index 91% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/LowerOfflineUUIDWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/LowerOfflineUUIDWrapper.java index ceb0875c2..f300c03eb 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/LowerOfflineUUIDWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/LowerOfflineUUIDWrapper.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.uuid; +package com.plotsquared.bukkit.util.uuid; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.player.PlotPlayer; import com.google.common.base.Charsets; import org.bukkit.OfflinePlayer; import org.jetbrains.annotations.NotNull; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/OfflineUUIDWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/OfflineUUIDWrapper.java similarity index 89% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/OfflineUUIDWrapper.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/OfflineUUIDWrapper.java index 04ccfc5fc..421484d3d 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/OfflineUUIDWrapper.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/OfflineUUIDWrapper.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.uuid; +package com.plotsquared.bukkit.util.uuid; -import com.github.intellectualsites.plotsquared.bukkit.object.BukkitOfflinePlayer; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.bukkit.player.BukkitOfflinePlayer; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.uuid.UUIDWrapper; import com.google.common.base.Charsets; import com.google.common.collect.BiMap; import org.bukkit.Bukkit; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/SQLUUIDHandler.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/SQLUUIDHandler.java similarity index 93% rename from Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/SQLUUIDHandler.java rename to Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/SQLUUIDHandler.java index 4b72e5cf8..2d8e38f50 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/uuid/SQLUUIDHandler.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/uuid/SQLUUIDHandler.java @@ -23,19 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.bukkit.uuid; +package com.plotsquared.bukkit.util.uuid; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.SQLite; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandlerImplementation; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.SQLite; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.uuid.UUIDHandlerImplementation; +import com.plotsquared.core.util.uuid.UUIDWrapper; import com.google.common.collect.HashBiMap; import org.json.simple.JSONArray; import org.json.simple.JSONObject; diff --git a/Bukkit/src/main/resources/plugin.yml b/Bukkit/src/main/resources/plugin.yml index 6fde92971..83e711c92 100644 --- a/Bukkit/src/main/resources/plugin.yml +++ b/Bukkit/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ${name} -main: com.github.intellectualsites.plotsquared.bukkit.BukkitMain +main: com.plotsquared.bukkit.BukkitMain api-version: "1.13" version: "${version}" load: STARTUP diff --git a/Core/build.gradle b/Core/build.gradle index 67e3d237e..dfd060146 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -35,7 +35,7 @@ processResources { //noinspection GroovyAssignabilityCheck jar.archiveFileName = "PlotSquared-${project.parent.version}.jar" -jar.destinationDirectory = file("../mvn/com/github/intellectualsites/plotsquared/PlotSquared/" + project.parent.version) +jar.destinationDirectory = file("../mvn/com/plotsquared/PlotSquared/" + project.parent.version) task createPom { doLast { pom { @@ -44,14 +44,14 @@ task createPom { artifactId = "PlotSquared" version = project.parent.version } - }.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared/${project.parent.version}/PlotSquared-${project.parent.version}.pom") + }.writeTo("../mvn/com/plotsquared/PlotSquared/${project.parent.version}/PlotSquared-${project.parent.version}.pom") pom { project { groupId = rootProject.group artifactId = "PlotSquared" version = "latest" } - }.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared/latest/PlotSquared-latest.pom") + }.writeTo("../mvn/com/plotsquared/PlotSquared/latest/PlotSquared-latest.pom") .writeTo("pom.xml") } } @@ -59,8 +59,8 @@ task createPom { task copyFiles { doLast { copy { - from("../mvn/com/github/intellectualsites/plotsquared/PlotSquared/${project.parent.version}/") - into("../mvn/com/github/intellectualsites/plotsquared/PlotSquared/latest/") + from("../mvn/com/plotsquared/PlotSquared/${project.parent.version}/") + into("../mvn/com/plotsquared/PlotSquared/latest/") include("*.jar") rename("PlotSquared-${project.parent.version}.jar", "PlotSquared-latest.jar") } @@ -74,8 +74,8 @@ shadowJar { include(dependency("net.kyori:text-serializer-legacy:3.0.2")) include(dependency("net.kyori:text-serializer-plain:3.0.2")) } - relocate("org.json", "com.github.intellectualsites.plotsquared.json") - relocate('net.kyori.text', 'com.github.intellectualsites.plotsquared.formatting.text') + relocate('net.kyori.text', 'com.plotsquared.formatting.text') + relocate("org.json", "com.plotsquared.json") } shadowJar.doLast { diff --git a/Core/pom.xml b/Core/pom.xml index 9d69211bb..f4123bd96 100644 --- a/Core/pom.xml +++ b/Core/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - com.github.intellectualsites.plotsquared + com.plotsquared PlotSquared latest diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpirySettings.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpirySettings.java deleted file mode 100644 index c1f6e38e1..000000000 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpirySettings.java +++ /dev/null @@ -1,29 +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.github.intellectualsites.plotsquared.plot.util.expiry; - -public class ExpirySettings { -} diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/IPlotMain.java b/Core/src/main/java/com/plotsquared/core/IPlotMain.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/IPlotMain.java rename to Core/src/main/java/com/plotsquared/core/IPlotMain.java index dba580807..376e9c474 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/IPlotMain.java +++ b/Core/src/main/java/com/plotsquared/core/IPlotMain.java @@ -23,23 +23,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot; +package com.plotsquared.core; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.logger.ILogger; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.ChatManager; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandlerImplementation; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.QueueProvider; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.generator.IndependentPlotGenerator; +import com.plotsquared.core.util.logger.ILogger; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.ChatManager; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.InventoryUtil; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandlerImplementation; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.queue.QueueProvider; import com.sk89q.worldedit.extension.platform.Actor; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/Platform.java b/Core/src/main/java/com/plotsquared/core/Platform.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/Platform.java rename to Core/src/main/java/com/plotsquared/core/Platform.java index 9813a2371..3a9eb42e1 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/Platform.java +++ b/Core/src/main/java/com/plotsquared/core/Platform.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot; +package com.plotsquared.core; public enum Platform { Bukkit, Sponge, Spigot, Paper diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java b/Core/src/main/java/com/plotsquared/core/PlotSquared.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java rename to Core/src/main/java/com/plotsquared/core/PlotSquared.java index e2e18b572..84f0a6588 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java +++ b/Core/src/main/java/com/plotsquared/core/PlotSquared.java @@ -23,39 +23,65 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot; +package com.plotsquared.core; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.configuration.MemorySection; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerialization; -import com.github.intellectualsites.plotsquared.plot.commands.WE_Anywhere; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.config.Storage; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.database.Database; -import com.github.intellectualsites.plotsquared.plot.database.MySQL; -import com.github.intellectualsites.plotsquared.plot.database.SQLManager; -import com.github.intellectualsites.plotsquared.plot.database.SQLite; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotWorld; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.listener.WESubscriber; -import com.github.intellectualsites.plotsquared.plot.logger.ILogger; -import com.github.intellectualsites.plotsquared.plot.object.*; -import com.github.intellectualsites.plotsquared.plot.object.worlds.DefaultPlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.util.*; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpiryTask; +import com.plotsquared.core.command.WE_Anywhere; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.configuration.Storage; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.configuration.MemorySection; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.configuration.serialization.ConfigurationSerialization; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.database.Database; +import com.plotsquared.core.database.MySQL; +import com.plotsquared.core.database.SQLManager; +import com.plotsquared.core.database.SQLite; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.generator.HybridPlotWorld; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.generator.IndependentPlotGenerator; +import com.plotsquared.core.listener.WESubscriber; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.BlockBucket; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotCluster; +import com.plotsquared.core.plot.PlotFilter; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.plot.comment.CommentManager; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.plot.expiration.ExpiryTask; +import com.plotsquared.core.plot.world.DefaultPlotAreaManager; +import com.plotsquared.core.plot.world.PlotAreaManager; +import com.plotsquared.core.plot.world.SinglePlotArea; +import com.plotsquared.core.plot.world.SinglePlotAreaManager; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.util.ChatManager; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.EventDispatcher; +import com.plotsquared.core.util.InventoryUtil; +import com.plotsquared.core.util.LegacyConverter; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.ReflectionUtils; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.util.logger.ILogger; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.regions.CuboidRegion; @@ -64,15 +90,37 @@ import lombok.NonNull; import lombok.Setter; import org.jetbrains.annotations.Nullable; -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; import java.nio.file.Files; import java.nio.file.StandardOpenOption; import java.sql.SQLException; -import java.util.*; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.Map.Entry; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; import java.util.function.Consumer; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -1401,41 +1449,41 @@ import java.util.zip.ZipInputStream; case "s": case "size": this.worlds.set(base + "plot.size", - Configuration.INTEGER.parseString(value).shortValue()); + ConfigurationUtil.INTEGER.parseString(value).shortValue()); break; case "g": case "gap": this.worlds.set(base + "road.width", - Configuration.INTEGER.parseString(value).shortValue()); + ConfigurationUtil.INTEGER.parseString(value).shortValue()); break; case "h": case "height": this.worlds.set(base + "road.height", - Configuration.INTEGER.parseString(value).shortValue()); + ConfigurationUtil.INTEGER.parseString(value).shortValue()); this.worlds.set(base + "plot.height", - Configuration.INTEGER.parseString(value).shortValue()); + ConfigurationUtil.INTEGER.parseString(value).shortValue()); this.worlds.set(base + "wall.height", - Configuration.INTEGER.parseString(value).shortValue()); + ConfigurationUtil.INTEGER.parseString(value).shortValue()); break; case "f": case "floor": this.worlds.set(base + "plot.floor", - Configuration.BLOCK_BUCKET.parseString(value).toString()); + ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString()); break; case "m": case "main": this.worlds.set(base + "plot.filling", - Configuration.BLOCK_BUCKET.parseString(value).toString()); + ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString()); break; case "w": case "wall": this.worlds.set(base + "wall.filling", - Configuration.BLOCK_BUCKET.parseString(value).toString()); + ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString()); break; case "b": case "border": this.worlds.set(base + "wall.block", - Configuration.BLOCK_BUCKET.parseString(value).toString()); + ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString()); break; default: PlotSquared.log("&cKey not found: &7" + element); @@ -1720,7 +1768,8 @@ import java.util.zip.ZipInputStream; if (this.worlds.contains("worlds")) { if (!this.worlds.contains("configuration_version") || - (!this.worlds.getString("configuration_version").equalsIgnoreCase(LegacyConverter.CONFIGURATION_VERSION) && + (!this.worlds.getString("configuration_version").equalsIgnoreCase( + LegacyConverter.CONFIGURATION_VERSION) && !this.worlds.getString("configuration_version").equalsIgnoreCase("v5"))) { // Conversion needed log(Captions.LEGACY_CONFIG_FOUND.getTranslated()); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotVersion.java b/Core/src/main/java/com/plotsquared/core/PlotVersion.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotVersion.java rename to Core/src/main/java/com/plotsquared/core/PlotVersion.java index 205fb455d..b0f001a1a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotVersion.java +++ b/Core/src/main/java/com/plotsquared/core/PlotVersion.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot; +package com.plotsquared.core; public class PlotVersion { public final int year, month, day, hash, build; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/api/PlotAPI.java b/Core/src/main/java/com/plotsquared/core/api/PlotAPI.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/api/PlotAPI.java rename to Core/src/main/java/com/plotsquared/core/api/PlotAPI.java index 6df90908c..acf894c54 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/api/PlotAPI.java +++ b/Core/src/main/java/com/plotsquared/core/api/PlotAPI.java @@ -23,18 +23,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.api; +package com.plotsquared.core.api; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.*; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.EventDispatcher; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.uuid.UUIDWrapper; import lombok.NoArgsConstructor; import java.util.Collections; @@ -48,12 +53,12 @@ import java.util.UUID; *
    *
  • {@link PlotPlayer}
  • *
  • {@link Plot}
  • - *
  • {@link com.github.intellectualsites.plotsquared.plot.object.Location}
  • + *
  • {@link Location}
  • *
  • {@link PlotArea}
  • *
  • {@link PlotSquared}
  • *
* - * @version 3.3.3 + * @version 5 */ @SuppressWarnings({"unused", "WeakerAccess"}) @NoArgsConstructor public class PlotAPI { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ArrayUtil.java b/Core/src/main/java/com/plotsquared/core/collection/ArrayUtil.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ArrayUtil.java rename to Core/src/main/java/com/plotsquared/core/collection/ArrayUtil.java index 5f4cc9567..cd72475e7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ArrayUtil.java +++ b/Core/src/main/java/com/plotsquared/core/collection/ArrayUtil.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.collection; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ByteArrayUtilities.java b/Core/src/main/java/com/plotsquared/core/collection/ByteArrayUtilities.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ByteArrayUtilities.java rename to Core/src/main/java/com/plotsquared/core/collection/ByteArrayUtilities.java index 78bcf1ad6..b21ced106 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ByteArrayUtilities.java +++ b/Core/src/main/java/com/plotsquared/core/collection/ByteArrayUtilities.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.collection; public class ByteArrayUtilities { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/FlatRandomCollection.java b/Core/src/main/java/com/plotsquared/core/collection/FlatRandomCollection.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/FlatRandomCollection.java rename to Core/src/main/java/com/plotsquared/core/collection/FlatRandomCollection.java index 934159fb3..0834f0d4f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/FlatRandomCollection.java +++ b/Core/src/main/java/com/plotsquared/core/collection/FlatRandomCollection.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.collection; +package com.plotsquared.core.collection; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; +import com.plotsquared.core.util.MathMan; import java.util.ArrayList; import java.util.Map; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/area/QuadMap.java b/Core/src/main/java/com/plotsquared/core/collection/QuadMap.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/area/QuadMap.java rename to Core/src/main/java/com/plotsquared/core/collection/QuadMap.java index 9c14ee6a3..d5b4e9394 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/area/QuadMap.java +++ b/Core/src/main/java/com/plotsquared/core/collection/QuadMap.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.area; +package com.plotsquared.core.collection; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.core.util.RegionUtil; import com.sk89q.worldedit.regions.CuboidRegion; import java.util.HashSet; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/RandomCollection.java b/Core/src/main/java/com/plotsquared/core/collection/RandomCollection.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/RandomCollection.java rename to Core/src/main/java/com/plotsquared/core/collection/RandomCollection.java index 56e40f5a1..f6209ceb6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/RandomCollection.java +++ b/Core/src/main/java/com/plotsquared/core/collection/RandomCollection.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.collection; +package com.plotsquared.core.collection; import java.util.Map; import java.util.Random; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/SimpleRandomCollection.java b/Core/src/main/java/com/plotsquared/core/collection/SimpleRandomCollection.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/SimpleRandomCollection.java rename to Core/src/main/java/com/plotsquared/core/collection/SimpleRandomCollection.java index 096b8d33f..905c69cfd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/collection/SimpleRandomCollection.java +++ b/Core/src/main/java/com/plotsquared/core/collection/SimpleRandomCollection.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.collection; +package com.plotsquared.core.collection; import java.util.Map; import java.util.NavigableMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Add.java b/Core/src/main/java/com/plotsquared/core/command/Add.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Add.java rename to Core/src/main/java/com/plotsquared/core/command/Add.java index 9996c14fc..4a5da7beb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Add.java +++ b/Core/src/main/java/com/plotsquared/core/command/Add.java @@ -23,19 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; import java.util.Iterator; import java.util.Set; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Alias.java b/Core/src/main/java/com/plotsquared/core/command/Alias.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Alias.java rename to Core/src/main/java/com/plotsquared/core/command/Alias.java index 1dcc69c67..9ca6804e6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Alias.java +++ b/Core/src/main/java/com/plotsquared/core/command/Alias.java @@ -23,19 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; @CommandDeclaration(command = "setalias", permission = "plots.alias", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Area.java b/Core/src/main/java/com/plotsquared/core/command/Area.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Area.java rename to Core/src/main/java/com/plotsquared/core/command/Area.java index 9b40ba6c4..aa00f251f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Area.java +++ b/Core/src/main/java/com/plotsquared/core/command/Area.java @@ -23,35 +23,33 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.generator.AugmentedUtils; -import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotWorld; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.CmdConfirm; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.generator.AugmentedUtils; +import com.plotsquared.core.generator.HybridPlotWorld; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaTerrainType; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.plot.SetupObject; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.util.RegionUtil; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.regions.CuboidRegion; @@ -241,20 +239,20 @@ public class Area extends SubCommand { break; case "f": case "floor": - pa.TOP_BLOCK = Configuration.BLOCK_BUCKET.parseString(pair[1]); + pa.TOP_BLOCK = ConfigurationUtil.BLOCK_BUCKET.parseString(pair[1]); break; case "m": case "main": - pa.MAIN_BLOCK = Configuration.BLOCK_BUCKET.parseString(pair[1]); + pa.MAIN_BLOCK = ConfigurationUtil.BLOCK_BUCKET.parseString(pair[1]); break; case "w": case "wall": pa.WALL_FILLING = - Configuration.BLOCK_BUCKET.parseString(pair[1]); + ConfigurationUtil.BLOCK_BUCKET.parseString(pair[1]); break; case "b": case "border": - pa.WALL_BLOCK = Configuration.BLOCK_BUCKET.parseString(pair[1]); + pa.WALL_BLOCK = ConfigurationUtil.BLOCK_BUCKET.parseString(pair[1]); break; case "terrain": pa.setTerrain(PlotAreaTerrainType.fromString(pair[1]).orElseThrow(() -> new IllegalArgumentException(pair[1] + " is not a valid terrain."))); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/Argument.java b/Core/src/main/java/com/plotsquared/core/command/Argument.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/commands/Argument.java rename to Core/src/main/java/com/plotsquared/core/command/Argument.java index 0c8de2100..2bb203ac8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/Argument.java +++ b/Core/src/main/java/com/plotsquared/core/command/Argument.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.PlotId; public abstract class Argument { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Auto.java b/Core/src/main/java/com/plotsquared/core/command/Auto.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Auto.java rename to Core/src/main/java/com/plotsquared/core/command/Auto.java index 1ca1a225f..3fa8d8ee6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Auto.java +++ b/Core/src/main/java/com/plotsquared/core/command/Auto.java @@ -23,30 +23,29 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlayerAutoPlotEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotAutoMergeEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.object.Expression; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.AutoClaimFinishTask; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlayerAutoPlotEvent; +import com.plotsquared.core.events.PlotAutoMergeEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.util.Expression; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.task.AutoClaimFinishTask; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.task.TaskManager; import com.google.common.primitives.Ints; import org.jetbrains.annotations.Nullable; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Biome.java b/Core/src/main/java/com/plotsquared/core/command/Biome.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Biome.java rename to Core/src/main/java/com/plotsquared/core/command/Biome.java index 0fa0ae8df..fca7d037a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Biome.java +++ b/Core/src/main/java/com/plotsquared/core/command/Biome.java @@ -23,14 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeTypes; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Buy.java b/Core/src/main/java/com/plotsquared/core/command/Buy.java similarity index 75% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Buy.java rename to Core/src/main/java/com/plotsquared/core/command/Buy.java index 3798e65a8..32fe02d60 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Buy.java +++ b/Core/src/main/java/com/plotsquared/core/command/Buy.java @@ -23,23 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PriceFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.PriceFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -90,7 +88,8 @@ public class Buy extends Command { Captions.PLOT_SOLD.send(owner, plot.getId(), player.getName(), price); } PlotFlag plotFlag = plot.getFlagContainer().getFlag(PriceFlag.class); - PlotFlagRemoveEvent event = PlotSquared.get().getEventDispatcher().callFlagRemove(plotFlag, plot); + PlotFlagRemoveEvent + event = PlotSquared.get().getEventDispatcher().callFlagRemove(plotFlag, plot); if(event.getEventResult() != Result.DENY) { plot.removeFlag(event.getFlag()); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Caps.java b/Core/src/main/java/com/plotsquared/core/command/Caps.java similarity index 67% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Caps.java rename to Core/src/main/java/com/plotsquared/core/command/Caps.java index bc47d3237..05ab6fb1b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Caps.java +++ b/Core/src/main/java/com/plotsquared/core/command/Caps.java @@ -23,27 +23,26 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnimalCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.EntityCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HostileCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MobCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehicleCapFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.AnimalCapFlag; +import com.plotsquared.core.plot.flag.implementations.EntityCapFlag; +import com.plotsquared.core.plot.flag.implementations.HostileCapFlag; +import com.plotsquared.core.plot.flag.implementations.MiscCapFlag; +import com.plotsquared.core.plot.flag.implementations.MobCapFlag; +import com.plotsquared.core.plot.flag.implementations.VehicleCapFlag; +import com.plotsquared.core.util.Permissions; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ANIMAL; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ENTITY; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MISC; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MOB; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MONSTER; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_VEHICLE; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_ANIMAL; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_ENTITY; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MISC; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MOB; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MONSTER; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_VEHICLE; @CommandDeclaration(command = "caps", category = CommandCategory.INFO, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Chat.java b/Core/src/main/java/com/plotsquared/core/command/Chat.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Chat.java rename to Core/src/main/java/com/plotsquared/core/command/Chat.java index 06e700138..7048dc31e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Chat.java +++ b/Core/src/main/java/com/plotsquared/core/command/Chat.java @@ -23,10 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.player.PlotPlayer; @CommandDeclaration(command = "chat", description = "Toggle plot chat on or off", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Claim.java b/Core/src/main/java/com/plotsquared/core/command/Claim.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Claim.java rename to Core/src/main/java/com/plotsquared/core/command/Claim.java index 3ecd21b87..f6208bb38 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Claim.java +++ b/Core/src/main/java/com/plotsquared/core/command/Claim.java @@ -23,22 +23,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlayerClaimPlotEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotMergeEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.object.*; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlayerClaimPlotEvent; +import com.plotsquared.core.events.PlotMergeEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.task.RunnableVal; import com.google.common.primitives.Ints; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.util.Expression; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; @CommandDeclaration(command = "claim", aliases = "c", @@ -59,7 +64,8 @@ public class Claim extends SubCommand { if (plot == null) { return sendMessage(player, Captions.NOT_IN_PLOT); } - PlayerClaimPlotEvent event = PlotSquared.get().getEventDispatcher().callClaim(player, plot, schematic); + PlayerClaimPlotEvent + event = PlotSquared.get().getEventDispatcher().callClaim(player, plot, schematic); schematic = event.getSchematic(); if (event.getEventResult() == Result.DENY) { sendMessage(player, Captions.EVENT_DENIED, "Claim"); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Clear.java b/Core/src/main/java/com/plotsquared/core/command/Clear.java similarity index 77% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Clear.java rename to Core/src/main/java/com/plotsquared/core/command/Clear.java index d57b1f3d3..3cffecada 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Clear.java +++ b/Core/src/main/java/com/plotsquared/core/command/Clear.java @@ -23,29 +23,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnalysisFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.AnalysisFlag; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.queue.GlobalBlockQueue; import java.util.concurrent.CompletableFuture; -import static com.github.intellectualsites.plotsquared.plot.commands.SubCommand.sendMessage; +import static com.plotsquared.core.command.SubCommand.sendMessage; @CommandDeclaration(command = "clear", description = "Clear the plot you stand on", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Cluster.java b/Core/src/main/java/com/plotsquared/core/command/Cluster.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Cluster.java rename to Core/src/main/java/com/plotsquared/core/command/Cluster.java index f23492957..56bed3d95 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Cluster.java +++ b/Core/src/main/java/com/plotsquared/core/command/Cluster.java @@ -23,24 +23,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.BlockLoc; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotCluster; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.location.BlockLoc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotCluster; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.ArrayList; import java.util.HashSet; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/CmdConfirm.java b/Core/src/main/java/com/plotsquared/core/command/CmdConfirm.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/CmdConfirm.java rename to Core/src/main/java/com/plotsquared/core/command/CmdConfirm.java index 6f21ec11c..8b657992d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/CmdConfirm.java +++ b/Core/src/main/java/com/plotsquared/core/command/CmdConfirm.java @@ -23,11 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.CmdInstance; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.task.TaskManager; public class CmdConfirm { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/CmdInstance.java b/Core/src/main/java/com/plotsquared/core/command/CmdInstance.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/CmdInstance.java rename to Core/src/main/java/com/plotsquared/core/command/CmdInstance.java index c0f8e4a4c..7dbd19407 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/CmdInstance.java +++ b/Core/src/main/java/com/plotsquared/core/command/CmdInstance.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.command; public class CmdInstance { public final Runnable command; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/Command.java b/Core/src/main/java/com/plotsquared/core/command/Command.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/commands/Command.java rename to Core/src/main/java/com/plotsquared/core/command/Command.java index 5badf34e2..a89533733 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/Command.java +++ b/Core/src/main/java/com/plotsquared/core/command/Command.java @@ -23,23 +23,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.CommandCategory; -import com.github.intellectualsites.plotsquared.plot.commands.MainCommand; -import com.github.intellectualsites.plotsquared.plot.commands.RequiredType; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.StringComparison; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringComparison; +import com.plotsquared.core.util.StringMan; import java.io.IOException; import java.lang.reflect.InvocationTargetException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/CommandCaller.java b/Core/src/main/java/com/plotsquared/core/command/CommandCaller.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/commands/CommandCaller.java rename to Core/src/main/java/com/plotsquared/core/command/CommandCaller.java index 7165a7b9f..b26eed517 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/CommandCaller.java +++ b/Core/src/main/java/com/plotsquared/core/command/CommandCaller.java @@ -23,9 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.commands; - -import com.github.intellectualsites.plotsquared.plot.commands.RequiredType; +package com.plotsquared.core.command; public interface CommandCaller { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CommandCategory.java b/Core/src/main/java/com/plotsquared/core/command/CommandCategory.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CommandCategory.java rename to Core/src/main/java/com/plotsquared/core/command/CommandCategory.java index a3e440dde..2cffd99c0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CommandCategory.java +++ b/Core/src/main/java/com/plotsquared/core/command/CommandCategory.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.plot.config.Captions; +import com.plotsquared.core.configuration.Captions; import lombok.RequiredArgsConstructor; /** diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/CommandDeclaration.java b/Core/src/main/java/com/plotsquared/core/command/CommandDeclaration.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/commands/CommandDeclaration.java rename to Core/src/main/java/com/plotsquared/core/command/CommandDeclaration.java index 651606014..693ed0cb2 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/commands/CommandDeclaration.java +++ b/Core/src/main/java/com/plotsquared/core/command/CommandDeclaration.java @@ -23,10 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.commands; - -import com.github.intellectualsites.plotsquared.plot.commands.CommandCategory; -import com.github.intellectualsites.plotsquared.plot.commands.RequiredType; +package com.plotsquared.core.command; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Comment.java b/Core/src/main/java/com/plotsquared/core/command/Comment.java similarity index 83% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Comment.java rename to Core/src/main/java/com/plotsquared/core/command/Comment.java index 235bc3741..58386802e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Comment.java +++ b/Core/src/main/java/com/plotsquared/core/command/Comment.java @@ -23,18 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.comment.CommentInbox; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; -import com.github.intellectualsites.plotsquared.plot.util.CommentManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.comment.CommentInbox; +import com.plotsquared.core.plot.comment.PlotComment; +import com.plotsquared.core.plot.comment.CommentManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.Arrays; import java.util.Locale; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Condense.java b/Core/src/main/java/com/plotsquared/core/command/Condense.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Condense.java rename to Core/src/main/java/com/plotsquared/core/command/Condense.java index 61c548c6f..48195db08 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Condense.java +++ b/Core/src/main/java/com/plotsquared/core/command/Condense.java @@ -23,18 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.WorldUtil; import java.util.ArrayList; import java.util.Collection; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Confirm.java b/Core/src/main/java/com/plotsquared/core/command/Confirm.java similarity index 77% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Confirm.java rename to Core/src/main/java/com/plotsquared/core/command/Confirm.java index e68dcec6d..04723ac48 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Confirm.java +++ b/Core/src/main/java/com/plotsquared/core/command/Confirm.java @@ -23,16 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.CmdInstance; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.CmdConfirm; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.task.TaskManager; @CommandDeclaration(command = "confirm", permission = "plots.use", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Continue.java b/Core/src/main/java/com/plotsquared/core/command/Continue.java similarity index 77% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Continue.java rename to Core/src/main/java/com/plotsquared/core/command/Continue.java index 6d367420b..f2a03ba2a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Continue.java +++ b/Core/src/main/java/com/plotsquared/core/command/Continue.java @@ -23,20 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; @CommandDeclaration(command = "continue", description = "Continue a plot that was previously marked as done", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Copy.java b/Core/src/main/java/com/plotsquared/core/command/Copy.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Copy.java rename to Core/src/main/java/com/plotsquared/core/command/Copy.java index 6337b44a3..2de5b35e8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Copy.java +++ b/Core/src/main/java/com/plotsquared/core/command/Copy.java @@ -23,15 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; @CommandDeclaration(command = "copy", permission = "plots.copy", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CreateRoadSchematic.java b/Core/src/main/java/com/plotsquared/core/command/CreateRoadSchematic.java similarity index 78% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CreateRoadSchematic.java rename to Core/src/main/java/com/plotsquared/core/command/CreateRoadSchematic.java index e70697212..fcd45f1fe 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/CreateRoadSchematic.java +++ b/Core/src/main/java/com/plotsquared/core/command/CreateRoadSchematic.java @@ -23,16 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotWorld; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.generator.HybridPlotWorld; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; @CommandDeclaration(command = "createroadschematic", aliases = {"crs"}, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DatabaseCommand.java b/Core/src/main/java/com/plotsquared/core/command/DatabaseCommand.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DatabaseCommand.java rename to Core/src/main/java/com/plotsquared/core/command/DatabaseCommand.java index 79c43acb4..df23c4ac7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DatabaseCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/DatabaseCommand.java @@ -23,21 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.database.MySQL; -import com.github.intellectualsites.plotsquared.plot.database.SQLManager; -import com.github.intellectualsites.plotsquared.plot.database.SQLite; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.database.MySQL; +import com.plotsquared.core.database.SQLManager; +import com.plotsquared.core.database.SQLite; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.world.SinglePlotArea; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.database.Database; import java.io.File; import java.sql.SQLException; @@ -93,7 +93,7 @@ public class DatabaseCommand extends SubCommand { return false; } try { - com.github.intellectualsites.plotsquared.plot.database.Database implementation; + Database implementation; String prefix = ""; switch (args[0].toLowerCase()) { case "import": diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Debug.java b/Core/src/main/java/com/plotsquared/core/command/Debug.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Debug.java rename to Core/src/main/java/com/plotsquared/core/command/Debug.java index 150c34a0b..988adde3d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Debug.java +++ b/Core/src/main/java/com/plotsquared/core/command/Debug.java @@ -23,18 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories; -import com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategory; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.entity.EntityCategories; +import com.plotsquared.core.util.entity.EntityCategory; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.worldedit.world.entity.EntityType; import java.util.Comparator; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugAllowUnsafe.java b/Core/src/main/java/com/plotsquared/core/command/DebugAllowUnsafe.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugAllowUnsafe.java rename to Core/src/main/java/com/plotsquared/core/command/DebugAllowUnsafe.java index 360d7ba15..e4de7e351 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugAllowUnsafe.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugAllowUnsafe.java @@ -23,11 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; import java.util.ArrayList; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugClaimTest.java b/Core/src/main/java/com/plotsquared/core/command/DebugClaimTest.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugClaimTest.java rename to Core/src/main/java/com/plotsquared/core/command/DebugClaimTest.java index e98402b3a..40fa3f105 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugClaimTest.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugClaimTest.java @@ -23,22 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; import com.google.common.collect.BiMap; import com.sk89q.worldedit.math.BlockVector2; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugExec.java b/Core/src/main/java/com/plotsquared/core/command/DebugExec.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugExec.java rename to Core/src/main/java/com/plotsquared/core/command/DebugExec.java index fa3eab5f3..4091862e5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugExec.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugExec.java @@ -23,44 +23,42 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.listener.WEManager; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; -import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.util.WEManager; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +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.util.ChunkManager; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.plot.expiration.PlotAnalysis; import com.google.common.io.Files; import com.sk89q.worldedit.world.block.BlockState; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java b/Core/src/main/java/com/plotsquared/core/command/DebugImportWorlds.java similarity index 80% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java rename to Core/src/main/java/com/plotsquared/core/command/DebugImportWorlds.java index 5937a99d3..ee831aad5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugImportWorlds.java @@ -23,20 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.plot.world.PlotAreaManager; +import com.plotsquared.core.plot.world.SinglePlotArea; +import com.plotsquared.core.plot.world.SinglePlotAreaManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; import com.google.common.base.Charsets; import java.io.File; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugLoadTest.java b/Core/src/main/java/com/plotsquared/core/command/DebugLoadTest.java similarity index 83% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugLoadTest.java rename to Core/src/main/java/com/plotsquared/core/command/DebugLoadTest.java index a64184703..47bf4d6c5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugLoadTest.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugLoadTest.java @@ -23,12 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.player.PlotPlayer; @CommandDeclaration(command = "debugloadtest", permission = "plots.debugloadtest", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java rename to Core/src/main/java/com/plotsquared/core/command/DebugPaste.java index 5d58bf150..d366c2b41 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java @@ -23,19 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.IncendoPaster; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.net.IncendoPaster; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import com.plotsquared.core.util.PremiumVerification; import lombok.NonNull; import java.io.BufferedReader; @@ -50,9 +50,6 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import static com.github.intellectualsites.plotsquared.plot.util.PremiumVerification.getDownloadID; -import static com.github.intellectualsites.plotsquared.plot.util.PremiumVerification.getUserID; - @CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste", @@ -85,7 +82,8 @@ public class DebugPaste extends SubCommand { + "problem\n\n"); b.append("# PlotSquared Information\n"); b.append("This PlotSquared version is licensed to the spigot user ") - .append(getUserID()).append(" under ").append(getDownloadID()).append("\n"); + .append(PremiumVerification.getUserID()).append(" under ").append( + PremiumVerification.getDownloadID()).append("\n"); b.append("# Server Information\n"); b.append("Server Version: ").append(PlotSquared.get().IMP.getServerImplementation()) .append("\n"); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugRoadRegen.java b/Core/src/main/java/com/plotsquared/core/command/DebugRoadRegen.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugRoadRegen.java rename to Core/src/main/java/com/plotsquared/core/command/DebugRoadRegen.java index d77085c1e..534241c73 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugRoadRegen.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugRoadRegen.java @@ -23,18 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotManager; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.generator.HybridPlotManager; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugSaveTest.java b/Core/src/main/java/com/plotsquared/core/command/DebugSaveTest.java similarity index 80% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugSaveTest.java rename to Core/src/main/java/com/plotsquared/core/command/DebugSaveTest.java index dd33219b2..3cd184abe 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugSaveTest.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugSaveTest.java @@ -23,14 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; import java.util.ArrayList; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Delete.java b/Core/src/main/java/com/plotsquared/core/command/Delete.java similarity index 78% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Delete.java rename to Core/src/main/java/com/plotsquared/core/command/Delete.java index f90da13d7..6d033109f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Delete.java +++ b/Core/src/main/java/com/plotsquared/core/command/Delete.java @@ -23,24 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.object.Expression; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.CmdConfirm; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.util.Expression; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.task.TaskManager; @CommandDeclaration(command = "delete", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Deny.java b/Core/src/main/java/com/plotsquared/core/command/Deny.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Deny.java rename to Core/src/main/java/com/plotsquared/core/command/Deny.java index 370d52e77..a8a9290b8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Deny.java +++ b/Core/src/main/java/com/plotsquared/core/command/Deny.java @@ -23,20 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Argument; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; import com.sk89q.worldedit.world.gamemode.GameModes; import java.util.Set; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Desc.java b/Core/src/main/java/com/plotsquared/core/command/Desc.java similarity index 78% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Desc.java rename to Core/src/main/java/com/plotsquared/core/command/Desc.java index bf81452f2..b7d2de59a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Desc.java +++ b/Core/src/main/java/com/plotsquared/core/command/Desc.java @@ -23,18 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagAddEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DescriptionFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.implementations.DescriptionFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; @CommandDeclaration(command = "setdescription", permission = "plots.set.desc", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Dislike.java b/Core/src/main/java/com/plotsquared/core/command/Dislike.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Dislike.java rename to Core/src/main/java/com/plotsquared/core/command/Dislike.java index b13a02892..ee6664f81 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Dislike.java +++ b/Core/src/main/java/com/plotsquared/core/command/Dislike.java @@ -23,10 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.player.PlotPlayer; @CommandDeclaration(command = "dislike", permission = "plots.dislike", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Done.java b/Core/src/main/java/com/plotsquared/core/command/Done.java similarity index 75% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Done.java rename to Core/src/main/java/com/plotsquared/core/command/Done.java index 7526964af..b1afc67ac 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Done.java +++ b/Core/src/main/java/com/plotsquared/core/command/Done.java @@ -23,26 +23,25 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotDoneEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagAddEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; -import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotDoneEvent; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.plot.expiration.PlotAnalysis; @CommandDeclaration(command = "done", aliases = {"submit"}, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Download.java b/Core/src/main/java/com/plotsquared/core/command/Download.java similarity index 83% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Download.java rename to Core/src/main/java/com/plotsquared/core/command/Download.java index a7677aa38..85dc1cd87 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Download.java +++ b/Core/src/main/java/com/plotsquared/core/command/Download.java @@ -23,21 +23,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.WorldUtil; import com.sk89q.jnbt.CompoundTag; import java.net.URL; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCommand.java b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCommand.java rename to Core/src/main/java/com/plotsquared/core/command/FlagCommand.java index 157d3af57..a7355b092 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java @@ -23,35 +23,33 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagAddEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.InternalFlag; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.IntegerFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.ListFlag; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.StringComparison; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.helpmenu.HelpMenu; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.InternalFlag; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.types.IntegerFlag; +import com.plotsquared.core.plot.flag.types.ListFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringComparison; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.helpmenu.HelpMenu; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Grant.java b/Core/src/main/java/com/plotsquared/core/command/Grant.java similarity index 83% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Grant.java rename to Core/src/main/java/com/plotsquared/core/command/Grant.java index dc062f9a4..ea2171c80 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Grant.java +++ b/Core/src/main/java/com/plotsquared/core/command/Grant.java @@ -23,20 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.player.PlotPlayer; +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.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; import com.google.common.primitives.Ints; import java.util.UUID; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Help.java b/Core/src/main/java/com/plotsquared/core/command/Help.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Help.java rename to Core/src/main/java/com/plotsquared/core/command/Help.java index 6d0a742fc..8f284c186 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Help.java +++ b/Core/src/main/java/com/plotsquared/core/command/Help.java @@ -23,18 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.helpmenu.HelpMenu; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.helpmenu.HelpMenu; import java.util.concurrent.CompletableFuture; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Inbox.java b/Core/src/main/java/com/plotsquared/core/command/Inbox.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Inbox.java rename to Core/src/main/java/com/plotsquared/core/command/Inbox.java index 8a1f890ca..00154570c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Inbox.java +++ b/Core/src/main/java/com/plotsquared/core/command/Inbox.java @@ -23,18 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.comment.CommentInbox; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; -import com.github.intellectualsites.plotsquared.plot.util.CommentManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.comment.CommentInbox; +import com.plotsquared.core.plot.comment.PlotComment; +import com.plotsquared.core.plot.comment.CommentManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Info.java b/Core/src/main/java/com/plotsquared/core/command/Info.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Info.java rename to Core/src/main/java/com/plotsquared/core/command/Info.java index ccb5f8708..a6fe53fbb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Info.java +++ b/Core/src/main/java/com/plotsquared/core/command/Info.java @@ -23,17 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HideInfoFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.flag.implementations.HideInfoFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.MainUtil; @CommandDeclaration(command = "info", aliases = "i", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Kick.java b/Core/src/main/java/com/plotsquared/core/command/Kick.java similarity index 83% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Kick.java rename to Core/src/main/java/com/plotsquared/core/command/Kick.java index 7e56a5d1b..f30c4d081 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Kick.java +++ b/Core/src/main/java/com/plotsquared/core/command/Kick.java @@ -23,20 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Argument; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; import java.util.HashSet; import java.util.Set; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Leave.java b/Core/src/main/java/com/plotsquared/core/command/Leave.java similarity index 81% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Leave.java rename to Core/src/main/java/com/plotsquared/core/command/Leave.java index 0bf38cd52..32c4e1ae8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Leave.java +++ b/Core/src/main/java/com/plotsquared/core/command/Leave.java @@ -23,17 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; import java.util.UUID; import java.util.concurrent.CompletableFuture; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Like.java b/Core/src/main/java/com/plotsquared/core/command/Like.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Like.java rename to Core/src/main/java/com/plotsquared/core/command/Like.java index fa1c3a201..305ae645e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Like.java +++ b/Core/src/main/java/com/plotsquared/core/command/Like.java @@ -23,22 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlotRateEvent; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Rating; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlotRateEvent; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.Rating; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.task.TaskManager; import java.util.ArrayList; import java.util.Collection; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/ListCmd.java b/Core/src/main/java/com/plotsquared/core/command/ListCmd.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/ListCmd.java rename to Core/src/main/java/com/plotsquared/core/command/ListCmd.java index 735a53262..28d322c4a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/ListCmd.java +++ b/Core/src/main/java/com/plotsquared/core/command/ListCmd.java @@ -23,29 +23,28 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.PlotSquared.SortType; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PriceFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Rating; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.StringComparison; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.PlotSquared.SortType; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.flag.implementations.PriceFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.Rating; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringComparison; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.plot.expiration.ExpireManager; import java.util.ArrayList; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Load.java b/Core/src/main/java/com/plotsquared/core/command/Load.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Load.java rename to Core/src/main/java/com/plotsquared/core/command/Load.java index 2ec437096..fca5e67a3 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Load.java +++ b/Core/src/main/java/com/plotsquared/core/command/Load.java @@ -23,22 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.schematic.Schematic; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.schematic.Schematic; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.task.TaskManager; import java.net.MalformedURLException; import java.net.URL; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java b/Core/src/main/java/com/plotsquared/core/command/MainCommand.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java rename to Core/src/main/java/com/plotsquared/core/command/MainCommand.java index 1b84f5000..263012e0f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/MainCommand.java @@ -23,23 +23,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.Expression; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.CmdConfirm; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.util.Expression; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.Permissions; import java.util.Arrays; import java.util.concurrent.CompletableFuture; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Merge.java b/Core/src/main/java/com/plotsquared/core/command/Merge.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Merge.java rename to Core/src/main/java/com/plotsquared/core/command/Merge.java index e677d694e..81856bbb4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Merge.java +++ b/Core/src/main/java/com/plotsquared/core/command/Merge.java @@ -23,31 +23,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotMergeEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.object.Direction; -import com.github.intellectualsites.plotsquared.plot.object.Expression; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.CmdConfirm; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotMergeEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.util.Expression; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.UUID; -import static com.github.intellectualsites.plotsquared.plot.object.Direction.getFromIndex; - @CommandDeclaration(command = "merge", aliases = "m", description = "Merge the plot you are standing on with another plot", @@ -112,7 +108,7 @@ public class Merge extends SubCommand { } else { for (int i = 0; i < values.length; i++) { if (args[0].equalsIgnoreCase(values[i]) || args[0].equalsIgnoreCase(aliases[i])) { - direction = getFromIndex(i); + direction = Direction.getFromIndex(i); break; } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Middle.java b/Core/src/main/java/com/plotsquared/core/command/Middle.java similarity index 80% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Middle.java rename to Core/src/main/java/com/plotsquared/core/command/Middle.java index c769e6a99..0eddec2e5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Middle.java +++ b/Core/src/main/java/com/plotsquared/core/command/Middle.java @@ -23,14 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.events.TeleportCause; /** * @author manuelgu, altered by Citymonstret diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Move.java b/Core/src/main/java/com/plotsquared/core/command/Move.java similarity index 82% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Move.java rename to Core/src/main/java/com/plotsquared/core/command/Move.java index e76b66e4f..4fdf0ea0b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Move.java +++ b/Core/src/main/java/com/plotsquared/core/command/Move.java @@ -23,20 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; import java.util.concurrent.CompletableFuture; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Music.java b/Core/src/main/java/com/plotsquared/core/command/Music.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Music.java rename to Core/src/main/java/com/plotsquared/core/command/Music.java index 8e67da69f..9228c1ca7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Music.java +++ b/Core/src/main/java/com/plotsquared/core/command/Music.java @@ -23,16 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagAddEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MusicFlag; -import com.github.intellectualsites.plotsquared.plot.object.*; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.MusicFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotInventory; +import com.plotsquared.core.plot.PlotItemStack; import com.sk89q.worldedit.world.item.ItemTypes; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Near.java b/Core/src/main/java/com/plotsquared/core/command/Near.java similarity index 77% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Near.java rename to Core/src/main/java/com/plotsquared/core/command/Near.java index e98f1dc95..8be253018 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Near.java +++ b/Core/src/main/java/com/plotsquared/core/command/Near.java @@ -23,16 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.StringMan; import java.util.concurrent.CompletableFuture; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Owner.java b/Core/src/main/java/com/plotsquared/core/command/Owner.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Owner.java rename to Core/src/main/java/com/plotsquared/core/command/Owner.java index 022444cbf..237ff7103 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Owner.java +++ b/Core/src/main/java/com/plotsquared/core/command/Owner.java @@ -23,18 +23,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotChangeOwnerEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotUnlinkEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.*; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotChangeOwnerEvent; +import com.plotsquared.core.events.PlotUnlinkEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.task.TaskManager; import java.util.Set; import java.util.UUID; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/PluginCmd.java b/Core/src/main/java/com/plotsquared/core/command/PluginCmd.java similarity index 81% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/PluginCmd.java rename to Core/src/main/java/com/plotsquared/core/command/PluginCmd.java index 0fe925d37..00cb40395 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/PluginCmd.java +++ b/Core/src/main/java/com/plotsquared/core/command/PluginCmd.java @@ -23,15 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; - -import static com.github.intellectualsites.plotsquared.plot.util.PremiumVerification.isPremium; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.PremiumVerification; @CommandDeclaration(command = "plugin", permission = "plots.use", @@ -50,7 +48,7 @@ public class PluginCmd extends SubCommand { "$2>> $1&lAuthors$2: $1Citymonstret $2& $1Empire92 $2& $1MattBDev $2& $1dordsor21 $2& $1NotMyFault"); MainUtil.sendMessage(player, "$2>> $1&lWiki$2: $1https://github.com/IntellectualSites/PlotSquared/wiki"); - MainUtil.sendMessage(player, "$2>> $1&lPremium$2: $1" + isPremium()); + MainUtil.sendMessage(player, "$2>> $1&lPremium$2: $1" + PremiumVerification.isPremium()); }); return true; } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Purge.java b/Core/src/main/java/com/plotsquared/core/command/Purge.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Purge.java rename to Core/src/main/java/com/plotsquared/core/command/Purge.java index ab7134c50..a248e9a50 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Purge.java +++ b/Core/src/main/java/com/plotsquared/core/command/Purge.java @@ -23,21 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.listener.PlotListener; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.CmdConfirm; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.listener.PlotListener; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.HashMap; import java.util.HashSet; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Rate.java b/Core/src/main/java/com/plotsquared/core/command/Rate.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Rate.java rename to Core/src/main/java/com/plotsquared/core/command/Rate.java index ce121b78f..ab1f1b523 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Rate.java +++ b/Core/src/main/java/com/plotsquared/core/command/Rate.java @@ -23,26 +23,24 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlotRateEvent; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotInventory; -import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Rating; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlotRateEvent; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotInventory; +import com.plotsquared.core.plot.PlotItemStack; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.Rating; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.task.TaskManager; import java.util.ArrayList; import java.util.HashMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/RegenAllRoads.java b/Core/src/main/java/com/plotsquared/core/command/RegenAllRoads.java similarity index 83% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/RegenAllRoads.java rename to Core/src/main/java/com/plotsquared/core/command/RegenAllRoads.java index a76f760d8..230c6eea1 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/RegenAllRoads.java +++ b/Core/src/main/java/com/plotsquared/core/command/RegenAllRoads.java @@ -23,17 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotManager; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.generator.HybridPlotManager; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; @CommandDeclaration(command = "regenallroads", description = "Regenerate all roads in the map using the set road schematic", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Relight.java b/Core/src/main/java/com/plotsquared/core/command/Relight.java similarity index 76% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Relight.java rename to Core/src/main/java/com/plotsquared/core/command/Relight.java index a8c01c95b..be6d8e95c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Relight.java +++ b/Core/src/main/java/com/plotsquared/core/command/Relight.java @@ -23,18 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +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.util.ChunkManager; +import com.plotsquared.core.queue.LocalBlockQueue; import java.util.concurrent.CompletableFuture; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Reload.java b/Core/src/main/java/com/plotsquared/core/command/Reload.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Reload.java rename to Core/src/main/java/com/plotsquared/core/command/Reload.java index f437d7b25..b099d3c02 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Reload.java +++ b/Core/src/main/java/com/plotsquared/core/command/Reload.java @@ -23,17 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.configuration.MemorySection; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.configuration.MemorySection; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; import java.io.IOException; import java.util.Objects; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Remove.java b/Core/src/main/java/com/plotsquared/core/command/Remove.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Remove.java rename to Core/src/main/java/com/plotsquared/core/command/Remove.java index cd1bdcd58..d461b6557 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Remove.java +++ b/Core/src/main/java/com/plotsquared/core/command/Remove.java @@ -23,19 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Argument; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.ArrayList; import java.util.HashSet; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/RequiredType.java b/Core/src/main/java/com/plotsquared/core/command/RequiredType.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/RequiredType.java rename to Core/src/main/java/com/plotsquared/core/command/RequiredType.java index bdf29c136..c0a88105b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/RequiredType.java +++ b/Core/src/main/java/com/plotsquared/core/command/RequiredType.java @@ -23,9 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; - -import com.github.intellectualsites.plotsquared.commands.CommandCaller; +package com.plotsquared.core.command; public enum RequiredType { CONSOLE, PLAYER, NONE; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Save.java b/Core/src/main/java/com/plotsquared/core/command/Save.java similarity index 82% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Save.java rename to Core/src/main/java/com/plotsquared/core/command/Save.java index 993fab875..4945cbefd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Save.java +++ b/Core/src/main/java/com/plotsquared/core/command/Save.java @@ -23,20 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.jnbt.CompoundTag; import java.net.URL; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java b/Core/src/main/java/com/plotsquared/core/command/SchematicCmd.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java rename to Core/src/main/java/com/plotsquared/core/command/SchematicCmd.java index 2e399f3a5..287f31cf8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java +++ b/Core/src/main/java/com/plotsquared/core/command/SchematicCmd.java @@ -23,24 +23,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.schematic.Schematic; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.schematic.Schematic; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; import com.google.common.collect.Lists; import java.net.URL; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Set.java b/Core/src/main/java/com/plotsquared/core/command/Set.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Set.java rename to Core/src/main/java/com/plotsquared/core/command/Set.java index 8f3f7bae3..ad378b29d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Set.java +++ b/Core/src/main/java/com/plotsquared/core/command/Set.java @@ -23,20 +23,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.world.PatternUtil; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.util.PatternUtil; import com.sk89q.worldedit.function.pattern.Pattern; import java.util.ArrayList; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SetCommand.java b/Core/src/main/java/com/plotsquared/core/command/SetCommand.java similarity index 82% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SetCommand.java rename to Core/src/main/java/com/plotsquared/core/command/SetCommand.java index 12326aeb9..4848dd11a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SetCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/SetCommand.java @@ -23,16 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringMan; public abstract class SetCommand extends SubCommand { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SetHome.java b/Core/src/main/java/com/plotsquared/core/command/SetHome.java similarity index 82% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SetHome.java rename to Core/src/main/java/com/plotsquared/core/command/SetHome.java index f4ec9f855..0045c9135 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SetHome.java +++ b/Core/src/main/java/com/plotsquared/core/command/SetHome.java @@ -23,15 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.BlockLoc; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.BlockLoc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; @CommandDeclaration(command = "sethome", permission = "plots.set.home", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Setup.java b/Core/src/main/java/com/plotsquared/core/command/Setup.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Setup.java rename to Core/src/main/java/com/plotsquared/core/command/Setup.java index aa9089698..d9854252e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Setup.java +++ b/Core/src/main/java/com/plotsquared/core/command/Setup.java @@ -23,26 +23,25 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaTerrainType; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.SetupObject; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.WorldUtil; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; @@ -312,7 +311,7 @@ public class Setup extends SubCommand { boolean valid = false; try { valid = step.isValid(args[0]); - } catch (final Configuration.UnsafeBlockException e) { + } catch (final ConfigurationUtil.UnsafeBlockException e) { Captions.NOT_ALLOWED_BLOCK.send(player, e.getUnsafeBlock().toString()); } if (valid) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SubCommand.java b/Core/src/main/java/com/plotsquared/core/command/SubCommand.java similarity index 79% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SubCommand.java rename to Core/src/main/java/com/plotsquared/core/command/SubCommand.java index ac99a3d24..95d830ab9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SubCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/SubCommand.java @@ -23,22 +23,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Argument; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; import java.util.concurrent.CompletableFuture; /** * SubCommand class * - * @deprecated In favor of normal Command class - * @see Command + * @Deprecated In favor of normal Command class + * @see Command(Command, boolean) */ public abstract class SubCommand extends Command { public SubCommand() { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Swap.java b/Core/src/main/java/com/plotsquared/core/command/Swap.java similarity index 83% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Swap.java rename to Core/src/main/java/com/plotsquared/core/command/Swap.java index b7eeae7f0..a6f62fd62 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Swap.java +++ b/Core/src/main/java/com/plotsquared/core/command/Swap.java @@ -23,18 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; import java.util.concurrent.CompletableFuture; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Target.java b/Core/src/main/java/com/plotsquared/core/command/Target.java similarity index 80% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Target.java rename to Core/src/main/java/com/plotsquared/core/command/Target.java index f6b3685d7..0b76c2a8e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Target.java +++ b/Core/src/main/java/com/plotsquared/core/command/Target.java @@ -23,17 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Argument; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; @CommandDeclaration(command = "target", usage = "/plot target <|nearest>", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Template.java b/Core/src/main/java/com/plotsquared/core/command/Template.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Template.java rename to Core/src/main/java/com/plotsquared/core/command/Template.java index d2e885eb0..4f06375fd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Template.java +++ b/Core/src/main/java/com/plotsquared/core/command/Template.java @@ -23,30 +23,26 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.configuration.InvalidConfigurationException; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.FileBytes; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.configuration.InvalidConfigurationException; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.util.FileBytes; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.SetupObject; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.queue.GlobalBlockQueue; import java.io.File; import java.io.FileInputStream; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Toggle.java b/Core/src/main/java/com/plotsquared/core/command/Toggle.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Toggle.java rename to Core/src/main/java/com/plotsquared/core/command/Toggle.java index a49129bdc..002c74cba 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Toggle.java +++ b/Core/src/main/java/com/plotsquared/core/command/Toggle.java @@ -23,15 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; @CommandDeclaration(command = "toggle", aliases = {"attribute"}, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trim.java b/Core/src/main/java/com/plotsquared/core/command/Trim.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trim.java rename to Core/src/main/java/com/plotsquared/core/command/Trim.java index 7bb2a3899..44e771f2f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trim.java +++ b/Core/src/main/java/com/plotsquared/core/command/Trim.java @@ -23,24 +23,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.util.RegionUtil; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.regions.CuboidRegion; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trust.java b/Core/src/main/java/com/plotsquared/core/command/Trust.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trust.java rename to Core/src/main/java/com/plotsquared/core/command/Trust.java index 40e34aa76..bff94f5e0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trust.java +++ b/Core/src/main/java/com/plotsquared/core/command/Trust.java @@ -23,19 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; import java.util.Iterator; import java.util.Set; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Unlink.java b/Core/src/main/java/com/plotsquared/core/command/Unlink.java similarity index 78% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Unlink.java rename to Core/src/main/java/com/plotsquared/core/command/Unlink.java index 1836c451f..cca09d5b9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Unlink.java +++ b/Core/src/main/java/com/plotsquared/core/command/Unlink.java @@ -23,21 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.events.PlotUnlinkEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.CmdConfirm; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.events.PlotUnlinkEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; @CommandDeclaration(command = "unlink", aliases = {"u", "unmerge"}, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Visit.java b/Core/src/main/java/com/plotsquared/core/command/Visit.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Visit.java rename to Core/src/main/java/com/plotsquared/core/command/Visit.java index 664101981..558d7d9de 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Visit.java +++ b/Core/src/main/java/com/plotsquared/core/command/Visit.java @@ -23,24 +23,22 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.UntrustedVisitFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.ArrayList; import java.util.Collection; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/WE_Anywhere.java b/Core/src/main/java/com/plotsquared/core/command/WE_Anywhere.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/WE_Anywhere.java rename to Core/src/main/java/com/plotsquared/core/command/WE_Anywhere.java index 63a8caf7d..6ac51f57c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/WE_Anywhere.java +++ b/Core/src/main/java/com/plotsquared/core/command/WE_Anywhere.java @@ -23,10 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.commands; +package com.plotsquared.core.command; -import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.player.PlotPlayer; @CommandDeclaration(command = "weanywhere", permission = "plots.worldedit.bypass", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Caption.java b/Core/src/main/java/com/plotsquared/core/configuration/Caption.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Caption.java rename to Core/src/main/java/com/plotsquared/core/configuration/Caption.java index 9b73590a9..bb9cf098f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Caption.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Caption.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringMan; public interface Caption { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/CaptionUtility.java b/Core/src/main/java/com/plotsquared/core/configuration/CaptionUtility.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/CaptionUtility.java rename to Core/src/main/java/com/plotsquared/core/configuration/CaptionUtility.java index a6c43b820..432836422 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/CaptionUtility.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/CaptionUtility.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.player.PlotPlayer; public class CaptionUtility { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java b/Core/src/main/java/com/plotsquared/core/configuration/Captions.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java rename to Core/src/main/java/com/plotsquared/core/configuration/Captions.java index d3358fdaf..69899d857 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Captions.java @@ -23,12 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.util.StringMan; import java.io.File; import java.io.IOException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/ChatFormatter.java b/Core/src/main/java/com/plotsquared/core/configuration/ChatFormatter.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/ChatFormatter.java rename to Core/src/main/java/com/plotsquared/core/configuration/ChatFormatter.java index 33f583025..33a4db472 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/ChatFormatter.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/ChatFormatter.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.player.PlotPlayer; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Config.java b/Core/src/main/java/com/plotsquared/core/configuration/Config.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Config.java rename to Core/src/main/java/com/plotsquared/core/configuration/Config.java index 38bc7f848..fe5283895 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Config.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Config.java @@ -23,13 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.configuration.MemorySection; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings.Enabled_Components; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.file.YamlConfiguration; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings.Enabled_Components; +import com.plotsquared.core.util.StringMan; import java.io.File; import java.io.PrintWriter; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/Configuration.java b/Core/src/main/java/com/plotsquared/core/configuration/Configuration.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/Configuration.java rename to Core/src/main/java/com/plotsquared/core/configuration/Configuration.java index 437a860a2..0e17c3cfb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/Configuration.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Configuration.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration; +package com.plotsquared.core.configuration; import java.util.Map; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/ConfigurationNode.java b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationNode.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/ConfigurationNode.java rename to Core/src/main/java/com/plotsquared/core/configuration/ConfigurationNode.java index bcf1dcdb7..c936245b3 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/ConfigurationNode.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationNode.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.plot.object.BlockBucket; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.plot.BlockBucket; +import com.plotsquared.core.util.StringMan; import com.sk89q.worldedit.world.block.BlockState; import java.util.ArrayList; @@ -41,11 +41,11 @@ public class ConfigurationNode { private final String constant; private final Object defaultValue; private final String description; - private final Configuration.SettingValue type; + private final ConfigurationUtil.SettingValue type; private Object value; public ConfigurationNode(String constant, Object defaultValue, String description, - Configuration.SettingValue type) { + ConfigurationUtil.SettingValue type) { this.constant = constant; this.defaultValue = defaultValue; this.description = description; @@ -53,7 +53,7 @@ public class ConfigurationNode { this.type = type; } - public Configuration.SettingValue getType() { + public ConfigurationUtil.SettingValue getType() { return this.type; } @@ -62,7 +62,7 @@ public class ConfigurationNode { Object result = this.type.parseString(string); return result != null; } catch (Exception e) { - if (e instanceof Configuration.UnknownBlockException) { + if (e instanceof ConfigurationUtil.UnknownBlockException) { throw e; } return false; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/ConfigurationOptions.java b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationOptions.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/ConfigurationOptions.java rename to Core/src/main/java/com/plotsquared/core/configuration/ConfigurationOptions.java index 54853d8a1..293af2257 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/ConfigurationOptions.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationOptions.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration; +package com.plotsquared.core.configuration; /** * Various settings for controlling the input and output of a {@link diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/ConfigurationSection.java b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationSection.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/ConfigurationSection.java rename to Core/src/main/java/com/plotsquared/core/configuration/ConfigurationSection.java index f68883847..ddd14735e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/ConfigurationSection.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationSection.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration; +package com.plotsquared.core.configuration; import java.util.List; import java.util.Map; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Configuration.java b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationUtil.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Configuration.java rename to Core/src/main/java/com/plotsquared/core/configuration/ConfigurationUtil.java index 975c935de..db03b73a0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Configuration.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/ConfigurationUtil.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.plot.object.BlockBucket; +import com.plotsquared.core.plot.BlockBucket; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeTypes; @@ -36,7 +36,7 @@ import lombok.NonNull; /** * Main Configuration Utility */ -public class Configuration { +public class ConfigurationUtil { public static final SettingValue INTEGER = new SettingValue("INTEGER") { @Override public boolean validateValue(String string) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/InvalidConfigurationException.java b/Core/src/main/java/com/plotsquared/core/configuration/InvalidConfigurationException.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/InvalidConfigurationException.java rename to Core/src/main/java/com/plotsquared/core/configuration/InvalidConfigurationException.java index 82a54d22a..b99dcdcd4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/InvalidConfigurationException.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/InvalidConfigurationException.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration; +package com.plotsquared.core.configuration; /** * Exception thrown when attempting to load an invalid {@link Configuration}. diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemoryConfiguration.java b/Core/src/main/java/com/plotsquared/core/configuration/MemoryConfiguration.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemoryConfiguration.java rename to Core/src/main/java/com/plotsquared/core/configuration/MemoryConfiguration.java index 847a3914c..88b8433ba 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemoryConfiguration.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/MemoryConfiguration.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration; +package com.plotsquared.core.configuration; import java.util.Map; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemoryConfigurationOptions.java b/Core/src/main/java/com/plotsquared/core/configuration/MemoryConfigurationOptions.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemoryConfigurationOptions.java rename to Core/src/main/java/com/plotsquared/core/configuration/MemoryConfigurationOptions.java index 39282d186..961c72586 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemoryConfigurationOptions.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/MemoryConfigurationOptions.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration; +package com.plotsquared.core.configuration; /** * Various settings for controlling the input and output of a {@link diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemorySection.java b/Core/src/main/java/com/plotsquared/core/configuration/MemorySection.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemorySection.java rename to Core/src/main/java/com/plotsquared/core/configuration/MemorySection.java index 758fd3f65..580730998 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/MemorySection.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/MemorySection.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration; +package com.plotsquared.core.configuration; import java.util.ArrayList; import java.util.LinkedHashMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/PlotSquaredChatFormatter.java b/Core/src/main/java/com/plotsquared/core/configuration/PlotSquaredChatFormatter.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/PlotSquaredChatFormatter.java rename to Core/src/main/java/com/plotsquared/core/configuration/PlotSquaredChatFormatter.java index f64e07dc5..0ea5aad73 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/PlotSquaredChatFormatter.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/PlotSquaredChatFormatter.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.util.StringMan; import java.util.LinkedHashMap; import java.util.Map; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java rename to Core/src/main/java/com/plotsquared/core/configuration/Settings.java index 8fb64770f..f7a0715d4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; -import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration; +import com.plotsquared.core.configuration.file.YamlConfiguration; import java.io.File; import java.util.ArrayList; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/StaticCaption.java b/Core/src/main/java/com/plotsquared/core/configuration/StaticCaption.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/StaticCaption.java rename to Core/src/main/java/com/plotsquared/core/configuration/StaticCaption.java index c418e143c..87c1a4d9c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/StaticCaption.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/StaticCaption.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; import lombok.RequiredArgsConstructor; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Storage.java b/Core/src/main/java/com/plotsquared/core/configuration/Storage.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Storage.java rename to Core/src/main/java/com/plotsquared/core/configuration/Storage.java index 7ed59d27d..5bc6a67b0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Storage.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Storage.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.config; +package com.plotsquared.core.configuration; import java.io.File; import java.util.ArrayList; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/FileConfiguration.java b/Core/src/main/java/com/plotsquared/core/configuration/file/FileConfiguration.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/FileConfiguration.java rename to Core/src/main/java/com/plotsquared/core/configuration/file/FileConfiguration.java index a46b10ced..cc7475370 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/FileConfiguration.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/file/FileConfiguration.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.file; +package com.plotsquared.core.configuration.file; -import com.github.intellectualsites.plotsquared.configuration.Configuration; -import com.github.intellectualsites.plotsquared.configuration.InvalidConfigurationException; -import com.github.intellectualsites.plotsquared.configuration.MemoryConfiguration; +import com.plotsquared.core.configuration.Configuration; +import com.plotsquared.core.configuration.InvalidConfigurationException; +import com.plotsquared.core.configuration.MemoryConfiguration; import java.io.BufferedReader; import java.io.File; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/FileConfigurationOptions.java b/Core/src/main/java/com/plotsquared/core/configuration/file/FileConfigurationOptions.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/FileConfigurationOptions.java rename to Core/src/main/java/com/plotsquared/core/configuration/file/FileConfigurationOptions.java index 0fa38eb9d..d92ca9e16 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/FileConfigurationOptions.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/file/FileConfigurationOptions.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.file; +package com.plotsquared.core.configuration.file; -import com.github.intellectualsites.plotsquared.configuration.Configuration; -import com.github.intellectualsites.plotsquared.configuration.MemoryConfiguration; -import com.github.intellectualsites.plotsquared.configuration.MemoryConfigurationOptions; +import com.plotsquared.core.configuration.Configuration; +import com.plotsquared.core.configuration.MemoryConfiguration; +import com.plotsquared.core.configuration.MemoryConfigurationOptions; /** * Various settings for controlling the input and output of a {@link diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConfiguration.java b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlConfiguration.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConfiguration.java rename to Core/src/main/java/com/plotsquared/core/configuration/file/YamlConfiguration.java index 068f7c4c0..0dcffc0ce 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConfiguration.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlConfiguration.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.file; +package com.plotsquared.core.configuration.file; -import com.github.intellectualsites.plotsquared.configuration.Configuration; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.configuration.InvalidConfigurationException; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; +import com.plotsquared.core.configuration.Configuration; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.configuration.InvalidConfigurationException; +import com.plotsquared.core.PlotSquared; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.error.YAMLException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConfigurationOptions.java b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlConfigurationOptions.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConfigurationOptions.java rename to Core/src/main/java/com/plotsquared/core/configuration/file/YamlConfigurationOptions.java index 031edb6c7..ed826e81a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConfigurationOptions.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlConfigurationOptions.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.file; +package com.plotsquared.core.configuration.file; /** * Various settings for controlling the input and output of a {@link diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConstructor.java b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlConstructor.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConstructor.java rename to Core/src/main/java/com/plotsquared/core/configuration/file/YamlConstructor.java index 561713519..6dea3c19b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlConstructor.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlConstructor.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.file; +package com.plotsquared.core.configuration.file; -import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerialization; +import com.plotsquared.core.configuration.serialization.ConfigurationSerialization; import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.error.YAMLException; import org.yaml.snakeyaml.nodes.Node; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlRepresenter.java b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlRepresenter.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlRepresenter.java rename to Core/src/main/java/com/plotsquared/core/configuration/file/YamlRepresenter.java index 16de52c24..b3cb59e88 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/file/YamlRepresenter.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/file/YamlRepresenter.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.file; +package com.plotsquared.core.configuration.file; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerializable; -import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerialization; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.configuration.serialization.ConfigurationSerializable; +import com.plotsquared.core.configuration.serialization.ConfigurationSerialization; import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.representer.Representer; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/ConfigurationSerializable.java b/Core/src/main/java/com/plotsquared/core/configuration/serialization/ConfigurationSerializable.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/ConfigurationSerializable.java rename to Core/src/main/java/com/plotsquared/core/configuration/serialization/ConfigurationSerializable.java index 63f5552e9..135864f55 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/ConfigurationSerializable.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/serialization/ConfigurationSerializable.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.serialization; +package com.plotsquared.core.configuration.serialization; import java.util.Map; @@ -33,11 +33,11 @@ import java.util.Map; * the methods as defined by this interface: *
    *
  • A static method "deserialize" that accepts a single {@link Map}< - * {@link String}, {@link Object}> and returns the class.
  • + * {@link String}, {@link Object}> and returns the class. *
  • A static method "valueOf" that accepts a single {@link Map}<{@link - * String}, {@link Object}> and returns the class.
  • + * String}, {@link Object}> and returns the class. *
  • A constructor that accepts a single {@link Map}<{@link String}, - * {@link Object}>.
  • + * {@link Object}>. *
* In addition to implementing this interface, you must register the class * with {@link ConfigurationSerialization#registerClass(Class)}. diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/ConfigurationSerialization.java b/Core/src/main/java/com/plotsquared/core/configuration/serialization/ConfigurationSerialization.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/ConfigurationSerialization.java rename to Core/src/main/java/com/plotsquared/core/configuration/serialization/ConfigurationSerialization.java index 17a24e1bd..c6d034b47 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/ConfigurationSerialization.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/serialization/ConfigurationSerialization.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.serialization; +package com.plotsquared.core.configuration.serialization; -import com.github.intellectualsites.plotsquared.configuration.Configuration; +import com.plotsquared.core.configuration.Configuration; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/DelegateDeserialization.java b/Core/src/main/java/com/plotsquared/core/configuration/serialization/DelegateDeserialization.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/DelegateDeserialization.java rename to Core/src/main/java/com/plotsquared/core/configuration/serialization/DelegateDeserialization.java index 5db912d19..983719fe1 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/DelegateDeserialization.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/serialization/DelegateDeserialization.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.serialization; +package com.plotsquared.core.configuration.serialization; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/SerializableAs.java b/Core/src/main/java/com/plotsquared/core/configuration/serialization/SerializableAs.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/SerializableAs.java rename to Core/src/main/java/com/plotsquared/core/configuration/serialization/SerializableAs.java index 221bef9de..464cc3bd7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/configuration/serialization/SerializableAs.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/serialization/SerializableAs.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.configuration.serialization; +package com.plotsquared.core.configuration.serialization; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/AbstractDB.java b/Core/src/main/java/com/plotsquared/core/database/AbstractDB.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/AbstractDB.java rename to Core/src/main/java/com/plotsquared/core/database/AbstractDB.java index d3c584e46..0e26b9083 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/AbstractDB.java +++ b/Core/src/main/java/com/plotsquared/core/database/AbstractDB.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotCluster; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotCluster; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.comment.PlotComment; import org.jetbrains.annotations.NotNull; import java.util.HashMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/DBFunc.java b/Core/src/main/java/com/plotsquared/core/database/DBFunc.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/DBFunc.java rename to Core/src/main/java/com/plotsquared/core/database/DBFunc.java index f59151bbb..c479612eb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/DBFunc.java +++ b/Core/src/main/java/com/plotsquared/core/database/DBFunc.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotCluster; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotCluster; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.comment.PlotComment; import java.sql.ResultSet; import java.sql.ResultSetMetaData; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/Database.java b/Core/src/main/java/com/plotsquared/core/database/Database.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/Database.java rename to Core/src/main/java/com/plotsquared/core/database/Database.java index 9c040643a..e76a137fd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/Database.java +++ b/Core/src/main/java/com/plotsquared/core/database/Database.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; import java.sql.Connection; import java.sql.ResultSet; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/MySQL.java b/Core/src/main/java/com/plotsquared/core/database/MySQL.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/MySQL.java rename to Core/src/main/java/com/plotsquared/core/database/MySQL.java index 076e07c7b..94624fd2c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/MySQL.java +++ b/Core/src/main/java/com/plotsquared/core/database/MySQL.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; -import com.github.intellectualsites.plotsquared.plot.config.Storage; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.Storage; +import com.plotsquared.core.util.StringMan; import java.sql.Connection; import java.sql.DriverManager; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/SQLManager.java b/Core/src/main/java/com/plotsquared/core/database/SQLManager.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/SQLManager.java rename to Core/src/main/java/com/plotsquared/core/database/SQLManager.java index f072bd077..64881c8a6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/SQLManager.java +++ b/Core/src/main/java/com/plotsquared/core/database/SQLManager.java @@ -23,28 +23,28 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.config.Storage; -import com.github.intellectualsites.plotsquared.plot.flags.FlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.BlockLoc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotCluster; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotSettings; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.configuration.Storage; +import com.plotsquared.core.plot.flag.FlagContainer; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.location.BlockLoc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotCluster; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.PlotSettings; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.comment.PlotComment; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; import com.google.common.base.Charsets; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/SQLite.java b/Core/src/main/java/com/plotsquared/core/database/SQLite.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/SQLite.java rename to Core/src/main/java/com/plotsquared/core/database/SQLite.java index b687de8aa..501033184 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/SQLite.java +++ b/Core/src/main/java/com/plotsquared/core/database/SQLite.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; +import com.plotsquared.core.PlotSquared; import java.io.File; import java.io.IOException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/StmtMod.java b/Core/src/main/java/com/plotsquared/core/database/StmtMod.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/StmtMod.java rename to Core/src/main/java/com/plotsquared/core/database/StmtMod.java index 907035522..679f94776 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/database/StmtMod.java +++ b/Core/src/main/java/com/plotsquared/core/database/StmtMod.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.util.StringMan; import java.sql.PreparedStatement; import java.sql.SQLException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/CancellablePlotEvent.java b/Core/src/main/java/com/plotsquared/core/events/CancellablePlotEvent.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/CancellablePlotEvent.java rename to Core/src/main/java/com/plotsquared/core/events/CancellablePlotEvent.java index 69c31c252..85ccd6d71 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/CancellablePlotEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/CancellablePlotEvent.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; /** * PlotSquared event with {@link Result} to cancel, force, or allow. diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerAutoPlotEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerAutoPlotEvent.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerAutoPlotEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerAutoPlotEvent.java index 5299156eb..693fc0220 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerAutoPlotEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerAutoPlotEvent.java @@ -23,10 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.command.Claim; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; import lombok.Getter; import lombok.Setter; @@ -61,7 +62,7 @@ public class PlayerAutoPlotEvent extends PlotEvent implements CancellablePlotEve } /** - * Obtain the schematic string as used by the {@link com.github.intellectualsites.plotsquared.plot.commands.Claim} command or null. + * Obtain the schematic string as used by the {@link Claim} command or null. * * @return schematic string */ diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerClaimPlotEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerClaimPlotEvent.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerClaimPlotEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerClaimPlotEvent.java index ecda043dc..d9fd19e8a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerClaimPlotEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerClaimPlotEvent.java @@ -23,10 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.command.Claim; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; import javax.annotation.Nullable; @@ -48,7 +49,7 @@ public class PlayerClaimPlotEvent extends PlotPlayerEvent implements Cancellable } /** - * Obtain the schematic string as used by the {@link com.github.intellectualsites.plotsquared.plot.commands.Claim} command or null. + * Obtain the schematic string as used by the {@link Claim} command or null. * * @return schematic string */ diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerEnterPlotEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerEnterPlotEvent.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerEnterPlotEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerEnterPlotEvent.java index 10a4a1339..4ef8191b4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerEnterPlotEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerEnterPlotEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; public class PlayerEnterPlotEvent extends PlotPlayerEvent { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerLeavePlotEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerLeavePlotEvent.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerLeavePlotEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerLeavePlotEvent.java index 8a4ef65d4..916d08571 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerLeavePlotEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerLeavePlotEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; /** * diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotDeniedEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerPlotDeniedEvent.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotDeniedEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerPlotDeniedEvent.java index 4058e38db..cdcad5e3e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotDeniedEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerPlotDeniedEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; import java.util.UUID; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotHelperEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerPlotHelperEvent.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotHelperEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerPlotHelperEvent.java index 39e8938f6..f52957e30 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotHelperEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerPlotHelperEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; import java.util.UUID; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotTrustedEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerPlotTrustedEvent.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotTrustedEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerPlotTrustedEvent.java index 50bfa85b2..d8591a5a0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerPlotTrustedEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerPlotTrustedEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; import java.util.UUID; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerTeleportToPlotEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlayerTeleportToPlotEvent.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerTeleportToPlotEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlayerTeleportToPlotEvent.java index 65e45c67d..38dffe966 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlayerTeleportToPlotEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlayerTeleportToPlotEvent.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; /** * Called when a player teleports to a plot diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotAutoMergeEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotAutoMergeEvent.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotAutoMergeEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotAutoMergeEvent.java index 103acd6ce..657a34838 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotAutoMergeEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotAutoMergeEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotId; import lombok.Getter; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotChangeOwnerEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotChangeOwnerEvent.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotChangeOwnerEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotChangeOwnerEvent.java index 536bb208c..240f084e5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotChangeOwnerEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotChangeOwnerEvent.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.player.PlotPlayer; import org.jetbrains.annotations.Nullable; import java.util.UUID; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotClearEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotClearEvent.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotClearEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotClearEvent.java index c4071d6af..d91745d5a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotClearEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotClearEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotId; /** * Called when a plot is cleared diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotComponentSetEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotComponentSetEvent.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotComponentSetEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotComponentSetEvent.java index 2c243cab5..32f5a09a5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotComponentSetEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotComponentSetEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotId; import com.sk89q.worldedit.function.pattern.Pattern; /** diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotDeleteEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotDeleteEvent.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotDeleteEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotDeleteEvent.java index e025e2b15..3f1ebd5a3 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotDeleteEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotDeleteEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotId; /** * Called when a plot is deleted diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotDoneEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotDoneEvent.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotDoneEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotDoneEvent.java index 6b67eddb7..fbabf335c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotDoneEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotDoneEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotId; /** * Called when a plot is cleared diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotEvent.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotEvent.java index 31c7ec6ec..0b9e8801c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotEvent.java @@ -23,14 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.plotsquared.core.plot.Plot; import org.jetbrains.annotations.NotNull; -import java.util.HashMap; -import java.util.Map; - public abstract class PlotEvent { private final Plot plot; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagAddEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotFlagAddEvent.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagAddEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotFlagAddEvent.java index 3c8bd7300..e53f5cad5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagAddEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotFlagAddEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; /** * Called when a Flag is added to a plot. diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotFlagEvent.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotFlagEvent.java index 048e00f4a..fb7439d79 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotFlagEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; public abstract class PlotFlagEvent extends PlotEvent { private final PlotFlag flag; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagRemoveEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotFlagRemoveEvent.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagRemoveEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotFlagRemoveEvent.java index a275a6b76..1191fe3ce 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotFlagRemoveEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotFlagRemoveEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; /** * Called when a flag is removed from a plot diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotMergeEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotMergeEvent.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotMergeEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotMergeEvent.java index 5410fb7c5..63c0acecc 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotMergeEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotMergeEvent.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Direction; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; import lombok.Getter; import lombok.Setter; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotPlayerEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotPlayerEvent.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotPlayerEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotPlayerEvent.java index 84ed702be..b331dd32f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotPlayerEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotPlayerEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; public abstract class PlotPlayerEvent extends PlotEvent { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotRateEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotRateEvent.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotRateEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotRateEvent.java index 364535392..52e7775e7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotRateEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotRateEvent.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Rating; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.Rating; import org.jetbrains.annotations.Nullable; public class PlotRateEvent extends PlotEvent implements CancellablePlotEvent { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotUnlinkEvent.java b/Core/src/main/java/com/plotsquared/core/events/PlotUnlinkEvent.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotUnlinkEvent.java rename to Core/src/main/java/com/plotsquared/core/events/PlotUnlinkEvent.java index 7df5a9e65..45299868f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/PlotUnlinkEvent.java +++ b/Core/src/main/java/com/plotsquared/core/events/PlotUnlinkEvent.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; import lombok.Getter; import lombok.Setter; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/Result.java b/Core/src/main/java/com/plotsquared/core/events/Result.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/Result.java rename to Core/src/main/java/com/plotsquared/core/events/Result.java index 7adef127c..1a5f9efbc 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/events/Result.java +++ b/Core/src/main/java/com/plotsquared/core/events/Result.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.events; +package com.plotsquared.core.events; import java.util.HashMap; import java.util.Map; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/TeleportCause.java b/Core/src/main/java/com/plotsquared/core/events/TeleportCause.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/TeleportCause.java rename to Core/src/main/java/com/plotsquared/core/events/TeleportCause.java index 6bbb54618..576bd90f7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/TeleportCause.java +++ b/Core/src/main/java/com/plotsquared/core/events/TeleportCause.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.events; public enum TeleportCause { COMMAND, PLUGIN, UNKNOWN diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/AugmentedUtils.java b/Core/src/main/java/com/plotsquared/core/generator/AugmentedUtils.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/AugmentedUtils.java rename to Core/src/main/java/com/plotsquared/core/generator/AugmentedUtils.java index 5160a33f4..d45fd2243 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/AugmentedUtils.java +++ b/Core/src/main/java/com/plotsquared/core/generator/AugmentedUtils.java @@ -23,20 +23,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.util.block.AreaBoundDelegateLocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocationOffsetDelegateLocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaTerrainType; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.queue.AreaBoundDelegateLocalBlockQueue; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.queue.LocationOffsetDelegateLocalBlockQueue; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; +import com.plotsquared.core.util.RegionUtil; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockTypes; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java rename to Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java index 6b82ff173..1cb7f0103 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java @@ -23,19 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.BlockBucket; -import com.github.intellectualsites.plotsquared.plot.object.Direction; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.BlockBucket; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotAreaTerrainType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.util.BlockUtil; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.world.block.BlockTypes; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotWorld.java b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotWorld.java rename to Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java index f4b7fb823..881b35cfa 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.BlockBucket; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.BlockBucket; +import com.plotsquared.core.plot.PlotId; import com.sk89q.worldedit.world.block.BlockTypes; import org.jetbrains.annotations.NotNull; @@ -72,29 +72,29 @@ import java.util.Locale; @NotNull @Override public ConfigurationNode[] getSettingNodes() { return new ConfigurationNode[] { new ConfigurationNode("plot.height", this.PLOT_HEIGHT, "Plot height", - Configuration.INTEGER), + ConfigurationUtil.INTEGER), new ConfigurationNode("plot.size", this.PLOT_WIDTH, "Plot width", - Configuration.INTEGER), + ConfigurationUtil.INTEGER), new ConfigurationNode("plot.filling", this.MAIN_BLOCK, "Plot block", - Configuration.BLOCK_BUCKET), + ConfigurationUtil.BLOCK_BUCKET), new ConfigurationNode("plot.floor", this.TOP_BLOCK, "Plot floor block", - Configuration.BLOCK_BUCKET), + ConfigurationUtil.BLOCK_BUCKET), new ConfigurationNode("wall.block", this.WALL_BLOCK, "Top wall block", - Configuration.BLOCK_BUCKET), + ConfigurationUtil.BLOCK_BUCKET), new ConfigurationNode("wall.block_claimed", this.CLAIMED_WALL_BLOCK, - "Wall block (claimed)", Configuration.BLOCK_BUCKET), + "Wall block (claimed)", ConfigurationUtil.BLOCK_BUCKET), new ConfigurationNode("road.width", this.ROAD_WIDTH, "Road width", - Configuration.INTEGER), + ConfigurationUtil.INTEGER), new ConfigurationNode("road.height", this.ROAD_HEIGHT, "Road height", - Configuration.INTEGER), + ConfigurationUtil.INTEGER), new ConfigurationNode("road.block", this.ROAD_BLOCK, "Road block", - Configuration.BLOCK_BUCKET), + ConfigurationUtil.BLOCK_BUCKET), new ConfigurationNode("wall.filling", this.WALL_FILLING, "Wall filling block", - Configuration.BLOCK_BUCKET), + ConfigurationUtil.BLOCK_BUCKET), new ConfigurationNode("wall.height", this.WALL_HEIGHT, "Wall height", - Configuration.INTEGER), + ConfigurationUtil.INTEGER), new ConfigurationNode("plot.bedrock", this.PLOT_BEDROCK, "Plot bedrock generation", - Configuration.BOOLEAN)}; + ConfigurationUtil.BOOLEAN)}; } /** diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GeneratorWrapper.java b/Core/src/main/java/com/plotsquared/core/generator/GeneratorWrapper.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GeneratorWrapper.java rename to Core/src/main/java/com/plotsquared/core/generator/GeneratorWrapper.java index 6167914af..04dbce965 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GeneratorWrapper.java +++ b/Core/src/main/java/com/plotsquared/core/generator/GeneratorWrapper.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; +import com.plotsquared.core.plot.PlotArea; public interface GeneratorWrapper { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GridPlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/GridPlotManager.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GridPlotManager.java rename to Core/src/main/java/com/plotsquared/core/generator/GridPlotManager.java index e0c510c77..37bddcd50 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GridPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/GridPlotManager.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotManager; /** * A plot manager where plots tessellate in a grid formation symmetrical about x=z. diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GridPlotWorld.java b/Core/src/main/java/com/plotsquared/core/generator/GridPlotWorld.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GridPlotWorld.java rename to Core/src/main/java/com/plotsquared/core/generator/GridPlotWorld.java index ee4e65b33..8b753b170 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/GridPlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/generator/GridPlotWorld.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; import org.jetbrains.annotations.NotNull; public abstract class GridPlotWorld extends PlotArea { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridGen.java b/Core/src/main/java/com/plotsquared/core/generator/HybridGen.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridGen.java rename to Core/src/main/java/com/plotsquared/core/generator/HybridGen.java index 55cd6e3bb..b3cb7c537 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridGen.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridGen.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; import com.google.common.base.Preconditions; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java rename to Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java index aaace2497..e9775d904 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java @@ -23,25 +23,24 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.Template; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.FileBytes; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil; import com.google.common.collect.Sets; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.command.Template; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotAreaTerrainType; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.FileBytes; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.task.RunnableVal; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotWorld.java b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotWorld.java rename to Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java index dcaf43531..3a4163b55 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java @@ -23,20 +23,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.schematic.Schematic; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.plot.schematic.Schematic; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.SchematicHandler; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTagBuilder; import com.sk89q.worldedit.extent.clipboard.Clipboard; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridUtils.java b/Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridUtils.java rename to Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java index f07ee8694..80ba833a4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridUtils.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java @@ -23,34 +23,34 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagAddEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnalysisFlag; -import com.github.intellectualsites.plotsquared.plot.listener.WEExtent; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.ChunkBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.AnalysisFlag; +import com.plotsquared.core.listener.WEExtent; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.queue.ChunkBlockQueue; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.plot.expiration.PlotAnalysis; +import com.plotsquared.core.util.RegionUtil; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.math.BlockVector3; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/IndependentPlotGenerator.java b/Core/src/main/java/com/plotsquared/core/generator/IndependentPlotGenerator.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/IndependentPlotGenerator.java rename to Core/src/main/java/com/plotsquared/core/generator/IndependentPlotGenerator.java index 54dba7923..915f22940 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/IndependentPlotGenerator.java +++ b/Core/src/main/java/com/plotsquared/core/generator/IndependentPlotGenerator.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.SetupObject; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; /** * This class allows for implementation independent world generation. diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SingleWorldGenerator.java b/Core/src/main/java/com/plotsquared/core/generator/SingleWorldGenerator.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SingleWorldGenerator.java rename to Core/src/main/java/com/plotsquared/core/generator/SingleWorldGenerator.java index a2873634f..eb2037def 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SingleWorldGenerator.java +++ b/Core/src/main/java/com/plotsquared/core/generator/SingleWorldGenerator.java @@ -23,14 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.worlds; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.world.SinglePlotArea; +import com.plotsquared.core.plot.world.SinglePlotAreaManager; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; import com.sk89q.worldedit.world.biome.BiomeTypes; import com.sk89q.worldedit.world.block.BlockTypes; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/SquarePlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/SquarePlotManager.java rename to Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java index bb8779bb5..4c6843b95 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/SquarePlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java @@ -23,16 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Direction; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; import com.sk89q.worldedit.regions.CuboidRegion; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/SquarePlotWorld.java b/Core/src/main/java/com/plotsquared/core/generator/SquarePlotWorld.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/SquarePlotWorld.java rename to Core/src/main/java/com/plotsquared/core/generator/SquarePlotWorld.java index 8fa1ea259..7532f4c37 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/SquarePlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/generator/SquarePlotWorld.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.generator; +package com.plotsquared.core.generator; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.plot.PlotId; import org.jetbrains.annotations.NotNull; public abstract class SquarePlotWorld extends GridPlotWorld { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ExtentWrapper.java b/Core/src/main/java/com/plotsquared/core/listener/ExtentWrapper.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ExtentWrapper.java rename to Core/src/main/java/com/plotsquared/core/listener/ExtentWrapper.java index 73f7df2b3..33ea9c9d2 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ExtentWrapper.java +++ b/Core/src/main/java/com/plotsquared/core/listener/ExtentWrapper.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.listener; +package com.plotsquared.core.listener; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlayerBlockEventType.java b/Core/src/main/java/com/plotsquared/core/listener/PlayerBlockEventType.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlayerBlockEventType.java rename to Core/src/main/java/com/plotsquared/core/listener/PlayerBlockEventType.java index cb05ed662..4ed318d7d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlayerBlockEventType.java +++ b/Core/src/main/java/com/plotsquared/core/listener/PlayerBlockEventType.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.listener; +package com.plotsquared.core.listener; public enum PlayerBlockEventType { // Non interactive diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java rename to Core/src/main/java/com/plotsquared/core/listener/PlotListener.java index 92e9f0ced..a3ebf1d8c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java +++ b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java @@ -23,24 +23,45 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.listener; +package com.plotsquared.core.listener; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagRemoveEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.*; -import com.github.intellectualsites.plotsquared.plot.flags.types.TimedFlag; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.*; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.plot.PlotWeather; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.DenyExitFlag; +import com.plotsquared.core.plot.flag.implementations.FarewellFlag; +import com.plotsquared.core.plot.flag.implementations.FeedFlag; +import com.plotsquared.core.plot.flag.implementations.FlyFlag; +import com.plotsquared.core.plot.flag.implementations.GamemodeFlag; +import com.plotsquared.core.plot.flag.implementations.GreetingFlag; +import com.plotsquared.core.plot.flag.implementations.GuestGamemodeFlag; +import com.plotsquared.core.plot.flag.implementations.HealFlag; +import com.plotsquared.core.plot.flag.implementations.MusicFlag; +import com.plotsquared.core.plot.flag.implementations.NotifyEnterFlag; +import com.plotsquared.core.plot.flag.implementations.NotifyLeaveFlag; +import com.plotsquared.core.plot.flag.implementations.TimeFlag; +import com.plotsquared.core.plot.flag.implementations.TitlesFlag; +import com.plotsquared.core.plot.flag.implementations.WeatherFlag; +import com.plotsquared.core.plot.flag.types.TimedFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.comment.CommentManager; +import com.plotsquared.core.collection.ByteArrayUtilities; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.worldedit.world.gamemode.GameMode; import com.sk89q.worldedit.world.gamemode.GameModes; import com.sk89q.worldedit.world.item.ItemType; @@ -346,7 +367,7 @@ public class PlotListener { } final PlotWeather plotWeather = plot.getFlag(WeatherFlag.class); - if (plotWeather != PlotWeather.RESET) { + if (plotWeather != PlotWeather.CLEAR) { player.setWeather(PlotWeather.RESET); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ProcessedWEExtent.java b/Core/src/main/java/com/plotsquared/core/listener/ProcessedWEExtent.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ProcessedWEExtent.java rename to Core/src/main/java/com/plotsquared/core/listener/ProcessedWEExtent.java index 78842f6fd..a67e743c8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/ProcessedWEExtent.java +++ b/Core/src/main/java/com/plotsquared/core/listener/ProcessedWEExtent.java @@ -23,11 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.listener; +package com.plotsquared.core.listener; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.util.WEManager; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.Entity; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WEExtent.java b/Core/src/main/java/com/plotsquared/core/listener/WEExtent.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WEExtent.java rename to Core/src/main/java/com/plotsquared/core/listener/WEExtent.java index 08e211c27..7909bd2f4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WEExtent.java +++ b/Core/src/main/java/com/plotsquared/core/listener/WEExtent.java @@ -23,8 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.listener; +package com.plotsquared.core.listener; +import com.plotsquared.core.util.WEManager; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.Entity; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WESubscriber.java b/Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WESubscriber.java rename to Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java index 3f5dc5ace..9e476b51f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WESubscriber.java +++ b/Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java @@ -23,15 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.listener; +package com.plotsquared.core.listener; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.WEManager; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.event.extent.EditSessionEvent; @@ -65,8 +66,8 @@ public class WESubscriber { if (plotPlayer == null) { Player player = (Player) actor; Location location = player.getLocation(); - com.github.intellectualsites.plotsquared.plot.object.Location pLoc = - new com.github.intellectualsites.plotsquared.plot.object.Location( + com.plotsquared.core.location.Location pLoc = + new com.plotsquared.core.location.Location( player.getWorld().getName(), location.getBlockX(), location.getBlockX(), location.getBlockZ()); Plot plot = pLoc.getPlot(); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockLoc.java b/Core/src/main/java/com/plotsquared/core/location/BlockLoc.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockLoc.java rename to Core/src/main/java/com/plotsquared/core/location/BlockLoc.java index 485bbe727..0fd25c48b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockLoc.java +++ b/Core/src/main/java/com/plotsquared/core/location/BlockLoc.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.location; public class BlockLoc { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/ChunkWrapper.java b/Core/src/main/java/com/plotsquared/core/location/ChunkWrapper.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/ChunkWrapper.java rename to Core/src/main/java/com/plotsquared/core/location/ChunkWrapper.java index 1c0652694..5f97ade75 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/ChunkWrapper.java +++ b/Core/src/main/java/com/plotsquared/core/location/ChunkWrapper.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.location; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.StringMan; public class ChunkWrapper { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Direction.java b/Core/src/main/java/com/plotsquared/core/location/Direction.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Direction.java rename to Core/src/main/java/com/plotsquared/core/location/Direction.java index 4ee866b18..406d3aa8c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Direction.java +++ b/Core/src/main/java/com/plotsquared/core/location/Direction.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.location; public enum Direction { ALL(-1, "all"), NORTH(0, "north"), EAST(1, "east"), SOUTH(2, "south"), WEST(3, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Location.java b/Core/src/main/java/com/plotsquared/core/location/Location.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Location.java rename to Core/src/main/java/com/plotsquared/core/location/Location.java index 30270bb89..a6f2c812b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Location.java +++ b/Core/src/main/java/com/plotsquared/core/location/Location.java @@ -23,10 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.location; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.util.MathMan; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.math.BlockVector3; import lombok.Getter; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotLoc.java b/Core/src/main/java/com/plotsquared/core/location/PlotLoc.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotLoc.java rename to Core/src/main/java/com/plotsquared/core/location/PlotLoc.java index ba4948525..b4c0b39cd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotLoc.java +++ b/Core/src/main/java/com/plotsquared/core/location/PlotLoc.java @@ -23,44 +23,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.location; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.util.StringMan; import lombok.AllArgsConstructor; import org.jetbrains.annotations.Nullable; +//todo better description needed /** * (x,y,z) or (x,z) representation for PlotSquared (hence the "Plot" prefix) */ @AllArgsConstructor public final class PlotLoc { - /** - * Use the getter - * - * @see #getX() - * @deprecated - */ - @Deprecated public int x; - /** - * Use the getter - * - * @see #getY() - * @deprecated - */ - @Deprecated public int y; - /** - * Use the getter - * - * @see #getZ() - * @deprecated - */ - @Deprecated public int z; + private final int x; + private final int y; + private final int z; /** * Initialize a new {@link PlotLoc} and set the Y value to {@code -1} * * @param x X value - * @param z Y value + * @param z Z value */ public PlotLoc(final int x, final int z) { this(x, -1, z); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/ConsolePlayer.java b/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/ConsolePlayer.java rename to Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java index 7e8eca8a2..551e5ba52 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/ConsolePlayer.java +++ b/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java @@ -23,12 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.player; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.RequiredType; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.util.PlotWeather; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.command.RequiredType; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.plot.PlotWeather; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.world.gamemode.GameMode; @@ -105,8 +108,8 @@ public class ConsolePlayer extends PlotPlayer { } @Override public void teleport(Location location, TeleportCause cause) { - setMeta(PlotPlayer.META_LAST_PLOT, location.getPlot()); - setMeta(PlotPlayer.META_LOCATION, location); + setMeta(META_LAST_PLOT, location.getPlot()); + setMeta(META_LOCATION, location); } @Override public boolean isOnline() { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/OfflinePlotPlayer.java b/Core/src/main/java/com/plotsquared/core/player/OfflinePlotPlayer.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/OfflinePlotPlayer.java rename to Core/src/main/java/com/plotsquared/core/player/OfflinePlotPlayer.java index 1633bb5c0..f48079f67 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/OfflinePlotPlayer.java +++ b/Core/src/main/java/com/plotsquared/core/player/OfflinePlotPlayer.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.player; import java.util.UUID; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java b/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java rename to Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java index 9f2f27f0e..1c40bd9e6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java +++ b/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java @@ -23,25 +23,32 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.player; -import com.github.intellectualsites.plotsquared.commands.CommandCaller; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.RequiredType; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.PlotWeather; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; +import com.plotsquared.core.command.CommandCaller; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.command.RequiredType; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotCluster; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.plot.world.PlotAreaManager; +import com.plotsquared.core.plot.world.SinglePlotArea; +import com.plotsquared.core.plot.world.SinglePlotAreaManager; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.plot.PlotWeather; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.util.task.RunnableVal; import com.google.common.base.Preconditions; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.world.gamemode.GameMode; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockBucket.java b/Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockBucket.java rename to Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java index ccfe2682f..59a2221ba 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockBucket.java +++ b/Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java @@ -23,14 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerializable; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil; -import com.github.intellectualsites.plotsquared.plot.util.world.PatternUtil; +import com.plotsquared.core.configuration.serialization.ConfigurationSerializable; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.BlockUtil; +import com.plotsquared.core.util.PatternUtil; import com.google.common.collect.ImmutableMap; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; @@ -90,7 +90,7 @@ public final class BlockBucket implements ConfigurationSerializable { if (!map.containsKey("blocks")) { return null; } - return Configuration.BLOCK_BUCKET.parseString(map.get("blocks").toString()); + return ConfigurationUtil.BLOCK_BUCKET.parseString(map.get("blocks").toString()); } public void addBlock(@NonNull final BlockState block) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java b/Core/src/main/java/com/plotsquared/core/plot/Plot.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java rename to Core/src/main/java/com/plotsquared/core/plot/Plot.java index 7fe50edf6..fb50c6bbb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Plot.java @@ -23,38 +23,46 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlotComponentSetEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotMergeEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotUnlinkEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.FlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.InternalFlag; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.KeepFlag; -import com.github.intellectualsites.plotsquared.plot.generator.SquarePlotWorld; -import com.github.intellectualsites.plotsquared.plot.listener.PlotListener; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; -import com.github.intellectualsites.plotsquared.plot.object.schematic.Schematic; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; -import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis; +import com.plotsquared.core.events.TeleportCause; +import com.plotsquared.core.location.BlockLoc; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.PlotLoc; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlotComponentSetEvent; +import com.plotsquared.core.events.PlotMergeEvent; +import com.plotsquared.core.events.PlotUnlinkEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.FlagContainer; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.InternalFlag; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.KeepFlag; +import com.plotsquared.core.generator.SquarePlotWorld; +import com.plotsquared.core.listener.PlotListener; +import com.plotsquared.core.plot.comment.PlotComment; +import com.plotsquared.core.plot.schematic.Schematic; +import com.plotsquared.core.util.ChunkManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.Permissions; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.plot.expiration.PlotAnalysis; +import com.plotsquared.core.util.task.RunnableVal; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; @@ -94,13 +102,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; import java.util.stream.Collectors; -import static com.github.intellectualsites.plotsquared.plot.commands.SubCommand.sendMessage; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ANIMAL; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_VEHICLE; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ENTITY; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MISC; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MOB; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MONSTER; +import static com.plotsquared.core.command.SubCommand.sendMessage; +import static com.plotsquared.core.util.entity.EntityCategories.*; + /** * The plot class
@@ -114,10 +118,7 @@ public class Plot { public static final int MAX_HEIGHT = 256; - /** - * @deprecated raw access is deprecated - */ - @Deprecated private static Set connected_cache; + private static Set connected_cache; private static Set regions_cache; @NotNull private final PlotId id; @@ -1111,7 +1112,7 @@ public class Plot { } } - protected boolean isLoaded() { + public boolean isLoaded() { return WorldUtil.IMP.isWorld(getWorldName()); } @@ -1866,7 +1867,7 @@ public class Plot { * (components are generator specific) */ @Deprecated public boolean setComponent(String component, String blocks) { - BlockBucket parsed = Configuration.BLOCK_BUCKET.parseString(blocks); + BlockBucket parsed = ConfigurationUtil.BLOCK_BUCKET.parseString(blocks); if (parsed != null && parsed.isEmpty()) { return false; } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotArea.java b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotArea.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotArea.java index fa2a388a5..e4248e6f5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotArea.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java @@ -23,32 +23,37 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flags.FlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.generator.GridPlotWorld; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.area.QuadMap; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.collection.QuadMap; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.generator.GridPlotWorld; +import com.plotsquared.core.generator.IndependentPlotGenerator; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.location.PlotLoc; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.flag.FlagContainer; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.util.EconHandler; +import com.plotsquared.core.util.Expression; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.RegionUtil; +import com.plotsquared.core.util.StringMan; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; @@ -256,7 +261,7 @@ public abstract class PlotArea { this.autoMerge = config.getBoolean("plot.auto_merge"); this.maxPlotMembers = config.getInt("limits.max-members"); this.allowSigns = config.getBoolean("plot.create_signs"); - this.plotBiome = Configuration.BIOME.parseString(config.getString("plot.biome")); + this.plotBiome = ConfigurationUtil.BIOME.parseString(config.getString("plot.biome")); this.schematicOnClaim = config.getBoolean("schematic.on_claim"); this.schematicFile = config.getString("schematic.file"); this.schematicClaimSpecify = config.getBoolean("schematic.specify_on_claim"); @@ -534,7 +539,7 @@ public abstract class PlotArea { || this.region.contains(location.getBlockVector3())); } - @NotNull Set getPlotsAbs(final UUID uuid) { + @NotNull public Set getPlotsAbs(final UUID uuid) { if (uuid == null) { return Collections.emptySet(); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaTerrainType.java b/Core/src/main/java/com/plotsquared/core/plot/PlotAreaTerrainType.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaTerrainType.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotAreaTerrainType.java index e0e32e8b4..e0835c263 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaTerrainType.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotAreaTerrainType.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; import java.util.Map; import java.util.Optional; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaType.java b/Core/src/main/java/com/plotsquared/core/plot/PlotAreaType.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaType.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotAreaType.java index 1e48e3568..69108a67e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaType.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotAreaType.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; import java.util.Map; import java.util.Optional; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotCluster.java b/Core/src/main/java/com/plotsquared/core/plot/PlotCluster.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotCluster.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotCluster.java index 537b7d669..51eed1f47 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotCluster.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotCluster.java @@ -23,11 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.core.location.BlockLoc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.RegionUtil; import com.sk89q.worldedit.regions.CuboidRegion; import java.util.HashSet; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotFilter.java b/Core/src/main/java/com/plotsquared/core/plot/PlotFilter.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotFilter.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotFilter.java index 6dd6719bd..f7433a2ae 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotFilter.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotFilter.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; public abstract class PlotFilter { public boolean allowsArea(final PlotArea area) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotHandler.java b/Core/src/main/java/com/plotsquared/core/plot/PlotHandler.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotHandler.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotHandler.java index 8bcb28c4a..052faada6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotHandler.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotHandler.java @@ -23,26 +23,22 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; - -import org.jetbrains.annotations.NotNull; +package com.plotsquared.core.plot; import java.util.Set; import java.util.UUID; public class PlotHandler { - - public static boolean sameOwners(@NotNull final Plot plot1, @NotNull final Plot plot2) { - if (!(plot1.hasOwner() && plot2.hasOwner())) { + public static boolean sameOwners(final Plot plot1, final Plot plot2) { + if (plot1.getOwnerAbs() == null || plot2.getOwnerAbs() == null) { return false; } final Set owners = plot1.getOwners(); - for (final UUID owner : owners) { + for (UUID owner : owners) { if (plot2.isOwner(owner)) { return true; } } return false; } - } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotId.java b/Core/src/main/java/com/plotsquared/core/plot/PlotId.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotId.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotId.java index 3e93f0574..f7fa1f39d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotId.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotId.java @@ -23,19 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; +import com.plotsquared.core.location.Direction; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class PlotId { - /** - * x value - */ + + @Deprecated public int x; - /** - * y value - */ + @Deprecated public int y; private int hash; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotInventory.java b/Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotInventory.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java index 37594b8d5..1a3abd5e0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotInventory.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java @@ -23,10 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.InventoryUtil; import lombok.NonNull; public class PlotInventory { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotItemStack.java b/Core/src/main/java/com/plotsquared/core/plot/PlotItemStack.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotItemStack.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotItemStack.java index 9460c68ce..a5c071476 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotItemStack.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotItemStack.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.item.ItemType; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotManager.java b/Core/src/main/java/com/plotsquared/core/plot/PlotManager.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotManager.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotManager.java index 5f8d1a176..836251ddf 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotManager.java @@ -23,10 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.commands.Template; -import com.github.intellectualsites.plotsquared.plot.config.Settings; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.command.Template; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.util.FileBytes; import com.sk89q.worldedit.function.pattern.Pattern; import java.io.IOException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotSettings.java b/Core/src/main/java/com/plotsquared/core/plot/PlotSettings.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotSettings.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotSettings.java index e66b14300..39d74083d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotSettings.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotSettings.java @@ -23,9 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; +import com.plotsquared.core.location.BlockLoc; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.plot.comment.PlotComment; import com.google.common.collect.ImmutableList; import lombok.Getter; import lombok.Setter; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/PlotWeather.java b/Core/src/main/java/com/plotsquared/core/plot/PlotWeather.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/PlotWeather.java rename to Core/src/main/java/com/plotsquared/core/plot/PlotWeather.java index ab876cd82..812816331 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/PlotWeather.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotWeather.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.plot; public enum PlotWeather { RAIN, CLEAR, RESET diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Rating.java b/Core/src/main/java/com/plotsquared/core/plot/Rating.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Rating.java rename to Core/src/main/java/com/plotsquared/core/plot/Rating.java index e91c1671f..b6ccfd0a3 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Rating.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Rating.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.config.Settings; +import com.plotsquared.core.configuration.Settings; import java.util.ArrayList; import java.util.HashMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/SetupObject.java b/Core/src/main/java/com/plotsquared/core/plot/SetupObject.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/SetupObject.java rename to Core/src/main/java/com/plotsquared/core/plot/SetupObject.java index e34b9a4c6..8ac5d5cb0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/SetupObject.java +++ b/Core/src/main/java/com/plotsquared/core/plot/SetupObject.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.util.SetupUtils; public class SetupObject { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/CommentInbox.java b/Core/src/main/java/com/plotsquared/core/plot/comment/CommentInbox.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/CommentInbox.java rename to Core/src/main/java/com/plotsquared/core/plot/comment/CommentInbox.java index b61cdbbc9..d707d0686 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/CommentInbox.java +++ b/Core/src/main/java/com/plotsquared/core/plot/comment/CommentInbox.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.comment; +package com.plotsquared.core.plot.comment; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.Permissions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.Permissions; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/CommentManager.java b/Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java similarity index 81% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/CommentManager.java rename to Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java index 265e477d9..17be28d07 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/CommentManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java @@ -23,24 +23,22 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.plot.comment; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.comment.CommentInbox; -import com.github.intellectualsites.plotsquared.plot.object.comment.InboxOwner; -import com.github.intellectualsites.plotsquared.plot.object.comment.InboxPublic; -import com.github.intellectualsites.plotsquared.plot.object.comment.InboxReport; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; +import com.google.common.annotations.Beta; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +@Beta public class CommentManager { public static final HashMap inboxes = new HashMap<>(); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxOwner.java b/Core/src/main/java/com/plotsquared/core/plot/comment/InboxOwner.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxOwner.java rename to Core/src/main/java/com/plotsquared/core/plot/comment/InboxOwner.java index ca47eb9f7..bb7cf1e97 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxOwner.java +++ b/Core/src/main/java/com/plotsquared/core/plot/comment/InboxOwner.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.comment; +package com.plotsquared.core.plot.comment; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; import java.util.ArrayList; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxPublic.java b/Core/src/main/java/com/plotsquared/core/plot/comment/InboxPublic.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxPublic.java rename to Core/src/main/java/com/plotsquared/core/plot/comment/InboxPublic.java index 5c7fb8a14..9b0d69e29 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxPublic.java +++ b/Core/src/main/java/com/plotsquared/core/plot/comment/InboxPublic.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.comment; +package com.plotsquared.core.plot.comment; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxReport.java b/Core/src/main/java/com/plotsquared/core/plot/comment/InboxReport.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxReport.java rename to Core/src/main/java/com/plotsquared/core/plot/comment/InboxReport.java index 920063ef3..3dc74b016 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxReport.java +++ b/Core/src/main/java/com/plotsquared/core/plot/comment/InboxReport.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.comment; +package com.plotsquared.core.plot.comment; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/PlotComment.java b/Core/src/main/java/com/plotsquared/core/plot/comment/PlotComment.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/PlotComment.java rename to Core/src/main/java/com/plotsquared/core/plot/comment/PlotComment.java index 23143da93..d38f4d8c8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/PlotComment.java +++ b/Core/src/main/java/com/plotsquared/core/plot/comment/PlotComment.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.comment; +package com.plotsquared.core.plot.comment; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.PlotId; public class PlotComment { public final String comment; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpireManager.java b/Core/src/main/java/com/plotsquared/core/plot/expiration/ExpireManager.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpireManager.java rename to Core/src/main/java/com/plotsquared/core/plot/expiration/ExpireManager.java index e2d436c8e..27bb96185 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpireManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/expiration/ExpireManager.java @@ -23,32 +23,32 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.expiry; +package com.plotsquared.core.plot.expiration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlotFlagAddEvent; -import com.github.intellectualsites.plotsquared.plot.events.PlotUnlinkEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.flags.GlobalFlagContainer; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnalysisFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.KeepFlag; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.PlotUnlinkEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.plot.flag.GlobalFlagContainer; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.AnalysisFlag; +import com.plotsquared.core.plot.flag.implementations.KeepFlag; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; import java.util.ArrayDeque; import java.util.ArrayList; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpiryTask.java b/Core/src/main/java/com/plotsquared/core/plot/expiration/ExpiryTask.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpiryTask.java rename to Core/src/main/java/com/plotsquared/core/plot/expiration/ExpiryTask.java index 883c92254..53a33100f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/ExpiryTask.java +++ b/Core/src/main/java/com/plotsquared/core/plot/expiration/ExpiryTask.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.expiry; +package com.plotsquared.core.plot.expiration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotFilter; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotFilter; import java.util.ArrayList; import java.util.Collections; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/PlotAnalysis.java b/Core/src/main/java/com/plotsquared/core/plot/expiration/PlotAnalysis.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/PlotAnalysis.java rename to Core/src/main/java/com/plotsquared/core/plot/expiration/PlotAnalysis.java index 1f3b43a78..dba11d26e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/expiry/PlotAnalysis.java +++ b/Core/src/main/java/com/plotsquared/core/plot/expiration/PlotAnalysis.java @@ -23,16 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.expiry; +package com.plotsquared.core.plot.expiration; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnalysisFlag; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.flag.implementations.AnalysisFlag; +import com.plotsquared.core.generator.HybridUtils; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.task.TaskManager; import java.lang.reflect.Array; import java.util.ArrayDeque; @@ -436,10 +436,7 @@ public class PlotAnalysis { } /** - * Sum of an array - * - * @param array - * @return + * Calls {@code Arrays.stream(array).sum()} */ public static int sum(int[] array) { return Arrays.stream(array).sum(); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/FlagContainer.java b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/FlagContainer.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java index 30565c158..f10e3be82 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/FlagContainer.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags; +package com.plotsquared.core.plot.flag; import com.google.common.collect.ImmutableMap; import lombok.EqualsAndHashCode; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/FlagParseException.java b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/FlagParseException.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java index 5207f2983..5f072dfe3 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/FlagParseException.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags; +package com.plotsquared.core.plot.flag; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.CaptionUtility; public class FlagParseException extends Exception { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/GlobalFlagContainer.java b/Core/src/main/java/com/plotsquared/core/plot/flag/GlobalFlagContainer.java similarity index 51% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/GlobalFlagContainer.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/GlobalFlagContainer.java index af177144e..fc5e369a2 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/GlobalFlagContainer.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/GlobalFlagContainer.java @@ -23,84 +23,82 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags; +package com.plotsquared.core.plot.flag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnalysisFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnimalAttackFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnimalCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.AnimalInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BlockBurnFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BlockIgnitionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BlockedCmdsFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.BreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.CoralDryFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DenyExitFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DenyTeleportFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DescriptionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DeviceInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DisablePhysicsFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DropProtectionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.EntityCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ExplosionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.FarewellFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.FeedFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.FlyFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ForcefieldFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.GamemodeFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.GrassGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.GreetingFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.GuestGamemodeFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HangingBreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HangingPlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HealFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HideInfoFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HostileAttackFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HostileCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.HostileInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.IceFormFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.IceMeltFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.InstabreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.InvincibleFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ItemDropFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.KeepFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.KelpGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.LiquidFlowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscBreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MiscPlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MobBreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MobCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MobPlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MusicFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.MycelGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.NoWorldeditFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.NotifyEnterFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.NotifyLeaveFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PlayerInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PriceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PveFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.PvpFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.RedstoneFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ServerPlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.SnowFormFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.SnowMeltFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.SoilDryFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.TamedAttackFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.TamedInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.TimeFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.TitlesFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.UntrustedVisitFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.UseFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehicleBreakFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehicleCapFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehiclePlaceFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VehicleUseFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VillagerInteractFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.VineGrowFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.WeatherFlag; +import com.plotsquared.core.plot.flag.implementations.AnalysisFlag; +import com.plotsquared.core.plot.flag.implementations.AnimalAttackFlag; +import com.plotsquared.core.plot.flag.implementations.AnimalCapFlag; +import com.plotsquared.core.plot.flag.implementations.AnimalInteractFlag; +import com.plotsquared.core.plot.flag.implementations.BlockBurnFlag; +import com.plotsquared.core.plot.flag.implementations.BlockIgnitionFlag; +import com.plotsquared.core.plot.flag.implementations.BlockedCmdsFlag; +import com.plotsquared.core.plot.flag.implementations.BreakFlag; +import com.plotsquared.core.plot.flag.implementations.CoralDryFlag; +import com.plotsquared.core.plot.flag.implementations.DenyExitFlag; +import com.plotsquared.core.plot.flag.implementations.DenyTeleportFlag; +import com.plotsquared.core.plot.flag.implementations.DescriptionFlag; +import com.plotsquared.core.plot.flag.implementations.DeviceInteractFlag; +import com.plotsquared.core.plot.flag.implementations.DisablePhysicsFlag; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.flag.implementations.DropProtectionFlag; +import com.plotsquared.core.plot.flag.implementations.EntityCapFlag; +import com.plotsquared.core.plot.flag.implementations.ExplosionFlag; +import com.plotsquared.core.plot.flag.implementations.FarewellFlag; +import com.plotsquared.core.plot.flag.implementations.FeedFlag; +import com.plotsquared.core.plot.flag.implementations.FlyFlag; +import com.plotsquared.core.plot.flag.implementations.ForcefieldFlag; +import com.plotsquared.core.plot.flag.implementations.GamemodeFlag; +import com.plotsquared.core.plot.flag.implementations.GrassGrowFlag; +import com.plotsquared.core.plot.flag.implementations.GreetingFlag; +import com.plotsquared.core.plot.flag.implementations.GuestGamemodeFlag; +import com.plotsquared.core.plot.flag.implementations.HangingBreakFlag; +import com.plotsquared.core.plot.flag.implementations.HangingPlaceFlag; +import com.plotsquared.core.plot.flag.implementations.HealFlag; +import com.plotsquared.core.plot.flag.implementations.HideInfoFlag; +import com.plotsquared.core.plot.flag.implementations.HostileAttackFlag; +import com.plotsquared.core.plot.flag.implementations.HostileCapFlag; +import com.plotsquared.core.plot.flag.implementations.HostileInteractFlag; +import com.plotsquared.core.plot.flag.implementations.IceFormFlag; +import com.plotsquared.core.plot.flag.implementations.IceMeltFlag; +import com.plotsquared.core.plot.flag.implementations.InstabreakFlag; +import com.plotsquared.core.plot.flag.implementations.InvincibleFlag; +import com.plotsquared.core.plot.flag.implementations.ItemDropFlag; +import com.plotsquared.core.plot.flag.implementations.KeepFlag; +import com.plotsquared.core.plot.flag.implementations.KelpGrowFlag; +import com.plotsquared.core.plot.flag.implementations.LiquidFlowFlag; +import com.plotsquared.core.plot.flag.implementations.MiscBreakFlag; +import com.plotsquared.core.plot.flag.implementations.MiscCapFlag; +import com.plotsquared.core.plot.flag.implementations.MobBreakFlag; +import com.plotsquared.core.plot.flag.implementations.MobCapFlag; +import com.plotsquared.core.plot.flag.implementations.MobPlaceFlag; +import com.plotsquared.core.plot.flag.implementations.MusicFlag; +import com.plotsquared.core.plot.flag.implementations.MycelGrowFlag; +import com.plotsquared.core.plot.flag.implementations.NoWorldeditFlag; +import com.plotsquared.core.plot.flag.implementations.NotifyEnterFlag; +import com.plotsquared.core.plot.flag.implementations.NotifyLeaveFlag; +import com.plotsquared.core.plot.flag.implementations.PlaceFlag; +import com.plotsquared.core.plot.flag.implementations.PlayerInteractFlag; +import com.plotsquared.core.plot.flag.implementations.PriceFlag; +import com.plotsquared.core.plot.flag.implementations.PveFlag; +import com.plotsquared.core.plot.flag.implementations.PvpFlag; +import com.plotsquared.core.plot.flag.implementations.RedstoneFlag; +import com.plotsquared.core.plot.flag.implementations.ServerPlotFlag; +import com.plotsquared.core.plot.flag.implementations.SnowFormFlag; +import com.plotsquared.core.plot.flag.implementations.SnowMeltFlag; +import com.plotsquared.core.plot.flag.implementations.SoilDryFlag; +import com.plotsquared.core.plot.flag.implementations.TamedAttackFlag; +import com.plotsquared.core.plot.flag.implementations.TamedInteractFlag; +import com.plotsquared.core.plot.flag.implementations.TimeFlag; +import com.plotsquared.core.plot.flag.implementations.TitlesFlag; +import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag; +import com.plotsquared.core.plot.flag.implementations.UseFlag; +import com.plotsquared.core.plot.flag.implementations.VehicleBreakFlag; +import com.plotsquared.core.plot.flag.implementations.VehicleCapFlag; +import com.plotsquared.core.plot.flag.implementations.VehiclePlaceFlag; +import com.plotsquared.core.plot.flag.implementations.VehicleUseFlag; +import com.plotsquared.core.plot.flag.implementations.VillagerInteractFlag; +import com.plotsquared.core.plot.flag.implementations.VineGrowFlag; +import com.plotsquared.core.plot.flag.implementations.WeatherFlag; import lombok.Getter; import javax.annotation.Nonnull; @@ -150,8 +148,6 @@ public final class GlobalFlagContainer extends FlagContainer { this.addFlag(RedstoneFlag.REDSTONE_TRUE); this.addFlag(ServerPlotFlag.SERVER_PLOT_FALSE); this.addFlag(MiscBreakFlag.MISC_BREAK_FALSE); - this.addFlag(MiscInteractFlag.MISC_INTERACT_FALSE); - this.addFlag(MiscPlaceFlag.MISC_PLACE_FALSE); this.addFlag(MobBreakFlag.MOB_BREAK_FALSE); this.addFlag(MobPlaceFlag.MOB_PLACE_FALSE); this.addFlag(MycelGrowFlag.MYCEL_GROW_TRUE); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/InternalFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/InternalFlag.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/InternalFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/InternalFlag.java index f8d3b1bcc..a7c841bac 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/InternalFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/InternalFlag.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags; +package com.plotsquared.core.plot.flag; /** * These are flags used in PlotSquared and PlotSquared diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/PlotFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/PlotFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java index 6a3fd2054..513398a39 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/PlotFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java @@ -23,10 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags; +package com.plotsquared.core.plot.flag; -import com.github.intellectualsites.plotsquared.plot.config.Caption; import com.google.common.base.Preconditions; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; import lombok.EqualsAndHashCode; import org.jetbrains.annotations.NotNull; @@ -135,7 +136,7 @@ public abstract class PlotFlag> { /** * Get the category this flag belongs to. Usually a caption from - * {@link com.github.intellectualsites.plotsquared.plot.config.Captions} + * {@link Captions} *

* These categories are used to categorize the flags when outputting * flag lists to players. diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnalysisFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnalysisFlag.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnalysisFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnalysisFlag.java index 4eca3ff81..133f56df9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnalysisFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnalysisFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.InternalFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.ListFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.InternalFlag; +import com.plotsquared.core.plot.flag.types.ListFlag; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalAttackFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalAttackFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalAttackFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalAttackFlag.java index 332941150..1ae0abc12 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalAttackFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalAttackFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class AnimalAttackFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalCapFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalCapFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalCapFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalCapFlag.java index 5980978ab..228ea94aa 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalCapFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalCapFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.NonNegativeIntegerFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag; import org.jetbrains.annotations.NotNull; public class AnimalCapFlag extends NonNegativeIntegerFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalInteractFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalInteractFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalInteractFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalInteractFlag.java index 4005972b2..f19a479d3 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/AnimalInteractFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/AnimalInteractFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class AnimalInteractFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockBurnFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockBurnFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockBurnFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockBurnFlag.java index 04b6522c6..ac50b91b3 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockBurnFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockBurnFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class BlockBurnFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockIgnitionFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockIgnitionFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockIgnitionFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockIgnitionFlag.java index 4d18cf1a5..4a2b7e205 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockIgnitionFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockIgnitionFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class BlockIgnitionFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockedCmdsFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockedCmdsFlag.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockedCmdsFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockedCmdsFlag.java index ab7cf7eb4..d5b3eeca6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BlockedCmdsFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BlockedCmdsFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.types.ListFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.types.ListFlag; import org.jetbrains.annotations.NotNull; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BreakFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BreakFlag.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BreakFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BreakFlag.java index 9e90c3632..5acf7d489 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/BreakFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BreakFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeListFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeWrapper; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BlockTypeListFlag; +import com.plotsquared.core.plot.flag.types.BlockTypeWrapper; import org.jetbrains.annotations.NotNull; import java.util.Collections; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/CoralDryFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/CoralDryFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/CoralDryFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/CoralDryFlag.java index 4863b9d71..84e98f9d6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/CoralDryFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/CoralDryFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class CoralDryFlag extends BooleanFlag { @@ -42,4 +42,4 @@ public class CoralDryFlag extends BooleanFlag { return value ? CORAL_DRY_TRUE : CORAL_DRY_FALSE; } -} \ No newline at end of file +} diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyExitFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DenyExitFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyExitFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DenyExitFlag.java index d6c635734..17fe9f0e8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyExitFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DenyExitFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class DenyExitFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyTeleportFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DenyTeleportFlag.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyTeleportFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DenyTeleportFlag.java index 281dc2400..446f31348 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyTeleportFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DenyTeleportFlag.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DescriptionFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DescriptionFlag.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DescriptionFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DescriptionFlag.java index a900ba02b..7afb264f4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DescriptionFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DescriptionFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; public class DescriptionFlag extends PlotFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DeviceInteractFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DeviceInteractFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DeviceInteractFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DeviceInteractFlag.java index 6833a399e..f43e1e27a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DeviceInteractFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DeviceInteractFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class DeviceInteractFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DisablePhysicsFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DisablePhysicsFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DisablePhysicsFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DisablePhysicsFlag.java index 641786fa2..f1d952260 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DisablePhysicsFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DisablePhysicsFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class DisablePhysicsFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DoneFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DoneFlag.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DoneFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DoneFlag.java index 909f29f75..2cd329f7d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DoneFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DoneFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.InternalFlag; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.InternalFlag; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; import org.jetbrains.annotations.NotNull; public class DoneFlag extends PlotFlag implements InternalFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DropProtectionFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DropProtectionFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DropProtectionFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DropProtectionFlag.java index 89cfe0a0b..a210af66e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DropProtectionFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DropProtectionFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class DropProtectionFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/EntityCapFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/EntityCapFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/EntityCapFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/EntityCapFlag.java index de1a74b35..e20e2dded 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/EntityCapFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/EntityCapFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.NonNegativeIntegerFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag; import org.jetbrains.annotations.NotNull; public class EntityCapFlag extends NonNegativeIntegerFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ExplosionFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ExplosionFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ExplosionFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ExplosionFlag.java index b13a2e241..0f1f04a54 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ExplosionFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ExplosionFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class ExplosionFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FarewellFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FarewellFlag.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FarewellFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FarewellFlag.java index 004295da9..625f41cb8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FarewellFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FarewellFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; public class FarewellFlag extends PlotFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FeedFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FeedFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FeedFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FeedFlag.java index 4d73bb2e1..11a0cac4a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FeedFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FeedFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.types.TimedFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.types.TimedFlag; import org.jetbrains.annotations.NotNull; public class FeedFlag extends TimedFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FlyFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FlyFlag.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FlyFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FlyFlag.java index a84293659..dbd28d360 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FlyFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FlyFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ForcefieldFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ForcefieldFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ForcefieldFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ForcefieldFlag.java index 5d48566fb..f8c985238 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ForcefieldFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ForcefieldFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class ForcefieldFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GamemodeFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GamemodeFlag.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GamemodeFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GamemodeFlag.java index 81c1d27a8..60fdb4a0a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GamemodeFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GamemodeFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; import com.sk89q.worldedit.world.gamemode.GameMode; import com.sk89q.worldedit.world.gamemode.GameModes; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GrassGrowFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GrassGrowFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GrassGrowFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GrassGrowFlag.java index 3fca9529f..7cb823667 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GrassGrowFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GrassGrowFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class GrassGrowFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GreetingFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GreetingFlag.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GreetingFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GreetingFlag.java index 6a3a36f49..0097defa8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GreetingFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GreetingFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; public class GreetingFlag extends PlotFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GuestGamemodeFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GuestGamemodeFlag.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GuestGamemodeFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GuestGamemodeFlag.java index bbd3213c0..8b320200e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/GuestGamemodeFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GuestGamemodeFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; import com.sk89q.worldedit.world.gamemode.GameMode; import com.sk89q.worldedit.world.gamemode.GameModes; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HangingBreakFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HangingBreakFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HangingBreakFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HangingBreakFlag.java index 70dceef11..f7a07a28a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HangingBreakFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HangingBreakFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class HangingBreakFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HangingPlaceFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HangingPlaceFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HangingPlaceFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HangingPlaceFlag.java index e0f643679..14923a319 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HangingPlaceFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HangingPlaceFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class HangingPlaceFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HealFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HealFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HealFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HealFlag.java index 4bd874367..90e5fbabb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HealFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HealFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.types.TimedFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.types.TimedFlag; import org.jetbrains.annotations.NotNull; public class HealFlag extends TimedFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HideInfoFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HideInfoFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HideInfoFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HideInfoFlag.java index f666575a8..d382cac8f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HideInfoFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HideInfoFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class HideInfoFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileAttackFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileAttackFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileAttackFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileAttackFlag.java index 66a2f7567..9ec805814 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileAttackFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileAttackFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class HostileAttackFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileCapFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileCapFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileCapFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileCapFlag.java index 9dff6f4ec..017e3736a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileCapFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileCapFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.NonNegativeIntegerFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag; import org.jetbrains.annotations.NotNull; public class HostileCapFlag extends NonNegativeIntegerFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileInteractFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileInteractFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileInteractFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileInteractFlag.java index 0f8d82701..96ce742b9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/HostileInteractFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HostileInteractFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class HostileInteractFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/IceFormFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/IceFormFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/IceFormFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/IceFormFlag.java index ac6bff037..a0f54097e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/IceFormFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/IceFormFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class IceFormFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/IceMeltFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/IceMeltFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/IceMeltFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/IceMeltFlag.java index e9b763d0c..0c1bf93a6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/IceMeltFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/IceMeltFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class IceMeltFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/InstabreakFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/InstabreakFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/InstabreakFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/InstabreakFlag.java index 0693ce529..7c87fcff4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/InstabreakFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/InstabreakFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class InstabreakFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/InvincibleFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/InvincibleFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/InvincibleFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/InvincibleFlag.java index 656f8cb50..b19e0d393 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/InvincibleFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/InvincibleFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class InvincibleFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ItemDropFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ItemDropFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ItemDropFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ItemDropFlag.java index 5d72757a8..1c71be3eb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ItemDropFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ItemDropFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class ItemDropFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/KeepFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/KeepFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/KeepFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/KeepFlag.java index bbe976f30..ce23f2510 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/KeepFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/KeepFlag.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; import org.jetbrains.annotations.NotNull; public class KeepFlag extends PlotFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/KelpGrowFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/KelpGrowFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/KelpGrowFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/KelpGrowFlag.java index f5a9836c4..495db4160 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/KelpGrowFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/KelpGrowFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class KelpGrowFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/LiquidFlowFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/LiquidFlowFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/LiquidFlowFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/LiquidFlowFlag.java index e5ee440f2..d8bf97e11 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/LiquidFlowFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/LiquidFlowFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class LiquidFlowFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscBreakFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscBreakFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscBreakFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscBreakFlag.java index 65df1cc8a..17bc797c9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscBreakFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscBreakFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class MiscBreakFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscCapFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscCapFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscCapFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscCapFlag.java index 3e993173f..2291d6343 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscCapFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscCapFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.NonNegativeIntegerFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag; import org.jetbrains.annotations.NotNull; public class MiscCapFlag extends NonNegativeIntegerFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscInteractFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscInteractFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscInteractFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscInteractFlag.java index abb313d3f..a70191a9d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscInteractFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscInteractFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class MiscInteractFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscPlaceFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscPlaceFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscPlaceFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscPlaceFlag.java index f2a4cd87e..8579d33df 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MiscPlaceFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MiscPlaceFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class MiscPlaceFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobBreakFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobBreakFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobBreakFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobBreakFlag.java index e3877541b..fd8db8c69 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobBreakFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobBreakFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class MobBreakFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobCapFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobCapFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobCapFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobCapFlag.java index 0ea5fc33a..f05f2699a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobCapFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobCapFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.NonNegativeIntegerFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag; import org.jetbrains.annotations.NotNull; public class MobCapFlag extends NonNegativeIntegerFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobPlaceFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobPlaceFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobPlaceFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobPlaceFlag.java index 11ebdfacf..b0f85914c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MobPlaceFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MobPlaceFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class MobPlaceFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MusicFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MusicFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MusicFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MusicFlag.java index 873559474..6d50df274 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MusicFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MusicFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.util.world.ItemUtil; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.util.ItemUtil; import com.sk89q.worldedit.world.item.ItemType; import com.sk89q.worldedit.world.item.ItemTypes; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MycelGrowFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MycelGrowFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MycelGrowFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MycelGrowFlag.java index 6e923cf0f..42c69c0da 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/MycelGrowFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/MycelGrowFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class MycelGrowFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NoWorldeditFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NoWorldeditFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NoWorldeditFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NoWorldeditFlag.java index 950e29f77..926ddbf81 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NoWorldeditFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NoWorldeditFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class NoWorldeditFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NotifyEnterFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NotifyEnterFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NotifyEnterFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NotifyEnterFlag.java index a48259141..55deec66d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NotifyEnterFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NotifyEnterFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class NotifyEnterFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NotifyLeaveFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NotifyLeaveFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NotifyLeaveFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NotifyLeaveFlag.java index 636a91ffb..521401f82 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/NotifyLeaveFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/NotifyLeaveFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class NotifyLeaveFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PlaceFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PlaceFlag.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PlaceFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PlaceFlag.java index 90caaa568..ae5fb6e2a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PlaceFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PlaceFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeListFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeWrapper; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BlockTypeListFlag; +import com.plotsquared.core.plot.flag.types.BlockTypeWrapper; import org.jetbrains.annotations.NotNull; import java.util.Collections; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PlayerInteractFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PlayerInteractFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PlayerInteractFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PlayerInteractFlag.java index fd9480b99..3743826a5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PlayerInteractFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PlayerInteractFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class PlayerInteractFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PriceFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PriceFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PriceFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PriceFlag.java index 3a2a379d3..a2250247d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PriceFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PriceFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.DoubleFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.DoubleFlag; import org.jetbrains.annotations.NotNull; public class PriceFlag extends DoubleFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PveFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PveFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PveFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PveFlag.java index 8367fafe1..9d46f63fb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PveFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PveFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class PveFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PvpFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PvpFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PvpFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PvpFlag.java index 5b679b7b1..3c07c9d1c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/PvpFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/PvpFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class PvpFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/RedstoneFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/RedstoneFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/RedstoneFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/RedstoneFlag.java index 005d10fd3..e46df3616 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/RedstoneFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/RedstoneFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class RedstoneFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ServerPlotFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ServerPlotFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ServerPlotFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ServerPlotFlag.java index 8406e22d5..db05dcdfa 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ServerPlotFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ServerPlotFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class ServerPlotFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SnowFormFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SnowFormFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SnowFormFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SnowFormFlag.java index 1c2335f47..33f21f1e6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SnowFormFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SnowFormFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class SnowFormFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SnowMeltFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SnowMeltFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SnowMeltFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SnowMeltFlag.java index 9129066d0..7a948ed39 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SnowMeltFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SnowMeltFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class SnowMeltFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SoilDryFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SoilDryFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SoilDryFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SoilDryFlag.java index 61b4c500c..3096850bf 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/SoilDryFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SoilDryFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class SoilDryFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TamedAttackFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TamedAttackFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TamedAttackFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TamedAttackFlag.java index dedc6a5e4..e2b3ba806 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TamedAttackFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TamedAttackFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class TamedAttackFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TamedInteractFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TamedInteractFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TamedInteractFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TamedInteractFlag.java index 393b072d9..c6c555501 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TamedInteractFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TamedInteractFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class TamedInteractFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TimeFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TimeFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TimeFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TimeFlag.java index b7f331f27..7b21b554b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TimeFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TimeFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.LongFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.LongFlag; import org.jetbrains.annotations.NotNull; public class TimeFlag extends LongFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TitlesFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TitlesFlag.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TitlesFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TitlesFlag.java index 21e14a3f6..c51ef7b00 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/TitlesFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TitlesFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UntrustedVisitFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/UntrustedVisitFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UntrustedVisitFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/UntrustedVisitFlag.java index cd6004eaf..a85fdacf0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UntrustedVisitFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/UntrustedVisitFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class UntrustedVisitFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UseFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/UseFlag.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UseFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/UseFlag.java index 96ed057f3..96d1630c8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UseFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/UseFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeListFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeWrapper; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BlockTypeListFlag; +import com.plotsquared.core.plot.flag.types.BlockTypeWrapper; import org.jetbrains.annotations.NotNull; import java.util.Collections; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleBreakFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleBreakFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleBreakFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleBreakFlag.java index 45ffff6a3..bf77b18a7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleBreakFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleBreakFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class VehicleBreakFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleCapFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleCapFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleCapFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleCapFlag.java index 41721ec40..3a428bb8c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleCapFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleCapFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.NonNegativeIntegerFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag; import org.jetbrains.annotations.NotNull; public class VehicleCapFlag extends NonNegativeIntegerFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehiclePlaceFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehiclePlaceFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehiclePlaceFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehiclePlaceFlag.java index b7120e30b..5bff06205 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehiclePlaceFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehiclePlaceFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class VehiclePlaceFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleUseFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleUseFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleUseFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleUseFlag.java index 1d17c75fb..b4386791b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VehicleUseFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VehicleUseFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class VehicleUseFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VillagerInteractFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VillagerInteractFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VillagerInteractFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VillagerInteractFlag.java index a44c7a3ef..2bcf6a2ed 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VillagerInteractFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VillagerInteractFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class VillagerInteractFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VineGrowFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VineGrowFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VineGrowFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VineGrowFlag.java index 334ac9167..5f90a069a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/VineGrowFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/VineGrowFlag.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.types.BooleanFlag; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.types.BooleanFlag; import org.jetbrains.annotations.NotNull; public class VineGrowFlag extends BooleanFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/WeatherFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/WeatherFlag.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/WeatherFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/implementations/WeatherFlag.java index 03d1ea966..5900eb354 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/WeatherFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/WeatherFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.implementations; +package com.plotsquared.core.plot.flag.implementations; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.util.PlotWeather; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.PlotWeather; import org.jetbrains.annotations.NotNull; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BlockTypeListFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeListFlag.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BlockTypeListFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeListFlag.java index 673b336ed..445357ae7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BlockTypeListFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeListFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.util.BlockUtil; import com.sk89q.worldedit.world.block.BlockCategory; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BlockTypeWrapper.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeWrapper.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BlockTypeWrapper.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeWrapper.java index 052343ec1..db7f8d6f7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BlockTypeWrapper.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeWrapper.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; import com.google.common.base.Preconditions; import com.sk89q.worldedit.world.block.BlockCategory; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BooleanFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BooleanFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BooleanFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/BooleanFlag.java index 3553616db..578204ff6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BooleanFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BooleanFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; import java.util.Arrays; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/DoubleFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/DoubleFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/DoubleFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/DoubleFlag.java index 026edba01..a7a9b88fd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/DoubleFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/DoubleFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; import org.jetbrains.annotations.NotNull; public abstract class DoubleFlag> extends NumberFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/IntegerFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/IntegerFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/IntegerFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/IntegerFlag.java index f20a54cee..efae07579 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/IntegerFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/IntegerFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; import org.jetbrains.annotations.NotNull; public abstract class IntegerFlag> extends NumberFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/ListFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/ListFlag.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/ListFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/ListFlag.java index fa8350d0c..746a769aa 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/ListFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/ListFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.util.StringMan; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/LongFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/LongFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java index 26af16d9f..c684457a0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/LongFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; import org.jetbrains.annotations.NotNull; public abstract class LongFlag> extends NumberFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/NonNegativeIntegerFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NonNegativeIntegerFlag.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/NonNegativeIntegerFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/NonNegativeIntegerFlag.java index 8244c4a14..699e2f018 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/NonNegativeIntegerFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NonNegativeIntegerFlag.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; +import com.plotsquared.core.configuration.Caption; import org.jetbrains.annotations.NotNull; public abstract class NonNegativeIntegerFlag> extends IntegerFlag { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/NumberFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java similarity index 88% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/NumberFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java index 15091f7a7..43068a85a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/NumberFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; public abstract class NumberFlag, F extends PlotFlag> diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/TimedFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/TimedFlag.java rename to Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java index 1bd283e3f..d00504989 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/TimedFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.flags.types; +package com.plotsquared.core.plot.flag.types; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.flags.FlagParseException; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.flag.FlagParseException; +import com.plotsquared.core.plot.flag.PlotFlag; import org.jetbrains.annotations.NotNull; public abstract class TimedFlag, F>> diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/chat/PlainChatManager.java b/Core/src/main/java/com/plotsquared/core/plot/message/PlainChatManager.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/chat/PlainChatManager.java rename to Core/src/main/java/com/plotsquared/core/plot/message/PlainChatManager.java index 0f40e0cea..00c12c899 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/chat/PlainChatManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/message/PlainChatManager.java @@ -23,12 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.chat; +package com.plotsquared.core.plot.message; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.ChatManager; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.ChatManager; import java.util.ArrayList; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotMessage.java b/Core/src/main/java/com/plotsquared/core/plot/message/PlotMessage.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotMessage.java rename to Core/src/main/java/com/plotsquared/core/plot/message/PlotMessage.java index 97be51296..e0e56c4fb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotMessage.java +++ b/Core/src/main/java/com/plotsquared/core/plot/message/PlotMessage.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot.message; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.chat.PlainChatManager; -import com.github.intellectualsites.plotsquared.plot.util.ChatManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.util.ChatManager; public class PlotMessage { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/PlotItem.java b/Core/src/main/java/com/plotsquared/core/plot/schematic/PlotItem.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/PlotItem.java rename to Core/src/main/java/com/plotsquared/core/plot/schematic/PlotItem.java index fabf8bb61..c8e614c71 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/PlotItem.java +++ b/Core/src/main/java/com/plotsquared/core/plot/schematic/PlotItem.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.schematic; +package com.plotsquared.core.plot.schematic; import com.sk89q.worldedit.world.item.ItemType; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/Schematic.java b/Core/src/main/java/com/plotsquared/core/plot/schematic/Schematic.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/Schematic.java rename to Core/src/main/java/com/plotsquared/core/plot/schematic/Schematic.java index bac924f6f..8f08b91cf 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/Schematic.java +++ b/Core/src/main/java/com/plotsquared/core/plot/schematic/Schematic.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.schematic; +package com.plotsquared.core.plot.schematic; import com.sk89q.jnbt.NBTOutputStream; import com.sk89q.jnbt.Tag; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/StoredEntity.java b/Core/src/main/java/com/plotsquared/core/plot/schematic/StoredEntity.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/StoredEntity.java rename to Core/src/main/java/com/plotsquared/core/plot/schematic/StoredEntity.java index 5d114c96d..1892ab4d4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/StoredEntity.java +++ b/Core/src/main/java/com/plotsquared/core/plot/schematic/StoredEntity.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.schematic; +package com.plotsquared.core.plot.schematic; import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.Entity; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/DefaultPlotAreaManager.java b/Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/DefaultPlotAreaManager.java rename to Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java index 0fd004f1b..3769347a4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/DefaultPlotAreaManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.worlds; +package com.plotsquared.core.plot.world; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.area.QuadMap; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.collection.QuadMap; import com.sk89q.worldedit.regions.CuboidRegion; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/PlotAreaManager.java b/Core/src/main/java/com/plotsquared/core/plot/world/PlotAreaManager.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/PlotAreaManager.java rename to Core/src/main/java/com/plotsquared/core/plot/world/PlotAreaManager.java index 6564c11ea..953a7cd6f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/PlotAreaManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/world/PlotAreaManager.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.worlds; +package com.plotsquared.core.plot.world; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; import com.sk89q.worldedit.regions.CuboidRegion; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlot.java b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlot.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlot.java rename to Core/src/main/java/com/plotsquared/core/plot/world/SinglePlot.java index 8545688fa..24f3e610f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlot.java @@ -23,14 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.worlds; +package com.plotsquared.core.plot.world; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.BlockLoc; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.location.BlockLoc; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; import org.jetbrains.annotations.NotNull; @@ -78,7 +78,7 @@ public class SinglePlot extends Plot { getCenter(result); } - @Override protected boolean isLoaded() { + @Override public boolean isLoaded() { getArea().loadWorld(getId()); return super.isLoaded(); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotArea.java b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotArea.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotArea.java rename to Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotArea.java index 5f6011949..39af62076 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotArea.java +++ b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotArea.java @@ -23,26 +23,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.worlds; +package com.plotsquared.core.plot.world; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Configuration; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.flags.FlagContainer; -import com.github.intellectualsites.plotsquared.plot.generator.GridPlotWorld; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotLoc; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.PlotSettings; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.ConfigurationUtil; +import com.plotsquared.core.configuration.ConfigurationNode; +import com.plotsquared.core.generator.SingleWorldGenerator; +import com.plotsquared.core.plot.flag.FlagContainer; +import com.plotsquared.core.generator.GridPlotWorld; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.location.PlotLoc; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.plot.PlotSettings; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.SetupObject; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.WorldUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -150,7 +151,7 @@ public class SinglePlotArea extends GridPlotWorld { @Override public ConfigurationNode[] getSettingNodes() { return new ConfigurationNode[] { - new ConfigurationNode("void", this.VOID, "Void world", Configuration.BOOLEAN)}; + new ConfigurationNode("void", this.VOID, "Void world", ConfigurationUtil.BOOLEAN)}; } @Nullable @Override public Plot getOwnedPlot(@NotNull final Location location) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotAreaManager.java b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotAreaManager.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotAreaManager.java rename to Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotAreaManager.java index 9f5416ab1..6f13bc7cd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotAreaManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotAreaManager.java @@ -23,12 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.worlds; +package com.plotsquared.core.plot.world; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.util.ArrayUtil; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; +import com.plotsquared.core.generator.SingleWorldGenerator; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.collection.ArrayUtil; +import com.plotsquared.core.util.SetupUtils; import com.sk89q.worldedit.regions.CuboidRegion; import org.jetbrains.annotations.NotNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotManager.java b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotManager.java rename to Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java index 79e049acb..0e014baba 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/worlds/SinglePlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java @@ -23,17 +23,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.worlds; +package com.plotsquared.core.plot.world; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.SetupUtils; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.worldedit.function.pattern.Pattern; import java.io.File; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/AreaBoundDelegateLocalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/AreaBoundDelegateLocalBlockQueue.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/AreaBoundDelegateLocalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/AreaBoundDelegateLocalBlockQueue.java index e5313fe3e..7ac07db57 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/AreaBoundDelegateLocalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/AreaBoundDelegateLocalBlockQueue.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; +import com.plotsquared.core.plot.PlotArea; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/BasicLocalBlockQueue.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/BasicLocalBlockQueue.java index 4f0445124..d63403975 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/BasicLocalBlockQueue.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.world.PatternUtil; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.PatternUtil; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/ChunkBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/ChunkBlockQueue.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/ChunkBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/ChunkBlockQueue.java index 40c4f5a97..17bd6eb83 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/ChunkBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/ChunkBlockQueue.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; -import com.github.intellectualsites.plotsquared.plot.object.Location; +import com.plotsquared.core.location.Location; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/DelegateLocalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/DelegateLocalBlockQueue.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/DelegateLocalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/DelegateLocalBlockQueue.java index 33a0f50db..22176671c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/DelegateLocalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/DelegateLocalBlockQueue.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.biome.BiomeType; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/GlobalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/GlobalBlockQueue.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/GlobalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/GlobalBlockQueue.java index 005ad4cd3..68a059583 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/GlobalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/GlobalBlockQueue.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.util.task.RunnableVal2; +import com.plotsquared.core.util.task.TaskManager; import java.util.ArrayList; import java.util.ConcurrentModificationException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/LocalBlockQueue.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/LocalBlockQueue.java index 36402fdda..570488307 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/LocalBlockQueue.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; -import com.github.intellectualsites.plotsquared.plot.util.world.PatternUtil; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.WorldUtil; +import com.plotsquared.core.util.PatternUtil; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector2; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocationOffsetDelegateLocalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/LocationOffsetDelegateLocalBlockQueue.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocationOffsetDelegateLocalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/LocationOffsetDelegateLocalBlockQueue.java index 1a5ad5aa1..966cb36a6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocationOffsetDelegateLocalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/LocationOffsetDelegateLocalBlockQueue.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; +import com.plotsquared.core.PlotSquared; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.biome.BiomeType; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/OffsetLocalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/OffsetLocalBlockQueue.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/OffsetLocalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/OffsetLocalBlockQueue.java index f44625ef5..06233277d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/OffsetLocalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/OffsetLocalBlockQueue.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/QueueProvider.java b/Core/src/main/java/com/plotsquared/core/queue/QueueProvider.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/QueueProvider.java rename to Core/src/main/java/com/plotsquared/core/queue/QueueProvider.java index a51db8548..2fee2fa99 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/QueueProvider.java +++ b/Core/src/main/java/com/plotsquared/core/queue/QueueProvider.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; public abstract class QueueProvider { public static QueueProvider of(final Class primary, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/ScopedLocalBlockQueue.java b/Core/src/main/java/com/plotsquared/core/queue/ScopedLocalBlockQueue.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/ScopedLocalBlockQueue.java rename to Core/src/main/java/com/plotsquared/core/queue/ScopedLocalBlockQueue.java index 1bf878057..0c85301c5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/ScopedLocalBlockQueue.java +++ b/Core/src/main/java/com/plotsquared/core/queue/ScopedLocalBlockQueue.java @@ -23,14 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.block; +package com.plotsquared.core.queue; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotManager; +import com.plotsquared.core.util.task.RunnableVal3; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/BlockUtil.java b/Core/src/main/java/com/plotsquared/core/util/BlockUtil.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/BlockUtil.java rename to Core/src/main/java/com/plotsquared/core/util/BlockUtil.java index 94b7cf777..2eef1e3f6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/BlockUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/BlockUtil.java @@ -23,9 +23,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.world; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ChatManager.java b/Core/src/main/java/com/plotsquared/core/util/ChatManager.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ChatManager.java rename to Core/src/main/java/com/plotsquared/core/util/ChatManager.java index 7f4b50b2a..e6f741219 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ChatManager.java +++ b/Core/src/main/java/com/plotsquared/core/util/ChatManager.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.message.PlotMessage; +import com.plotsquared.core.player.PlotPlayer; public abstract class ChatManager { public static ChatManager manager; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ChunkManager.java b/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ChunkManager.java rename to Core/src/main/java/com/plotsquared/core/util/ChunkManager.java index 09a7ac635..6a938b7e6 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ChunkManager.java +++ b/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java @@ -23,15 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.queue.GlobalBlockQueue; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.queue.ScopedLocalBlockQueue; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.regions.CuboidRegion; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ConsoleColors.java b/Core/src/main/java/com/plotsquared/core/util/ConsoleColors.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ConsoleColors.java rename to Core/src/main/java/com/plotsquared/core/util/ConsoleColors.java index 315a9ba47..deee70a24 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ConsoleColors.java +++ b/Core/src/main/java/com/plotsquared/core/util/ConsoleColors.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; public class ConsoleColors { public static String fromString(String input) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EconHandler.java b/Core/src/main/java/com/plotsquared/core/util/EconHandler.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EconHandler.java rename to Core/src/main/java/com/plotsquared/core/util/EconHandler.java index f04bb5459..15180e68e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EconHandler.java +++ b/Core/src/main/java/com/plotsquared/core/util/EconHandler.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.player.PlotPlayer; public abstract class EconHandler { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EntityUtil.java b/Core/src/main/java/com/plotsquared/core/util/EntityUtil.java similarity index 77% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EntityUtil.java rename to Core/src/main/java/com/plotsquared/core/util/EntityUtil.java index 90c841c68..e0e579171 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EntityUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/EntityUtil.java @@ -23,21 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.Plot; import lombok.NonNull; import lombok.experimental.UtilityClass; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ANIMAL; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_ENTITY; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MISC; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MOB; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_MONSTER; -import static com.github.intellectualsites.plotsquared.plot.util.entity.EntityCategories.CAP_VEHICLE; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_ANIMAL; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_ENTITY; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MISC; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MOB; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_MONSTER; +import static com.plotsquared.core.util.entity.EntityCategories.CAP_VEHICLE; /** * Entity related general utility methods diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EventDispatcher.java b/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java similarity index 85% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EventDispatcher.java rename to Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java index 50f28d56c..e64c3b919 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EventDispatcher.java +++ b/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java @@ -23,20 +23,51 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.events.*; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.*; -import com.github.intellectualsites.plotsquared.plot.flags.types.BlockTypeWrapper; -import com.github.intellectualsites.plotsquared.plot.listener.PlayerBlockEventType; -import com.github.intellectualsites.plotsquared.plot.object.*; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.events.PlayerAutoPlotEvent; +import com.plotsquared.core.events.PlayerClaimPlotEvent; +import com.plotsquared.core.events.PlayerEnterPlotEvent; +import com.plotsquared.core.events.PlayerLeavePlotEvent; +import com.plotsquared.core.events.PlayerPlotDeniedEvent; +import com.plotsquared.core.events.PlayerPlotHelperEvent; +import com.plotsquared.core.events.PlayerPlotTrustedEvent; +import com.plotsquared.core.events.PlayerTeleportToPlotEvent; +import com.plotsquared.core.events.PlotAutoMergeEvent; +import com.plotsquared.core.events.PlotChangeOwnerEvent; +import com.plotsquared.core.events.PlotClearEvent; +import com.plotsquared.core.events.PlotComponentSetEvent; +import com.plotsquared.core.events.PlotDeleteEvent; +import com.plotsquared.core.events.PlotDoneEvent; +import com.plotsquared.core.events.PlotEvent; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.PlotMergeEvent; +import com.plotsquared.core.events.PlotRateEvent; +import com.plotsquared.core.events.PlotUnlinkEvent; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.DeviceInteractFlag; +import com.plotsquared.core.plot.flag.implementations.MiscPlaceFlag; +import com.plotsquared.core.plot.flag.implementations.MobPlaceFlag; +import com.plotsquared.core.plot.flag.implementations.PlaceFlag; +import com.plotsquared.core.plot.flag.implementations.UseFlag; +import com.plotsquared.core.plot.flag.implementations.VehiclePlaceFlag; +import com.plotsquared.core.plot.flag.types.BlockTypeWrapper; +import com.plotsquared.core.listener.PlayerBlockEventType; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.Rating; +import com.plotsquared.core.plot.world.SinglePlotArea; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.util.task.TaskManager; import com.google.common.eventbus.EventBus; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockType; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Expression.java b/Core/src/main/java/com/plotsquared/core/util/Expression.java similarity index 91% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Expression.java rename to Core/src/main/java/com/plotsquared/core/util/Expression.java index 055adebab..86bdeea2d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Expression.java +++ b/Core/src/main/java/com/plotsquared/core/util/Expression.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.DebugExec; -import com.github.intellectualsites.plotsquared.plot.commands.MainCommand; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.command.DebugExec; +import com.plotsquared.core.command.MainCommand; import javax.script.ScriptException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/FileBytes.java b/Core/src/main/java/com/plotsquared/core/util/FileBytes.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/FileBytes.java rename to Core/src/main/java/com/plotsquared/core/util/FileBytes.java index ce7875664..e582aa7b7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/FileBytes.java +++ b/Core/src/main/java/com/plotsquared/core/util/FileBytes.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util; public class FileBytes { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/InventoryUtil.java b/Core/src/main/java/com/plotsquared/core/util/InventoryUtil.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/InventoryUtil.java rename to Core/src/main/java/com/plotsquared/core/util/InventoryUtil.java index 046f3d614..c203a9656 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/InventoryUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/InventoryUtil.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.object.PlotInventory; -import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.plot.PlotInventory; +import com.plotsquared.core.plot.PlotItemStack; +import com.plotsquared.core.player.PlotPlayer; /** * This class is only used by internal functions, for most cases use the PlotInventory class diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/ItemUtil.java b/Core/src/main/java/com/plotsquared/core/util/ItemUtil.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/ItemUtil.java rename to Core/src/main/java/com/plotsquared/core/util/ItemUtil.java index 7014605fe..f0594b4d7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/ItemUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/ItemUtil.java @@ -23,9 +23,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.world; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.util.MathMan; import com.sk89q.worldedit.world.item.ItemType; import com.sk89q.worldedit.world.item.ItemTypes; import com.sk89q.worldedit.world.registry.LegacyMapper; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/LazyBlock.java b/Core/src/main/java/com/plotsquared/core/util/LazyBlock.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/LazyBlock.java rename to Core/src/main/java/com/plotsquared/core/util/LazyBlock.java index 23fa9ef91..a8a8970f8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/LazyBlock.java +++ b/Core/src/main/java/com/plotsquared/core/util/LazyBlock.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util; import com.sk89q.worldedit.world.block.BlockState; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/LazyResult.java b/Core/src/main/java/com/plotsquared/core/util/LazyResult.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/LazyResult.java rename to Core/src/main/java/com/plotsquared/core/util/LazyResult.java index f3dcdc4ab..ae2be3a19 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/LazyResult.java +++ b/Core/src/main/java/com/plotsquared/core/util/LazyResult.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util; public abstract class LazyResult { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/LegacyConverter.java b/Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java similarity index 92% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/LegacyConverter.java rename to Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java index c8bb2ac82..e930c6aec 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/LegacyConverter.java +++ b/Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java @@ -23,14 +23,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.BlockBucket; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.plot.BlockBucket; +import com.plotsquared.core.player.ConsolePlayer; import com.sk89q.worldedit.world.block.BlockState; import lombok.NonNull; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/MainUtil.java b/Core/src/main/java/com/plotsquared/core/util/MainUtil.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/MainUtil.java rename to Core/src/main/java/com/plotsquared/core/util/MainUtil.java index 68d6010fe..8893499ab 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/MainUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/MainUtil.java @@ -23,31 +23,34 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.Like; -import com.github.intellectualsites.plotsquared.plot.config.Caption; -import com.github.intellectualsites.plotsquared.plot.config.CaptionUtility; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DescriptionFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.ServerPlotFlag; -import com.github.intellectualsites.plotsquared.plot.flags.types.DoubleFlag; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; -import com.github.intellectualsites.plotsquared.plot.object.PlotAreaType; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.stream.AbstractDelegateOutputStream; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.util.net.AbstractDelegateOutputStream; +import com.plotsquared.core.configuration.ConfigurationSection; +import com.plotsquared.core.player.ConsolePlayer; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.command.Like; +import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.plot.expiration.ExpireManager; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.flag.implementations.DescriptionFlag; +import com.plotsquared.core.plot.flag.implementations.ServerPlotFlag; +import com.plotsquared.core.plot.flag.types.DoubleFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotAreaTerrainType; +import com.plotsquared.core.plot.PlotAreaType; +import com.plotsquared.core.plot.PlotId; + +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.util.uuid.UUIDHandler; import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; @@ -658,7 +661,8 @@ public class MainUtil { public static boolean sendMessage(PlotPlayer player, @NotNull String msg, boolean prefix) { if (!msg.isEmpty()) { if (player == null) { - String message = CaptionUtility.format(null, (prefix ? Captions.PREFIX.getTranslated() : "") + msg); + String message = CaptionUtility + .format(null, (prefix ? Captions.PREFIX.getTranslated() : "") + msg); PlotSquared.log(message); } else { player.sendMessage( diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/MathMan.java b/Core/src/main/java/com/plotsquared/core/util/MathMan.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/MathMan.java rename to Core/src/main/java/com/plotsquared/core/util/MathMan.java index 8a989d1a8..3373e4ed7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/MathMan.java +++ b/Core/src/main/java/com/plotsquared/core/util/MathMan.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; public class MathMan { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/OperationUtil.java b/Core/src/main/java/com/plotsquared/core/util/OperationUtil.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/OperationUtil.java rename to Core/src/main/java/com/plotsquared/core/util/OperationUtil.java index 88216bccc..af2df598e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/OperationUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/OperationUtil.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.world; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.player.PlotPlayer; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListeningExecutorService; import com.sk89q.worldedit.EditSession; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/PatternUtil.java b/Core/src/main/java/com/plotsquared/core/util/PatternUtil.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/PatternUtil.java rename to Core/src/main/java/com/plotsquared/core/util/PatternUtil.java index a73b24425..146215c52 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/PatternUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/PatternUtil.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.world; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.command.Command; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; import com.google.common.base.Preconditions; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.entity.Player; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/Permissions.java b/Core/src/main/java/com/plotsquared/core/util/Permissions.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/Permissions.java rename to Core/src/main/java/com/plotsquared/core/util/Permissions.java index da8193c9f..186439fc9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/Permissions.java +++ b/Core/src/main/java/com/plotsquared/core/util/Permissions.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.commands.CommandCaller; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.command.CommandCaller; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.player.PlotPlayer; import java.util.HashMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/PremiumVerification.java b/Core/src/main/java/com/plotsquared/core/util/PremiumVerification.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/PremiumVerification.java rename to Core/src/main/java/com/plotsquared/core/util/PremiumVerification.java index 9ae73e1c0..3e3f57efa 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/PremiumVerification.java +++ b/Core/src/main/java/com/plotsquared/core/util/PremiumVerification.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; public class PremiumVerification { private static Boolean usingPremium; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PseudoRandom.java b/Core/src/main/java/com/plotsquared/core/util/PseudoRandom.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PseudoRandom.java rename to Core/src/main/java/com/plotsquared/core/util/PseudoRandom.java index 6924aab3d..cb5a2d0c2 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PseudoRandom.java +++ b/Core/src/main/java/com/plotsquared/core/util/PseudoRandom.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util; public class PseudoRandom { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ReflectionUtils.java b/Core/src/main/java/com/plotsquared/core/util/ReflectionUtils.java similarity index 99% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ReflectionUtils.java rename to Core/src/main/java/com/plotsquared/core/util/ReflectionUtils.java index e3192f9b7..afe86e83b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ReflectionUtils.java +++ b/Core/src/main/java/com/plotsquared/core/util/ReflectionUtils.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; import java.lang.reflect.Constructor; import java.lang.reflect.Field; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/RegExUtil.java b/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/RegExUtil.java rename to Core/src/main/java/com/plotsquared/core/util/RegExUtil.java index 57e1e45d6..90f3e1350 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/RegExUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; import java.util.HashMap; import java.util.Map; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/RegionUtil.java b/Core/src/main/java/com/plotsquared/core/util/RegionUtil.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/RegionUtil.java rename to Core/src/main/java/com/plotsquared/core/util/RegionUtil.java index 055f0c209..fe4d83a96 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/world/RegionUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/RegionUtil.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.world; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.plotsquared.core.plot.Plot; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/RuntimeExceptionRunnableVal.java b/Core/src/main/java/com/plotsquared/core/util/RuntimeExceptionRunnableVal.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/RuntimeExceptionRunnableVal.java rename to Core/src/main/java/com/plotsquared/core/util/RuntimeExceptionRunnableVal.java index 435bf0bc4..56bb9cc70 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/RuntimeExceptionRunnableVal.java +++ b/Core/src/main/java/com/plotsquared/core/util/RuntimeExceptionRunnableVal.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; +import com.plotsquared.core.util.task.RunnableVal; import lombok.RequiredArgsConstructor; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SchematicHandler.java b/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SchematicHandler.java rename to Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java index e13b60b40..d110626f9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SchematicHandler.java +++ b/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java @@ -23,17 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.generator.ClassicPlotWorld; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.schematic.Schematic; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.generator.ClassicPlotWorld; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.util.uuid.UUIDHandler; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.schematic.Schematic; +import com.plotsquared.core.queue.LocalBlockQueue; +import com.plotsquared.core.util.task.TaskManager; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.NBTInputStream; import com.sk89q.jnbt.NBTOutputStream; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SetupUtils.java b/Core/src/main/java/com/plotsquared/core/util/SetupUtils.java similarity index 86% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SetupUtils.java rename to Core/src/main/java/com/plotsquared/core/util/SetupUtils.java index 5e8b4992b..477c99715 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SetupUtils.java +++ b/Core/src/main/java/com/plotsquared/core/util/SetupUtils.java @@ -23,11 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; +import com.plotsquared.core.generator.GeneratorWrapper; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.SetupObject; import java.util.HashMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/StringComparison.java b/Core/src/main/java/com/plotsquared/core/util/StringComparison.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/StringComparison.java rename to Core/src/main/java/com/plotsquared/core/util/StringComparison.java index d26d905aa..42af58b88 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/StringComparison.java +++ b/Core/src/main/java/com/plotsquared/core/util/StringComparison.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; import java.util.ArrayList; import java.util.Collection; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/StringMan.java b/Core/src/main/java/com/plotsquared/core/util/StringMan.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/StringMan.java rename to Core/src/main/java/com/plotsquared/core/util/StringMan.java index cad39f199..c5c215d67 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/StringMan.java +++ b/Core/src/main/java/com/plotsquared/core/util/StringMan.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.config.Caption; +import com.plotsquared.core.configuration.Caption; import org.jetbrains.annotations.NotNull; import java.lang.reflect.Array; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/StringWrapper.java b/Core/src/main/java/com/plotsquared/core/util/StringWrapper.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/StringWrapper.java rename to Core/src/main/java/com/plotsquared/core/util/StringWrapper.java index 8d5fe66c5..e2d048346 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/StringWrapper.java +++ b/Core/src/main/java/com/plotsquared/core/util/StringWrapper.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util; /** * diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WEManager.java b/Core/src/main/java/com/plotsquared/core/util/WEManager.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WEManager.java rename to Core/src/main/java/com/plotsquared/core/util/WEManager.java index c64910f9c..9734a562a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WEManager.java +++ b/Core/src/main/java/com/plotsquared/core/util/WEManager.java @@ -23,17 +23,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.listener; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.DoneFlag; -import com.github.intellectualsites.plotsquared.plot.flags.implementations.NoWorldeditFlag; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.world.RegionUtil; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.plot.flag.implementations.DoneFlag; +import com.plotsquared.core.plot.flag.implementations.NoWorldeditFlag; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/WorldUtil.java b/Core/src/main/java/com/plotsquared/core/util/WorldUtil.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/WorldUtil.java rename to Core/src/main/java/com/plotsquared/core/util/WorldUtil.java index 7924b9a1b..33ce89694 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/WorldUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/WorldUtil.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.IntTag; import com.sk89q.jnbt.NBTInputStream; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/entity/EntityCategories.java b/Core/src/main/java/com/plotsquared/core/util/entity/EntityCategories.java similarity index 97% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/entity/EntityCategories.java rename to Core/src/main/java/com/plotsquared/core/util/entity/EntityCategories.java index 36ec700cd..485db847b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/entity/EntityCategories.java +++ b/Core/src/main/java/com/plotsquared/core/util/entity/EntityCategories.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.entity; +package com.plotsquared.core.util.entity; /** * A collection of {@link EntityCategory entity categories} diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/entity/EntityCategory.java b/Core/src/main/java/com/plotsquared/core/util/entity/EntityCategory.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/entity/EntityCategory.java rename to Core/src/main/java/com/plotsquared/core/util/entity/EntityCategory.java index f6cfa85f0..60f7190ef 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/entity/EntityCategory.java +++ b/Core/src/main/java/com/plotsquared/core/util/entity/EntityCategory.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.entity; +package com.plotsquared.core.util.entity; -import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; +import com.plotsquared.core.util.WorldUtil; import com.sk89q.worldedit.registry.Category; import com.sk89q.worldedit.registry.Keyed; import com.sk89q.worldedit.registry.NamespacedRegistry; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpMenu.java b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpMenu.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpMenu.java rename to Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpMenu.java index 84688e63d..11defc7f0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpMenu.java +++ b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpMenu.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.helpmenu; +package com.plotsquared.core.util.helpmenu; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.plot.commands.CommandCategory; -import com.github.intellectualsites.plotsquared.plot.commands.MainCommand; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.command.Command; +import com.plotsquared.core.command.CommandCategory; +import com.plotsquared.core.command.MainCommand; +import com.plotsquared.core.player.PlotPlayer; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpObject.java b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpObject.java similarity index 87% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpObject.java rename to Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpObject.java index 736b50b6c..f33a1f519 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpObject.java +++ b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpObject.java @@ -23,12 +23,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.helpmenu; +package com.plotsquared.core.util.helpmenu; -import com.github.intellectualsites.plotsquared.commands.Argument; -import com.github.intellectualsites.plotsquared.commands.Command; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.command.Argument; +import com.plotsquared.core.command.Command; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.util.StringMan; public class HelpObject { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpPage.java b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java similarity index 84% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpPage.java rename to Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java index b1ae95fac..610fdeb4e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/helpmenu/HelpPage.java +++ b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java @@ -23,13 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util.helpmenu; +package com.plotsquared.core.util.helpmenu; -import com.github.intellectualsites.plotsquared.plot.commands.CommandCategory; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import com.plotsquared.core.command.CommandCategory; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.MainUtil; +import com.plotsquared.core.util.StringMan; import java.util.ArrayList; import java.util.List; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/logger/DelegateLogger.java b/Core/src/main/java/com/plotsquared/core/util/logger/DelegateLogger.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/logger/DelegateLogger.java rename to Core/src/main/java/com/plotsquared/core/util/logger/DelegateLogger.java index c322b8a1d..81e11cada 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/logger/DelegateLogger.java +++ b/Core/src/main/java/com/plotsquared/core/util/logger/DelegateLogger.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.logger; +package com.plotsquared.core.util.logger; public class DelegateLogger implements ILogger { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/logger/ILogger.java b/Core/src/main/java/com/plotsquared/core/util/logger/ILogger.java similarity index 95% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/logger/ILogger.java rename to Core/src/main/java/com/plotsquared/core/util/logger/ILogger.java index 474ce5942..3f9b3d598 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/logger/ILogger.java +++ b/Core/src/main/java/com/plotsquared/core/util/logger/ILogger.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.logger; +package com.plotsquared.core.util.logger; public interface ILogger { void log(String message); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/stream/AbstractDelegateOutputStream.java b/Core/src/main/java/com/plotsquared/core/util/net/AbstractDelegateOutputStream.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/stream/AbstractDelegateOutputStream.java rename to Core/src/main/java/com/plotsquared/core/util/net/AbstractDelegateOutputStream.java index 674b6dee9..f2b8f2d59 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/stream/AbstractDelegateOutputStream.java +++ b/Core/src/main/java/com/plotsquared/core/util/net/AbstractDelegateOutputStream.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object.stream; +package com.plotsquared.core.util.net; import java.io.IOException; import java.io.OutputStream; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/HttpUtil.java b/Core/src/main/java/com/plotsquared/core/util/net/HttpUtil.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/HttpUtil.java rename to Core/src/main/java/com/plotsquared/core/util/net/HttpUtil.java index 99b796446..607a0fa2b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/HttpUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/net/HttpUtil.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util.net; -import com.github.intellectualsites.plotsquared.plot.config.Settings; +import com.plotsquared.core.configuration.Settings; import java.io.BufferedReader; import java.io.IOException; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/IncendoPaster.java b/Core/src/main/java/com/plotsquared/core/util/net/IncendoPaster.java similarity index 98% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/IncendoPaster.java rename to Core/src/main/java/com/plotsquared/core/util/net/IncendoPaster.java index 90366c996..16b30da39 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/IncendoPaster.java +++ b/Core/src/main/java/com/plotsquared/core/util/net/IncendoPaster.java @@ -23,9 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util.net; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; +import com.plotsquared.core.PlotSquared; import com.google.common.base.Charsets; import java.io.BufferedReader; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/AutoClaimFinishTask.java b/Core/src/main/java/com/plotsquared/core/util/task/AutoClaimFinishTask.java similarity index 73% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/AutoClaimFinishTask.java rename to Core/src/main/java/com/plotsquared/core/util/task/AutoClaimFinishTask.java index 97a7b03e5..8e7640eda 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/AutoClaimFinishTask.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/AutoClaimFinishTask.java @@ -23,22 +23,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util.task; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.Auto; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.events.PlotMergeEvent; -import com.github.intellectualsites.plotsquared.plot.events.Result; -import com.github.intellectualsites.plotsquared.plot.object.Direction; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.command.Auto; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.events.PlotMergeEvent; +import com.plotsquared.core.events.Result; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.player.PlotPlayer; import lombok.RequiredArgsConstructor; -import static com.github.intellectualsites.plotsquared.plot.util.MainUtil.sendMessage; +import static com.plotsquared.core.util.MainUtil.sendMessage; @RequiredArgsConstructor public final class AutoClaimFinishTask extends RunnableVal { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ObjectTaskRunnable.java b/Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ObjectTaskRunnable.java rename to Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java index c6dc2ebb3..62be029fe 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/ObjectTaskRunnable.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java @@ -23,9 +23,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util.task; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; import lombok.RequiredArgsConstructor; import java.util.Iterator; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal.java b/Core/src/main/java/com/plotsquared/core/util/task/RunnableVal.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal.java rename to Core/src/main/java/com/plotsquared/core/util/task/RunnableVal.java index 9a3d2a0f8..e69637944 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/RunnableVal.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util.task; public abstract class RunnableVal implements Runnable { public T value; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal2.java b/Core/src/main/java/com/plotsquared/core/util/task/RunnableVal2.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal2.java rename to Core/src/main/java/com/plotsquared/core/util/task/RunnableVal2.java index b9b297462..d7da4be93 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal2.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/RunnableVal2.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util.task; public abstract class RunnableVal2 implements Runnable { public T value1; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal3.java b/Core/src/main/java/com/plotsquared/core/util/task/RunnableVal3.java similarity index 96% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal3.java rename to Core/src/main/java/com/plotsquared/core/util/task/RunnableVal3.java index d7ef2b454..2a71222d4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/RunnableVal3.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/RunnableVal3.java @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.util.task; public abstract class RunnableVal3 implements Runnable { public T value1; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/TaskManager.java b/Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java similarity index 94% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/TaskManager.java rename to Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java index 6db07763f..0aefe9e08 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/TaskManager.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util.task; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.util.RuntimeExceptionRunnableVal; import java.util.Collection; import java.util.HashMap; @@ -131,7 +131,8 @@ public abstract class TaskManager { return function.value; } final AtomicBoolean running = new AtomicBoolean(true); - final RuntimeExceptionRunnableVal run = new RuntimeExceptionRunnableVal<>(function, running); + final RuntimeExceptionRunnableVal + run = new RuntimeExceptionRunnableVal<>(function, running); TaskManager.IMP.task(run); try { synchronized (function) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandler.java b/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandler.java similarity index 90% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandler.java rename to Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandler.java index ed882742b..8cafdde93 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandler.java +++ b/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandler.java @@ -23,16 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util.uuid; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.StringWrapper; import com.google.common.collect.BiMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandlerImplementation.java b/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandlerImplementation.java similarity index 93% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandlerImplementation.java rename to Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandlerImplementation.java index 619a2bd14..f899b640c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandlerImplementation.java +++ b/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandlerImplementation.java @@ -23,18 +23,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.util.uuid; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.core.PlotSquared; +import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.util.StringMan; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.StringWrapper; +import com.plotsquared.core.util.task.TaskManager; import com.google.common.base.Charsets; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/uuid/UUIDWrapper.java b/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDWrapper.java similarity index 89% rename from Core/src/main/java/com/github/intellectualsites/plotsquared/plot/uuid/UUIDWrapper.java rename to Core/src/main/java/com/plotsquared/core/util/uuid/UUIDWrapper.java index b8f30ed16..14c5a03ce 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/uuid/UUIDWrapper.java +++ b/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDWrapper.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.uuid; +package com.plotsquared.core.util.uuid; -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; +import com.plotsquared.core.player.OfflinePlotPlayer; +import com.plotsquared.core.player.PlotPlayer; import org.jetbrains.annotations.NotNull; import java.util.UUID; diff --git a/Core/src/main/resources/mycommand.js b/Core/src/main/resources/mycommand.js index d4858bb97..1ad9cf1b5 100644 --- a/Core/src/main/resources/mycommand.js +++ b/Core/src/main/resources/mycommand.js @@ -24,4 +24,4 @@ * along with this program. If not, see . */ // This command is registered from the start.js file which is run during startup -PlotPlayer.sendMessage("Hello World!"); \ No newline at end of file +PlotPlayer.sendMessage("Hello World!"); diff --git a/Core/src/main/resources/start.js b/Core/src/main/resources/start.js index 821919e00..ce1e6ca3b 100644 --- a/Core/src/main/resources/start.js +++ b/Core/src/main/resources/start.js @@ -29,4 +29,4 @@ var commands = ["mycommand"]; // Command registration: for (var i in commands) { MainCommand.class.static.onCommand(PlotPlayer, "plot", "debugexec", "addcmd", commands[i] + ".js"); -} \ No newline at end of file +} diff --git a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/database/AbstractDBTest.java b/Core/src/test/java/com/plotsquared/core/database/AbstractDBTest.java similarity index 91% rename from Core/src/test/java/com/github/intellectualsites/plotsquared/plot/database/AbstractDBTest.java rename to Core/src/test/java/com/plotsquared/core/database/AbstractDBTest.java index 7ff22cbde..0dbe97480 100644 --- a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/database/AbstractDBTest.java +++ b/Core/src/test/java/com/plotsquared/core/database/AbstractDBTest.java @@ -23,15 +23,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.database; +package com.plotsquared.core.database; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotCluster; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotCluster; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.plot.comment.PlotComment; import org.jetbrains.annotations.NotNull; import java.util.HashMap; diff --git a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/FlagTest.java b/Core/src/test/java/com/plotsquared/core/plot/FlagTest.java similarity index 92% rename from Core/src/test/java/com/github/intellectualsites/plotsquared/plot/FlagTest.java rename to Core/src/test/java/com/plotsquared/core/plot/FlagTest.java index 56503b11c..5f8d2859f 100644 --- a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/FlagTest.java +++ b/Core/src/test/java/com/plotsquared/core/plot/FlagTest.java @@ -23,10 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot; +package com.plotsquared.core.plot; -import com.github.intellectualsites.plotsquared.plot.database.AbstractDBTest; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; +import com.plotsquared.core.database.AbstractDBTest; +import com.plotsquared.core.database.DBFunc; import com.sk89q.worldedit.world.item.ItemType; import org.junit.Before; diff --git a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/PlotVersionTest.java b/Core/src/test/java/com/plotsquared/core/plot/PlotVersionTest.java similarity index 95% rename from Core/src/test/java/com/github/intellectualsites/plotsquared/plot/PlotVersionTest.java rename to Core/src/test/java/com/plotsquared/core/plot/PlotVersionTest.java index 30c6013bc..71a73c45a 100644 --- a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/PlotVersionTest.java +++ b/Core/src/test/java/com/plotsquared/core/plot/PlotVersionTest.java @@ -23,8 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot; +package com.plotsquared.core.plot; +import com.plotsquared.core.PlotVersion; import org.junit.Test; public class PlotVersionTest { diff --git a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/object/LocationTest.java b/Core/src/test/java/com/plotsquared/core/plot/object/LocationTest.java similarity index 95% rename from Core/src/test/java/com/github/intellectualsites/plotsquared/plot/object/LocationTest.java rename to Core/src/test/java/com/plotsquared/core/plot/object/LocationTest.java index bc58d6703..cef1b4c94 100644 --- a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/object/LocationTest.java +++ b/Core/src/test/java/com/plotsquared/core/plot/object/LocationTest.java @@ -23,8 +23,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.object; +package com.plotsquared.core.plot.object; +import com.plotsquared.core.location.Location; import org.junit.Test; import java.util.logging.Logger; diff --git a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/util/EventDispatcherTest.java b/Core/src/test/java/com/plotsquared/core/plot/util/EventDispatcherTest.java similarity index 72% rename from Core/src/test/java/com/github/intellectualsites/plotsquared/plot/util/EventDispatcherTest.java rename to Core/src/test/java/com/plotsquared/core/plot/util/EventDispatcherTest.java index bb1ff9501..319850389 100644 --- a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/util/EventDispatcherTest.java +++ b/Core/src/test/java/com/plotsquared/core/plot/util/EventDispatcherTest.java @@ -23,11 +23,36 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.plot.util; -import com.github.intellectualsites.plotsquared.plot.events.*; -import com.github.intellectualsites.plotsquared.plot.flags.PlotFlag; -import com.github.intellectualsites.plotsquared.plot.object.*; +import com.plotsquared.core.events.PlayerAutoPlotEvent; +import com.plotsquared.core.events.PlayerClaimPlotEvent; +import com.plotsquared.core.events.PlayerEnterPlotEvent; +import com.plotsquared.core.events.PlayerLeavePlotEvent; +import com.plotsquared.core.events.PlayerPlotDeniedEvent; +import com.plotsquared.core.events.PlayerPlotHelperEvent; +import com.plotsquared.core.events.PlayerPlotTrustedEvent; +import com.plotsquared.core.events.PlayerTeleportToPlotEvent; +import com.plotsquared.core.events.PlotAutoMergeEvent; +import com.plotsquared.core.events.PlotChangeOwnerEvent; +import com.plotsquared.core.events.PlotClearEvent; +import com.plotsquared.core.events.PlotComponentSetEvent; +import com.plotsquared.core.events.PlotDeleteEvent; +import com.plotsquared.core.events.PlotDoneEvent; +import com.plotsquared.core.events.PlotFlagAddEvent; +import com.plotsquared.core.events.PlotFlagRemoveEvent; +import com.plotsquared.core.events.PlotMergeEvent; +import com.plotsquared.core.events.PlotRateEvent; +import com.plotsquared.core.events.PlotUnlinkEvent; +import com.plotsquared.core.player.PlotPlayer; +import com.plotsquared.core.plot.flag.PlotFlag; +import com.plotsquared.core.location.Direction; +import com.plotsquared.core.location.Location; +import com.plotsquared.core.plot.Plot; +import com.plotsquared.core.plot.PlotArea; +import com.plotsquared.core.plot.PlotId; +import com.plotsquared.core.plot.Rating; +import com.plotsquared.core.util.EventDispatcher; import com.sk89q.worldedit.function.pattern.Pattern; import java.util.List; diff --git a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandlerImplementationTest.java b/Core/src/test/java/com/plotsquared/core/plot/util/UUIDHandlerImplementationTest.java similarity index 83% rename from Core/src/test/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandlerImplementationTest.java rename to Core/src/test/java/com/plotsquared/core/plot/util/UUIDHandlerImplementationTest.java index 63ae54037..0452da529 100644 --- a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/util/UUIDHandlerImplementationTest.java +++ b/Core/src/test/java/com/plotsquared/core/plot/util/UUIDHandlerImplementationTest.java @@ -23,12 +23,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.github.intellectualsites.plotsquared.plot.util; +package com.plotsquared.core.plot.util; -import com.github.intellectualsites.plotsquared.plot.database.AbstractDBTest; -import com.github.intellectualsites.plotsquared.plot.database.DBFunc; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; +import com.plotsquared.core.database.AbstractDBTest; +import com.plotsquared.core.database.DBFunc; +import com.plotsquared.core.util.uuid.UUIDHandlerImplementation; +import com.plotsquared.core.util.task.RunnableVal; +import com.plotsquared.core.util.uuid.UUIDWrapper; import org.junit.Before; import java.util.UUID; diff --git a/Nukkit/build.gradle b/Nukkit/build.gradle deleted file mode 100644 index 635cc7ad3..000000000 --- a/Nukkit/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -repositories { - maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } - maven { url "http://nexus.hc.to/content/repositories/pub_releases" } - maven { url "https://repo.potestas.xyz/main/" } - flatDir { dirs 'lib' } -} - -dependencies { - compile project(':Core') - compile 'com.google.guava:guava:17.0' - compile 'cn.nukkit:nukkit:1.0-SNAPSHOT' -} - -configurations.all { - resolutionStrategy { - force 'com.google.guava:guava:17.0' - } -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 -processResources { - from('src/main/resources') { - include 'plugin.yml' - expand( - name: project.parent.name, - version: project.parent.version - ) - } -} -// We only want the shadow jar produced -jar.enabled = false - -shadowJar { - dependencies { - include(dependency(':Core')) - } - archiveName = "${parent.name}-${project.name}-${parent.version}.jar" - destinationDir = file '../target' - - relocate('com.google.gson', 'com.sk89q.worldedit.internal.gson') - relocate 'org.yaml.snakeyaml', 'com.boydti.fawe.yaml' - relocate 'com.google.common', 'com.sk89q.worldedit.internal.common' -} - -shadowJar.doLast { - task -> - ant.checksum file: task.archivePath -} - -build.dependsOn(shadowJar); diff --git a/Nukkit/lib/nukkit-1.0-SNAPSHOT.jar b/Nukkit/lib/nukkit-1.0-SNAPSHOT.jar deleted file mode 100644 index 542094a7b..000000000 Binary files a/Nukkit/lib/nukkit-1.0-SNAPSHOT.jar and /dev/null differ diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/NukkitMain.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/NukkitMain.java deleted file mode 100644 index 06106c8ea..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/NukkitMain.java +++ /dev/null @@ -1,450 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit; - -import cn.nukkit.Nukkit; -import cn.nukkit.OfflinePlayer; -import cn.nukkit.Player; -import cn.nukkit.entity.Entity; -import cn.nukkit.event.Listener; -import cn.nukkit.level.Level; -import cn.nukkit.level.format.FullChunk; -import cn.nukkit.level.generator.Generator; -import cn.nukkit.metadata.MetadataValue; -import cn.nukkit.plugin.Plugin; -import cn.nukkit.plugin.PluginBase; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.nukkit.generator.NukkitPlotGenerator; -import com.github.intellectualsites.plotsquared.nukkit.listeners.PlayerEvents; -import com.github.intellectualsites.plotsquared.nukkit.listeners.WorldEvents; -import com.github.intellectualsites.plotsquared.nukkit.util.*; -import com.github.intellectualsites.plotsquared.nukkit.util.block.NukkitHybridGen; -import com.github.intellectualsites.plotsquared.nukkit.util.block.NukkitLocalQueue; -import com.github.intellectualsites.plotsquared.nukkit.uuid.FileUUIDHandler; -import com.github.intellectualsites.plotsquared.nukkit.uuid.LowerOfflineUUIDWrapper; -import com.github.intellectualsites.plotsquared.plot.IPlotMain; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.C; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.chat.PlainChatManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.util.block.QueueProvider; -import com.sk89q.worldedit.WorldEdit; - -import java.io.File; -import java.lang.reflect.Field; - -public final class NukkitMain extends PluginBase implements Listener, IPlotMain { - - public static WorldEdit worldEdit; - - private int[] version; - private String name; - - @Override public int[] getServerVersion() { - if (this.version == null) { - try { - this.version = new int[3]; - String[] split = Nukkit.API_VERSION.split("\\."); - this.version[0] = Integer.parseInt(split[0]); - this.version[1] = Integer.parseInt(split[1]); - if (split.length == 3) { - this.version[2] = Integer.parseInt(split[2]); - } - } catch (NumberFormatException e) { - return new int[] {1, 0, 0}; - } - } - return this.version; - } - - @Override public void onEnable() { - try { - this.name = getDescription().getName(); - getServer().getName(); - new PlotSquared(this, "Nukkit"); - if (Settings.Enabled_Components.METRICS) { - new Metrics(this).start(); - PlotSquared.log(C.PREFIX + "&6Metrics enabled."); - } else { - PlotSquared.log(C.CONSOLE_PLEASE_ENABLE_METRICS.f(getPluginName())); - } - Generator.addGenerator(NukkitHybridGen.class, getPluginName(), 1); - if (Settings.Enabled_Components.WORLDS) { - TaskManager.IMP.taskRepeat(new Runnable() { - @Override public void run() { - unload(); - } - }, 20); - } - } catch (Throwable e) { - e.printStackTrace(); - } - } - - public void unload() { - PlotAreaManager manager = PlotSquared.get().getPlotAreaManager(); - if (manager instanceof SinglePlotAreaManager) { - long start = System.currentTimeMillis(); - SinglePlotArea area = ((SinglePlotAreaManager) manager).getArea(); - Map worlds = getServer().getLevels(); - Level unload = null; - for (Level world : getServer().getLevels().values()) { - String name = world.getName(); - PlotId id = PlotId.fromString(name); - if (id != null) { - Plot plot = area.getOwnedPlot(id); - if (plot != null) { - List players = plot.getPlayersInPlot(); - if (players.isEmpty() && PlotPlayer.wrap(plot.owner) == null) { - unload = world; - break; - } - } - } - } - if (unload != null) { - Map chunks = unload.getChunks(); - FullChunk[] toUnload = chunks.values().toArray(new FullChunk[chunks.size()]); - for (FullChunk chunk : toUnload) { - try { - chunk.unload(true, false); - } catch (Exception e) { - e.printStackTrace(); - } - if (System.currentTimeMillis() - start > 20) { - return; - } - } - getServer().unloadLevel(unload, true); - } - } - } - - @Override public void onDisable() { - PlotSquared.get().disable(); - getServer().getScheduler().cancelAllTasks(); - } - - @Override public void log(String message) { - try { - message = C.color(message); - if (!Settings.Chat.CONSOLE_COLOR) { - message = message.replaceAll('\u00A7' + "[0-9]", ""); - } - this.getServer().getConsoleSender().sendMessage(message); - } catch (Throwable ignored) { - System.out.println(ConsoleColors.fromString(message)); - } - } - - @Override public void disable() { - onDisable(); - } - - @Override public int[] getPluginVersion() { - String ver = getDescription().getVersion(); - if (ver.contains("-")) { - ver = ver.split("-")[0]; - } - String[] split = ver.split("\\."); - return new int[] {Integer.parseInt(split[0]), Integer.parseInt(split[1]), - Integer.parseInt(split[2])}; - } - - @Override public String getPluginVersionString() { - return getDescription().getVersion(); - } - - @Override public String getPluginName() { - return name; - } - - @Override public void registerCommands() { - NukkitCommand bukkitCommand = - new NukkitCommand("plot", new String[] {"p", "plot", "ps", "plotsquared", "p2", "2"}); - getServer().getCommandMap().register("plot", bukkitCommand); - } - - @Override public File getDirectory() { - return getDataFolder(); - } - - @Override public File getWorldContainer() { - return new File("worlds"); - } - - @Override public TaskManager getTaskManager() { - return new NukkitTaskManager(this); - } - - @Override public void runEntityTask() { - PlotSquared.log(C.PREFIX + "KillAllEntities started."); - TaskManager.runTaskRepeat(new Runnable() { - @Override public void run() { - PlotSquared.get().foreachPlotArea(new RunnableVal() { - @Override public void run(PlotArea plotArea) { - Level world = getServer().getLevelByName(plotArea.getWorldName()); - try { - if (world == null) { - return; - } - Entity[] entities = world.getEntities(); - for (Entity entity : entities) { - if (entity instanceof Player) { - continue; - } - Location location = NukkitUtil.getLocation(entity.getLocation()); - Plot plot = location.getPlot(); - if (plot == null) { - if (location.isPlotArea()) { - entity.kill(); - } - continue; - } - List meta = entity.getMetadata("plot"); - if (meta.isEmpty()) { - continue; - } - Plot origin = (Plot) meta.get(0).value(); - if (!plot.equals(origin.getBasePlot(false))) { - entity.kill(); - } - continue; - } - } catch (Throwable e) { - e.printStackTrace(); - } - } - }); - } - }, 20); - } - - @Override public void registerPlayerEvents() { - getServer().getPluginManager().registerEvents(new PlayerEvents(), this); - } - - @Override public void registerInventoryEvents() { - PlotSquared.debug("Not implemented: registerPlotPlusEvents"); - } - - @Override public void registerPlotPlusEvents() { - PlotSquared.debug("Not implemented: registerPlotPlusEvents"); - } - - @Override public void registerForceFieldEvents() { - PlotSquared.debug("Not implemented: registerPlotPlusEvents"); - } - - @Override public boolean initWorldEdit() { - if (getServer().getPluginManager().getPlugin("WorldEdit") != null) { - worldEdit = WorldEdit.getInstance(); - return true; - } - return false; - } - - @Override public EconHandler getEconomyHandler() { - return null; - } - - @Override public QueueProvider initBlockQueue() { - return QueueProvider.of(NukkitLocalQueue.class, null); - } - - @Override public WorldUtil initWorldUtil() { - return new NukkitUtil(this); - } - - @Override public boolean initPlotMeConverter() { - return false; // No PlotMe for MCPE - } - - @Override public GeneratorWrapper getGenerator(String world, String name) { - if (name == null) { - return null; - } - HashMap map = new HashMap(); - map.put("world", world); - Class gen = Generator.getGenerator(name); - if (gen != null) { - try { - Generator instance = gen.getConstructor(Map.class).newInstance(map); - if (instance instanceof GeneratorWrapper) { - return (GeneratorWrapper) instance; - } - map.put("generator", instance); - return new NukkitPlotGenerator(map); - } catch (Throwable e) { - System.out.println("Failed to create generator for " + name + " | " + gen); - while (e.getCause() != null) { - e = e.getCause(); - } - synchronized (PlotSquared.class) { - e.printStackTrace(); - } - } - } - return new NukkitHybridGen(map); - } - - @Override public HybridUtils initHybridUtils() { - return new NukkitHybridUtils(); - } - - @Override public SetupUtils initSetupUtils() { - return new NukkitSetupUtils(this); - } - - @Override public UUIDHandlerImplementation initUUIDHandler() { - Settings.UUID.FORCE_LOWERCASE = true; - Settings.UUID.OFFLINE = true; - LowerOfflineUUIDWrapper wrapper = new LowerOfflineUUIDWrapper(); - return new FileUUIDHandler(wrapper); - } - - @Override public ChunkManager initChunkManager() { - return new NukkitChunkManager(); - } - - @Override public EventUtil initEventUtil() { - return new NukkitEventUtil(this); - } - - @Override public void unregister(PlotPlayer player) { - NukkitUtil.removePlayer(player.getName()); - } - - @Override public void registerChunkProcessor() { - PlotSquared.debug("Not implemented: registerChunkProcessor"); - } - - @Override public void registerWorldEvents() { - getServer().getPluginManager().registerEvents(new WorldEvents(), this); - } - - @Override public InventoryUtil initInventoryUtil() { - return new NukkitInventoryUtil(); - } - - @Override public void startMetrics() { - new Metrics(this).start(); - PlotSquared.log(C.PREFIX + "&6Metrics enabled."); - } - - @Override public void setGenerator(String worldName) { - Level world = getServer().getLevelByName(worldName); - if (world == null) { - // create world - ConfigurationSection worldConfig = - PlotSquared.get().worlds.getConfigurationSection("worlds." + worldName); - String manager = worldConfig.getString("generator.plugin", getPluginName()); - SetupObject setup = new SetupObject(); - setup.plotManager = manager; - setup.setupGenerator = worldConfig.getString("generator.init", manager); - setup.type = worldConfig.getInt("generator.type"); - setup.terrain = worldConfig.getInt("generator.terrain"); - setup.step = new ConfigurationNode[0]; - setup.world = worldName; - SetupUtils.manager.setupWorld(setup); - world = getServer().getLevelByName(worldName); - } else { - HashMap map = new HashMap<>(); - map.put("world", world.getName()); - map.put("plot-generator", PlotSquared.get().IMP.getDefaultGenerator()); - setGenerator(world, new NukkitPlotGenerator(map)); - } - if (world != null) { - try { - Generator gen = world.getGenerator(); - if (gen instanceof NukkitPlotGenerator) { - PlotSquared.get().loadWorld(worldName, (NukkitPlotGenerator) gen); - } else if (gen instanceof GeneratorWrapper) { - PlotSquared.get().loadWorld(worldName, (GeneratorWrapper) gen); - } else if (PlotSquared.get().worlds.contains("worlds." + worldName)) { - PlotSquared.get().loadWorld(worldName, null); - } - } catch (Throwable e) { - e.printStackTrace(); - } - } - } - - private void setGenerator(Level level, Generator generator) { - try { - Field fieldClass = Level.class.getDeclaredField("generator"); - Field fieldInstance = Level.class.getDeclaredField("generatorInstance"); - fieldClass.setAccessible(true); - fieldInstance.setAccessible(true); - fieldClass.set(level, generator.getClass()); - fieldInstance.set(level, generator); - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Override public SchematicHandler initSchematicHandler() { - return new NukkitSchematicHandler(this); - } - - @Override public AbstractTitle initTitleManager() { - return new NukkitTitleUtil(); - } - - @Override public PlotPlayer wrapPlayer(Object player) { - if (player instanceof Player) { - return NukkitUtil.getPlayer((Player) player); - } - if (player instanceof OfflinePlayer) { - return NukkitUtil.getPlayer((OfflinePlayer) player); - } - if (player instanceof String) { - return UUIDHandler.getPlayer((String) player); - } - if (player instanceof UUID) { - return UUIDHandler.getPlayer((UUID) player); - } - return null; - } - - @Override public String getNMSPackage() { - return ""; - } - - @Override public ChatManager initChatManager() { - return new PlainChatManager(); - } - - @Override - public GeneratorWrapper wrapPlotGenerator(String world, IndependentPlotGenerator generator) { - HashMap settings = new HashMap<>(); - settings.put("world", world); - settings.put("plot-generator", generator); - return new NukkitPlotGenerator(settings); - } - - @Override public List getPluginIds() { - ArrayList names = new ArrayList<>(); - for (Map.Entry entry : getServer().getPluginManager().getPlugins() - .entrySet()) { - Plugin plugin = entry.getValue(); - names.add(entry.getKey() + ';' + plugin.getDescription().getVersion() + ':' + plugin - .isEnabled()); - } - return names; - } - - @Override public IndependentPlotGenerator getDefaultGenerator() { - return new HybridGen() { - @Override public PlotManager getNewPlotManager() { - return new HybridPlotManager() { - @Override public int getWorldHeight() { - return 255; - } - }; - } - }; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/ClusterFlagRemoveEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/ClusterFlagRemoveEvent.java deleted file mode 100644 index a2811c481..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/ClusterFlagRemoveEvent.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.Event; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.object.PlotCluster; - -/** - * Called when a flag is removed from a plot. - */ -public class ClusterFlagRemoveEvent extends Event implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final PlotCluster cluster; - private final Flag flag; - private boolean cancelled; - - /** - * PlotFlagRemoveEvent: Called when a flag is removed from a plot. - * - * @param flag Flag that was removed - * @param cluster PlotCluster from which the flag was removed - */ - public ClusterFlagRemoveEvent(Flag flag, PlotCluster cluster) { - this.cluster = cluster; - this.flag = flag; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the cluster involved. - * - * @return PlotCluster - */ - public PlotCluster getCluster() { - return this.cluster; - } - - /** - * Get the flag involved. - * - * @return Flag - */ - public Flag getFlag() { - return this.flag; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean b) { - this.cancelled = b; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerClaimPlotEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerClaimPlotEvent.java deleted file mode 100644 index d876d39ad..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerClaimPlotEvent.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import cn.nukkit.event.player.PlayerEvent; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -public class PlayerClaimPlotEvent extends PlayerEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final Plot plot; - private final boolean auto; - private boolean cancelled; - - /** - * PlayerClaimPlotEvent: Called when a plot is claimed. - * - * @param player Player that claimed the plot - * @param plot Plot that was claimed - */ - public PlayerClaimPlotEvent(Player player, Plot plot, boolean auto) { - this.player = player; - this.plot = plot; - this.auto = auto; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the plot involved - * - * @return Plot - */ - public Plot getPlot() { - return this.plot; - } - - /** - * @return true if it was an automated claim, else false - */ - public boolean wasAuto() { - return this.auto; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean b) { - this.cancelled = b; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerEnterPlotEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerEnterPlotEvent.java deleted file mode 100644 index cc3e665c0..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerEnterPlotEvent.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.HandlerList; -import cn.nukkit.event.player.PlayerEvent; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -public class PlayerEnterPlotEvent extends PlayerEvent { - - private static final HandlerList handlers = new HandlerList(); - private final Plot plot; - private final Player player; - - /** - * Called when a player leaves a plot. - * - * @param player Player that entered the plot - * @param plot Plot that was entered - */ - public PlayerEnterPlotEvent(Player player, Plot plot) { - this.player = player; - this.plot = plot; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the plot involved. - * - * @return Plot - */ - public Plot getPlot() { - return this.plot; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerLeavePlotEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerLeavePlotEvent.java deleted file mode 100644 index 4d1f1689d..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerLeavePlotEvent.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.HandlerList; -import cn.nukkit.event.player.PlayerEvent; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -/** - - - */ -public class PlayerLeavePlotEvent extends PlayerEvent { - - private static final HandlerList handlers = new HandlerList(); - private final Plot plot; - - /** - * PlayerLeavePlotEvent: Called when a player leaves a plot - * - * @param player Player that left the plot - * @param plot Plot that was left - */ - public PlayerLeavePlotEvent(Player player, Plot plot) { - this.player = player; - this.plot = plot; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the plot involved - * - * @return Plot - */ - public Plot getPlot() { - return this.plot; - } - -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotDeniedEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotDeniedEvent.java deleted file mode 100644 index 75e6bccfa..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotDeniedEvent.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -import java.util.UUID; - -public class PlayerPlotDeniedEvent extends PlotEvent { - - private static final HandlerList handlers = new HandlerList(); - private final Player initiator; - private final boolean added; - private final UUID player; - - /** - * PlayerPlotDeniedEvent: Called when the denied UUID list is modified for a plot. - * - * @param initiator Player that initiated the event - * @param plot Plot in which the event occurred - * @param player Player that was denied/un-denied - * @param added true of add to deny list, false if removed - */ - public PlayerPlotDeniedEvent(Player initiator, Plot plot, UUID player, boolean added) { - super(plot); - this.initiator = initiator; - this.added = added; - this.player = player; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * If a user was added. - * - * @return boolean - */ - public boolean wasAdded() { - return this.added; - } - - /** - * The player added/removed. - * - * @return UUID - */ - public UUID getPlayer() { - return this.player; - } - - /** - * The player initiating the action. - * - * @return Player - */ - public Player getInitiator() { - return this.initiator; - } - -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotHelperEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotHelperEvent.java deleted file mode 100644 index 53a034a2a..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotHelperEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -import java.util.UUID; - -/** - - - */ -public class PlayerPlotHelperEvent extends PlotEvent { - - private static final HandlerList handlers = new HandlerList(); - private final Player initiator; - private final boolean added; - private final UUID player; - - /** - * PlayerPlotHelperEvent: Called when a plot helper is added/removed - * - * @param initiator Player that initiated the event - * @param plot Plot in which the event occurred - * @param player Player that was added/removed from the helper list - * @param added true of the player was added, false if the player was removed - */ - public PlayerPlotHelperEvent(Player initiator, Plot plot, UUID player, boolean added) { - super(plot); - this.initiator = initiator; - this.added = added; - this.player = player; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * If a player was added - * - * @return boolean - */ - public boolean wasAdded() { - return this.added; - } - - /** - * The UUID added/removed - * - * @return UUID - */ - public UUID getPlayer() { - return this.player; - } - - /** - * The player initiating the action - * - * @return Player - */ - public Player getInitiator() { - return this.initiator; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotTrustedEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotTrustedEvent.java deleted file mode 100644 index 55290c938..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerPlotTrustedEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -import java.util.UUID; - -/** - - - */ -public class PlayerPlotTrustedEvent extends PlotEvent { - - private static final HandlerList handlers = new HandlerList(); - private final Player initiator; - private final boolean added; - private final UUID player; - - /** - * PlayerPlotTrustedEvent: Called when a plot trusted user is added/removed - * - * @param initiator Player that initiated the event - * @param plot Plot in which the event occurred - * @param player Player that was added/removed from the trusted list - * @param added true of the player was added, false if the player was removed - */ - public PlayerPlotTrustedEvent(Player initiator, Plot plot, UUID player, boolean added) { - super(plot); - this.initiator = initiator; - this.added = added; - this.player = player; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * If a player was added - * - * @return boolean - */ - public boolean wasAdded() { - return this.added; - } - - /** - * The UUID added/removed - * - * @return UUID - */ - public UUID getPlayer() { - return this.player; - } - - /** - * The player initiating the action - * - * @return Player - */ - public Player getInitiator() { - return this.initiator; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerTeleportToPlotEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerTeleportToPlotEvent.java deleted file mode 100644 index c4c1aacc2..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlayerTeleportToPlotEvent.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import cn.nukkit.event.player.PlayerEvent; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -/** - * Called when a player teleports to a plot - */ -public class PlayerTeleportToPlotEvent extends PlayerEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final Location from; - private final Plot plot; - private boolean cancelled; - - /** - * PlayerTeleportToPlotEvent: Called when a player teleports to a plot - * - * @param player That was teleported - * @param from Start location - * @param plot Plot to which the player was teleported - */ - public PlayerTeleportToPlotEvent(Player player, Location from, Plot plot) { - this.player = player; - this.from = from; - this.plot = plot; - } - - public static HandlerList getHandlers() { - return handlers; - } - - - /** - * Get the from location - * - * @return Location - */ - public Location getFrom() { - return this.from; - } - - /** - * Get the plot involved - * - * @return Plot - */ - public Plot getPlot() { - return this.plot; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotChangeOwnerEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotChangeOwnerEvent.java deleted file mode 100644 index d929aedde..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotChangeOwnerEvent.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.Player; -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; - -import java.util.UUID; - -public class PlotChangeOwnerEvent extends PlotEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final Plot plot; - private final Player initiator; - private final UUID newOwner; - private final UUID oldOwner; - private final boolean hasOldOwner; - private boolean cancelled; - - /** - * PlotChangeOwnerEvent: Called when a plot's owner is change. - * - * @param newOwner The new owner of the plot - * @param oldOwner The old owner of the plot - * @param plot The plot having its owner changed - */ - public PlotChangeOwnerEvent(Player initiator, Plot plot, UUID oldOwner, UUID newOwner, - boolean hasOldOwner) { - super(plot); - this.plot = plot; - this.initiator = initiator; - this.newOwner = newOwner; - this.hasOldOwner = hasOldOwner; - this.oldOwner = oldOwner; - } - - public static HandlerList getHandlerList() { - return handlers; - } - - /** - * Get the PlotId. - * - * @return PlotId - */ - public PlotId getPlotId() { - return getPlot().getId(); - } - - /** - * Get the world name. - * - * @return String - */ - public String getWorld() { - return getPlot().getWorldName(); - } - - /** - * Get the change-owner initator - * - * @return Player - */ - public Player getInitiator() { - return this.initiator; - } - - /** - * Get the old owner of the plot - * - * @return UUID - */ - public UUID getOldOwner() { - return this.oldOwner; - } - - /** - * Get the new owner of the plot - * - * @return UUID - */ - public UUID getNewOwner() { - return this.newOwner; - } - - /** - * Get if the plot had an old owner - * - * @return boolean - */ - public boolean hasOldOwner() { - return this.hasOldOwner; - } - - public HandlerList getHandlers() { - return handlers; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean b) { - this.cancelled = b; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotClearEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotClearEvent.java deleted file mode 100644 index 2fbf98de0..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotClearEvent.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; - -/** - * Called when a plot is cleared - */ -public class PlotClearEvent extends PlotEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private boolean cancelled; - - public PlotClearEvent(Plot plot) { - super(plot); - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the PlotId. - * - * @return PlotId - */ - public PlotId getPlotId() { - return getPlot().getId(); - } - - /** - * Get the world name. - * - * @return String - */ - public String getWorld() { - return getPlot().getWorldName(); - } - - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean b) { - this.cancelled = b; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotComponentSetEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotComponentSetEvent.java deleted file mode 100644 index 09c68bf4e..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotComponentSetEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; - -/** - * Called when a plot component is set - */ -public class PlotComponentSetEvent extends PlotEvent { - - private static final HandlerList handlers = new HandlerList(); - private final String component; - - public PlotComponentSetEvent(Plot plot, String component) { - super(plot); - this.component = component; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the PlotId - * - * @return PlotId - */ - public PlotId getPlotId() { - return getPlot().getId(); - } - - /** - * Get the world name - * - * @return String - */ - public String getWorld() { - return getPlot().getWorldName(); - } - - /** - * Get the component which was set - * - * @return Component name - */ - public String getComponent() { - return this.component; - } - -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotDeleteEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotDeleteEvent.java deleted file mode 100644 index cb571e366..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotDeleteEvent.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; - -/** - * Called when a plot is deleted - */ -public class PlotDeleteEvent extends PlotEvent { - - private static final HandlerList handlers = new HandlerList(); - - public PlotDeleteEvent(Plot plot) { - super(plot); - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the PlotId - * - * @return PlotId - */ - public PlotId getPlotId() { - return getPlot().getId(); - } - - /** - * Get the world name - * - * @return String - */ - public String getWorld() { - return getPlot().getWorldName(); - } - -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotEvent.java deleted file mode 100644 index b3b471658..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotEvent.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Event; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -public abstract class PlotEvent extends Event { - - private final Plot plot; - - public PlotEvent(Plot plot) { - this.plot = plot; - } - - public final Plot getPlot() { - return this.plot; - } - -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotFlagAddEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotFlagAddEvent.java deleted file mode 100644 index ac1741f6e..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotFlagAddEvent.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -/** - * Called when a Flag is added to a plot. - */ -public class PlotFlagAddEvent extends PlotEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final Flag flag; - private boolean cancelled; - - /** - * PlotFlagAddEvent: Called when a Flag is added to a plot. - * - * @param flag Flag that was added - * @param plot Plot to which the flag was added - */ - public PlotFlagAddEvent(Flag flag, Plot plot) { - super(plot); - this.flag = flag; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the flag involved. - * - * @return Flag - */ - public Flag getFlag() { - return this.flag; - } - - @Override public final boolean isCancelled() { - return this.cancelled; - } - - @Override public final void setCancelled(boolean cancelled) { - this.cancelled = cancelled; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotFlagRemoveEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotFlagRemoveEvent.java deleted file mode 100644 index 3330c4653..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotFlagRemoveEvent.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; - -/** - * Called when a flag is removed from a plot - */ -public class PlotFlagRemoveEvent extends PlotEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final Flag flag; - private boolean cancelled; - - /** - * PlotFlagRemoveEvent: Called when a flag is removed from a plot - * - * @param flag Flag that was removed - * @param plot Plot from which the flag was removed - */ - public PlotFlagRemoveEvent(Flag flag, Plot plot) { - super(plot); - this.flag = flag; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the flag involved - * - * @return Flag - */ - public Flag getFlag() { - return this.flag; - } - - @Override public final boolean isCancelled() { - return this.cancelled; - } - - @Override public final void setCancelled(boolean cancelled) { - this.cancelled = cancelled; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotMergeEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotMergeEvent.java deleted file mode 100644 index 97c445fb4..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotMergeEvent.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import cn.nukkit.level.Level; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; - -import java.util.ArrayList; - -public class PlotMergeEvent extends PlotEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final ArrayList plots; - private final Level world; - private boolean cancelled; - - /** - * PlotMergeEvent: Called when plots are merged - * - * @param world World in which the event occurred - * @param plot Plot that was merged - * @param plots A list of plots involved in the event - */ - public PlotMergeEvent(Level world, Plot plot, ArrayList plots) { - super(plot); - this.world = world; - this.plots = plots; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the plots being added. - * - * @return Plot - */ - public ArrayList getPlots() { - return this.plots; - } - - public Level getLevel() { - return this.world; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean b) { - this.cancelled = b; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotRateEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotRateEvent.java deleted file mode 100644 index 3afe9c905..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotRateEvent.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.HandlerList; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Rating; - -public class PlotRateEvent extends PlotEvent implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final PlotPlayer rater; - private Rating rating; - private boolean cancelled = false; - - public PlotRateEvent(PlotPlayer rater, Rating rating, Plot plot) { - super(plot); - this.rater = rater; - this.rating = rating; - } - - public static HandlerList getHandlers() { - return handlers; - } - - public PlotPlayer getRater() { - return this.rater; - } - - public Rating getRating() { - return this.rating; - } - - public void setRating(Rating rating) { - this.rating = rating; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean cancelled) { - this.cancelled = cancelled; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotUnlinkEvent.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotUnlinkEvent.java deleted file mode 100644 index 8fa1e766c..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/events/PlotUnlinkEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.events; - -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.Event; -import cn.nukkit.event.HandlerList; -import cn.nukkit.level.Level; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; - -import java.util.ArrayList; - -public class PlotUnlinkEvent extends Event implements Cancellable { - - private static final HandlerList handlers = new HandlerList(); - private final ArrayList plots; - private final Level world; - private final PlotArea area; - private boolean cancelled; - - /** - * Called when a mega-plot is unlinked. - * - * @param world World in which the event occurred - * @param plots Plots that are involved in the event - */ - public PlotUnlinkEvent(Level world, PlotArea area, ArrayList plots) { - this.plots = plots; - this.world = world; - this.area = area; - } - - public static HandlerList getHandlers() { - return handlers; - } - - /** - * Get the plots involved. - * - * @return The {@link PlotId}'s of the plots involved - */ - public ArrayList getPlots() { - return this.plots; - } - - public Level getLevel() { - return this.world; - } - - public PlotArea getArea() { - return this.area; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean b) { - this.cancelled = b; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/generator/NukkitAugmentedGenerator.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/generator/NukkitAugmentedGenerator.java deleted file mode 100644 index a0af1281a..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/generator/NukkitAugmentedGenerator.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.generator; - -import cn.nukkit.event.EventHandler; -import cn.nukkit.event.Listener; -import cn.nukkit.event.level.ChunkLoadEvent; -import cn.nukkit.level.Level; -import cn.nukkit.level.format.FullChunk; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.AugmentedUtils; - -import java.util.concurrent.ConcurrentHashMap; - -public class NukkitAugmentedGenerator implements Listener { - - private static NukkitAugmentedGenerator generator; - private static ConcurrentHashMap generators = - new ConcurrentHashMap<>(); - - private NukkitAugmentedGenerator(NukkitMain plugin) { - plugin.getServer().getPluginManager().registerEvents(this, plugin); - } - - public static NukkitAugmentedGenerator get(Level level) { - NukkitAugmentedGenerator current = generators.get(level.getName()); - if (current != null) { - return current; - } - if (generator == null) { - NukkitMain plugin = ((NukkitMain) PlotSquared.get().IMP); - generator = new NukkitAugmentedGenerator(plugin); - } - generators.put(level.getName(), generator); - return generator; - } - - @EventHandler private void onChunkLoad(ChunkLoadEvent event) { - Level level = event.getLevel(); - generator = generators.get(level.getName()); - if (generator != null) { - generator.populate(level, event.getChunk()); - } - } - - private void populate(Level world, FullChunk chunk) { - AugmentedUtils.generate(world.getName(), chunk.getX(), chunk.getZ(), null); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/generator/NukkitPlotGenerator.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/generator/NukkitPlotGenerator.java deleted file mode 100644 index caab8b6b0..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/generator/NukkitPlotGenerator.java +++ /dev/null @@ -1,187 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.generator; - -import cn.nukkit.level.format.generic.BaseFullChunk; -import cn.nukkit.level.generator.Generator; -import cn.nukkit.math.NukkitRandom; -import cn.nukkit.math.Vector3; -import com.github.intellectualsites.plotsquared.nukkit.util.NukkitUtil; -import com.github.intellectualsites.plotsquared.nukkit.util.block.NukkitWrappedChunk; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; - -import java.util.Map; - -public class NukkitPlotGenerator extends Generator implements GeneratorWrapper { - - protected final PseudoRandom random = new PseudoRandom(); - protected final IndependentPlotGenerator plotGenerator; - protected final Generator platformGenerator; - protected final boolean full; - protected final String world; - protected final Map settings; - protected final NukkitWrappedChunk chunkSetter; - protected boolean loaded = false; - protected cn.nukkit.level.ChunkManager chunkManager; - - public NukkitPlotGenerator(Map map) { - if (map == null) { - throw new IllegalArgumentException("options may not be null!"); - } - this.settings = map; - MainUtil.initCache(); - this.world = map.get("world").toString(); - if (map.containsKey("generator")) { - final Generator cg = (Generator) map.get("generator"); - if (cg instanceof NukkitPlotGenerator) { - throw new IllegalArgumentException( - "Generator: " + cg.getClass().getName() + " is already a NukkitPlotGenerator!"); - } - this.full = false; - PlotSquared.debug("NukkitPlotGenerator does not fully support: " + cg); - this.platformGenerator = cg; - this.plotGenerator = new IndependentPlotGenerator() { - @Override public void processSetup(SetupObject setup) { - } - - @Override public void initialize(PlotArea area) { - } - - @Override public PlotManager getNewPlotManager() { - return PlotSquared.get().IMP.getDefaultGenerator().getNewPlotManager(); - } - - @Override public String getName() { - return cg.getClass().getName(); - } - - @Override - public PlotArea getNewPlotArea(String world, String id, PlotId min, PlotId max) { - return PlotSquared.get().IMP.getDefaultGenerator() - .getNewPlotArea(world, id, min, max); - } - - @Override - public void generateChunk(final ScopedLocalBlockQueue result, PlotArea settings, - PseudoRandom random) { - Location min = result.getMin(); - int cx = min.getX() >> 4; - int cz = min.getZ() >> 4; - cg.generateChunk(cx, cz); - cg.populateChunk(cx, cz); - } - }; - chunkSetter = new NukkitWrappedChunk(world, null); - MainUtil.initCache(); - } else { - this.plotGenerator = (IndependentPlotGenerator) map.get("plot-generator"); - this.platformGenerator = this; - this.full = true; - chunkSetter = new NukkitWrappedChunk(world, null); - } - } - - @Override public void augment(PlotArea area) { - NukkitAugmentedGenerator.get(NukkitUtil.getWorld(area.getWorldName())); - } - - @Override public boolean isFull() { - return this.full; - } - - @Override public IndependentPlotGenerator getPlotGenerator() { - return this.plotGenerator; - } - - @Override public Generator getPlatformGenerator() { - return this.platformGenerator; - } - - @Override public String toString() { - if (this.platformGenerator == this) { - return this.plotGenerator.getName(); - } - if (this.platformGenerator == null) { - return "null"; - } else { - return this.platformGenerator.getClass().getName(); - } - } - - @Override public boolean equals(Object obj) { - if (obj == null) { - return false; - } - return toString().equals(obj.toString()) || toString().equals(obj.getClass().getName()); - } - - @Override public int getId() { - return 1; - } - - @Override - public void init(cn.nukkit.level.ChunkManager chunkManager, NukkitRandom nukkitRandom) { - if (this.chunkManager == null) { - PlotSquared.get().loadWorld(world, this); - } - this.chunkManager = chunkManager; - if (getPlatformGenerator() != this) { - getPlatformGenerator().init(chunkManager, nukkitRandom); - } - } - - @Override public void generateChunk(int cx, int cz) { - if (getPlatformGenerator() != this) { - getPlatformGenerator().generateChunk(cx, cz); - } else { - BaseFullChunk chunk = this.chunkManager.getChunk(cx, cz); - // Load if improperly loaded - if (!this.loaded) { - PlotSquared.get().loadWorld(world, this); - this.loaded = true; - } - chunkSetter.init(chunk); - // Set random seed - this.random.state = cx << 16 | cz & 0xFFFF; - // Process the chunk - if (ChunkManager.preProcessChunk(chunkSetter)) { - return; - } - PlotArea area = PlotSquared.get().getPlotArea(world, null); - try { - this.plotGenerator.generateChunk(this.chunkSetter, area, this.random); - } catch (Throwable e) { - // Recover from generator error - e.printStackTrace(); - } - ChunkManager.postProcessChunk(chunkSetter); - } - } - - @Override public void populateChunk(int x, int z) { - if (getPlatformGenerator() != this) { - getPlatformGenerator().populateChunk(x, z); - } else { - // No populating - } - } - - @Override public Map getSettings() { - return settings; - } - - @Override public String getName() { - return plotGenerator.getName(); - } - - @Override public Vector3 getSpawn() { - return new Vector3(0, 61, 0); - } - - @Override public cn.nukkit.level.ChunkManager getChunkManager() { - return chunkManager; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/listeners/PlayerEvents.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/listeners/PlayerEvents.java deleted file mode 100644 index 456cb97b2..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/listeners/PlayerEvents.java +++ /dev/null @@ -1,1233 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.listeners; - -import cn.nukkit.Player; -import cn.nukkit.Server; -import cn.nukkit.block.Block; -import cn.nukkit.command.CommandSender; -import cn.nukkit.entity.*; -import cn.nukkit.entity.item.EntityPotion; -import cn.nukkit.entity.item.EntityVehicle; -import cn.nukkit.entity.mob.EntityMob; -import cn.nukkit.entity.passive.EntityAnimal; -import cn.nukkit.entity.passive.EntityTameable; -import cn.nukkit.entity.passive.EntityWaterAnimal; -import cn.nukkit.entity.projectile.EntityProjectile; -import cn.nukkit.event.*; -import cn.nukkit.event.block.*; -import cn.nukkit.event.entity.*; -import cn.nukkit.event.inventory.InventoryCloseEvent; -import cn.nukkit.event.player.*; -import cn.nukkit.event.potion.PotionCollideEvent; -import cn.nukkit.event.redstone.RedstoneUpdateEvent; -import cn.nukkit.metadata.MetadataValue; -import cn.nukkit.plugin.Plugin; -import com.github.intellectualsites.plotsquared.nukkit.object.NukkitPlayer; -import com.github.intellectualsites.plotsquared.nukkit.util.NukkitUtil; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.C; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.flag.Flags; -import com.github.intellectualsites.plotsquared.plot.listener.PlotListener; -import com.google.common.base.Optional; - -import java.util.Map.Entry; -import java.util.regex.Pattern; - -@SuppressWarnings("unused") -public class PlayerEvents extends PlotListener implements Listener { - - private boolean pistonBlocks = true; - // To prevent recursion - private boolean tmpTeleport = true; - - public static boolean checkEntity(Entity entity, Plot plot) { - if (plot == null || !plot.hasOwner() || plot.getFlags().isEmpty() && plot - .getArea().DEFAULT_FLAGS.isEmpty()) { - return false; - } - if (entity instanceof EntityLiving) { - if (entity instanceof EntityCreature) { - if (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal) { - return EntityUtil.checkEntity(plot, Flags.ENTITY_CAP, Flags.MOB_CAP, Flags.ANIMAL_CAP); - } else if (entity instanceof EntityMob) { - return EntityUtil.checkEntity(plot, Flags.ENTITY_CAP, Flags.MOB_CAP, Flags.HOSTILE_CAP); - } else if (entity instanceof EntityHuman) { - return false; - } else { - return EntityUtil.checkEntity(plot, Flags.ENTITY_CAP, Flags.MOB_CAP, Flags.MOB_CAP); - } - } else { - return EntityUtil.checkEntity(plot, Flags.ENTITY_CAP, Flags.MOB_CAP); - } - } else if (entity instanceof EntityVehicle) { - return EntityUtil.checkEntity(plot, Flags.ENTITY_CAP, Flags.VEHICLE_CAP); - } else if (entity instanceof EntityHanging) { - return EntityUtil.checkEntity(plot, Flags.ENTITY_CAP, Flags.MISC_CAP); - } else { - return EntityUtil.checkEntity(plot, Flags.ENTITY_CAP); - } - } - - // TODO fix this - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) - public void onPhysicsEvent(BlockUpdateEvent event) { - if (event instanceof RedstoneUpdateEvent) { - Block block = event.getBlock(); - Location loc = NukkitUtil.getLocation(block.getLocation()); - PlotArea area = loc.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getOwnedPlot(loc); - if (plot == null) { - return; - } - if (Flags.REDSTONE.isFalse(plot)) { - event.setCancelled(true); - return; - } - if (Settings.Redstone.DISABLE_OFFLINE) { - if (UUIDHandler.getPlayer(plot.getOwner()) == null) { - boolean disable = true; - for (UUID trusted : plot.getTrusted()) { - if (UUIDHandler.getPlayer(trusted) != null) { - disable = false; - break; - } - } - if (disable) { - event.setCancelled(true); - return; - } - } - } - if (Settings.Redstone.DISABLE_UNOCCUPIED) { - for (Map.Entry entry : UUIDHandler.getPlayers().entrySet()) { - if (plot.equals(entry.getValue().getCurrentPlot())) { - return; - } - } - event.setCancelled(true); - } - } else { - Block block = event.getBlock(); - Location loc = NukkitUtil.getLocation(block.getLocation()); - PlotArea area = loc.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getOwnedPlotAbs(loc); - if (plot == null) { - return; - } - if (Flags.DISABLE_PHYSICS.isFalse(plot)) { - event.setCancelled(true); - } - } - } - - @EventHandler(priority = EventPriority.HIGHEST) - public void onEntityCombustByEntity(EntityCombustEvent event) { - if (event instanceof EntityCombustByEntityEvent) { - EntityDamageByEntityEvent eventChange = - new EntityDamageByEntityEvent(((EntityCombustByEntityEvent) event).getCombuster(), - event.getEntity(), EntityDamageEvent.DamageCause.FIRE_TICK, - event.getDuration()); - onEntityDamageByEntityEvent(eventChange); - } - } - - @EventHandler(priority = EventPriority.HIGHEST) - public void onEntityDamageByEntityEvent(EntityDamageEvent event) { - if (event instanceof EntityDamageByEntityEvent) { - EntityDamageByEntityEvent specific = (EntityDamageByEntityEvent) event; - Entity damager = specific.getDamager(); - Location l = NukkitUtil.getLocation(damager); - if (!PlotSquared.get().hasPlotArea(l.getWorld())) { - return; - } - Entity victim = event.getEntity(); - if (!entityDamage(damager, victim)) { - event.setCancelled(true); - } - } - } - - @EventHandler public void onProjectileLaunch(ProjectileLaunchEvent event) { - EntityProjectile entity = event.getEntity(); - if (!(entity instanceof EntityPotion)) { - return; - } - Entity shooter = entity.shootingEntity; - if (!(shooter instanceof Player)) { - return; - } - Location l = NukkitUtil.getLocation(entity); - if (!PlotSquared.get().hasPlotArea(l.getWorld())) { - return; - } - PlotPlayer pp = NukkitUtil.getPlayer((Player) shooter); - Plot plot = l.getOwnedPlot(); - if (plot != null && !plot.isAdded(pp.getUUID())) { - kill(entity, event); - } - } - - @EventHandler public boolean onProjectileHit(ProjectileHitEvent event) { - EntityProjectile entity = (EntityProjectile) event.getEntity(); - Location loc = NukkitUtil.getLocation(entity); - if (!PlotSquared.get().hasPlotArea(loc.getWorld())) { - return true; - } - PlotArea area = loc.getPlotArea(); - if (area == null) { - return true; - } - Plot plot = area.getPlotAbs(loc); - Entity shooter = entity.shootingEntity; - if (shooter instanceof Player) { - PlotPlayer pp = NukkitUtil.getPlayer((Player) shooter); - if (plot == null) { - if (!Permissions.hasPermission(pp, C.PERMISSION_PROJECTILE_UNOWNED)) { - kill(entity, event); - return false; - } - return true; - } - if (plot.isAdded(pp.getUUID()) || Permissions - .hasPermission(pp, C.PERMISSION_PROJECTILE_OTHER)) { - return true; - } - kill(entity, event); - return false; - } - if (shooter == null) { - kill(entity, event); - return false; - } - return true; - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) - public void playerCommand(PlayerCommandPreprocessEvent event) { - String msg = event.getMessage().toLowerCase().replaceAll("/", "").trim(); - if (msg.isEmpty()) { - return; - } - String[] split = msg.split(" "); - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - Plot plot = pp.getCurrentPlot(); - if (plot == null) { - return; - } - Optional> flag = plot.getFlag(Flags.BLOCKED_CMDS); - if (flag.isPresent() && !Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS)) { - List blocked_cmds = flag.get(); - for (String s : blocked_cmds) { - Pattern pattern; - if (!RegExUtil.compiledPatterns.containsKey(s)) { - RegExUtil.compiledPatterns.put(s, pattern = Pattern.compile(s)); - } else { - pattern = RegExUtil.compiledPatterns.get(s); - } - if (pattern.matcher(msg).matches()) { - String perm; - if (plot.isAdded(pp.getUUID())) { - perm = "plots.admin.command.blocked-cmds.shared"; - } else { - perm = "plots.admin.command.blocked-cmds.other"; - } - if (!Permissions.hasPermission(pp, perm)) { - MainUtil.sendMessage(pp, C.COMMAND_BLOCKED); - event.setCancelled(true); - } - return; - } - } - } - } - - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onConnect(PlayerJoinEvent event) { - final Player player = event.getPlayer(); - NukkitUtil.getPlayer(event.getPlayer()).unregister(); - final PlotPlayer pp = NukkitUtil.getPlayer(player); - // Now - String name = pp.getName(); - StringWrapper sw = new StringWrapper(name); - UUID uuid = pp.getUUID(); - UUIDHandler.add(sw, uuid); - - Location loc = pp.getLocation(); - PlotArea area = loc.getPlotArea(); - if (area != null) { - Plot plot = area.getPlot(loc); - if (plot != null) { - plotEntry(pp, plot); - } - } - // Delayed - - // Async - TaskManager.runTaskLaterAsync(new Runnable() { - @Override public void run() { - if (!player.hasPlayedBefore() && player.isOnline()) { - player.save(); - } - EventUtil.manager.doJoinTask(pp); - } - }, 20); - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void playerRespawn(PlayerRespawnEvent event) { - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - EventUtil.manager.doRespawnTask(pp); - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onTeleport(PlayerTeleportEvent event) { - if (event.getTo() == null || event.getFrom() == null) { - NukkitUtil.getPlayer(event.getPlayer()).deleteMeta(PlotPlayer.META_LOCATION); - NukkitUtil.getPlayer(event.getPlayer()).deleteMeta(PlotPlayer.META_LAST_PLOT); - return; - } - cn.nukkit.level.Location from = event.getFrom(); - cn.nukkit.level.Location to = event.getTo(); - int x2; - if (MathMan.roundInt(from.getX()) != (x2 = MathMan.roundInt(to.getX()))) { - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - // Cancel teleport - TaskManager.TELEPORT_QUEUE.remove(pp.getName()); - // Set last location - Location loc = NukkitUtil.getLocation(to); - pp.setMeta(PlotPlayer.META_LOCATION, loc); - PlotArea area = loc.getPlotArea(); - if (area == null) { - pp.deleteMeta(PlotPlayer.META_LAST_PLOT); - return; - } - Plot now = area.getPlot(loc); - Plot lastPlot = pp.getMeta(PlotPlayer.META_LAST_PLOT); - if (now == null) { - if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_EXIT_DENIED); - this.tmpTeleport = false; - if (lastPlot.equals(NukkitUtil.getLocation(from).getPlot())) { - player.teleport(from); - } else { - player.teleport(player.getLevel().getSpawnLocation()); - } - this.tmpTeleport = true; - event.setCancelled(true); - return; - } - } else if (now.equals(lastPlot)) { - return; - } else if (!plotEntry(pp, now) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_ENTRY_DENIED); - this.tmpTeleport = false; - to.setComponents(from.getX(), from.getY(), from.getZ()); - player.teleport(event.getTo()); - this.tmpTeleport = true; - return; - } - Integer border = area.getBorder(); - if (x2 > border) { - to.setComponents(border - 4, to.getY(), to.getZ()); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - return; - } - if (x2 < -border) { - to.setComponents(-border + 4, to.getY(), to.getZ()); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - return; - } - return; - } - int z2; - if (MathMan.roundInt(from.getZ()) != (z2 = MathMan.roundInt(to.getZ()))) { - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - // Cancel teleport - TaskManager.TELEPORT_QUEUE.remove(pp.getName()); - // Set last location - Location loc = NukkitUtil.getLocation(to); - pp.setMeta("location", loc); - PlotArea area = loc.getPlotArea(); - if (area == null) { - pp.deleteMeta(PlotPlayer.META_LAST_PLOT); - return; - } - Plot now = area.getPlot(loc); - Plot lastPlot = pp.getMeta(PlotPlayer.META_LAST_PLOT); - if (now == null) { - if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_EXIT_DENIED); - this.tmpTeleport = false; - if (lastPlot.equals(NukkitUtil.getLocation(from).getPlot())) { - player.teleport(from); - } else { - player.teleport(player.getLevel().getSpawnLocation()); - } - this.tmpTeleport = true; - event.setCancelled(true); - return; - } - } else if (now.equals(lastPlot)) { - return; - } else if (!plotEntry(pp, now) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_ENTRY_DENIED); - this.tmpTeleport = false; - player.teleport(from); - to.setComponents(from.getX(), from.getY(), from.getZ()); - player.teleport(event.getTo()); - this.tmpTeleport = true; - return; - } - Integer border = area.getBorder(); - if (z2 > border) { - to.setComponents(to.getX(), to.getY(), border - 4); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - } else if (z2 < -border) { - to.setComponents(to.getX(), to.getY(), -border + 4); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - } - } - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void playerMove(PlayerMoveEvent event) { - cn.nukkit.level.Location from = event.getFrom(); - cn.nukkit.level.Location to = event.getTo(); - int x2; - if (MathMan.roundInt(from.getX()) != (x2 = MathMan.roundInt(to.getX()))) { - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - // Cancel teleport - TaskManager.TELEPORT_QUEUE.remove(pp.getName()); - // Set last location - Location loc = NukkitUtil.getLocation(to); - pp.setMeta(PlotPlayer.META_LOCATION, loc); - PlotArea area = loc.getPlotArea(); - if (area == null) { - pp.deleteMeta(PlotPlayer.META_LAST_PLOT); - return; - } - Plot now = area.getPlot(loc); - Plot lastPlot = pp.getMeta(PlotPlayer.META_LAST_PLOT); - if (now == null) { - if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_EXIT_DENIED); - this.tmpTeleport = false; - if (lastPlot.equals(NukkitUtil.getLocation(from).getPlot())) { - player.teleport(from); - } else { - player.teleport(player.getLevel().getSpawnLocation()); - } - this.tmpTeleport = true; - event.setCancelled(true); - return; - } - } else if (now.equals(lastPlot)) { - return; - } else if (!plotEntry(pp, now) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_ENTRY_DENIED); - this.tmpTeleport = false; - to.setComponents(from.getX(), from.getY(), from.getZ()); - player.teleport(event.getTo()); - this.tmpTeleport = true; - return; - } - Integer border = area.getBorder(); - if (x2 > border) { - to.setComponents(border - 4, to.getY(), to.getZ()); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - return; - } - if (x2 < -border) { - to.setComponents(-border + 4, to.getY(), to.getZ()); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - return; - } - return; - } - int z2; - if (MathMan.roundInt(from.getZ()) != (z2 = MathMan.roundInt(to.getZ()))) { - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - // Cancel teleport - TaskManager.TELEPORT_QUEUE.remove(pp.getName()); - // Set last location - Location loc = NukkitUtil.getLocation(to); - pp.setMeta(PlotPlayer.META_LOCATION, loc); - PlotArea area = loc.getPlotArea(); - if (area == null) { - pp.deleteMeta(PlotPlayer.META_LAST_PLOT); - return; - } - Plot now = area.getPlot(loc); - Plot lastPlot = pp.getMeta(PlotPlayer.META_LAST_PLOT); - if (now == null) { - if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_EXIT_DENIED); - this.tmpTeleport = false; - if (lastPlot.equals(NukkitUtil.getLocation(from).getPlot())) { - player.teleport(from); - } else { - player.teleport(player.getLevel().getSpawnLocation()); - } - this.tmpTeleport = true; - event.setCancelled(true); - return; - } - } else if (now.equals(lastPlot)) { - return; - } else if (!plotEntry(pp, now) && this.tmpTeleport) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_ENTRY_DENIED); - this.tmpTeleport = false; - player.teleport(from); - to.setComponents(from.getX(), from.getY(), from.getZ()); - player.teleport(event.getTo()); - this.tmpTeleport = true; - return; - } - Integer border = area.getBorder(); - if (z2 > border) { - to.setComponents(to.getX(), to.getY(), border - 4); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - } else if (z2 < -border) { - to.setComponents(to.getX(), to.getY(), -border + 4); - this.tmpTeleport = false; - player.teleport(event.getTo()); - this.tmpTeleport = true; - MainUtil.sendMessage(pp, C.BORDER); - } - } - } - - @EventHandler(priority = EventPriority.LOW) public void onChat(PlayerChatEvent event) { - if (event.isCancelled()) - return; - - PlotPlayer plotPlayer = NukkitUtil.getPlayer(event.getPlayer()); - Location location = plotPlayer.getLocation(); - PlotArea area = location.getPlotArea(); - if (area == null || (area.PLOT_CHAT == plotPlayer.getAttribute("chat"))) { - return; - } - Plot plot = area.getPlot(location); - if (plot == null) { - return; - } - String message = event.getMessage(); - if (plotPlayer.hasPermission("plots.chat.color")) { - event.setMessage(C.color(message)); - } - String format = C.PLOT_CHAT_FORMAT.s(); - String sender = event.getPlayer().getDisplayName(); - PlotId id = plot.getId(); - Set recipients = event.getRecipients(); - recipients.clear(); - for (Entry entry : UUIDHandler.getPlayers().entrySet()) { - PlotPlayer pp = entry.getValue(); - if (pp.getAttribute("chatspy")) { - String spy = event.getFormat(); - spy = String.format(spy, sender, message); - pp.sendMessage(spy); - } else { - Plot current = pp.getCurrentPlot(); - if (current != null && current.getBasePlot(false).equals(plot)) { - recipients.add(((NukkitPlayer) pp).player); - } - } - } - String newFormat = C.color( - format.replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", "{%0}") - .replace("%msg%", "{%1}")); - event.setFormat(newFormat); - recipients.add(Server.getInstance().getConsoleSender()); - } - - @EventHandler(priority = EventPriority.LOWEST) public void blockDestroy(BlockBreakEvent event) { - Player player = event.getPlayer(); - Location location = NukkitUtil.getLocation(event.getBlock().getLocation()); - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getPlotAbs(location); - if (plot != null) { - PlotPlayer plotPlayer = NukkitUtil.getPlayer(player); - if (event.getBlock().getY() == 0) { - if (!Permissions - .hasPermission(plotPlayer, C.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) { - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, - C.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL); - event.setCancelled(true); - return; - } - } - if (!plot.hasOwner()) { - if (Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_DESTROY_UNOWNED)) { - return; - } - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, - C.PERMISSION_ADMIN_DESTROY_UNOWNED); - event.setCancelled(true); - return; - } - if (!plot.isAdded(plotPlayer.getUUID())) { - Optional> destroy = plot.getFlag(Flags.BREAK); - Block block = event.getBlock(); - if (destroy.isPresent() && destroy.get() - .contains(PlotBlock.get((short) block.getId(), block.getDamage()))) { - return; - } - if (Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_DESTROY_OTHER)) { - return; - } - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, - C.PERMISSION_ADMIN_DESTROY_OTHER); - event.setCancelled(true); - } else if (Settings.Done.RESTRICT_BUILDING && plot.getFlags().containsKey(Flags.DONE)) { - if (!Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_BUILD_OTHER)) { - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, - C.PERMISSION_ADMIN_BUILD_OTHER); - event.setCancelled(true); - return; - } - } - return; - } - PlotPlayer pp = NukkitUtil.getPlayer(player); - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD)) { - return; - } - if (PlotSquared.get().worldedit != null && pp.getAttribute("worldedit")) { - if (player.getInventory().getItemInHand().getId() == PlotSquared.get().worldedit - .getConfiguration().wandItem) { - return; - } - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_ROAD); - event.setCancelled(true); - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onBigBoom(ExplosionPrimeEvent event) { - Entity entity = event.getEntity(); - Location location = NukkitUtil.getLocation(entity); - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - final Plot finalPlot = area.getOwnedPlot(location); - if (!entity.hasMetadata("plot")) { - entity.setMetadata("plot", new MetadataValue((Plugin) PlotSquared.get().IMP) { - private Plot plot = finalPlot; - - @Override public Object value() { - return plot; - } - - @Override public void invalidate() { - plot = null; - } - }); - } - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onBigBoom(EntityExplodeEvent event) { - Location location = NukkitUtil.getLocation(event.getPosition()); - PlotArea area = location.getPlotArea(); - if (area == null) { - if (!PlotSquared.get().hasPlotArea(location.getWorld())) { - return; - } - Iterator iterator = event.getBlockList().iterator(); - while (iterator.hasNext()) { - iterator.next(); - if (location.getPlotArea() != null) { - iterator.remove(); - } - } - return; - } - Plot plot = area.getOwnedPlot(location); - if (plot != null) { - if (Flags.EXPLOSION.isTrue(plot)) { - List meta = event.getEntity().getMetadata("plot"); - Plot origin; - if (meta.isEmpty()) { - origin = plot; - } else { - origin = (Plot) meta.get(0).value(); - } - Iterator iterator = event.getBlockList().iterator(); - while (iterator.hasNext()) { - Block block = iterator.next(); - location = NukkitUtil.getLocation(block.getLocation()); - if (!area.contains(location.getX(), location.getZ()) || !origin - .equals(area.getOwnedPlot(location))) { - iterator.remove(); - } - } - return; - } - } - event.setCancelled(true); - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onEntityBlockForm(BlockFormEvent event) { - String world = event.getBlock().getLevel().getName(); - if (!PlotSquared.get().hasPlotArea(world)) { - return; - } - if (NukkitUtil.getLocation(event.getBlock().getLocation()).getPlotArea() != null) { - event.setCancelled(true); - } - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onBlockSpread(BlockSpreadEvent event) { - Block block = event.getBlock(); - Location location = NukkitUtil.getLocation(block.getLocation()); - if (location.isPlotRoad()) { - event.setCancelled(true); - return; - } - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getOwnedPlot(location); - if (plot == null) { - return; - } - Block source = event.getSource(); - switch (source.getId()) { - case 2: - if (Flags.GRASS_GROW.isFalse(plot)) { - event.setCancelled(true); - } - break; - case 110: - if (Flags.MYCEL_GROW.isFalse(plot)) { - event.setCancelled(true); - } - break; - case 106: - if (Flags.VINE_GROW.isFalse(plot)) { - event.setCancelled(true); - } - break; - } - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onGrow(BlockGrowEvent event) { - Block b = event.getBlock(); - Location location = NukkitUtil.getLocation(b.getLocation()); - if (location.isUnownedPlotArea()) { - event.setCancelled(true); - } - } - - @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) - public void onInteract(PlayerInteractEvent event) { - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - PlotArea area = pp.getPlotAreaAbs(); - if (area == null) { - return; - } - switch (event.getAction()) { - case RIGHT_CLICK_BLOCK: - case LEFT_CLICK_BLOCK: - case PHYSICAL: { - Plot plot = pp.getCurrentPlot(); - if (plot == null || !plot.isAdded(pp.getUUID())) { - Block block = event.getBlock(); - if (block != null) { - if (plot != null && Flags.USE - .contains(plot, PlotBlock.get(block.getId(), block.getDamage()))) { - return; - } - } - if (plot == null) { - if (Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_ROAD.s(), true)) { - return; - } - } else if (!plot.hasOwner()) { - if (Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_UNOWNED.s(), true)) { - return; - } - } else if (Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER.s(), true)) { - return; - } - event.setCancelled(true); - return; - } - return; - } - case LEFT_CLICK_AIR: - case RIGHT_CLICK_AIR: { - Plot plot = pp.getCurrentPlot(); - if (plot == null || !plot.isAdded(pp.getUUID())) { - if (plot == null) { - if (Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_ROAD.s(), true)) { - return; - } - } else if (!plot.hasOwner()) { - if (Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_UNOWNED.s(), true)) { - return; - } - } else if (Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER.s(), true)) { - return; - } - event.setCancelled(true); - return; - } - return; - } - } - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void creatureSpawnEvent(EntitySpawnEvent event) { - Entity entity = event.getEntity(); - Location location = NukkitUtil.getLocation(entity.getLocation()); - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getOwnedPlotAbs(location); - if (plot == null) { - if (!area.MOB_SPAWNING) { - kill(entity, event); - } - return; - } - if (checkEntity(entity, plot)) { - kill(entity, event); - } - } - - private void kill(Entity entity, Event event) { - if (event instanceof Cancellable) { - event.setCancelled(true); - } - entity.kill(); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) - public void onEntityFall(EntityBlockChangeEvent event) { - Entity entity = event.getEntity(); - Location location = NukkitUtil.getLocation(entity); - if (!PlotSquared.get().hasPlotArea(location.getWorld())) { - return; - } - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - Block from = event.getFrom(); - Block to = event.getTo(); - final Plot finalPlot = area.getOwnedPlotAbs(location); - boolean toBlock = from == null || from.getId() == 0; - if (toBlock) { - List meta = entity.getMetadata("plot"); - if (meta.isEmpty()) { - return; - } - Plot origin = (Plot) meta.get(0).value(); - if (origin != null && !origin.equals(finalPlot)) { - kill(entity, event); - } - } else { - entity.setMetadata("plot", new MetadataValue((Plugin) PlotSquared.get().IMP) { - private Plot plot = finalPlot; - - @Override public Object value() { - return plot; - } - - @Override public void invalidate() { - plot = null; - } - }); - } - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onBlockBurn(BlockBurnEvent event) { - Block b = event.getBlock(); - Location location = NukkitUtil.getLocation(b.getLocation()); - - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - - Plot plot = location.getOwnedPlot(); - if (plot == null || !plot.getFlag(Flags.BLOCK_BURN, false)) { - event.setCancelled(true); - return; - } - - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onBucketEmpty(PlayerBucketEmptyEvent event) { - Block block = event.getBlockClicked(); - Block b = block.getSide(event.getBlockFace()); - Location location = NukkitUtil.getLocation(b.getLocation()); - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - PlotPlayer pp = NukkitUtil.getPlayer(event.getPlayer()); - Plot plot = area.getPlotAbs(location); - if (plot == null) { - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD)) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_ROAD); - event.setCancelled(true); - } else if (!plot.hasOwner()) { - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_UNOWNED)) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_UNOWNED); - event.setCancelled(true); - } else if (!plot.isAdded(pp.getUUID())) { - if (Flags.USE.contains(plot, PlotBlock.get(event.getBucket().getId(), 0))) { - return; - } - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER)) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_OTHER); - event.setCancelled(true); - } - } - - @EventHandler(priority = EventPriority.HIGHEST) - public void onInventoryClose(InventoryCloseEvent event) { - NukkitUtil.getPlayer(event.getPlayer()).deleteMeta("inventory"); - } - - @EventHandler(priority = EventPriority.MONITOR) public void onLeave(PlayerQuitEvent event) { - if (TaskManager.TELEPORT_QUEUE.contains(event.getPlayer().getName())) { - TaskManager.TELEPORT_QUEUE.remove(event.getPlayer().getName()); - } - PlotPlayer pp = NukkitUtil.getPlayer(event.getPlayer()); - pp.unregister(); - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onBucketFill(PlayerBucketFillEvent event) { - Block b = event.getBlockClicked(); - Location location = NukkitUtil.getLocation(b.getLocation()); - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - Player player = event.getPlayer(); - PlotPlayer plotPlayer = NukkitUtil.getPlayer(player); - Plot plot = area.getPlotAbs(location); - if (plot == null) { - if (Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_BUILD_ROAD)) { - return; - } - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_ROAD); - event.setCancelled(true); - } else if (!plot.hasOwner()) { - if (Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_BUILD_UNOWNED)) { - return; - } - MainUtil - .sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_UNOWNED); - event.setCancelled(true); - } else if (!plot.isAdded(plotPlayer.getUUID())) { - Optional> use = plot.getFlag(Flags.USE); - Block block = event.getBlockClicked(); - if (use.isPresent() && use.get() - .contains(PlotBlock.get(block.getId(), block.getDamage()))) { - return; - } - if (Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_BUILD_OTHER)) { - return; - } - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_OTHER); - event.setCancelled(true); - } - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onPotionSplash(PotionCollideEvent event) { - EntityPotion entity = event.getThrownPotion(); - Location l = NukkitUtil.getLocation(entity); - if (!PlotSquared.get().hasPlotArea(l.getWorld())) { - return; - } - Entity shooter = entity.shootingEntity; - if (shooter instanceof Player) { - PlotPlayer pp = NukkitUtil.getPlayer((Player) shooter); - Plot plot = l.getOwnedPlotAbs(); - if (plot == null) { - if (!Permissions.hasPermission(pp, C.PERMISSION_PROJECTILE_UNOWNED)) { - kill(entity, event); - return; - } - return; - } - if (plot.isAdded(pp.getUUID()) || Permissions - .hasPermission(pp, C.PERMISSION_PROJECTILE_OTHER)) { - return; - } - kill(entity, event); - return; - } - if (shooter == null) { - kill(entity, event); - return; - } - } - - public boolean entityDamage(Entity damager, Entity victim) { - Location dloc = NukkitUtil.getLocation(damager); - Location vloc = NukkitUtil.getLocation(victim); - PlotArea dArea = dloc.getPlotArea(); - PlotArea vArea = - dArea != null && dArea.contains(vloc.getX(), vloc.getZ()) ? dArea : vloc.getPlotArea(); - if (dArea == null && vArea == null) { - return true; - } - - Plot dplot = dArea != null ? dArea.getPlot(dloc) : null; - Plot vplot = vArea != null ? vArea.getPlot(vloc) : null; - - Plot plot; - String stub; - if (dplot == null && vplot == null) { - if (dArea == null) { - return true; - } - plot = null; - stub = "road"; - } else { - // Prioritize plots for close to seamless pvp zones - if (victim.ticksLived > damager.ticksLived) { - if (dplot == null || !(victim instanceof Player)) { - if (vplot == null) { - plot = dplot; - } else { - plot = vplot; - } - } else { - plot = dplot; - } - } else if (dplot == null || !(victim instanceof Player)) { - if (vplot == null) { - plot = dplot; - } else { - plot = vplot; - } - } else if (vplot == null) { - plot = dplot; - } else { - plot = vplot; - } - if (plot.hasOwner()) { - stub = "other"; - } else { - stub = "unowned"; - } - } - - Player player; - if (damager instanceof Player) { // attacker is player - player = (Player) damager; - } else if (damager instanceof EntityProjectile) { - EntityProjectile projectile = (EntityProjectile) damager; - Entity shooter = projectile.shootingEntity; - if (shooter instanceof Player) { // shooter is player - player = (Player) shooter; - } else { // shooter is not player - player = null; - } - } else { // Attacker is not player - player = null; - } - if (player != null) { - PlotPlayer plotPlayer = NukkitUtil.getPlayer(player); - if (victim instanceof EntityHanging) { // hanging - if (plot != null && (plot.getFlag(Flags.HANGING_BREAK, false) || plot - .isAdded(plotPlayer.getUUID()))) { - return true; - } - if (!Permissions.hasPermission(plotPlayer, "plots.admin.destroy." + stub)) { - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, - "plots.admin.destroy." + stub); - return false; - } - } else if (false) { // TODO armor stand - if (plot != null && (plot.getFlag(Flags.MISC_BREAK, false) || plot - .isAdded(plotPlayer.getUUID()))) { - return true; - } - if (!Permissions.hasPermission(plotPlayer, "plots.admin.destroy." + stub)) { - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, - "plots.admin.destroy." + stub); - return false; - } - } else if (victim instanceof EntityMob) { // victim is monster - if (plot != null && (plot.getFlag(Flags.HOSTILE_ATTACK, false) || plot - .getFlag(Flags.PVE, false) || plot.isAdded(plotPlayer.getUUID()))) { - return true; - } - if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) { - MainUtil - .sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub); - return false; - } - } else if (victim instanceof EntityTameable) { - if (plot != null && (plot.getFlag(Flags.TAMED_ATTACK, false) || plot - .getFlag(Flags.PVE, false) || plot.isAdded(plotPlayer.getUUID()))) { - return true; - } - if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) { - MainUtil - .sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub); - return false; - } - } else if (victim instanceof Player) { - if (plot != null) { - if (Flags.PVP.isFalse(plot) && !Permissions - .hasPermission(plotPlayer, "plots.admin.pvp." + stub)) { - MainUtil.sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, - "plots.admin.pvp." + stub); - return false; - } else { - return true; - } - } - if (!Permissions.hasPermission(plotPlayer, "plots.admin.pvp." + stub)) { - MainUtil - .sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, "plots.admin.pvp." + stub); - return false; - } - } else if (victim instanceof EntityCreature) { // victim is animal - if (plot != null && (plot.getFlag(Flags.ANIMAL_ATTACK, false) || plot - .getFlag(Flags.PVE, false) || plot.isAdded(plotPlayer.getUUID()))) { - return true; - } - if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) { - MainUtil - .sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub); - return false; - } - } else if (victim instanceof EntityVehicle) { // Vehicles are managed in vehicle destroy event - return true; - } else { // victim is something else - if (plot != null && (plot.getFlag(Flags.PVE, false) || plot - .isAdded(plotPlayer.getUUID()))) { - return true; - } - if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) { - MainUtil - .sendMessage(plotPlayer, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub); - return false; - } - } - return true; - } - // player is null - return !(damager instanceof EntityProjectile && !(victim instanceof EntityCreature)); - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void blockCreate(BlockPlaceEvent event) { - Location location = NukkitUtil.getLocation(event.getBlock().getLocation()); - PlotArea area = location.getPlotArea(); - if (area == null) { - return; - } - Player player = event.getPlayer(); - PlotPlayer pp = NukkitUtil.getPlayer(player); - Plot plot = area.getPlotAbs(location); - if (plot != null) { - if (!plot.hasOwner()) { - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_UNOWNED)) { - MainUtil - .sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_UNOWNED); - event.setCancelled(true); - return; - } - } else if (!plot.isAdded(pp.getUUID())) { - Set place = plot.getFlag(Flags.PLACE, null); - if (place != null) { - Block block = event.getBlock(); - if (place.contains(PlotBlock.get((short) block.getId(), block.getDamage()))) { - return; - } - } - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER)) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_OTHER); - event.setCancelled(true); - return; - } - } else if (Settings.Done.RESTRICT_BUILDING && plot.getFlags().containsKey(Flags.DONE)) { - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER)) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_OTHER); - event.setCancelled(true); - return; - } - } - if (location.getY() > area.MAX_BUILD_HEIGHT && location.getY() < area.MIN_BUILD_HEIGHT - && !Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_HEIGHTLIMIT)) { - event.setCancelled(true); - MainUtil.sendMessage(pp, - C.HEIGHT_LIMIT.s().replace("{limit}", String.valueOf(area.MAX_BUILD_HEIGHT))); - } - } else if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER)) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_ROAD); - event.setCancelled(true); - } - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/listeners/WorldEvents.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/listeners/WorldEvents.java deleted file mode 100644 index aa7cd763d..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/listeners/WorldEvents.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.listeners; - -import cn.nukkit.event.EventHandler; -import cn.nukkit.event.EventPriority; -import cn.nukkit.event.Listener; -import cn.nukkit.event.level.LevelInitEvent; -import cn.nukkit.event.level.LevelLoadEvent; -import cn.nukkit.level.Level; -import cn.nukkit.level.generator.Generator; -import com.github.intellectualsites.plotsquared.nukkit.generator.NukkitPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; - -import java.util.HashMap; - -@SuppressWarnings("unused") -public class WorldEvents implements Listener { - - public WorldEvents() { - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onWorldLoad(LevelLoadEvent event) { - handle(event.getLevel()); - } - - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onWorldInit(LevelInitEvent event) { - handle(event.getLevel()); - } - - private void handle(Level level) { - String name = level.getName(); - try { - Generator gen = level.getGenerator(); - if (gen instanceof GeneratorWrapper) { - PlotSquared.get().loadWorld(name, (GeneratorWrapper) gen); - } else { - HashMap settings = new HashMap<>(); - settings.put("world", level.getName()); - settings.put("generator", gen); - PlotSquared.get().loadWorld(name, new NukkitPlotGenerator(settings)); - for (PlotArea area : PlotSquared.get().getPlotAreas(name)) { - area.MAX_BUILD_HEIGHT = Math.min(127, area.MAX_BUILD_HEIGHT); - } - } - } catch (Throwable e) { - e.printStackTrace(); - } - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/object/NukkitPlayer.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/object/NukkitPlayer.java deleted file mode 100644 index 5fffa92d5..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/object/NukkitPlayer.java +++ /dev/null @@ -1,235 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.object; - -import cn.nukkit.Player; -import cn.nukkit.Server; -import cn.nukkit.event.player.PlayerTeleportEvent; -import cn.nukkit.network.protocol.LevelEventPacket; -import cn.nukkit.plugin.RegisteredListener; -import cn.nukkit.utils.EventException; -import com.github.intellectualsites.plotsquared.nukkit.util.NukkitUtil; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; - -import java.util.Collections; -import java.util.UUID; - -public class NukkitPlayer extends PlotPlayer { - - public final Player player; - public boolean offline; - private UUID uuid; - private String name; - - /** - *

Please do not use this method. Instead use - * NukkitUtil.getPlayer(Player), as it caches player objects.

- * - * @param player - */ - public NukkitPlayer(Player player) { - this.player = player; - super.populatePersistentMetaMap(); - } - - public NukkitPlayer(Player player, boolean offline) { - this.player = player; - this.offline = offline; - super.populatePersistentMetaMap(); - } - - @Override public Location getLocation() { - Location location = super.getLocation(); - return location == null ? NukkitUtil.getLocation(this.player) : location; - } - - @Override public UUID getUUID() { - if (this.uuid == null) { - this.uuid = UUIDHandler.getUUID(this); - } - return this.uuid; - } - - @Override public long getLastPlayed() { - return this.player.getLastPlayed(); - } - - @Override public boolean canTeleport(Location loc) { - cn.nukkit.level.Location to = NukkitUtil.getLocation(loc); - cn.nukkit.level.Location from = player.getLocation(); - PlayerTeleportEvent event = - new PlayerTeleportEvent(player, from, to, PlayerTeleportEvent.TeleportCause.PLUGIN); - RegisteredListener[] listeners = event.getHandlers().getRegisteredListeners(); - for (RegisteredListener listener : listeners) { - if (listener.getPlugin().getName().equals(PlotSquared.imp().getPluginName())) { - continue; - } - try { - listener.callEvent(event); - } catch (EventException e) { - e.printStackTrace(); - } - } - if (event.isCancelled() || !event.getTo().equals(to)) { - return false; - } - event = new PlayerTeleportEvent(player, to, from, PlayerTeleportEvent.TeleportCause.PLUGIN); - for (RegisteredListener listener : listeners) { - if (listener.getPlugin().getName().equals(PlotSquared.imp().getPluginName())) { - continue; - } - try { - listener.callEvent(event); - } catch (EventException e) { - e.printStackTrace(); - } - } - return true; - } - - @Override public boolean hasPermission(String permission) { - if (this.offline && EconHandler.manager != null) { - return EconHandler.manager.hasPermission(getName(), permission); - } - return this.player.hasPermission(permission); - } - - @Override public boolean isPermissionSet(String permission) { - return this.player.isPermissionSet(permission); - } - - @Override public void sendMessage(String message) { - if (!StringMan.isEqual(this.getMeta("lastMessage"), message) || ( - System.currentTimeMillis() - this.getMeta("lastMessageTime") > 5000)) { - setMeta("lastMessage", message); - setMeta("lastMessageTime", System.currentTimeMillis()); - this.player.sendMessage(message); - } - } - - @Override public void teleport(Location to, TeleportCause cause) { - if (Math.abs(to.getX()) >= 30000000 || Math.abs(to.getZ()) >= 30000000) { - return; - } - cn.nukkit.level.Location loc = - new cn.nukkit.level.Location(to.getX() + 0.5, to.getY(), to.getZ() + 0.5, to.getYaw(), - to.getPitch(), NukkitUtil.getWorld(to.getWorld())); - this.player.teleport(loc); - } - - @Override public String getName() { - if (this.name == null) { - this.name = this.player.getName(); - } - return this.name; - } - - @Override public boolean isOnline() { - return !this.offline && this.player.isOnline(); - } - - @Override public void setCompassTarget(Location location) { - throw new UnsupportedOperationException("Not implemented yet: setCompassTarget"); - } - - @Override public Location getLocationFull() { - return NukkitUtil.getLocationFull(this.player); - } - - @Override public void setWeather(PlotWeather weather) { - LevelEventPacket pk; - switch (weather) { - case RAIN: { - pk = new LevelEventPacket(); - pk.evid = LevelEventPacket.EVENT_STOP_THUNDER; - pk.data = Integer.MAX_VALUE; - Server.broadcastPacket(Collections.singleton(player), pk); - - pk = new LevelEventPacket(); - pk.evid = LevelEventPacket.EVENT_START_RAIN; - pk.data = Integer.MAX_VALUE; - Server.broadcastPacket(Collections.singleton(player), pk); - break; - } - case CLEAR: { - pk = new LevelEventPacket(); - pk.evid = LevelEventPacket.EVENT_STOP_THUNDER; - pk.data = Integer.MAX_VALUE; - Server.broadcastPacket(Collections.singleton(player), pk); - - pk = new LevelEventPacket(); - pk.evid = LevelEventPacket.EVENT_STOP_RAIN; - pk.data = Integer.MAX_VALUE; - Server.broadcastPacket(Collections.singleton(player), pk); - break; - } - case RESET: - player.getLevel().sendWeather(player); - break; - } - } - - @Override public PlotGameMode getGameMode() { - switch (this.player.getGamemode()) { - case 0: - return PlotGameMode.SURVIVAL; - case 1: - return PlotGameMode.CREATIVE; - case 2: - return PlotGameMode.ADVENTURE; - case 3: - return PlotGameMode.SPECTATOR; - default: - return PlotGameMode.NOT_SET; - } - } - - @Override public void setGameMode(PlotGameMode gameMode) { - switch (gameMode) { - case ADVENTURE: - this.player.setGamemode(2); - break; - case CREATIVE: - this.player.setGamemode(1); - break; - case SPECTATOR: - this.player.setGamemode(3); - break; - case SURVIVAL: - this.player.setGamemode(0); - break; - default: - this.player.setGamemode(0); - break; - } - } - - @Override public void setTime(long time) { - throw new UnsupportedOperationException("Not implemented yet: setTIme"); - } - - @Override public boolean getFlight() { - return player.getAllowFlight(); - } - - @Override public void setFlight(boolean fly) { - this.player.setAllowFlight(fly); - } - - @Override public void playMusic(Location location, int id) { - throw new UnsupportedOperationException("Not implemented yet: playMusic"); - } - - @Override public void kick(String message) { - player.kick(message); - } - - @Override public void stopSpectating() { - // Do nothing - } - - @Override public boolean isBanned() { - return this.player.isBanned(); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/Metrics.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/Metrics.java deleted file mode 100644 index 9b2ffb10c..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/Metrics.java +++ /dev/null @@ -1,563 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.plugin.Plugin; -import cn.nukkit.plugin.PluginDescription; -import cn.nukkit.utils.LogLevel; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; - -import java.net.Proxy; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.util.zip.GZIPOutputStream; - -public class Metrics { - - /** - * The current revision number. - */ - private static final int REVISION = 7; - /** - * The base url of the metrics domain. - */ - private static final String BASE_URL = "http://report.mcstats.org"; - /** - * The url used to report a server's status. - */ - private static final String REPORT_URL = "/plugin/%s"; - /** - * Interval of time to ping (in minutes). - */ - private static final int PING_INTERVAL = 15; - /** - * The plugin this metrics submits for. - */ - private final Plugin plugin; - /** - * All of the custom graphs to submit to metrics. - */ - private final Set graphs = Collections.synchronizedSet(new HashSet()); - /** - * Unique server id. - */ - private final String guid; - /** - * Debug mode. - */ - private final boolean debug; - /** - * The scheduled task. - */ - private volatile int taskId = -1; - - public Metrics(Plugin plugin) { - if (plugin == null) { - throw new IllegalArgumentException("Plugin cannot be null"); - } - this.plugin = plugin; - this.guid = UUID.randomUUID().toString(); - this.debug = false; - } - - /** - * GZip compress a string of bytes. - * - * @param input - * @return byte[] the file as a byte array - */ - public static byte[] gzip(String input) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - GZIPOutputStream gzos = null; - try { - gzos = new GZIPOutputStream(baos); - gzos.write(input.getBytes("UTF-8")); - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (gzos != null) { - try { - gzos.close(); - } catch (IOException ignore) { - } - } - } - return baos.toByteArray(); - } - - /** - * Appends a json encoded key/value pair to the given string builder. - * - * @param json - * @param key - * @param value - */ - private static void appendJSONPair(StringBuilder json, String key, String value) { - boolean isValueNumeric = false; - try { - if (value.equals("0") || !value.endsWith("0")) { - Double.parseDouble(value); - isValueNumeric = true; - } - } catch (NumberFormatException e) { - isValueNumeric = false; - } - if (json.charAt(json.length() - 1) != '{') { - json.append(','); - } - json.append(escapeJSON(key)); - json.append(':'); - if (isValueNumeric) { - json.append(value); - } else { - json.append(escapeJSON(value)); - } - } - - /** - * Escape a string to create a valid JSON string - * - * @param text - * @return String - */ - private static String escapeJSON(String text) { - StringBuilder builder = new StringBuilder(); - builder.append('"'); - for (int index = 0; index < text.length(); index++) { - char chr = text.charAt(index); - switch (chr) { - case '"': - case '\\': - builder.append('\\'); - builder.append(chr); - break; - case '\b': - builder.append("\\b"); - break; - case '\t': - builder.append("\\t"); - break; - case '\n': - builder.append("\\n"); - break; - case '\r': - builder.append("\\r"); - break; - default: - if (chr < ' ') { - String t = "000" + Integer.toHexString(chr); - builder.append("\\u" + t.substring(t.length() - 4)); - } else { - builder.append(chr); - } - break; - } - } - builder.append('"'); - return builder.toString(); - } - - /** - * Encode text as UTF-8 - * - * @param text the text to encode - * @return the encoded text, as UTF-8 - */ - private static String urlEncode(String text) throws UnsupportedEncodingException { - return URLEncoder.encode(text, "UTF-8"); - } - - /** - * Construct and create a Graph that can be used to separate specific plotters to their own graphs on the metrics - * website. Plotters can be added to the graph object returned. - * - * @param name The name of the graph - * @return Graph object created. Will never return NULL under normal circumstances unless bad parameters are given - */ - public Graph createGraph(String name) { - if (name == null) { - throw new IllegalArgumentException("Graph name cannot be null"); - } - // Construct the graph object - Graph graph = new Graph(name); - // Now we can add our graph - this.graphs.add(graph); - // and return back - return graph; - } - - /** - * Add a Graph object to BukkitMetrics that represents data for the plugin that should be sent to the backend - * - * @param graph The name of the graph - */ - public void addGraph(Graph graph) { - if (graph == null) { - throw new IllegalArgumentException("Graph cannot be null"); - } - this.graphs.add(graph); - } - - /** - * Start measuring statistics. This will immediately create an async repeating task as the plugin and send the - * initial data to the metrics backend, and then after that it will post in increments of PING_INTERVAL * 1200 - * ticks. - * - * @return True if statistics measuring is running, otherwise false. - */ - public boolean start() { - // Is metrics already running? - if (this.taskId != -1) { - return true; - } - // Begin hitting the server with glorious data - this.taskId = TaskManager.IMP.taskRepeatAsync(new Runnable() { - private boolean firstPost = true; - - @Override public void run() { - try { - postPlugin(!this.firstPost); - // After the first post we set firstPost to - // false - // Each post thereafter will be a ping - this.firstPost = false; - } catch (IOException e) { - e.printStackTrace(); - if (Metrics.this.debug) { - plugin.getLogger().log(LogLevel.INFO, "[Metrics] " + e.getMessage()); - } - } - } - }, PING_INTERVAL * 1200); - return true; - } - - /** - * Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task. - * - * @throws java.io.IOException - */ - public void enable() { - // Enable Task, if it is not running - if (this.taskId == -1) { - start(); - } - } - - /** - * Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task. - */ - public void disable() { - // Disable Task, if it is running - if (this.taskId != -1) { - TaskManager.IMP.cancelTask(this.taskId); - this.taskId = -1; - } - } - - /** - * Gets the File object of the config file that should be used to store - * data such as the GUID and opt-out status. - * - * @return the File object for the config file - */ - public File getConfigFile() { - // I believe the easiest way to get the base folder (e.g craftbukkit set - // via -P) for plugins to use - // is to abuse the plugin object we already have - // plugin.getDataFolder() => base/plugins/PluginA/ - // pluginsFolder => base/plugins/ - // The base is not necessarily relative to the startup directory. - File pluginsFolder = this.plugin.getDataFolder().getParentFile(); - // return => base/plugins/PluginMetrics/config.yml - return new File(new File(pluginsFolder, "PluginMetrics"), "config.yml"); - } - - /** - * Generic method that posts a plugin to the metrics website. - */ - private void postPlugin(boolean isPing) throws IOException { - // Server software specific section - PluginDescription description = this.plugin.getDescription(); - String pluginName = description.getName(); - boolean onlineMode = false; - String pluginVersion = description.getVersion(); - String serverVersion = plugin.getServer().getNukkitVersion(); - int playersOnline = plugin.getServer().getOnlinePlayers().size(); - // END server software specific section -- all code below does not use - // any code outside of this class / Java - // Construct the post data - StringBuilder json = new StringBuilder(1024); - json.append('{'); - // The plugin's description file containing all of the plugin data such as name, version, author, etc - appendJSONPair(json, "guid", this.guid); - appendJSONPair(json, "plugin_version", pluginVersion); - appendJSONPair(json, "server_version", serverVersion); - appendJSONPair(json, "players_online", Integer.toString(playersOnline)); - // New data as of R6 - String osname = System.getProperty("os.name"); - String osarch = System.getProperty("os.arch"); - String osversion = System.getProperty("os.version"); - String java_version = System.getProperty("java.version"); - int coreCount = Runtime.getRuntime().availableProcessors(); - // normalize os arch .. amd64 -> x86_64 - if (osarch.equals("amd64")) { - osarch = "x86_64"; - } - appendJSONPair(json, "osname", osname); - appendJSONPair(json, "osarch", osarch); - appendJSONPair(json, "osversion", osversion); - appendJSONPair(json, "cores", Integer.toString(coreCount)); - appendJSONPair(json, "auth_mode", onlineMode ? "1" : "0"); - appendJSONPair(json, "java_version", java_version); - // If we're pinging, append it - if (isPing) { - appendJSONPair(json, "ping", "1"); - } - if (!this.graphs.isEmpty()) { - synchronized (this.graphs) { - json.append(','); - json.append('"'); - json.append("graphs"); - json.append('"'); - json.append(':'); - json.append('{'); - boolean firstGraph = true; - for (Graph graph : this.graphs) { - StringBuilder graphJson = new StringBuilder(); - graphJson.append('{'); - for (Plotter plotter : graph.getPlotters()) { - appendJSONPair(graphJson, plotter.getColumnName(), - Integer.toString(plotter.getValue())); - } - graphJson.append('}'); - if (!firstGraph) { - json.append(','); - } - json.append(escapeJSON(graph.getName())); - json.append(':'); - json.append(graphJson); - firstGraph = false; - } - json.append('}'); - } - } - // close json - json.append('}'); - // Create the url - URL url = new URL(BASE_URL + String.format(REPORT_URL, urlEncode(pluginName))); - // Connect to the website - URLConnection connection; - // Mineshafter creates a socks proxy, so we can safely bypass it - // It does not reroute POST requests so we need to go around it - if (isMineshafterPresent()) { - connection = url.openConnection(Proxy.NO_PROXY); - } else { - connection = url.openConnection(); - } - byte[] uncompressed = json.toString().getBytes(); - byte[] compressed = gzip(json.toString()); - // Headers - connection.addRequestProperty("User-Agent", "MCStats/" + REVISION); - connection.addRequestProperty("Content-Type", "application/json"); - connection.addRequestProperty("Content-Encoding", "gzip"); - connection.addRequestProperty("Content-Length", Integer.toString(compressed.length)); - connection.addRequestProperty("Accept", "application/json"); - connection.addRequestProperty("Connection", "close"); - connection.setDoOutput(true); - if (this.debug) { - PlotSquared.debug("[Metrics] Prepared request for " + pluginName + " uncompressed=" - + uncompressed.length + " compressed=" + compressed.length); - } - try { - try (OutputStream os = connection.getOutputStream()) { - os.write(compressed); - os.flush(); - } - String response; - try (BufferedReader reader = new BufferedReader( - new InputStreamReader(connection.getInputStream()))) { - response = reader.readLine(); - if (this.debug) { - PlotSquared.debug("[Metrics] Response for " + pluginName + ": " + response); - } - } - if (response == null || response.startsWith("ERR") || response.startsWith("7")) { - if (response == null) { - response = "null"; - } else if (response.startsWith("7")) { - response = response.substring(response.startsWith("7,") ? 2 : 1); - } - throw new IOException(response); - } else { - // Is this the first update this hour? - if ("1".equals(response) || response - .contains("This is your first update this hour")) { - synchronized (this.graphs) { - for (Graph graph : this.graphs) { - for (Plotter plotter : graph.getPlotters()) { - plotter.reset(); - } - } - } - } - } - } catch (Exception e) { - if (this.debug) { - e.printStackTrace(); - } - } - } - - /** - * Check if mineshafter is present. If it is, we need to bypass it to send POST requests - * - * @return true if mineshafter is installed on the server - */ - private boolean isMineshafterPresent() { - try { - Class.forName("mineshafter.MineServer"); - return true; - } catch (ClassNotFoundException e) { - return false; - } - } - - /** - * Represents a custom graph on the website - */ - public static class Graph { - - /** - * The graph's name, alphanumeric and spaces only :) If it does not comply to the above when submitted, it is - * rejected - */ - private final String name; - /** - * The set of plotters that are contained within this graph - */ - private final Set plotters = new LinkedHashSet<>(); - - private Graph(String name) { - this.name = name; - } - - /** - * Gets the graph's name - * - * @return the Graph's name - */ - public String getName() { - return this.name; - } - - /** - * Add a plotter to the graph, which will be used to plot entries - * - * @param plotter the plotter to add to the graph - */ - public void addPlotter(Plotter plotter) { - this.plotters.add(plotter); - } - - /** - * Remove a plotter from the graph - * - * @param plotter the plotter to remove from the graph - */ - public void removePlotter(Plotter plotter) { - this.plotters.remove(plotter); - } - - /** - * Gets an unmodifiable set of the plotter objects in the graph - * - * @return an unmodifiable {@link java.util.Set} of the plotter objects - */ - public Set getPlotters() { - return Collections.unmodifiableSet(this.plotters); - } - - @Override public int hashCode() { - return this.name.hashCode(); - } - - @Override public boolean equals(Object object) { - if (!(object instanceof Graph)) { - return false; - } - Graph graph = (Graph) object; - return graph.name.equals(this.name); - } - - /** - * Called when the server owner decides to opt-out of BukkitMetrics while the server is running. - */ - protected void onOptOut() { - } - } - - - /** - * Interface used to collect custom data for a plugin - */ - public abstract static class Plotter { - - /** - * The plot's name - */ - private final String name; - - /** - * Construct a plotter with the default plot name - */ - public Plotter() { - this("Default"); - } - - /** - * Construct a plotter with a specific plot name - * - * @param name the name of the plotter to use, which will show up on the website - */ - public Plotter(String name) { - this.name = name; - } - - /** - * Get the current value for the plotted point. Since this function defers to an external function it may or may - * not return immediately thus cannot be guaranteed to be thread friendly or safe. This function can be called - * from any thread so care should be taken when accessing resources that need to be synchronized. - * - * @return the current value for the point to be plotted. - */ - public abstract int getValue(); - - /** - * Get the column name for the plotted point - * - * @return the plotted point's column name - */ - public String getColumnName() { - return this.name; - } - - /** - * Called after the website graphs have been updated - */ - public void reset() { - } - - @Override public int hashCode() { - return getColumnName().hashCode(); - } - - @Override public boolean equals(Object object) { - if (!(object instanceof Plotter)) { - return false; - } - Plotter plotter = (Plotter) object; - return plotter.name.equals(this.name) && plotter.getValue() == getValue(); - } - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitChunkManager.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitChunkManager.java deleted file mode 100644 index 32da16dc3..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitChunkManager.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.BlockVector2; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; - -public class NukkitChunkManager extends ChunkManager { - public NukkitChunkManager() { - PlotSquared.debug("Not implemented: NukkitChunkManager"); - } - - @Override public int[] countEntities(Plot plot) { - return new int[0]; - } - - @Override public boolean loadChunk(String world, BlockVector2 loc, boolean force) { - return true; - } - - @Override public void unloadChunk(String world, BlockVector2 loc, boolean save, boolean safe) { - - } - - @Override - public boolean copyRegion(Location pos1, Location pos2, Location newPos, Runnable whenDone) { - return false; - } - - @Override public boolean regenerateRegion(Location pos1, Location pos2, boolean ignoreAugment, - Runnable whenDone) { - return false; - } - - @Override public void clearAllEntities(Location pos1, Location pos2) { - - } - - @Override public void swap(Location bot1, Location top1, Location bot2, Location top2, - Runnable whenDone) { - whenDone.run(); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitCommand.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitCommand.java deleted file mode 100644 index 2fd9b6524..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitCommand.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.Player; -import cn.nukkit.command.Command; -import cn.nukkit.command.CommandSender; -import cn.nukkit.command.ConsoleCommandSender; -import cn.nukkit.command.RemoteConsoleCommandSender; -import com.github.intellectualsites.plotsquared.plot.commands.MainCommand; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; - -public class NukkitCommand extends Command { - - public NukkitCommand(String cmd, String[] aliases) { - super(cmd, "Plot command", "/plot", aliases); - } - - - @Override - public boolean execute(CommandSender commandSender, String commandLabel, String[] args) { - if (commandSender instanceof Player) { - return MainCommand.onCommand(NukkitUtil.getPlayer((Player) commandSender), args); - } - if (commandSender instanceof ConsoleCommandSender - || commandSender instanceof RemoteConsoleCommandSender) { - return MainCommand.onCommand(ConsolePlayer.getConsole(), args); - } - return false; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitEventUtil.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitEventUtil.java deleted file mode 100644 index abb2e4818..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitEventUtil.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.Player; -import cn.nukkit.event.Cancellable; -import cn.nukkit.event.Event; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.nukkit.events.*; -import com.github.intellectualsites.plotsquared.nukkit.object.NukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.util.EventUtil; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.UUID; - -public class NukkitEventUtil extends EventUtil { - - private final NukkitMain plugin; - - public NukkitEventUtil(NukkitMain plugin) { - this.plugin = plugin; - } - - public Player getPlayer(PlotPlayer player) { - if (player instanceof NukkitPlayer) { - return ((NukkitPlayer) player).player; - } - return null; - } - - public boolean callEvent(Event event) { - plugin.getServer().getPluginManager().callEvent(event); - return !(event instanceof Cancellable) || !event.isCancelled(); - } - - @Override public boolean callClaim(PlotPlayer player, Plot plot, boolean auto) { - return callEvent(new PlayerClaimPlotEvent(getPlayer(player), plot, auto)); - } - - @Override public boolean callTeleport(PlotPlayer player, Location from, Plot plot) { - return callEvent(new PlayerTeleportToPlotEvent(getPlayer(player), from, plot)); - } - - @Override public boolean callComponentSet(Plot plot, String component) { - return callEvent(new PlotComponentSetEvent(plot, component)); - } - - @Override public boolean callClear(Plot plot) { - return callEvent(new PlotClearEvent(plot)); - } - - @Override public void callDelete(Plot plot) { - callEvent(new PlotDeleteEvent(plot)); - } - - @Override public boolean callFlagAdd(Flag flag, Plot plot) { - return callEvent(new PlotFlagAddEvent(flag, plot)); - } - - @Override public boolean callFlagRemove(Flag flag, Plot plot, Object value) { - return callEvent(new PlotFlagRemoveEvent(flag, plot)); - } - - @Override public boolean callMerge(Plot plot, ArrayList plots) { - return callEvent(new PlotMergeEvent(NukkitUtil.getWorld(plot.getWorldName()), plot, plots)); - } - - @Override public boolean callUnlink(PlotArea area, ArrayList plots) { - return callEvent(new PlotUnlinkEvent(NukkitUtil.getWorld(area.getWorldName()), area, plots)); - } - - @Override public void callEntry(PlotPlayer player, Plot plot) { - callEvent(new PlayerEnterPlotEvent(getPlayer(player), plot)); - } - - @Override public void callLeave(PlotPlayer player, Plot plot) { - callEvent(new PlayerLeavePlotEvent(getPlayer(player), plot)); - } - - @Override public void callDenied(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotDeniedEvent(getPlayer(initiator), plot, player, added)); - } - - @Override public void callTrusted(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotTrustedEvent(getPlayer(initiator), plot, player, added)); - } - - @Override public void callMember(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotHelperEvent(getPlayer(initiator), plot, player, added)); - } - - @Override - public boolean callOwnerChange(PlotPlayer initiator, Plot plot, UUID oldOwner, UUID newOwner, - boolean hasOldOwner) { - return callEvent( - new PlotChangeOwnerEvent(getPlayer(initiator), plot, oldOwner, newOwner, hasOldOwner)); - } - - @Override public boolean callFlagRemove(Flag flag, Object object, PlotCluster cluster) { - return callEvent(new ClusterFlagRemoveEvent(flag, cluster)); - } - - @Override @Nullable public Rating callRating(PlotPlayer player, Plot plot, Rating rating) { - PlotRateEvent event = new PlotRateEvent(player, rating, plot); - plugin.getServer().getPluginManager().callEvent(event); - if (event.isCancelled()) { - return null; - } - return event.getRating(); - } - -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitHybridUtils.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitHybridUtils.java deleted file mode 100644 index 9ebd66d5d..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitHybridUtils.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.RegionWrapper; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis; - -public class NukkitHybridUtils extends HybridUtils { - - public NukkitHybridUtils() { - PlotSquared.debug("Not implemented: NukkitHybridUtils"); - } - - @Override public void analyzeRegion(final String world, final RegionWrapper region, - final RunnableVal whenDone) { - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitInventoryUtil.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitInventoryUtil.java deleted file mode 100644 index 74e75caec..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitInventoryUtil.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.inventory.PlayerInventory; -import cn.nukkit.item.Item; -import com.github.intellectualsites.plotsquared.nukkit.object.NukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.C; -import com.github.intellectualsites.plotsquared.plot.object.PlotInventory; -import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil; - -public class NukkitInventoryUtil extends InventoryUtil { - - public NukkitInventoryUtil() { - PlotSquared.debug("Not implemented: NukkitInventoryUtil"); - } - - public static Item getItem(PlotItemStack item) { - if (item == null) { - return null; - } - Item stack = new Item(item.id, item.amount, item.data); - if (item.name != null) { - stack.setCustomName(C.color(item.name)); - } - if (item.lore != null) { - // TODO not implemented - } - return stack; - } - - @Override public void open(PlotInventory inv) { - return; // TODO - } - - @Override public void close(PlotInventory inv) { - return; // TODO - } - - @Override public void setItem(PlotInventory inv, int index, PlotItemStack item) { - return; // TODO - } - - public PlotItemStack getItem(Item item) { - if (item == null) { - return null; - } - int id = item.getId(); - int data = item.getDamage(); - int amount = item.count; - String name = item.getCustomName(); - if (name.length() == 0) { - name = null; - } - return new PlotItemStack(id, (short) data, amount, name); - } - - @Override public PlotItemStack[] getItems(PlotPlayer player) { - NukkitPlayer bp = (NukkitPlayer) player; - PlayerInventory inv = bp.player.getInventory(); - PlotItemStack[] items = new PlotItemStack[36]; - for (int i = 0; i < 36; i++) { - items[i] = getItem(inv.getItem(i)); - } - return items; - } - - @Override public boolean isOpen(PlotInventory inv) { - return false; // TODO - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitSchematicHandler.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitSchematicHandler.java deleted file mode 100644 index 4a301101a..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitSchematicHandler.java +++ /dev/null @@ -1,177 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.block.Block; -import cn.nukkit.level.Level; -import cn.nukkit.level.format.generic.BaseFullChunk; -import cn.nukkit.math.Vector3; -import com.github.intellectualsites.plotsquared.jnbt.*; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.plot.object.BlockVector2; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.RegionWrapper; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; - -import java.io.IOException; - -/** - * Schematic Handler. - */ -public class NukkitSchematicHandler extends SchematicHandler { - - private final NukkitMain plugin; - - public NukkitSchematicHandler(NukkitMain plugin) { - this.plugin = plugin; - } - - @Override public void getCompoundTag(final String world, final Set regions, - final RunnableVal whenDone) { - // async - TaskManager.runTaskAsync(new Runnable() { - @Override public void run() { - // Main positions - Location[] corners = MainUtil.getCorners(world, regions); - final Location bot = corners[0]; - Location top = corners[1]; - - final int width = top.getX() - bot.getX() + 1; - int height = top.getY() - bot.getY() + 1; - final int length = top.getZ() - bot.getZ() + 1; - // Main Schematic tag - final HashMap schematic = new HashMap<>(); - schematic.put("Width", new ShortTag("Width", (short) width)); - schematic.put("Length", new ShortTag("Length", (short) length)); - schematic.put("Height", new ShortTag("Height", (short) height)); - schematic.put("Materials", new StringTag("Materials", "Alpha")); - schematic.put("WEOriginX", new IntTag("WEOriginX", 0)); - schematic.put("WEOriginY", new IntTag("WEOriginY", 0)); - schematic.put("WEOriginZ", new IntTag("WEOriginZ", 0)); - schematic.put("WEOffsetX", new IntTag("WEOffsetX", 0)); - schematic.put("WEOffsetY", new IntTag("WEOffsetY", 0)); - schematic.put("WEOffsetZ", new IntTag("WEOffsetZ", 0)); - // Arrays of data types - final List tileEntities = new ArrayList<>(); - final byte[] blocks = new byte[width * height * length]; - final byte[] blockData = new byte[width * height * length]; - // Queue - final ArrayDeque queue = new ArrayDeque<>(regions); - TaskManager.runTask(new Runnable() { - @Override public void run() { - if (queue.isEmpty()) { - TaskManager.runTaskAsync(new Runnable() { - @Override public void run() { - schematic.put("Blocks", new ByteArrayTag("Blocks", blocks)); - schematic.put("Data", new ByteArrayTag("Data", blockData)); - schematic.put("Entities", - new ListTag("Entities", CompoundTag.class, - new ArrayList<>())); - schematic.put("TileEntities", - new ListTag("TileEntities", CompoundTag.class, - tileEntities)); - whenDone.value = new CompoundTag("Schematic", schematic); - TaskManager.runTask(whenDone); - System.gc(); - System.gc(); - } - }); - return; - } - final Runnable regionTask = this; - RegionWrapper region = queue.poll(); - Location pos1 = new Location(world, region.minX, region.minY, region.minZ); - Location pos2 = new Location(world, region.maxX, region.maxY, region.maxZ); - final int bx = bot.getX(); - final int bz = bot.getZ(); - final int p1x = pos1.getX(); - final int p1z = pos1.getZ(); - final int p2x = pos2.getX(); - final int p2z = pos2.getZ(); - final int bcx = p1x >> 4; - final int bcz = p1z >> 4; - final int tcx = p2x >> 4; - final int tcz = p2z >> 4; - final int sy = pos1.getY(); - final int ey = pos2.getY(); - // Generate list of chunks - final ArrayList chunks = new ArrayList<>(); - for (int x = bcx; x <= tcx; x++) { - for (int z = bcz; z <= tcz; z++) { - chunks.add(BlockVector2.at(x, z)); - } - } - final Level worldObj = plugin.getServer().getLevelByName(world); - // Main thread - final Vector3 mutable = new Vector3(); - TaskManager.runTask(new Runnable() { - @Override public void run() { - long start = System.currentTimeMillis(); - while (!chunks.isEmpty() - && System.currentTimeMillis() - start < 20) { - // save schematics - BlockVector2 chunk = chunks.remove(0); - BaseFullChunk bc = worldObj.getChunk(chunk.x, chunk.z); - try { - bc.load(false); - } catch (IOException e) { - continue; - } - int X = chunk.x; - int Z = chunk.z; - int xxb = X << 4; - int zzb = Z << 4; - int xxt = xxb + 15; - int zzt = zzb + 15; - - if (X == bcx) { - xxb = p1x; - } - if (X == tcx) { - xxt = p2x; - } - if (Z == bcz) { - zzb = p1z; - } - if (Z == tcz) { - zzt = p2z; - } - for (int y = sy; y <= Math.min(255, ey); y++) { - int ry = y - sy; - int i1 = ry * width * length; - for (int z = zzb; z <= zzt; z++) { - int rz = z - bz; - int i2 = i1 + rz * width; - for (int x = xxb; x <= xxt; x++) { - int rx = x - bx; - int index = i2 + rx; - mutable.x = x; - mutable.y = y; - mutable.z = z; - Block block = worldObj.getBlock(mutable); - blocks[index] = (byte) block.getId(); - blockData[index] = (byte) block.getDamage(); - } - } - } - } - if (!chunks.isEmpty()) { - TaskManager.runTaskLater(this, 1); - } else { - regionTask.run(); - } - } - }); - } - }); - } - }); - } - - @Override - public boolean restoreTile(LocalBlockQueue queue, CompoundTag ct, int x, int y, int z) { - return false; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitSetupUtils.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitSetupUtils.java deleted file mode 100644 index 979a8fc58..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitSetupUtils.java +++ /dev/null @@ -1,181 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.level.Level; -import cn.nukkit.level.generator.Generator; -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.nukkit.generator.NukkitPlotGenerator; -import com.github.intellectualsites.plotsquared.nukkit.util.block.NukkitHybridGen; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.Objects; - -public class NukkitSetupUtils extends SetupUtils { - - private final NukkitMain plugin; - - public NukkitSetupUtils(NukkitMain plugin) { - this.plugin = plugin; - Generator.addGenerator(NukkitHybridGen.class, "PlotSquared", 1); - } - - @Override public void unload(String world, boolean save) { - plugin.getServer().unloadLevel(plugin.getServer().getLevelByName(world), save); - } - - @Override public void updateGenerators() { - if (!SetupUtils.generators.isEmpty()) { - return; - } - String testWorld = "CheckingPlotSquaredGenerator"; - HashMap map = new HashMap<>(); - map.put("world", testWorld); - map.put("plot-generator", PlotSquared.get().IMP.getDefaultGenerator()); - NukkitPlotGenerator gen = new NukkitPlotGenerator(map); - SetupUtils.generators.put(PlotSquared.imp().getPluginName(), gen); - } - - @Override public String setupWorld(SetupObject object) { - SetupUtils.manager.updateGenerators(); - ConfigurationNode[] steps = object.step == null ? new ConfigurationNode[0] : object.step; - String world = object.world; - int type = object.type; - String worldPath = "worlds." + object.world; - if (!PlotSquared.get().worlds.contains(worldPath)) { - PlotSquared.get().worlds.createSection(worldPath); - } - ConfigurationSection worldSection = - PlotSquared.get().worlds.getConfigurationSection(worldPath); - switch (type) { - case 2: { - if (object.id != null) { - String areaName = object.id + "-" + object.min + "-" + object.max; - String areaPath = "areas." + areaName; - if (!worldSection.contains(areaPath)) { - worldSection.createSection(areaPath); - } - ConfigurationSection areaSection = - worldSection.getConfigurationSection(areaPath); - HashMap options = new HashMap<>(); - for (ConfigurationNode step : steps) { - options.put(step.getConstant(), step.getValue()); - } - options.put("generator.type", object.type); - options.put("generator.terrain", object.terrain); - options.put("generator.plugin", object.plotManager); - if (object.setupGenerator != null && !object.setupGenerator - .equals(object.plotManager)) { - options.put("generator.init", object.setupGenerator); - } - for (Entry entry : options.entrySet()) { - String key = entry.getKey(); - Object value = entry.getValue(); - if (worldSection.contains(key)) { - Object current = worldSection.get(key); - if (!Objects.equals(value, current)) { - areaSection.set(key, value); - } - } else { - worldSection.set(key, value); - } - } - } - GeneratorWrapper gen = SetupUtils.generators.get(object.setupGenerator); - if (gen != null && gen.isFull()) { - object.setupGenerator = null; - } - break; - } - case 1: - for (ConfigurationNode step : steps) { - worldSection.set(step.getConstant(), step.getValue()); - } - PlotSquared.get().worlds.set("worlds." + world + ".generator.type", object.type); - PlotSquared.get().worlds - .set("worlds." + world + ".generator.terrain", object.terrain); - PlotSquared.get().worlds - .set("worlds." + world + ".generator.plugin", object.plotManager); - if (object.setupGenerator != null && !object.setupGenerator - .equals(object.plotManager)) { - PlotSquared.get().worlds - .set("worlds." + world + ".generator.init", object.setupGenerator); - } - GeneratorWrapper gen = SetupUtils.generators.get(object.setupGenerator); - if (gen != null && gen.isFull()) { - object.setupGenerator = null; - } - break; - case 0: - for (ConfigurationNode step : steps) { - worldSection.set(step.getConstant(), step.getValue()); - } - break; - } - try { - PlotSquared.get().worlds.save(PlotSquared.get().worldsFile); - } catch (IOException e) { - e.printStackTrace(); - } - if (object.setupGenerator != null) { - HashMap map = new HashMap<>(); - map.put("world", object.world); - map.put("plot-generator", PlotSquared.get().IMP.getDefaultGenerator()); - if (!plugin.getServer() - .generateLevel(object.world, object.world.hashCode(), NukkitHybridGen.class, map)) { - plugin.getServer().loadLevel(object.world); - } - try { - // File nukkitFile = new File("nukkit.yml"); - // YamlConfiguration nukkitYml = YamlConfiguration.loadConfiguration(nukkitFile); - // if (!nukkitYml.contains("worlds." + object.world + ".generator")) { - // nukkitYml.set("worlds." + object.world + ".generator", object.setupGenerator); - // nukkitYml.save(nukkitFile); - // } - } catch (Throwable e) { - e.printStackTrace(); - } - } else { - if (!plugin.getServer().generateLevel(object.world, object.world.hashCode())) { - plugin.getServer().loadLevel(object.world); - } - } - return object.world; - } - - @Override public String getGenerator(PlotArea plotArea) { - if (SetupUtils.generators.isEmpty()) { - updateGenerators(); - } - Level world = NukkitUtil.getWorld(plotArea.getWorldName()); - if (world == null) { - return null; - } - try { - Field field = Level.class.getDeclaredField("generatorInstance"); - field.setAccessible(true); - Generator generator = (Generator) field.get(world); - if (!(generator instanceof NukkitPlotGenerator)) { - return null; - } - for (Entry> entry : SetupUtils.generators.entrySet()) { - GeneratorWrapper current = entry.getValue(); - if (current.equals(generator)) { - return entry.getKey(); - } - } - return PlotSquared.imp().getPluginName(); - } catch (Throwable e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitTaskManager.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitTaskManager.java deleted file mode 100644 index 2aefeab68..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitTaskManager.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.scheduler.TaskHandler; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; - -import java.util.HashMap; -import java.util.concurrent.atomic.AtomicInteger; - -public class NukkitTaskManager extends TaskManager { - - private final NukkitMain plugin; - private AtomicInteger index = new AtomicInteger(0); - private HashMap tasks = new HashMap<>(); - - public NukkitTaskManager(NukkitMain bukkitMain) { - this.plugin = bukkitMain; - } - - @Override public int taskRepeat(Runnable r, int interval) { - TaskHandler task = - this.plugin.getServer().getScheduler().scheduleRepeatingTask(r, interval, false); - return task.getTaskId(); - } - - @SuppressWarnings("deprecation") @Override - public int taskRepeatAsync(Runnable r, int interval) { - TaskHandler task = - this.plugin.getServer().getScheduler().scheduleRepeatingTask(r, interval, true); - return task.getTaskId(); - } - - @Override public void taskAsync(Runnable r) { - if (r == null) { - return; - } - this.plugin.getServer().getScheduler().scheduleTask(r, true); - } - - @Override public void task(Runnable r) { - if (r == null) { - return; - } - this.plugin.getServer().getScheduler().scheduleTask(r, false); - } - - @Override public void taskLater(Runnable r, int delay) { - if (r == null) { - return; - } - this.plugin.getServer().getScheduler().scheduleDelayedTask(r, delay); - } - - @Override public void taskLaterAsync(Runnable r, int delay) { - this.plugin.getServer().getScheduler().scheduleDelayedTask(r, delay, true); - } - - @Override public void cancelTask(int task) { - if (task != -1) { - this.plugin.getServer().getScheduler().cancelTask(task); - } - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitTitleUtil.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitTitleUtil.java deleted file mode 100644 index 474241686..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitTitleUtil.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.Player; -import com.github.intellectualsites.plotsquared.nukkit.object.NukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.AbstractTitle; - -public class NukkitTitleUtil extends AbstractTitle { - @Override - public void sendTitle(PlotPlayer player, String head, String sub, int in, int delay, int out) { - Player plr = ((NukkitPlayer) player).player; - plr.sendTitle(head, sub, in, delay, out); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitUtil.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitUtil.java deleted file mode 100644 index ad085dca3..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/NukkitUtil.java +++ /dev/null @@ -1,279 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util; - -import cn.nukkit.OfflinePlayer; -import cn.nukkit.Player; -import cn.nukkit.block.Block; -import cn.nukkit.block.BlockWallSign; -import cn.nukkit.blockentity.BlockEntity; -import cn.nukkit.blockentity.BlockEntitySign; -import cn.nukkit.entity.Entity; -import cn.nukkit.item.Item; -import cn.nukkit.level.Level; -import cn.nukkit.level.Position; -import cn.nukkit.level.biome.Biome; -import cn.nukkit.level.biome.EnumBiome; -import cn.nukkit.math.Vector3; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.nukkit.object.NukkitPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RegionWrapper; -import com.github.intellectualsites.plotsquared.plot.object.schematic.PlotItem; - -import java.lang.reflect.Field; -import java.util.ArrayList; - -public class NukkitUtil extends WorldUtil { - - private static String lastString = null; - private static Level lastWorld = null; - - private static Player lastPlayer = null; - private static PlotPlayer lastPlotPlayer = null; - private static NukkitMain plugin; - - public NukkitUtil(NukkitMain plugin) { - this.plugin = plugin; - } - - public static void removePlayer(String player) { - lastPlayer = null; - lastPlotPlayer = null; - } - - public static PlotPlayer getPlayer(OfflinePlayer op) { - if (op.isOnline()) { - return getPlayer(op.getPlayer()); - } - return null; - } - - public static PlotPlayer getPlayer(Player player) { - if (player == lastPlayer) { - return lastPlotPlayer; - } - String name = player.getName(); - PlotPlayer plotPlayer = UUIDHandler.getPlayer(name); - if (plotPlayer != null) { - return plotPlayer; - } - lastPlotPlayer = new NukkitPlayer(player); - UUIDHandler.getPlayers().put(name, lastPlotPlayer); - lastPlayer = player; - return lastPlotPlayer; - } - - public static Location getLocation(cn.nukkit.level.Location location) { - return new Location(location.getLevel().getName(), MathMan.roundInt(location.getX()), - MathMan.roundInt(location.getY()), MathMan.roundInt(location.getZ())); - } - - public static Location getLocation(cn.nukkit.level.Position location) { - return new Location(location.getLevel().getName(), MathMan.roundInt(location.getX()), - MathMan.roundInt(location.getY()), MathMan.roundInt(location.getZ())); - } - - public static cn.nukkit.level.Location getLocation(Location location) { - return new cn.nukkit.level.Location(location.getX(), location.getY(), location.getZ(), 0, 0, - getWorld(location.getWorld())); - } - - public static Level getWorld(String string) { - if (StringMan.isEqual(string, lastString)) { - if (lastWorld != null) { - return lastWorld; - } - } - Level world = plugin.getServer().getLevelByName(string); - lastString = string; - lastWorld = world; - return world; - } - - public static String getWorld(Entity entity) { - return entity.getLevel().getName(); - } - - public static Entity[] getEntities(String worldName) { - return getWorld(worldName).getEntities(); - } - - public static Location getLocation(Entity entity) { - cn.nukkit.level.Location location = entity.getLocation(); - String world = location.getLevel().getName(); - return new Location(world, location.getFloorX(), location.getFloorY(), - location.getFloorZ()); - } - - public static Location getLocationFull(Entity entity) { - cn.nukkit.level.Location location = entity.getLocation(); - return new Location(location.getLevel().getName(), MathMan.roundInt(location.getX()), - MathMan.roundInt(location.getY()), MathMan.roundInt(location.getZ()), - (float) location.getYaw(), (float) location.getPitch()); - } - - @Override public boolean isWorld(String worldName) { - return getWorld(worldName) != null; - } - - @Override public String getBiome(String world, int x, int z) { - int id = getWorld(world).getBiomeId(x, z); - return EnumBiome.getBiome(id).getName(); - } - - @Override public void setSign(String worldName, int x, int y, int z, String[] lines) { - Level world = getWorld(worldName); - BlockWallSign sign = new BlockWallSign(0); - Vector3 pos = new Vector3(x, y, z); - world.setBlock(pos, sign); - BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof BlockEntitySign) { - ((BlockEntitySign) tile).setText(lines[0], lines[1], lines[2], lines[3]); - tile.scheduleUpdate(); - } - } - - @Override public String[] getSign(Location location) { - Level world = getWorld(location.getWorld()); - Vector3 pos = new Vector3(location.getX(), location.getY(), location.getZ()); - BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof BlockEntitySign) { - return ((BlockEntitySign) tile).getText(); - } - return null; - } - - @Override public Location getSpawn(PlotPlayer player) { - return getLocation(((NukkitPlayer) player).player.getSpawn()); - } - - @Override public Location getSpawn(String world) { - Position loc = getWorld(world).getSpawnLocation(); - return new Location(world, loc.getFloorX(), loc.getFloorY(), loc.getFloorZ(), 0, 0); - } - - @Override public void setSpawn(Location location) { - Level world = getWorld(location.getWorld()); - if (world != null) { - world.setSpawnLocation(new Vector3(location.getX(), location.getY(), location.getZ())); - } - } - - @Override public void saveWorld(String worldName) { - Level world = getWorld(worldName); - if (world != null) { - world.save(); - } - } - - @Override public int getHighestBlock(String world, int x, int z) { - return getWorld(world).getHeightMap(x, z); - } - - @Override public int getBiomeFromString(String biomeString) { - try { - Biome biome = EnumBiome.getBiome(biomeString.toUpperCase()); - return biome.getId(); - } catch (Throwable ignored) { - return -1; - } - } - - @Override public String[] getBiomeList() { - ArrayList biomes = new ArrayList<>(); - for (Field field : Biome.class.getDeclaredFields()) { - if (field.getName().equals(field.getName().toUpperCase())) { - biomes.add(field.getName()); - } - } - return biomes.toArray(new String[biomes.size()]); - } - - @Override public boolean addItems(String worldName, PlotItem items) { - return false; - } - - @Override public boolean isBlockSolid(PlotBlock block) { - try { - Item item = Item.get(block.id, (int) block.data); - return (item != null && item.canBePlaced() && !Block.transparent[item.getId()] - && Block.solid[item.getId()]); - } catch (Exception ignored) { - ignored.printStackTrace(); - return false; - } - } - - @Override public String getClosestMatchingName(PlotBlock block) { - try { - return Item.get(block.id, (int) block.data).getName(); - } catch (Exception ignored) { - return null; - } - } - - @Override public StringComparison.ComparisonResult getClosestBlock(String name) { - try { - Item item = Item.fromString(name); - return new StringComparison().new ComparisonResult(0, - PlotBlock.get(item.getId(), item.getDamage())); - } catch (IllegalArgumentException ignored) { - } - try { - byte data; - String[] split = name.split(":"); - if (split.length == 2) { - data = Byte.parseByte(split[1]); - name = split[0]; - } else { - data = 0; - } - double match; - short id; - if (MathMan.isInteger(split[0])) { - id = Short.parseShort(split[0]); - match = 0; - } else { - StringComparison.ComparisonResult comparison = - new StringComparison<>(name, Item.getCreativeItems()).getBestMatchAdvanced(); - match = comparison.match; - id = (short) comparison.best.getId(); - } - PlotBlock block = PlotBlock.get(id, data); - StringComparison outer = new StringComparison<>(); - return outer.new ComparisonResult(match, block); - - } catch (NumberFormatException ignored) { - } - return null; - } - - @Override public void setBiomes(String worldName, RegionWrapper region, String biomeString) { - Level world = getWorld(worldName); - try { - int biome = (int) Biome.class.getDeclaredField(biomeString.toUpperCase()).get(null); - for (int x = region.minX; x <= region.maxX; x++) { - for (int z = region.minZ; z <= region.maxZ; z++) { - world.setBiomeId(x, z, (byte) biome); - } - } - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Override public PlotBlock getBlock(Location location) { - Level world = getWorld(location.getWorld()); - int id = world.getBlockIdAt(location.getX(), location.getY(), location.getZ()); - if (id == 0) { - return PlotBlock.get(0, 0); - } - int data = world.getBlockDataAt(location.getX(), location.getY(), location.getZ()); - return PlotBlock.get(id, data); - } - - @Override public String getMainWorld() { - return plugin.getServer().getDefaultLevel().getName(); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitHybridGen.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitHybridGen.java deleted file mode 100644 index 6af270e63..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitHybridGen.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util.block; - -import com.sk89q.worldedit.math.BlockVector2; - -import cn.nukkit.level.Level; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.nukkit.generator.NukkitPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; - -import java.util.Map; - -public class NukkitHybridGen extends NukkitPlotGenerator { - public NukkitHybridGen(Map settings) { - super(defaultSettings(settings)); - } - - private static Map defaultSettings(Map existing) { - if (!existing.containsKey("world")) { - Map levels = - ((NukkitMain) PlotSquared.get().IMP).getServer().getLevels(); - int max = -1; - for (Map.Entry entry : levels.entrySet()) { - int id = entry.getKey(); - if (id > max) { - max = id; - existing.put("world", entry.getValue().getName()); - } - } - } - existing.put("plot-generator", PlotSquared.get().IMP.getDefaultGenerator()); - return existing; - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitLocalQueue.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitLocalQueue.java deleted file mode 100644 index 297df7c6b..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitLocalQueue.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util.block; - -import com.sk89q.worldedit.math.BlockVector2; - -import cn.nukkit.block.Block; -import cn.nukkit.level.Level; -import cn.nukkit.level.biome.EnumBiome; -import cn.nukkit.level.format.FullChunk; -import cn.nukkit.level.format.generic.BaseFullChunk; -import cn.nukkit.math.Vector3; -import com.github.intellectualsites.plotsquared.nukkit.NukkitMain; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; -import com.github.intellectualsites.plotsquared.plot.util.block.BasicLocalBlockQueue; - -public class NukkitLocalQueue extends BasicLocalBlockQueue { - - private final Level level; - private Vector3 mutable; - - public NukkitLocalQueue(String world) { - super(world); - this.level = ((NukkitMain) PlotSquared.get().IMP).getServer().getLevelByName(world); - } - - @Override public LocalChunk getLocalChunk(int x, int z) { - return (LocalChunk) new BasicLocalChunk(this, x, z) { - // Custom stuff? - }; - } - - @Override public void optimize() { - - } - - @Override public PlotBlock getBlock(int x, int y, int z) { - Block block = level.getBlock(getMut(x, y, z)); - if (block == null) { - return PlotBlock.get(0, 0); - } - int id = block.getId(); - if (id == 0) { - return PlotBlock.get(0, 0); - } - return PlotBlock.get(id, block.getDamage()); - } - - @Override public void refreshChunk(int x, int z) { - - } - - @Override public void fixChunkLighting(int x, int z) { - // Do nothing - } - - @Override public final void regenChunk(int x, int z) { - level.regenerateChunk(x, z); - } - - @Override public final void setComponents(LocalChunk lc) { - setBlocks(lc); - setBiomes(lc); - } - - public BaseFullChunk getChunk(int x, int z) { - return level.getChunk(x, z); - } - - private Vector3 getMut(int x, int y, int z) { - mutable.x = x; - mutable.y = y; - mutable.z = z; - return mutable; - } - - public void setBlocks(LocalChunk lc) { - FullChunk chunk = level.getChunk(lc.getX(), lc.getZ(), true); - for (int layer = 0; layer < lc.blocks.length; layer++) { - PlotBlock[] blocksLayer = (PlotBlock[]) lc.blocks[layer]; - if (blocksLayer != null) { - int by = layer << 4; - int j = 0; - for (int y = by; y < by + 16; y++) { - for (int z = 0; z < 16; z++) { - for (int x = 0; x < 16; x++, j++) { - PlotBlock block = blocksLayer[j]; - if (block != null) { - chunk.setBlock(x, y, z, (int) block.id, (int) block.data); - } - } - } - } - } - } - } - - public void setBiomes(LocalChunk lc) { - if (lc.biomes != null) { - int bx = lc.getX() << 4; - int bz = lc.getX() << 4; - String last = null; - int biome = -1; - for (int x = 0; x < lc.biomes.length; x++) { - String[] biomes2 = lc.biomes[x]; - if (biomes2 != null) { - for (int y = 0; y < biomes2.length; y++) { - String biomeStr = biomes2[y]; - if (biomeStr != null) { - biome = EnumBiome.getBiome(biomeStr.toUpperCase()).getId(); - level.setBiomeId(bx + x, bz + y, (byte) biome); - } - } - } - } - } - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitWrappedChunk.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitWrappedChunk.java deleted file mode 100644 index bc5182947..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/util/block/NukkitWrappedChunk.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.util.block; - -import com.sk89q.worldedit.math.BlockVector2; - -import cn.nukkit.level.biome.Biome; -import cn.nukkit.level.biome.EnumBiome; -import cn.nukkit.level.format.generic.BaseFullChunk; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; - -public class NukkitWrappedChunk extends ScopedLocalBlockQueue { - private final String world; - private BaseFullChunk chunk; - - public NukkitWrappedChunk(String world, BaseFullChunk chunk) { - super(null, new Location(null, 0, 0, 0), new Location(null, 15, 127, 15)); - this.world = world; - init(chunk); - } - - public void init(BaseFullChunk chunk) { - this.chunk = chunk; - } - - @Override public boolean setBlock(int x, int y, int z, int id, int data) { - chunk.setBlock(x, y, z, id, data); - return true; - } - - @Override public PlotBlock getBlock(int x, int y, int z) { - int id = chunk.getBlockId(x, y, z); - if (id == 0) { - return PlotBlock.get(0, 0); - } - int data = chunk.getBlockData(x, y, z); - return PlotBlock.get(id, data); - } - - @Override public boolean setBiome(int x, int z, String biome) { - Biome b = EnumBiome.getBiome(biome); - int id = b.getId(); - chunk.setBiomeId(x, z, id); - return true; - } - - @Override public void fillBiome(String biome) { - Biome b = EnumBiome.getBiome(biome); - int id = b.getId(); - for (int x = 0; x < 16; x++) { - for (int z = 0; z < 16; z++) { - chunk.setBiomeId(x, z, id); - } - } - } - - @Override public String getWorld() { - return world; - } - - public int getX() { - return chunk.getX(); - } - - public int getZ() { - return chunk.getZ(); - } - - @Override public Location getMax() { - return new Location(getWorld(), 15 + (getX() << 4), 255, 15 + (getZ() << 4)); - } - - @Override public Location getMin() { - return new Location(getWorld(), getX() << 4, 0, getZ() << 4); - } - - public NukkitWrappedChunk clone() { - return new NukkitWrappedChunk(world, chunk); - } - - public NukkitWrappedChunk shallowClone() { - return new NukkitWrappedChunk(world, chunk); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/DatFileFilter.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/DatFileFilter.java deleted file mode 100644 index a60c7a77c..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/DatFileFilter.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.uuid; - -import java.io.File; -import java.io.FilenameFilter; - -public class DatFileFilter implements FilenameFilter { - - @Override public boolean accept(File dir, String name) { - return name.endsWith(".dat"); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/FileUUIDHandler.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/FileUUIDHandler.java deleted file mode 100644 index a9d6693c2..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/FileUUIDHandler.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.uuid; - -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.C; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandlerImplementation; -import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; -import com.google.common.collect.HashBiMap; - -import java.io.File; -import java.util.HashMap; -import java.util.UUID; - -public class FileUUIDHandler extends UUIDHandlerImplementation { - - public FileUUIDHandler(UUIDWrapper wrapper) { - super(wrapper); - } - - @Override public boolean startCaching(Runnable whenDone) { - return super.startCaching(whenDone) && cache(whenDone); - } - - public boolean cache(final Runnable whenDone) { - final File container = new File("players"); - TaskManager.runTaskAsync(new Runnable() { - @Override public void run() { - PlotSquared.debug(C.PREFIX + "&6Starting player data caching for: " + container); - HashBiMap toAdd = - HashBiMap.create(new HashMap()); - for (File file : container.listFiles(new DatFileFilter())) { - String fileName = file.getName(); - String name = fileName.substring(0, fileName.length() - 4); - UUID uuid = uuidWrapper.getUUID(name); - toAdd.put(new StringWrapper(name), uuid); - long last = file.lastModified(); - if (ExpireManager.IMP != null) { - ExpireManager.IMP.storeDate(uuid, last); - } - } - add(toAdd); - if (whenDone != null) { - whenDone.run(); - } - } - }); - return true; - } - - @Override public void fetchUUID(final String name, final RunnableVal ifFetch) { - TaskManager.runTaskAsync(new Runnable() { - @Override public void run() { - ifFetch.value = FileUUIDHandler.this.uuidWrapper.getUUID(name); - TaskManager.runTask(ifFetch); - } - }); - } -} diff --git a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/LowerOfflineUUIDWrapper.java b/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/LowerOfflineUUIDWrapper.java deleted file mode 100644 index e2be30654..000000000 --- a/Nukkit/src/main/java/com/github/intellectualsites/plotsquared/nukkit/uuid/LowerOfflineUUIDWrapper.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.github.intellectualsites.plotsquared.nukkit.uuid; - -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; -import com.google.common.base.Charsets; - -import java.util.UUID; - -public class LowerOfflineUUIDWrapper extends UUIDWrapper { - - @Override public UUID getUUID(PlotPlayer player) { - return UUID.nameUUIDFromBytes( - ("OfflinePlayer:" + player.getName().toLowerCase()).getBytes(Charsets.UTF_8)); - } - - @Override public UUID getUUID(OfflinePlotPlayer player) { - return UUID.nameUUIDFromBytes( - ("OfflinePlayer:" + player.getName().toLowerCase()).getBytes(Charsets.UTF_8)); - } - - @Override public UUID getUUID(String name) { - return UUID - .nameUUIDFromBytes(("OfflinePlayer:" + name.toLowerCase()).getBytes(Charsets.UTF_8)); - } - - @Override public OfflinePlotPlayer getOfflinePlayer(UUID uuid) { - return null; - } - - @Override public OfflinePlotPlayer getOfflinePlayer(String name) { - return null; - } - - @Override public OfflinePlotPlayer[] getOfflinePlayers() { - return new OfflinePlotPlayer[0]; - } - -} diff --git a/Nukkit/src/main/resources/plugin.yml b/Nukkit/src/main/resources/plugin.yml deleted file mode 100644 index d17737c50..000000000 --- a/Nukkit/src/main/resources/plugin.yml +++ /dev/null @@ -1,153 +0,0 @@ -name: "${name}" -version: "${version}" -author: Empire92 -api: ["1.0.0"] -main: NukkitMain -load: STARTUP -permissions: - plots.use: - default: true - plots.permpack.basicflags: - default: op - children: - plots.set.flag: true - plots.flag: true - plots.flag.add: true - plots.flag.remove: true - plots.flag.list: true - plots.flag.info: true - plots.set.flag.titles.*: true - plots.set.flag.greeting.*: true - plots.set.flag.farewell.*: true - plots.set.flag.notify-enter.*: true - plots.set.flag.notify-leave.*: true - plots.set.flag.feed.*: true - plots.set.flag.heal.*: true - plots.set.flag.invincible.*: true - plots.set.flag.instabreak.*: true - plots.set.flag.fly.*: true - plots.set.flag.gamemode: true - plots.set.flag.gamemode.creative: true - plots.set.flag.gamemode.survival: true - plots.set.flag.gamemode.adventure: true - plots.set.flag.time.*: true - plots.set.flag.weather.*: true - plots.set.flag.music.*: true - plots.set.flag.disable-physics.*: true - plots.set.flag.pve.*: true - plots.set.flag.pvp.*: true - plots.set.flag.explosion.*: true - plots.set.flag.hostile-interact.*: true - plots.set.flag.hostile-attack.*: true - plots.set.flag.player-interact.*: true - plots.set.flag.animal-interact.*: true - plots.set.flag.animal-attack.*: true - plots.set.flag.tamed-interact.*: true - plots.set.flag.tamed-attack.*: true - plots.set.flag.misc-interact.*: true - plots.set.flag.hanging-place.*: true - plots.set.flag.hanging-break.*: true - plots.set.flag.vehicle-use.*: true - plots.set.flag.vehicle-place.*: true - plots.set.flag.vehicle-break.*: true - plots.set.flag.player-interact.*: true - plots.set.flag.place.*: true - plots.set.flag.break.*: true - plots.set.flag.use.*: true - plots.set.flag.forcefield.*: true - plots.set.flag.price.*: true - plots.set.flag.no-worldedit.*: true - plots.permpack.basicinbox: - default: op - children: - comments.notifications.enabled : true - plots.inbox.read.public: true - plots.inbox.modify.public: true - plots.inbox.modify.public: true - plots.inbox.write.public: true - plots.inbox.read.public: true - plots.inbox.read.report: true - plots.inbox.write.report: true - plots.inbox.read.report: true - plots.inbox.read.owner: true - plots.inbox.modify.owner: true - plots.inbox.write.owner: true - plots.inbox.read.owner: true - plots.comment: true - plots.inbox: true - plots.permpack.wilderness: - default: op - children: - plots.admin.interact.unowned: true - plots.admin.destroy.unowned: true - plots.admin.build.unowned: true - plots.projectile.unowned: true - plots.admin.vehicle.break.unowned: true - plots.admin.pve.unowned: true - plots.permpack.basic: - default: op - children: - plots.use: true - plots.info: true - plots.claim: true - plots.auto: true - plots.home: true - plots.clear: true - plots.delete: true - plots.music: true - plots.list: true - plots.list.mine: true - plots.list.shared: true - plots.list.world: true - plots.list.all: true - plots.list.forsale: true - plots.list.unowned: true - plots.list.unknown: true - plots.set: true - plots.visit: true - plots.visit.owned: true - plots.visit.shared: true - plots.set.flag: true - plots.flag.add: true - plots.flag.remove: true - plots.flag.list: true - plots.flag.info: true - plots.flag: true - plots.buy: true - plots.chat: true - plots.confirm: true - plots.toggle: true - plots.toggle.titles: true - plots.toggle.chat: true - plots.toggle.time: true - plots.set.biome: true - plots.set.home: true - plots.set.alias: true - plots.alias.set: true - plots.alias.remove: true - plots.set.description: true - plots.description: true - plots.alias: true - plots.merge: true - plots.merge.other: true - plots.merge.4: true - plots.unlink: true - plots.denied: true - plots.add: true - plots.trust: true - plots.deny: true - plots.remove: true - plots.untrust: true - plots.undeny: true - plots.kick: true - plots.download: true - plots.save: true - plots.done: true - plots.continue: true - plots.middle: true - plots.worldedit.bypass: - default: false - plots.gamemode.bypass: - default: op - plots.confirm.bypass: - default: false diff --git a/Sponge/build.gradle b/Sponge/build.gradle deleted file mode 100644 index 89740568f..000000000 --- a/Sponge/build.gradle +++ /dev/null @@ -1,85 +0,0 @@ -buildscript { - repositories { - jcenter() - mavenLocal() - maven { - name = "forge" - url = "http://files.minecraftforge.net/maven" - } - maven { url = "http://repo.minecrell.net/releases" } - maven { - url "https://plugins.gradle.org/m2/" - } - } - dependencies { - classpath 'gradle.plugin.net.minecrell:vanillagradle:2.2-6' - classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' - } -} - -apply plugin: 'net.minecrell.vanillagradle.server' - -dependencies { - compile project(':Core') - compile 'org.spongepowered:spongeapi:7.1.0-SNAPSHOT' - compile 'net.minecrell.mcstats:statslite-sponge:0.2.2' - -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -repositories { - maven { - name = 'minecrell' - url = 'http://repo.minecrell.net/releases' - } - maven { - name = 'forge' - url = 'http://files.minecraftforge.net/maven' - } - maven { - name = "Sponge" - url = "https://repo.spongepowered.org/maven" - } -} -minecraft { - version = "1.12.2" - mappings = "snapshot_20171022" - runDir = 'run' -} - -project.archivesBaseName = "${project.archivesBaseName}-mc${minecraft.version}" - -processResources { - from(sourceSets.main.resources.srcDirs) { - expand 'version': project.version, - 'mcVersion': project.minecraft.version - } -} -shadowJar { - dependencies { - include(dependency(':Core')) - include dependency('net.minecrell.mcstats:statslite-sponge') - } - relocate 'net.minecrell.mcstats', 'com.plotsquared.util.mcstats' - archiveName = "${parent.name}-${project.name}-${parent.version}.jar" - destinationDir = file '../target' -} -shadowJar.doLast { - task -> - ant.checksum file: task.archivePath -} - -reobf { - shadowJar { - mappingType = 'SEARGE' - } -} - -task deobfJar(type: Jar) { - from sourceSets.main.output - classifier = 'dev' -} - -build.dependsOn(shadowJar) diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/SpongeMain.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/SpongeMain.java deleted file mode 100644 index 07e535040..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/SpongeMain.java +++ /dev/null @@ -1,400 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge; - -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.IPlotMain; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.C; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.HybridGen; -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.object.worlds.PlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SingleWorldGenerator; -import com.github.intellectualsites.plotsquared.plot.util.block.QueueProvider; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; -import com.github.intellectualsites.plotsquared.sponge.generator.SpongePlotGenerator; -import com.github.intellectualsites.plotsquared.sponge.listener.ChunkProcessor; -import com.github.intellectualsites.plotsquared.sponge.listener.MainListener; -import com.github.intellectualsites.plotsquared.sponge.listener.WorldEvents; -import com.github.intellectualsites.plotsquared.sponge.util.*; -import com.github.intellectualsites.plotsquared.sponge.util.block.SpongeLocalQueue; -import com.github.intellectualsites.plotsquared.sponge.uuid.SpongeLowerOfflineUUIDWrapper; -import com.github.intellectualsites.plotsquared.sponge.uuid.SpongeOnlineUUIDWrapper; -import com.github.intellectualsites.plotsquared.sponge.uuid.SpongeUUIDHandler; -import com.google.inject.Inject; -import net.minecrell.mcstats.SpongeStatsLite; -import org.slf4j.Logger; -import org.spongepowered.api.Game; -import org.spongepowered.api.Server; -import org.spongepowered.api.Sponge; -import org.spongepowered.api.config.ConfigDir; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.Listener; -import org.spongepowered.api.event.game.state.GameAboutToStartServerEvent; -import org.spongepowered.api.event.game.state.GamePreInitializationEvent; -import org.spongepowered.api.plugin.Plugin; -import org.spongepowered.api.plugin.PluginContainer; -import org.spongepowered.api.profile.GameProfileManager; -import org.spongepowered.api.world.Chunk; -import org.spongepowered.api.world.World; -import org.spongepowered.api.world.gen.GenerationPopulator; -import org.spongepowered.api.world.gen.WorldGenerator; -import org.spongepowered.api.world.gen.WorldGeneratorModifier; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.UUID; -import java.util.stream.Collectors; - -@Plugin(id = "plotsquared", name = "PlotSquared", description = "Easy, yet powerful Plot World generation and management.", url = "https://github.com/IntellectualSites/PlotSquared", version = "3.5.0-SNAPSHOT") -public class SpongeMain implements IPlotMain { - - public static SpongeMain THIS; - - @Inject public PluginContainer plugin; - @Inject public SpongeStatsLite stats; - @Inject private Logger logger; - @Inject private Game game; - private Server server; - - @Inject @ConfigDir(sharedRoot = false) private Path privateConfigDir; - - private GameProfileManager resolver; - - private Logger getLogger() { - return this.logger; - } - - public Game getGame() { - return this.game; - } - - public Server getServer() { - return this.server; - } - - public GameProfileManager getResolver() { - if (this.resolver == null) { - this.resolver = this.game.getServer().getGameProfileManager(); - } - return this.resolver; - } - - public SpongeMain getPlugin() { - return THIS; - } - - @Listener public void onPreInitialize(GamePreInitializationEvent event) { - getLogger().info( - "The metrics section in PlotSquared is ignored in favor of the actual metrics reporter configurations."); - this.stats.start(); - } - - @Listener public void onServerAboutToStart(GameAboutToStartServerEvent event) { - THIS = this; - new PlotSquared(this, "Sponge"); - this.server = this.game.getServer(); - this.game.getRegistry().register(WorldGeneratorModifier.class, - (WorldGeneratorModifier) PlotSquared.get().IMP.getDefaultGenerator().specify(null)); - this.game.getRegistry().register(WorldGeneratorModifier.class, - (WorldGeneratorModifier) new SingleWorldGenerator().specify(null)); - if (Settings.Enabled_Components.WORLDS) { - TaskManager.IMP.taskRepeat(new Runnable() { - @Override public void run() { - unload(); - } - }, 20); - } - } - - public void unload() { - PlotAreaManager manager = PlotSquared.get().getPlotAreaManager(); - if (manager instanceof SinglePlotAreaManager) { - SinglePlotArea area = ((SinglePlotAreaManager) manager).getArea(); - for (World world : Sponge.getServer().getWorlds()) { - String name = world.getName(); - PlotId id = PlotId.fromString(name); - if (id != null) { - Plot plot = area.getOwnedPlot(id); - if (plot != null) { - List players = plot.getPlayersInPlot(); - if (players.isEmpty() && PlotPlayer.wrap(plot.owner) == null) { - try { - world.save(); - } catch (IOException e) { - e.printStackTrace(); - return; - } - long start = System.currentTimeMillis(); - for (Chunk chunk : world.getLoadedChunks()) { - chunk.unloadChunk(); - if (System.currentTimeMillis() - start > 10) { - return; - } - } - Sponge.getServer().unloadWorld(world); - return; - } - } - } - } - } - } - - @Override public void log(String message) { - message = C.format(message, C.replacements); - if (!Settings.Chat.CONSOLE_COLOR) { - message = message.replaceAll('\u00a7' + "[a-z|0-9]", ""); - } - if (this.server == null) { - this.logger.info(message); - return; - } - this.server.getConsole().sendMessage(SpongeUtil.getText(message)); - } - - @Override public File getDirectory() { - return privateConfigDir.toFile(); - } - - @Override public File getWorldContainer() { - return new File(game.getSavesDirectory().toFile(), "world"); - } - - @Override public void disable() { - PlotSquared.get().disable(); - THIS = null; - } - - @Override public int[] getPluginVersion() { - String ver = this.plugin.getVersion().orElse(""); - String[] split = ver.split("[\\.|-]"); - return new int[] {Integer.parseInt(split[0]), Integer.parseInt(split[1]), - Integer.parseInt(split[2])}; - } - - @Override public String getPluginVersionString() { - return this.plugin.getVersion().orElse(""); - } - - @Override public String getPluginName() { - return "PlotSquared"; - } - - @Override public int[] getServerVersion() { - PlotSquared.log("Checking minecraft version: Sponge: "); - String version = this.game.getPlatform().getMinecraftVersion().getName(); - String[] split = version.split("\\."); - return new int[] {Integer.parseInt(split[0]), Integer.parseInt(split[1]), - split.length == 3 ? Integer.parseInt(split[2]) : 0}; - } - - @Override public InventoryUtil initInventoryUtil() { - return new SpongeInventoryUtil(); - } - - @Override public EconHandler getEconomyHandler() { - SpongeEconHandler econ = new SpongeEconHandler(); - Sponge.getEventManager().registerListeners(this, econ); - return econ; - } - - @Override public EventUtil initEventUtil() { - return new SpongeEventUtil(); - } - - @Override public ChunkManager initChunkManager() { - return new SpongeChunkManager(); - } - - @Override public SetupUtils initSetupUtils() { - return new SpongeSetupUtils(); - } - - @Override public HybridUtils initHybridUtils() { - return new SpongeHybridUtils(); - } - - @Override public SchematicHandler initSchematicHandler() { - return new SpongeSchematicHandler(); - } - - @Override public TaskManager getTaskManager() { - return new SpongeTaskManager(this); - } - - @Override public void runEntityTask() { - new KillRoadMobs().run(); - } - - @Override public void registerCommands() { - getGame().getCommandManager() - .register(THIS, new SpongeCommand(), "plots", "p", "plot", "ps", "plotsquared", "p2", - "2"); - } - - @Override public void registerPlayerEvents() { - Sponge.getEventManager().registerListeners(this, new MainListener()); - } - - @Override public void registerInventoryEvents() { - // Part of PlayerEvents - can be moved if necessary - } - - @Override public void registerPlotPlusEvents() { - PlotSquared.log("registerPlotPlusEvents is not implemented!"); - } - - @Override public void registerForceFieldEvents() { - } - - @Override public boolean initWorldEdit() { - try { - Class.forName("com.sk89q.worldedit.WorldEdit"); - } catch (ClassNotFoundException ignored) { - return false; - } - return true; - } - - @Override public UUIDHandlerImplementation initUUIDHandler() { - UUIDWrapper wrapper; - if (Settings.UUID.OFFLINE) { - wrapper = new SpongeLowerOfflineUUIDWrapper(); - } else { - wrapper = new SpongeOnlineUUIDWrapper(); - } - return new SpongeUUIDHandler(wrapper); - } - - @Override public boolean initPlotMeConverter() { - return false; - } - - @Override public void unregister(PlotPlayer player) { - SpongeUtil.removePlayer(player.getName()); - } - - @Override public void registerChunkProcessor() { - Sponge.getEventManager().registerListeners(this, new ChunkProcessor()); - } - - @Override public void registerWorldEvents() { - Sponge.getEventManager().registerListeners(this, new WorldEvents()); - } - - @Override public void startMetrics() { - } - - @Override public void setGenerator(String worldName) { - World world = SpongeUtil.getWorld(worldName); - if (world == null) { - // create world - ConfigurationSection worldConfig = - PlotSquared.get().worlds.getConfigurationSection("worlds." + worldName); - String manager = worldConfig.getString("generator.plugin", "PlotSquared"); - String generator = worldConfig.getString("generator.init", manager); - - int type = worldConfig.getInt("generator.type"); - int terrain = worldConfig.getInt("generator.terrain"); - SetupObject setup = new SetupObject(); - setup.plotManager = manager; - setup.setupGenerator = generator; - setup.type = type; - setup.terrain = terrain; - setup.step = new ConfigurationNode[0]; - setup.world = worldName; - SetupUtils.manager.setupWorld(setup); - world = SpongeUtil.getWorld(worldName); - } else { - throw new IllegalArgumentException("World already loaded: " + worldName + "???"); - } - WorldGenerator wg = world.getWorldGenerator(); - GenerationPopulator gen = wg.getBaseGenerationPopulator(); - if (gen instanceof GeneratorWrapper) { - PlotSquared.get().loadWorld(worldName, (GeneratorWrapper) gen); - } else { - throw new UnsupportedOperationException( - "NOT IMPLEMENTED YET2! " + worldName + " | " + gen); - } - } - - @Override public AbstractTitle initTitleManager() { - return new SpongeTitleManager(); - } - - @Override public PlotPlayer wrapPlayer(Object player) { - if (player instanceof Player) { - return SpongeUtil.getPlayer((Player) player); - } else if (UUIDHandler.implementation == null) { - return null; - } else if (player instanceof String) { - return UUIDHandler.getPlayer((String) player); - } else if (player instanceof UUID) { - return UUIDHandler.getPlayer((UUID) player); - } - // TODO FIXME offline player - return null; - } - - @Override public String getNMSPackage() { - return "";//TODO FIXME - } - - @Override public ChatManager initChatManager() { - return new SpongeChatManager(); - } - - @Override public QueueProvider initBlockQueue() { - MainUtil.canSendChunk = true; - return QueueProvider.of(SpongeLocalQueue.class, null); - } - - @Override public WorldUtil initWorldUtil() { - return new SpongeUtil(); - } - - @Override public GeneratorWrapper getGenerator(String world, String name) { - if (name == null) { - return null; - } - Collection wgms = - this.game.getRegistry().getAllOf(WorldGeneratorModifier.class); - for (WorldGeneratorModifier wgm : wgms) { - if (StringMan.isEqualIgnoreCaseToAny(name, wgm.getName(), wgm.getId())) { - if (wgm instanceof GeneratorWrapper) { - return (GeneratorWrapper) wgm; - } - return new SpongePlotGenerator(wgm); - } - } - return new SpongePlotGenerator(PlotSquared.get().IMP.getDefaultGenerator()); - } - - @Override - public GeneratorWrapper wrapPlotGenerator(String world, IndependentPlotGenerator generator) { - return new SpongePlotGenerator(generator); - } - - @Override public List getPluginIds() { - return this.game.getPluginManager().getPlugins().stream() - .map(plugin1 -> plugin1.getName() + ';' + plugin1.getVersion() + ':' + true) - .collect(Collectors.toCollection(ArrayList::new)); - } - - @Override public IndependentPlotGenerator getDefaultGenerator() { - return new HybridGen(); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/ClusterFlagRemoveEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/ClusterFlagRemoveEvent.java deleted file mode 100644 index 09ea38f79..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/ClusterFlagRemoveEvent.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.object.PlotCluster; -import org.spongepowered.api.event.Cancellable; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; - -public class ClusterFlagRemoveEvent extends AbstractEvent implements Cancellable { - - private final PlotCluster cluster; - private final Flag flag; - private boolean cancelled; - - public ClusterFlagRemoveEvent(final Flag flag, final PlotCluster cluster) { - this.cluster = cluster; - this.flag = flag; - } - - /** - * Get the cluster involved - * - * @return PlotCluster - */ - public PlotCluster getCluster() { - return cluster; - } - - /** - * Get the flag involved - * - * @return Flag - */ - public Flag getFlag() { - return flag; - } - - @Override public boolean isCancelled() { - return cancelled; - } - - @Override public void setCancelled(final boolean cancel) { - cancelled = cancel; - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerClaimPlotEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerClaimPlotEvent.java deleted file mode 100644 index d5d417987..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerClaimPlotEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.Cancellable; -import org.spongepowered.api.event.cause.Cause; - -public class PlayerClaimPlotEvent extends PlayerEvent implements Cancellable { - - private final Plot plot; - private final boolean auto; - private boolean cancelled; - - /** - * PlayerClaimPlotEvent: Called when a plot is claimed - * - * @param player Player that claimed the plot - * @param plot Plot that was claimed - */ - public PlayerClaimPlotEvent(final Player player, final Plot plot, final boolean auto) { - super(player); - this.plot = plot; - this.auto = auto; - } - - /** - * Get the plot involved - * - * @return Plot - */ - public Plot getPlot() { - return plot; - } - - /** - * @return true if it was an automated claim, else false - */ - public boolean wasAuto() { - return auto; - } - - @Override public boolean isCancelled() { - return cancelled; - } - - @Override public void setCancelled(final boolean cancel) { - cancelled = cancel; - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerEnterPlotEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerEnterPlotEvent.java deleted file mode 100644 index aa38782ab..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerEnterPlotEvent.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.cause.Cause; - -public class PlayerEnterPlotEvent extends PlayerEvent { - - private final Plot plot; - - /** - * PlayerEnterPlotEvent: Called when a player leaves a plot - * - * @param player Player that entered the plot - * @param plot Plot that was entered - */ - public PlayerEnterPlotEvent(final Player player, final Plot plot) { - super(player); - this.plot = plot; - } - - /** - * Get the plot involved - * - * @return Plot - */ - public Plot getPlot() { - return plot; - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerEvent.java deleted file mode 100644 index 2bd39c135..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerEvent.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; - -public abstract class PlayerEvent extends AbstractEvent { - - public final Player player; - - public PlayerEvent(final Player player) { - this.player = player; - } - - public Player getPlayer() { - return player; - } - - @Override public Cause getCause() { - return null; - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerLeavePlotEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerLeavePlotEvent.java deleted file mode 100644 index b3ce5746d..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerLeavePlotEvent.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.entity.living.player.Player; - -public class PlayerLeavePlotEvent extends PlayerEvent { - - private final Plot plot; - - /** - * PlayerLeavePlotEvent: Called when a player leaves a plot - * - * @param player Player that left the plot - * @param plot Plot that was left - */ - public PlayerLeavePlotEvent(final Player player, final Plot plot) { - super(player); - this.plot = plot; - } - - /** - * Get the plot involved - * - * @return Plot - */ - public Plot getPlot() { - return plot; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotDeniedEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotDeniedEvent.java deleted file mode 100644 index b2c490c97..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotDeniedEvent.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.entity.living.player.Player; - -import java.util.UUID; - -public class PlayerPlotDeniedEvent extends PlotEvent { - - private final Player initiator; - private final boolean added; - private final UUID player; - - /** - * PlayerPlotDeniedEvent: Called when the denied UUID list is modified for a plot - * - * @param initiator Player that initiated the event - * @param plot Plot in which the event occurred - * @param player Player that was denied/un-denied - * @param added true of add to deny list, false if removed - */ - public PlayerPlotDeniedEvent(final Player initiator, final Plot plot, final UUID player, - final boolean added) { - super(plot); - this.initiator = initiator; - this.added = added; - this.player = player; - } - - /** - * If a user was added - * - * @return boolean - */ - public boolean wasAdded() { - return added; - } - - /** - * The player added/removed - * - * @return UUID - */ - public UUID getPlayer() { - return player; - } - - /** - * The player initiating the action - * - * @return Player - */ - public Player getInitiator() { - return initiator; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotHelperEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotHelperEvent.java deleted file mode 100644 index d041bdebb..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotHelperEvent.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.entity.living.player.Player; - -import java.util.UUID; - -public class PlayerPlotHelperEvent extends PlotEvent { - - private final Player initiator; - private final boolean added; - private final UUID player; - - /** - * PlayerPlotHelperEvent: Called when a plot helper is added/removed - * - * @param initiator Player that initiated the event - * @param plot Plot in which the event occurred - * @param player Player that was added/removed from the helper list - * @param added true of the player was added, false if the player was removed - */ - public PlayerPlotHelperEvent(final Player initiator, final Plot plot, final UUID player, - final boolean added) { - super(plot); - this.initiator = initiator; - this.added = added; - this.player = player; - } - - /** - * If a user was added - * - * @return boolean - */ - public boolean wasAdded() { - return added; - } - - /** - * The player added/removed - * - * @return UUID - */ - public UUID getPlayer() { - return player; - } - - /** - * The player initiating the action - * - * @return Player - */ - public Player getInitiator() { - return initiator; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotTrustedEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotTrustedEvent.java deleted file mode 100644 index 6705307fd..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerPlotTrustedEvent.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.entity.living.player.Player; - -import java.util.UUID; - -public class PlayerPlotTrustedEvent extends PlotEvent { - - private final Player initiator; - private final boolean added; - private final UUID player; - - /** - * PlayerPlotTrustedEvent: Called when a plot trusted user is added/removed - * - * @param initiator Player that initiated the event - * @param plot Plot in which the event occurred - * @param player Player that was added/removed from the trusted list - * @param added true of the player was added, false if the player was removed - */ - public PlayerPlotTrustedEvent(final Player initiator, final Plot plot, final UUID player, - final boolean added) { - super(plot); - this.initiator = initiator; - this.added = added; - this.player = player; - } - - /** - * If a user was added - * - * @return boolean - */ - public boolean wasAdded() { - return added; - } - - /** - * The player added/removed - * - * @return UUID - */ - public UUID getPlayer() { - return player; - } - - /** - * The player initiating the action - * - * @return Player - */ - public Player getInitiator() { - return initiator; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerTeleportToPlotEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerTeleportToPlotEvent.java deleted file mode 100644 index 41f7e7510..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlayerTeleportToPlotEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.Cancellable; - -public class PlayerTeleportToPlotEvent extends PlayerEvent implements Cancellable { - - private final Location from; - private final Plot plot; - private boolean cancelled; - - /** - * PlayerTeleportToPlotEvent: Called when a player teleports to a plot. - * - * @param player That was teleported - * @param from Start location - * @param plot Plot to which the player was teleported - */ - public PlayerTeleportToPlotEvent(Player player, Location from, Plot plot) { - super(player); - this.from = from; - this.plot = plot; - } - - /** - * Get the from location. - * - * @return Location - */ - public Location getFrom() { - return this.from; - } - - /** - * Get the plot involved. - * - * @return Plot - */ - public Plot getPlot() { - return this.plot; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotChangeOwnerEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotChangeOwnerEvent.java deleted file mode 100644 index e21674565..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotChangeOwnerEvent.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.Cancellable; - -import java.util.UUID; - -public class PlotChangeOwnerEvent extends PlotEvent implements Cancellable { - - private final Player initiator; - private final UUID newOwner; - private final UUID oldOwner; - private final boolean hasOldOwner; - private boolean cancelled; - - /** - * PlotChangeOwnerEvent: Called when a plot's owner is change. - * - * @param newOwner The new owner of the plot - * @param oldOwner The old owner of the plot - * @param plot The plot having its owner changed - */ - public PlotChangeOwnerEvent(Player initiator, Plot plot, UUID oldOwner, UUID newOwner, - boolean hasOldOwner) { - super(plot); - this.initiator = initiator; - this.newOwner = newOwner; - this.oldOwner = oldOwner; - this.hasOldOwner = hasOldOwner; - } - - - /** - * Get the PlotId. - * - * @return PlotId - */ - public PlotId getPlotId() { - return getPlot().getId(); - } - - /** - * Get the world name. - * - * @return String - */ - public String getWorld() { - return getPlot().getWorldName(); - } - - /** - * Get the change-owner initator - * - * @return Player - */ - public Player getInitiator() { - return this.initiator; - } - - /** - * Get the old owner of the plot. Null if not exists. - * - * @return UUID - */ - public UUID getOldOwner() { - return this.oldOwner; - } - - /** - * Get the new owner of the plot - * - * @return UUID - */ - public UUID getNewOwner() { - return this.newOwner; - } - - /** - * Get if the plot had an old owner - * - * @return boolean - */ - public boolean hasOldOwner() { - return this.hasOldOwner; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean b) { - this.cancelled = b; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotClearEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotClearEvent.java deleted file mode 100644 index 231b9740e..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotClearEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import org.spongepowered.api.event.Cancellable; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; - -public class PlotClearEvent extends AbstractEvent implements Cancellable { - - private final Plot plot; - private boolean cancelled; - - /** - * PlotDeleteEvent: Called when a plot is cleared - * - * @param plot The plot that was cleared - */ - - public PlotClearEvent(Plot plot) { - this.plot = plot; - } - - /** - * Get the PlotId. - * - * @return PlotId - */ - public PlotId getPlotId() { - return this.plot.getId(); - } - - /** - * Get the world name. - * - * @return String - */ - public String getWorld() { - return this.plot.getWorldName(); - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotComponentSetEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotComponentSetEvent.java deleted file mode 100644 index d9a424cc0..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotComponentSetEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; - -public class PlotComponentSetEvent extends AbstractEvent { - private final Plot plot; - private final String component; - - /** - * PlotDeleteEvent: Called when a plot component is set - * - * @param plot The plot - * @param component The component which was set - */ - public PlotComponentSetEvent(Plot plot, String component) { - this.plot = plot; - this.component = component; - } - - /** - * Get the PlotId - * - * @return PlotId - */ - public PlotId getPlotId() { - return this.plot.getId(); - } - - /** - * Get the world name - * - * @return String - */ - public String getWorld() { - return this.plot.getWorldName(); - } - - /** - * Get the component which was set - * - * @return Component name - */ - public String getComponent() { - return this.component; - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotDeleteEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotDeleteEvent.java deleted file mode 100644 index 23b322db4..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotDeleteEvent.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; - -public class PlotDeleteEvent extends AbstractEvent { - private final Plot plot; - - /** - * PlotDeleteEvent: Called when a plot is deleted - * - * @param plot The plot that was deleted - */ - public PlotDeleteEvent(Plot plot) { - this.plot = plot; - } - - /** - * Get the PlotId - * - * @return PlotId - */ - public PlotId getPlotId() { - return plot.getId(); - } - - /** - * Get the world name - * - * @return String - */ - public String getWorld() { - return plot.getWorldName(); - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotEvent.java deleted file mode 100644 index 70b77c5fc..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotEvent.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; - -public abstract class PlotEvent extends AbstractEvent { - - private final Plot plot; - - public PlotEvent(final Plot plot) { - this.plot = plot; - } - - public final Plot getPlot() { - return plot; - } - - @Override public Cause getCause() { - return null; - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotFlagAddEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotFlagAddEvent.java deleted file mode 100644 index 49f5251a3..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotFlagAddEvent.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.event.Cancellable; - -public class PlotFlagAddEvent extends PlotEvent implements Cancellable { - private final Flag flag; - private boolean cancelled; - - /** - * PlotFlagAddEvent: Called when a Flag is added to a plot - * - * @param flag Flag that was added - * @param plot Plot to which the flag was added - */ - public PlotFlagAddEvent(final Flag flag, final Plot plot) { - super(plot); - this.flag = flag; - } - - /** - * Get the flag involved - * - * @return Flag - */ - public Flag getFlag() { - return flag; - } - - @Override public boolean isCancelled() { - return cancelled; - } - - @Override public void setCancelled(final boolean cancel) { - cancelled = cancel; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotFlagRemoveEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotFlagRemoveEvent.java deleted file mode 100644 index a14e5d06f..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotFlagRemoveEvent.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import org.spongepowered.api.event.Cancellable; - -public class PlotFlagRemoveEvent extends PlotEvent implements Cancellable { - private final Flag flag; - private boolean cancelled; - - /** - * PlotFlagRemoveEvent: Called when a flag is removed from a plot - * - * @param flag Flag that was removed - * @param plot Plot from which the flag was removed - */ - public PlotFlagRemoveEvent(final Flag flag, final Plot plot) { - super(plot); - this.flag = flag; - } - - /** - * Get the flag involved - * - * @return Flag - */ - public Flag getFlag() { - return flag; - } - - @Override public boolean isCancelled() { - return cancelled; - } - - @Override public void setCancelled(final boolean cancel) { - cancelled = cancel; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotMergeEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotMergeEvent.java deleted file mode 100644 index 6352169fb..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotMergeEvent.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import org.spongepowered.api.event.Cancellable; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; -import org.spongepowered.api.world.World; - -import java.util.ArrayList; - -public class PlotMergeEvent extends AbstractEvent implements Cancellable { - private final ArrayList plots; - private boolean cancelled; - private Plot plot; - private World world; - - /** - * PlotMergeEvent: Called when plots are merged - * - * @param world World in which the event occurred - * @param plot Plot that was merged - * @param plots A list of plots involved in the event - */ - public PlotMergeEvent(final World world, final Plot plot, final ArrayList plots) { - this.plots = plots; - } - - /** - * Get the plots being added; - * - * @return Plot - */ - public ArrayList getPlots() { - return plots; - } - - /** - * Get the main plot - * - * @return Plot - */ - public Plot getPlot() { - return plot; - } - - public World getWorld() { - return world; - } - - @Override public boolean isCancelled() { - return cancelled; - } - - @Override public void setCancelled(final boolean cancel) { - cancelled = cancel; - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotRateEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotRateEvent.java deleted file mode 100644 index 6c967d133..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotRateEvent.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.Rating; -import org.spongepowered.api.event.Cancellable; - -public class PlotRateEvent extends PlotEvent implements Cancellable { - - private final PlotPlayer rater; - private Rating rating; - private boolean cancelled = false; - - public PlotRateEvent(final PlotPlayer rater, final Rating rating, final Plot plot) { - super(plot); - this.rater = rater; - this.rating = rating; - } - - public PlotPlayer getRater() { - return rater; - } - - public Rating getRating() { - return rating; - } - - @Override public boolean isCancelled() { - return this.cancelled; - } - - @Override public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotUnlinkEvent.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotUnlinkEvent.java deleted file mode 100644 index 6c0cd2849..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotUnlinkEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.events; - -import com.github.intellectualsites.plotsquared.plot.object.PlotId; -import org.spongepowered.api.event.Cancellable; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.impl.AbstractEvent; -import org.spongepowered.api.world.World; - -import java.util.ArrayList; - -public class PlotUnlinkEvent extends AbstractEvent implements Cancellable { - private final ArrayList plots; - private final World world; - private boolean cancelled; - - /** - * Called when a mega-plot is unlinked. - * - * @param world World in which the event occurred - * @param plots Plots that are involved in the event - */ - public PlotUnlinkEvent(final World world, final ArrayList plots) { - this.plots = plots; - this.world = world; - } - - /** - * Get the plots involved - * - * @return PlotId - */ - public ArrayList getPlots() { - return plots; - } - - public World getWorld() { - return world; - } - - @Override public boolean isCancelled() { - return cancelled; - } - - @Override public void setCancelled(final boolean cancel) { - cancelled = cancel; - } - - @Override public Cause getCause() { - return null; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongeAugmentedGenerator.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongeAugmentedGenerator.java deleted file mode 100644 index 78353c9d9..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongeAugmentedGenerator.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.generator; - -import com.flowpowered.math.vector.Vector3i; -import com.github.intellectualsites.plotsquared.plot.generator.AugmentedUtils; -import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; -import com.github.intellectualsites.plotsquared.plot.util.block.DelegateLocalBlockQueue; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import org.spongepowered.api.block.BlockState; -import org.spongepowered.api.world.World; -import org.spongepowered.api.world.extent.ImmutableBiomeVolume; -import org.spongepowered.api.world.extent.MutableBlockVolume; -import org.spongepowered.api.world.gen.GenerationPopulator; -import org.spongepowered.api.world.gen.WorldGenerator; - -import java.util.List; - -public class SpongeAugmentedGenerator implements GenerationPopulator { - - private static SpongeAugmentedGenerator generator; - - private SpongeAugmentedGenerator() { - } - - public static SpongeAugmentedGenerator get(World world) { - WorldGenerator wg = world.getWorldGenerator(); - List populators = wg.getGenerationPopulators(); - for (GenerationPopulator populator : populators) { - if (populator instanceof SpongeAugmentedGenerator) { - return (SpongeAugmentedGenerator) populator; - } - } - if (generator == null) { - generator = new SpongeAugmentedGenerator(); - } - populators.add(generator); - return generator; - } - - @Override - public void populate(World world, MutableBlockVolume terrain, ImmutableBiomeVolume biome) { - Vector3i min = terrain.getBlockMin(); - int bx = min.getX(); - int bz = min.getZ(); - int cx = bx >> 4; - int cz = bz >> 4; - AugmentedUtils.generate(world.getName(), cx, cz, new DelegateLocalBlockQueue(null) { - @Override public boolean setBlock(int x, int y, int z, int id, int data) { - terrain.setBlock(bx + x, y, bz + z, SpongeUtil.getBlockState(id, data)); - return true; - } - - @Override public PlotBlock getBlock(int x, int y, int z) { - BlockState block = terrain.getBlock(bx + x, y, bz + z); - return SpongeUtil.getPlotBlock(block); - } - - @Override public boolean setBiome(int x, int z, String biome) { - return false; // TODO ? - } - - @Override public String getWorld() { - return world.getName(); - } - }); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongePlotGenerator.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongePlotGenerator.java deleted file mode 100644 index e6a286bd7..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongePlotGenerator.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.generator; - -import com.flowpowered.math.vector.Vector3i; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PlotManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import org.spongepowered.api.data.DataContainer; -import org.spongepowered.api.world.biome.BiomeGenerationSettings; -import org.spongepowered.api.world.biome.BiomeType; -import org.spongepowered.api.world.biome.BiomeTypes; -import org.spongepowered.api.world.extent.MutableBiomeVolume; -import org.spongepowered.api.world.gen.BiomeGenerator; -import org.spongepowered.api.world.gen.GenerationPopulator; -import org.spongepowered.api.world.gen.WorldGenerator; -import org.spongepowered.api.world.gen.WorldGeneratorModifier; -import org.spongepowered.api.world.storage.WorldProperties; - -import java.util.ArrayList; -import java.util.List; - -public class SpongePlotGenerator - implements WorldGeneratorModifier, GeneratorWrapper { - - private final IndependentPlotGenerator plotGenerator; - private final List populators = new ArrayList<>(); - private final boolean loaded = false; - private final WorldGeneratorModifier platformGenerator; - private final boolean full; - private PlotManager manager; - - public SpongePlotGenerator(IndependentPlotGenerator generator) { - this.plotGenerator = generator; - this.platformGenerator = this; - this.full = true; - MainUtil.initCache(); - } - - public SpongePlotGenerator(WorldGeneratorModifier wgm) { - this.plotGenerator = null; - this.platformGenerator = wgm; - this.full = false; - MainUtil.initCache(); - } - - @Override public String getId() { - if (this.plotGenerator == null) { - if (this.platformGenerator != this) { - return this.platformGenerator.getId(); - } - return "null"; - } - return this.plotGenerator.getName(); - } - - @Override public String getName() { - if (this.plotGenerator == null) { - if (this.platformGenerator != this) { - return this.platformGenerator.getName(); - } - return "null"; - } - return this.plotGenerator.getName(); - } - - @Override public void modifyWorldGenerator(WorldProperties world, DataContainer settings, - WorldGenerator worldGenerator) { - String worldName = world.getWorldName(); - worldGenerator.setBaseGenerationPopulator(new SpongeTerrainGen(this.plotGenerator)); - worldGenerator.setBiomeGenerator(new BiomeGenerator() { - @Override public void generateBiomes(MutableBiomeVolume buffer) { - PlotArea area = PlotSquared.get().getPlotArea(worldName, null); - if (area != null) { - BiomeType biome = SpongeUtil.getBiome(area.PLOT_BIOME); - Vector3i min = buffer.getBiomeMin(); - Vector3i max = buffer.getBiomeMax(); - for (int x = min.getX(); x <= max.getX(); x++) { - for (int z = min.getZ(); z <= max.getZ(); z++) { - buffer.setBiome(x, 0, z, biome); - } - } - } - } - }); - for (BiomeType type : ReflectionUtils.getStaticFields(BiomeTypes.class)) { - BiomeGenerationSettings biomeSettings = worldGenerator.getBiomeSettings(type); - biomeSettings.getGenerationPopulators().clear(); - biomeSettings.getPopulators().clear(); - biomeSettings.getGroundCoverLayers().clear(); - } - worldGenerator.getGenerationPopulators().clear(); - worldGenerator.getPopulators().clear(); - PlotSquared.get().loadWorld(worldName, this); - } - - @Override public IndependentPlotGenerator getPlotGenerator() { - return this.plotGenerator; - } - - @Override public WorldGeneratorModifier getPlatformGenerator() { - return this.platformGenerator; - } - - @Override public void augment(PlotArea area) { - SpongeAugmentedGenerator.get(SpongeUtil.getWorld(area.getWorldName())); - } - - @Override public boolean isFull() { - return this.full; - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongeTerrainGen.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongeTerrainGen.java deleted file mode 100644 index f9d83fda7..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/generator/SpongeTerrainGen.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.generator; - -import com.flowpowered.math.vector.Vector3i; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator; -import com.github.intellectualsites.plotsquared.plot.object.ChunkWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.PseudoRandom; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import com.github.intellectualsites.plotsquared.sponge.util.block.GenChunk; -import org.spongepowered.api.world.World; -import org.spongepowered.api.world.extent.ImmutableBiomeVolume; -import org.spongepowered.api.world.extent.MutableBlockVolume; -import org.spongepowered.api.world.gen.GenerationPopulator; - -public class SpongeTerrainGen - implements GenerationPopulator, GeneratorWrapper { - - public final IndependentPlotGenerator child; - private final boolean full; - private final GenerationPopulator platformGenerator; - private final PseudoRandom random = new PseudoRandom(); - - public SpongeTerrainGen(IndependentPlotGenerator ipg) { - this.child = ipg; - this.full = true; - this.platformGenerator = this; - MainUtil.initCache(); - } - - public SpongeTerrainGen(GenerationPopulator populator) { - this.child = null; - this.platformGenerator = populator; - this.full = false; - MainUtil.initCache(); - } - - @Override - public void populate(World world, MutableBlockVolume terrain, ImmutableBiomeVolume biomes) { - if (platformGenerator != this) { - platformGenerator.populate(world, terrain, biomes); - return; - } - Vector3i size = terrain.getBlockSize(); - if (size.getX() != 16 || size.getZ() != 16) { - throw new UnsupportedOperationException("NON CHUNK POPULATION NOT SUPPORTED"); - } - String worldname = world.getName(); - Vector3i min = terrain.getBlockMin(); - int cx = min.getX() >> 4; - int cz = min.getZ() >> 4; - ChunkWrapper wrap = new ChunkWrapper(worldname, cx, cz); - // Create the result object - GenChunk result = new GenChunk(terrain, null, wrap); - // Catch any exceptions - try { - // Set random seed - random.state = (cx << 16) | (cz & 0xFFFF); - // Process the chunk - result.modified = false; - ChunkManager.preProcessChunk(result); - if (result.modified) { - return; - } - // Fill the result data - PlotArea area = PlotSquared.get().getPlotArea(world.getName(), null); - child.generateChunk(result, area, random); - child.populateChunk(result, area, random); - ChunkManager.postProcessChunk(result); - return; - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Override public IndependentPlotGenerator getPlotGenerator() { - return child; - } - - @Override public GenerationPopulator getPlatformGenerator() { - return platformGenerator; - } - - @Override public void augment(PlotArea area) { - SpongeAugmentedGenerator.get(SpongeUtil.getWorld(area.getWorldName())); - } - - @Override public boolean isFull() { - return this.full; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/ChunkProcessor.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/ChunkProcessor.java deleted file mode 100644 index 29f41c65d..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/ChunkProcessor.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.listener; - -public class ChunkProcessor { - // TODO FIXME -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/ForceFieldListener.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/ForceFieldListener.java deleted file mode 100644 index 4c461db40..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/ForceFieldListener.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.listener; - -import com.flowpowered.math.vector.Vector3d; -import com.github.intellectualsites.plotsquared.plot.flag.Flags; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import org.spongepowered.api.entity.Entity; -import org.spongepowered.api.entity.EntityTypes; -import org.spongepowered.api.entity.living.player.Player; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -public class ForceFieldListener { - - private static Set getNearbyPlayers(Player player, Plot plot) { - Set players = new HashSet<>(); - for (Entity nearbyEntity : player - .getNearbyEntities(entity -> entity.getType().equals(EntityTypes.PLAYER))) { - Player nearbyPlayer = (Player) nearbyEntity; - PlotPlayer plotPlayer; - if ((plotPlayer = SpongeUtil.getPlayer(nearbyPlayer)) == null || !plot - .equals(plotPlayer.getCurrentPlot())) { - continue; - } - if (!plot.isAdded(plotPlayer.getUUID())) { - players.add(plotPlayer); - } - - } - return players; - } - - private static PlotPlayer hasNearbyPermitted(Player player, Plot plot) { - for (Entity nearbyEntity : player - .getNearbyEntities(entity -> entity.getType().equals(EntityTypes.PLAYER))) { - Player nearbyPlayer = (Player) nearbyEntity; - PlotPlayer plotPlayer; - if ((plotPlayer = SpongeUtil.getPlayer(nearbyPlayer)) == null || !plot - .equals(plotPlayer.getCurrentPlot())) { - continue; - } - if (plot.isAdded(plotPlayer.getUUID())) { - return plotPlayer; - } - } - return null; - } - - private static Vector3d calculateVelocity(PlotPlayer player, PlotPlayer e) { - Location playerLocation = player.getLocationFull(); - Location oPlayerLocation = e.getLocation(); - double playerX = playerLocation.getX(); - double playerY = playerLocation.getY(); - double playerZ = playerLocation.getZ(); - double oPlayerX = oPlayerLocation.getX(); - double oPlayerY = oPlayerLocation.getY(); - double oPlayerZ = oPlayerLocation.getZ(); - double x = 0d; - if (playerX < oPlayerX) { - x = 1.0d; - } else if (playerX > oPlayerX) { - x = -1.0d; - } - double y = 0d; - if (playerY < oPlayerY) { - y = 0.5d; - } else if (playerY > oPlayerY) { - y = -0.5d; - } - double z = 0d; - if (playerZ < oPlayerZ) { - z = 1.0d; - } else if (playerZ > oPlayerZ) { - z = -1.0d; - } - return new Vector3d(x, y, z); - } - - public static void handleForcefield(Player player, PlotPlayer plotPlayer, Plot plot) { - if (Flags.FORCEFIELD.isTrue(plot)) { - UUID uuid = plotPlayer.getUUID(); - if (plot.isAdded(uuid)) { - Set players = getNearbyPlayers(player, plot); - for (PlotPlayer oPlayer : players) { - ((SpongePlayer) oPlayer).player - .setVelocity(calculateVelocity(plotPlayer, oPlayer)); - } - } else { - PlotPlayer oPlayer = hasNearbyPermitted(player, plot); - if (oPlayer == null) { - return; - } - player.setVelocity(calculateVelocity(oPlayer, plotPlayer)); - } - } - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/MainListener.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/MainListener.java deleted file mode 100644 index 09f500103..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/MainListener.java +++ /dev/null @@ -1,755 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.listener; - -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.C; -import com.github.intellectualsites.plotsquared.plot.flag.Flags; -import com.github.intellectualsites.plotsquared.plot.listener.PlotListener; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import org.spongepowered.api.block.BlockSnapshot; -import org.spongepowered.api.block.BlockState; -import org.spongepowered.api.data.Transaction; -import org.spongepowered.api.entity.EntityTypes; -import org.spongepowered.api.entity.explosive.Explosive; -import org.spongepowered.api.entity.living.Ambient; -import org.spongepowered.api.entity.living.Living; -import org.spongepowered.api.entity.living.animal.Animal; -import org.spongepowered.api.entity.living.monster.Monster; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.entity.vehicle.Boat; -import org.spongepowered.api.entity.vehicle.minecart.Minecart; -import org.spongepowered.api.event.Listener; -import org.spongepowered.api.event.block.ChangeBlockEvent; -import org.spongepowered.api.event.block.InteractBlockEvent; -import org.spongepowered.api.event.block.NotifyNeighborBlockEvent; -import org.spongepowered.api.event.entity.BreedEntityEvent; -import org.spongepowered.api.event.entity.MoveEntityEvent; -import org.spongepowered.api.event.entity.SpawnEntityEvent; -import org.spongepowered.api.event.message.MessageEvent; -import org.spongepowered.api.event.network.ClientConnectionEvent; -import org.spongepowered.api.event.world.ExplosionEvent; -import org.spongepowered.api.event.world.ExplosionEvent.Detonate; -import org.spongepowered.api.text.Text; -import org.spongepowered.api.world.World; - -import java.util.Map.Entry; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Predicate; - -@SuppressWarnings("Guava") public class MainListener { - - /* - * TODO: - * - Anything marked with a TODO below - * - BlockPhysicsEvent - * - BlockFormEvent - * - BlockFadeEvent - * - BlockFromToEvent - * - BlockDamageEvent - * - Structure (tree etc) - * - ChunkPreGenerateEvent - * - PlayerIgniteBlockEvent - * - PlayerBucketEmptyEvent - * - PlayerBucketFillEvent - * - VehicleCreateEvent - * - HangingPlaceEvent - * - HangingBreakEvent - * - EntityChangeBlockEvent - * - PVP - * - block dispense - * - PVE - * - VehicleDestroy - * - Projectile - * - enderman harvest - */ - - @Listener public void onChat(MessageEvent event) { - // TODO - if (event.isMessageCancelled()) - return; - - Player player = SpongeUtil.getCause(event.getCause(), Player.class); - if (player == null) { - return; - } - String world = player.getWorld().getName(); - if (!PlotSquared.get().hasPlotArea(world)) { - return; - } - PlotArea plotworld = PlotSquared.get().getPlotAreaByString(world); - PlotPlayer plr = SpongeUtil.getPlayer(player); - if (!plotworld.PLOT_CHAT && (plr.getMeta("chat") == null || !(Boolean) plr - .getMeta("chat"))) { - return; - } - Location loc = SpongeUtil.getLocation(player); - Plot plot = loc.getPlot(); - if (plot == null) { - return; - } - Text message = event.getMessage(); - - // TODO use display name rather than username - // - Getting displayname currently causes NPE, so wait until sponge fixes that - - String sender = player.getName(); - PlotId id = plot.getId(); - String newMessage = StringMan - .replaceAll(C.PLOT_CHAT_FORMAT.s(), "%plot_id%", id.x + ";" + id.y, "%sender%", sender); - // String forcedMessage = StringMan.replaceAll(C.PLOT_CHAT_FORCED.s(), "%plot_id%", id.x + ";" + id.y, "%sender%", sender); - for (Entry entry : UUIDHandler.getPlayers().entrySet()) { - PlotPlayer user = entry.getValue(); - String toSend; - if (plot.equals(user.getLocation().getPlot())) { - toSend = newMessage; - } else if (Permissions.hasPermission(user, C.PERMISSION_COMMANDS_CHAT)) { - ((SpongePlayer) user).player.sendMessage(message); - continue; - } else { - continue; - } - String[] split = (toSend + " ").split("%msg%"); - List components = new ArrayList<>(); - Text prefix = null; - for (String part : split) { - if (prefix != null) { - components.add(prefix); - } else { - prefix = message; - } - components.add(SpongeUtil.getText(part)); - } - ((SpongePlayer) user).player.sendMessage(Text.join(components)); - } - //event.setMessage(null); - } - - @Listener public void onBreedEntity(BreedEntityEvent.Breed event) { - Location loc = SpongeUtil.getLocation(event.getTargetEntity()); - String world = loc.getWorld(); - PlotArea plotworld = PlotSquared.get().getPlotAreaByString(world); - if (plotworld == null) { - return; - } - Plot plot = loc.getPlot(); - if (plot == null) { - if (loc.isPlotRoad()) { - event.setCancelled(true); - } - return; - } - if (!plotworld.SPAWN_BREEDING) { - event.setCancelled(true); - } - } - - @Listener public void onSpawnEntity(SpawnEntityEvent event) { - event.filterEntities(entity -> { - if (entity instanceof Player) { - return true; - } - Location loc = SpongeUtil.getLocation(entity); - Plot plot = loc.getPlot(); - if (plot == null) { - return !loc.isPlotRoad(); - } - // Player player = this. getCause(event.getCause()); - // TODO selectively cancel depending on spawn reason - // - Not sure if possible to get spawn reason (since there are no callbacks) - // if (player != null && !plotworld.SPAWN_EGGS) { - // return false; - // return true; - // } - - if (entity.getType() == EntityTypes.ITEM) { - return plot.getFlag(Flags.ITEM_DROP).or(true); - } - int[] mobs = null; - if (entity instanceof Living) { - if (!loc.getPlotArea().MOB_SPAWNING) { - return false; - } - com.google.common.base.Optional mobCap = plot.getFlag(Flags.MOB_CAP); - if (mobCap.isPresent()) { - Integer cap = mobCap.get(); - if (cap == 0) { - return false; - } - mobs = plot.countEntities(); - if (mobs[3] >= cap) { - return false; - } - } - if (entity instanceof Ambient || entity instanceof Animal) { - com.google.common.base.Optional animalFlag = - plot.getFlag(Flags.ANIMAL_CAP); - if (animalFlag.isPresent()) { - int cap = animalFlag.get(); - if (cap == 0) { - return false; - } - if (mobs == null) { - mobs = plot.countEntities(); - } - if (mobs[1] >= cap) { - return false; - } - } - } else if (entity instanceof Monster) { - com.google.common.base.Optional monsterFlag = - plot.getFlag(Flags.HOSTILE_CAP); - if (monsterFlag.isPresent()) { - int cap = monsterFlag.get(); - if (cap == 0) { - return false; - } - if (mobs == null) { - mobs = plot.countEntities(); - } - if (mobs[2] >= cap) { - return false; - } - } - } - return true; - } else if (entity instanceof Minecart || entity instanceof Boat) { - com.google.common.base.Optional vehicleFlag = - plot.getFlag(Flags.VEHICLE_CAP); - if (vehicleFlag.isPresent()) { - int cap = vehicleFlag.get(); - if (cap == 0) { - return false; - } - mobs = plot.countEntities(); - if (mobs[4] >= cap) { - return false; - } - } - } - com.google.common.base.Optional entityCap = plot.getFlag(Flags.ENTITY_CAP); - if (entityCap.isPresent()) { - Integer cap = entityCap.get(); - if (cap == 0) { - return false; - } - if (mobs == null) { - mobs = plot.countEntities(); - } - if (mobs[0] >= cap) { - return false; - } - } - if (entity instanceof Explosive) { - entity.setCreator(plot.owner); - } - return true; - }); - } - - public void onNotifyNeighborBlock(NotifyNeighborBlockEvent event) { - AtomicBoolean cancelled = new AtomicBoolean(false); - // SpongeUtil.printCause("physics", event.getCause()); - // PlotArea area = plotloc.getPlotArea(); - // event.filterDirections(new Predicate() { - // - // @Override - // public boolean test(Direction dir) { - // if (cancelled.get()) { - // return true; - // } - // org.spongepowered.api.world.Location loc = relatives.get(dir); - // Location plotloc = SpongeUtil.getLocation(loc.getExtent().getPluginName(), loc); - // if (area == null) { - // return true; - // } - // plot = area.get - // Plot plot = plotloc.getPlot(); - // if (plot == null) { - // if (MainUtil.isPlotAreaAbs(plotloc)) { - // cancelled.set(true); - // return false; - // } - // cancelled.set(true); - // return true; - // } - // org.spongepowered.api.world.Location relative = loc.getRelative(dir); - // Location relLoc = SpongeUtil.getLocation(relative.getExtent().getPluginName(), relative); - // if (plot.equals(MainUtil.getPlot(relLoc))) { - // return true; - // } - // return false; - // } - // }); - } - - @Listener public void onInteract(InteractBlockEvent event) { - Player player = SpongeUtil.getCause(event.getCause(), Player.class); - if (player == null) { - event.setCancelled(true); - return; - } - BlockSnapshot block = event.getTargetBlock(); - if (block == null) { - return; - } - Optional> bloc = block.getLocation(); - if (!bloc.isPresent()) { - return; - } - Location loc = SpongeUtil.getLocation(player.getWorld().getName(), bloc.get()); - PlotArea area = loc.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getPlot(loc); - PlotPlayer pp = SpongeUtil.getPlayer(player); - if (plot == null) { - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_ROAD, true)) { - event.setCancelled(true); - return; - } - return; - } - if (!plot.hasOwner()) { - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_UNOWNED)) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_UNOWNED); - event.setCancelled(true); - return; - } - if (plot.isAdded(pp.getUUID()) || Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER)) { - return; - } else { - com.google.common.base.Optional> flag = plot.getFlag(Flags.USE); - org.spongepowered.api.world.Location l = SpongeUtil.getLocation(loc); - if (flag.isPresent() && flag.get().contains(SpongeUtil.getPlotBlock(l.getBlock()))) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_OTHER); - event.setCancelled(true); - return; - } - } - - @Listener public void onExplosion(ExplosionEvent e) { - if (e instanceof ExplosionEvent.Detonate) { - ExplosionEvent.Detonate event = (Detonate) e; - World world = event.getTargetWorld(); - String worldName = world.getName(); - if (!PlotSquared.get().hasPlotArea(worldName)) { - return; - } - Optional source = event.getExplosion().getSourceExplosive(); - if (!source.isPresent()) { - event.setCancelled(true); - return; - } - Explosive tnt = source.get(); - UUID creator = tnt.getCreator().orElse(null); - Location current = SpongeUtil.getLocation(tnt); - Plot currentPlot = current.getPlot(); - if (currentPlot == null) { - if (current.isPlotArea()) { - event.setCancelled(true); - } - return; - } - if (creator != null) { - if (!currentPlot.isAdded(creator)) { - event.setCancelled(true); - return; - } - } - if (!currentPlot.getFlag(Flags.EXPLOSION).or(false)) { - event.setCancelled(true); - return; - } - - event.getAffectedLocations().removeIf(worldLocation -> currentPlot.equals( - SpongeUtil.getLocation(worldLocation.getExtent().getName(), worldLocation) - .getPlot())); - event.filterEntities( - entity -> currentPlot.equals(SpongeUtil.getLocation(entity).getPlot())); - } - } - - public void onChangeBlock(ChangeBlockEvent event) { - List> transactions = event.getTransactions(); - Transaction first = transactions.get(0); - BlockSnapshot original = first.getOriginal(); - Optional world = SpongeMain.THIS.getServer().getWorld(original.getWorldUniqueId()); - String worldName = world.get().getName(); - Location loc = SpongeUtil.getLocation(worldName, original.getPosition()); - PlotArea area = loc.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getPlot(loc); - if (plot == null) { - if (!loc.isPlotArea()) { - return; - } - event.setCancelled(true); - return; - } - event.filter(loc1 -> !SpongeUtil.getLocation(worldName, loc1).isPlotRoad()); - } - - @Listener public void onBlockBreak(ChangeBlockEvent.Decay event) { - onChangeBlock(event); - } - - @Listener public void onBlockBreak(ChangeBlockEvent.Grow event) { - onChangeBlock(event); - } - - @Listener public void onBlockBreak(ChangeBlockEvent.Modify event) { - onChangeBlock(event); - } - - @Listener public void onBlockBreak(ChangeBlockEvent.Break event) { - Player player = SpongeUtil.getCause(event.getCause(), Player.class); - if (player == null) { - //SpongeUtil.printCause("break", event.getCause()); - return; - } - PlotPlayer pp = SpongeUtil.getPlayer(player); - List> transactions = event.getTransactions(); - Transaction first = transactions.get(0); - BlockSnapshot original = first.getOriginal(); - Optional world = SpongeMain.THIS.getServer().getWorld(original.getWorldUniqueId()); - String worldName = world.get().getName(); - Location loc = SpongeUtil.getLocation(worldName, original.getPosition()); - Plot plot = loc.getPlot(); - if (plot == null) { - if (!loc.isPlotArea()) { - return; - } - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD)) { - MainUtil.sendMessage(pp, C.PERMISSION_ADMIN_DESTROY_ROAD); - event.setCancelled(true); - return; - } - } else if (transactions.size() == 1) { - if (!plot.hasOwner()) { - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_UNOWNED)) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_UNOWNED); - event.setCancelled(true); - return; - } - if (plot.isAdded(pp.getUUID()) || Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_OTHER)) { - return; - } else { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_OTHER); - com.google.common.base.Optional> destroy = - plot.getFlag(Flags.BREAK); - BlockState state = original.getState(); - if (!destroy.isPresent() || !destroy.get() - .contains(SpongeUtil.getPlotBlock(state))) { - event.setCancelled(true); - return; - } - } - } - event.filter(l -> { - Location loc1 = SpongeUtil.getLocation(worldName, l); - PlotArea area = loc1.getPlotArea(); - if (area == null) { - return true; - } - Plot plot1 = area.getPlot(loc1); - if (plot1 == null) { - return Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD, true); - } - if (!plot1.hasOwner()) { - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_UNOWNED, true)) { - return false; - } - return true; - } - if (!plot1.isAdded(pp.getUUID()) && !Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_OTHER, true)) { - com.google.common.base.Optional> destroy = - plot1.getFlag(Flags.BREAK); - BlockState state = l.getBlock(); - if (destroy.isPresent() && destroy.get().contains(SpongeUtil.getPlotBlock(state))) { - return true; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_OTHER); - return false; - } - return true; - }); - } - - @Listener public void onBlockPlace(ChangeBlockEvent.Pre event) { - Player player = SpongeUtil.getCause(event.getCause(), Player.class); - if (player == null) { - return; - } - PlotPlayer pp = SpongeUtil.getPlayer(player); - List> locs = event.getLocations(); - org.spongepowered.api.world.Location first = locs.get(0); - String worldName = first.getExtent().getName(); - Location loc = SpongeUtil.getLocation(worldName, first.getPosition()); - PlotArea area = loc.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getPlot(loc); - if (plot == null) { - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD, true)) { - event.setCancelled(true); - } - return; - } - if (plot.hasOwner()) { - if (plot.isAdded(pp.getUUID()) || Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER)) { - return; - } else { - com.google.common.base.Optional> place = - plot.getFlag(Flags.PLACE); - BlockState state = first.getBlock(); - if (!place.isPresent() || !place.get().contains(SpongeUtil.getPlotBlock(state))) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_OTHER); - event.setCancelled(true); - return; - } - } - } else { - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_UNOWNED)) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_UNOWNED); - event.setCancelled(true); - return; - } - } - - @Listener public void onBlockPlace(ChangeBlockEvent.Place event) { - Player player = SpongeUtil.getCause(event.getCause(), Player.class); - if (player == null) { - return; - } - PlotPlayer pp = SpongeUtil.getPlayer(player); - List> transactions = event.getTransactions(); - Transaction first = transactions.get(0); - BlockSnapshot pos = first.getOriginal(); - Optional world = SpongeMain.THIS.getServer().getWorld(pos.getWorldUniqueId()); - String worldName = world.get().getName(); - Location loc = SpongeUtil.getLocation(worldName, pos.getPosition()); - PlotArea area = loc.getPlotArea(); - if (area == null) { - return; - } - Plot plot = area.getPlot(loc); - if (plot == null) { - if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD, true)) { - event.setCancelled(true); - return; - } - } else if (transactions.size() == 1) { - if (plot.hasOwner()) { - if (plot.isAdded(pp.getUUID()) || Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER)) { - return; - } else { - com.google.common.base.Optional> place = - plot.getFlag(Flags.PLACE); - BlockState state = pos.getState(); - if (!place.isPresent() || !place.get() - .contains(SpongeUtil.getPlotBlock(state))) { - MainUtil - .sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_OTHER); - event.setCancelled(true); - return; - } - } - } else { - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_UNOWNED)) { - return; - } - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_UNOWNED); - event.setCancelled(true); - return; - } - } else { - event.filter(new Predicate>() { - @Override public boolean test(org.spongepowered.api.world.Location l) { - Location loc = SpongeUtil.getLocation(worldName, l); - Plot plot = loc.getPlot(); - if (plot == null) { - return loc.getPlotArea() == null || Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD, true); - } - if (!plot.hasOwner()) { - if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_UNOWNED, true)) { - return true; - } - return false; - } - if (plot.isAdded(pp.getUUID()) || Permissions - .hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER, true)) { - return true; - } else { - com.google.common.base.Optional> place = - plot.getFlag(Flags.PLACE); - BlockState state = l.getBlock(); - if (place.isPresent() && place.get() - .contains(SpongeUtil.getPlotBlock(state))) { - return true; - } - MainUtil - .sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_OTHER); - return false; - } - } - }); - } - } - - @Listener public void onJoin(ClientConnectionEvent.Join event) { - Player player = event.getTargetEntity(); - SpongeUtil.getPlayer(player).unregister(); - PlotPlayer pp = SpongeUtil.getPlayer(player); - // Now - String name = pp.getName(); - StringWrapper sw = new StringWrapper(name); - UUID uuid = pp.getUUID(); - UUIDHandler.add(sw, uuid); - - Location loc = pp.getLocation(); - PlotArea area = loc.getPlotArea(); - Plot plot; - if (area != null) { - plot = area.getPlot(loc); - if (plot != null) { - PlotListener.plotEntry(pp, plot); - } - } else { - plot = null; - } - // Delayed - - // Async - TaskManager.runTaskLaterAsync(() -> EventUtil.manager.doJoinTask(pp), 20); - } - - @Listener public void onQuit(ClientConnectionEvent.Disconnect event) { - Player player = event.getTargetEntity(); - PlotPlayer pp = SpongeUtil.getPlayer(player); - pp.unregister(); - } - - @Listener public void onMove(MoveEntityEvent event) { - if (!(event.getTargetEntity() instanceof Player)) { - return; - } - org.spongepowered.api.world.Location from = event.getFromTransform().getLocation(); - org.spongepowered.api.world.Location to = event.getToTransform().getLocation(); - int x2; - if (MathMan.roundInt(from.getX()) != (x2 = MathMan.roundInt(to.getX()))) { - Player player = (Player) event.getTargetEntity(); - PlotPlayer pp = SpongeUtil.getPlayer(player); - // Cancel teleport - TaskManager.TELEPORT_QUEUE.remove(pp.getName()); - // Set last location - Location loc = SpongeUtil.getLocation(to); - pp.setMeta("location", loc); - PlotArea area = loc.getPlotArea(); - if (area == null) { - pp.deleteMeta(PlotPlayer.META_LAST_PLOT); - return; - } - Plot now = area.getPlotAbs(loc); - Plot lastPlot = pp.getMeta(PlotPlayer.META_LAST_PLOT); - if (now == null) { - if (lastPlot != null && !PlotListener.plotExit(pp, lastPlot)) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_EXIT_DENIED); - if (lastPlot.equals(SpongeUtil.getLocation(from).getPlot())) { - player.setLocation(from); - } else { - player.setLocation(player.getWorld().getSpawnLocation()); - } - event.setCancelled(true); - return; - } - } else if (now.equals(lastPlot)) { - ForceFieldListener.handleForcefield(player, pp, now); - return; - } else if (!PlotListener.plotEntry(pp, now)) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_ENTRY_DENIED); - player.setLocation(from); - event.setCancelled(true); - return; - } - Integer border = area.getBorder(); - if (x2 > border) { - to.sub(x2 - border + 4, 0, 0); - player.setLocation(to); - MainUtil.sendMessage(pp, C.BORDER); - return; - } else if (x2 < -border) { - to.add(border - x2 + 4, 0, 0); - player.setLocation(to); - MainUtil.sendMessage(pp, C.BORDER); - return; - } - return; - } - int z2; - if (MathMan.roundInt(from.getZ()) != (z2 = MathMan.roundInt(to.getZ()))) { - Player player = (Player) event.getTargetEntity(); - PlotPlayer pp = SpongeUtil.getPlayer(player); - // Cancel teleport - TaskManager.TELEPORT_QUEUE.remove(pp.getName()); - // Set last location - Location loc = SpongeUtil.getLocation(to); - pp.setMeta(PlotPlayer.META_LOCATION, loc); - PlotArea area = loc.getPlotArea(); - if (area == null) { - pp.deleteMeta(PlotPlayer.META_LAST_PLOT); - return; - } - Plot now = area.getPlotAbs(loc); - Plot lastPlot = pp.getMeta(PlotPlayer.META_LAST_PLOT); - if (now == null) { - if (lastPlot != null && !PlotListener.plotExit(pp, lastPlot)) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_EXIT_DENIED); - if (lastPlot.equals(SpongeUtil.getLocation(from).getPlot())) { - player.setLocation(from); - } else { - player.setLocation(player.getWorld().getSpawnLocation()); - } - event.setCancelled(true); - return; - } - } else if (now.equals(lastPlot)) { - ForceFieldListener.handleForcefield(player, pp, now); - return; - } else if (!PlotListener.plotEntry(pp, now)) { - MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_ENTRY_DENIED); - player.setLocation(from); - event.setCancelled(true); - return; - } - Integer border = area.getBorder(); - if (z2 > border) { - to.add(0, 0, z2 - border - 4); - player.setLocation(to); - MainUtil.sendMessage(pp, C.BORDER); - } else if (z2 < -border) { - to.add(0, 0, border - z2 + 4); - player.setLocation(to); - MainUtil.sendMessage(pp, C.BORDER); - } - } - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/WorldEvents.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/WorldEvents.java deleted file mode 100644 index 592ae07c9..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/listener/WorldEvents.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.listener; - -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import org.spongepowered.api.event.Listener; -import org.spongepowered.api.event.world.LoadWorldEvent; -import org.spongepowered.api.world.World; -import org.spongepowered.api.world.gen.GenerationPopulator; -import org.spongepowered.api.world.gen.WorldGenerator; - -public class WorldEvents { - - @Listener public void onLoadWorld(LoadWorldEvent event) { - final World world = event.getTargetWorld(); - final String name = world.getName(); - WorldGenerator generator = world.getWorldGenerator(); - GenerationPopulator terrain = generator.getBaseGenerationPopulator(); - if (terrain instanceof GeneratorWrapper) { - GeneratorWrapper stg = (GeneratorWrapper) terrain; - PlotSquared.get().loadWorld(name, stg); - } else { - PlotSquared.get().loadWorld(name, null); - } - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/object/SpongeOfflinePlayer.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/object/SpongeOfflinePlayer.java deleted file mode 100644 index 1d96c0080..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/object/SpongeOfflinePlayer.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.object; - -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import org.spongepowered.api.entity.living.player.User; - -import java.util.UUID; - -public class SpongeOfflinePlayer implements OfflinePlotPlayer { - - private User user; - - public SpongeOfflinePlayer(User user) { - this.user = user; - } - - @Override public UUID getUUID() { - return user.getUniqueId(); - } - - @Override public long getLastPlayed() { - return 0; //todo - } - - @Override public boolean isOnline() { - return user.isOnline(); - } - - @Override public String getName() { - return user.getName(); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/object/SpongePlayer.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/object/SpongePlayer.java deleted file mode 100644 index 1a0879b21..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/object/SpongePlayer.java +++ /dev/null @@ -1,251 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.object; - -import com.flowpowered.math.vector.Vector3d; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.commands.RequiredType; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.TeleportCause; -import com.github.intellectualsites.plotsquared.plot.util.PlotGameMode; -import com.github.intellectualsites.plotsquared.plot.util.PlotWeather; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import org.spongepowered.api.Sponge; -import org.spongepowered.api.data.key.Keys; -import org.spongepowered.api.data.manipulator.mutable.TargetedLocationData; -import org.spongepowered.api.effect.sound.SoundTypes; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.entity.living.player.gamemode.GameMode; -import org.spongepowered.api.entity.living.player.gamemode.GameModes; -import org.spongepowered.api.service.ban.BanService; -import org.spongepowered.api.text.chat.ChatTypes; -import org.spongepowered.api.text.serializer.TextSerializers; -import org.spongepowered.api.util.Tristate; -import org.spongepowered.api.world.World; - -import java.util.Optional; -import java.util.UUID; - -public class SpongePlayer extends PlotPlayer { - - public final Player player; - private UUID uuid; - private String name; - - public SpongePlayer(Player player) { - this.player = player; - super.populatePersistentMetaMap(); - } - - @Override public RequiredType getSuperCaller() { - return RequiredType.PLAYER; - } - - @Override public Location getLocation() { - Location location = super.getLocation(); - if (location == null) { - return SpongeUtil.getLocation(this.player); - } else { - return location; - } - } - - @Override public Location getLocationFull() { - return SpongeUtil.getLocationFull(this.player); - } - - @Override public UUID getUUID() { - if (this.uuid == null) { - this.uuid = UUIDHandler.getUUID(this); - } - return this.uuid; - } - - @Override public long getLastPlayed() { - return this.player.lastPlayed().get().toEpochMilli(); - } - - @Override public boolean hasPermission(String permission) { - return this.player.hasPermission(permission); - } - - @Override public boolean isPermissionSet(String permission) { - Tristate state = - this.player.getPermissionValue(this.player.getActiveContexts(), permission); - return state != Tristate.UNDEFINED; - } - - @Override public void sendMessage(String message) { - if (!StringMan.isEqual(this.getMeta("lastMessage"), message) || ( - System.currentTimeMillis() - this.getMeta("lastMessageTime") > 5000)) { - setMeta("lastMessage", message); - setMeta("lastMessageTime", System.currentTimeMillis()); - this.player.sendMessage(ChatTypes.CHAT, - TextSerializers.LEGACY_FORMATTING_CODE.deserialize(message)); - } - } - - @Override public void teleport(Location location, TeleportCause cause) { - if ((Math.abs(location.getX()) >= 30000000) || (Math.abs(location.getZ()) >= 30000000)) { - return; - } - String world = this.player.getWorld().getName(); - if (!world.equals(location.getWorld())) { - this.player.transferToWorld(location.getWorld(), - new Vector3d(location.getX(), location.getY(), location.getZ())); - } else { - org.spongepowered.api.world.Location current = this.player.getLocation(); - current = current - .setPosition(new Vector3d(location.getX(), location.getY(), location.getZ())); - this.player.setLocation(current); - } - } - - @Override public boolean isOnline() { - return this.player.isOnline(); - } - - @Override public String getName() { - if (this.name == null) { - this.name = this.player.getName(); - } - return this.name; - } - - @Override public void setCompassTarget(Location location) { - Optional target = this.player.getOrCreate(TargetedLocationData.class); - if (target.isPresent()) { - target.get() - .set(Keys.TARGETED_LOCATION, SpongeUtil.getLocation(location).getPosition()); - } else { - PlotSquared.debug("Failed to set compass target."); - } - } - - @Override public void setWeather(PlotWeather weather) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public PlotGameMode getGameMode() { - GameMode gamemode = this.player.getGameModeData().type().get(); - if (gamemode == GameModes.ADVENTURE) { - return PlotGameMode.ADVENTURE; - } else if (gamemode == GameModes.CREATIVE) { - return PlotGameMode.CREATIVE; - } else if (gamemode == GameModes.SPECTATOR) { - return PlotGameMode.SPECTATOR; - } else if (gamemode == GameModes.SURVIVAL) { - return PlotGameMode.SURVIVAL; - } else { - return PlotGameMode.NOT_SET; - } - } - - @Override public void setGameMode(PlotGameMode gameMode) { - switch (gameMode) { - case ADVENTURE: - this.player.offer(Keys.GAME_MODE, GameModes.ADVENTURE); - return; - case CREATIVE: - this.player.offer(Keys.GAME_MODE, GameModes.CREATIVE); - return; - case SPECTATOR: - this.player.offer(Keys.GAME_MODE, GameModes.SPECTATOR); - return; - case SURVIVAL: - this.player.offer(Keys.GAME_MODE, GameModes.SURVIVAL); - return; - case NOT_SET: - this.player.offer(Keys.GAME_MODE, GameModes.NOT_SET); - } - } - - @Override public void setTime(long time) { - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public boolean getFlight() { - Optional flying = player.get(Keys.CAN_FLY); - return flying.isPresent() && flying.get(); - } - - @Override public void setFlight(boolean fly) { - this.player.offer(Keys.IS_FLYING, fly); - this.player.offer(Keys.CAN_FLY, fly); - } - - @Override public void playMusic(Location location, int id) { - switch (id) { - case 0: - //Placeholder because Sponge doesn't have a stopSound() implemented yet. - this.player.playSound(SoundTypes.BLOCK_CLOTH_PLACE, - SpongeUtil.getLocation(location).getPosition(), 0); - break; - case 2256: - this.player - .playSound(SoundTypes.RECORD_11, SpongeUtil.getLocation(location).getPosition(), - 1); - break; - case 2257: - this.player - .playSound(SoundTypes.RECORD_13, SpongeUtil.getLocation(location).getPosition(), - 1); - break; - case 2258: - this.player.playSound(SoundTypes.RECORD_BLOCKS, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2259: - this.player.playSound(SoundTypes.RECORD_CAT, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2260: - this.player.playSound(SoundTypes.RECORD_CHIRP, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2261: - this.player.playSound(SoundTypes.RECORD_FAR, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2262: - this.player.playSound(SoundTypes.RECORD_MALL, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2263: - this.player.playSound(SoundTypes.RECORD_MELLOHI, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2264: - this.player.playSound(SoundTypes.RECORD_STAL, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2265: - this.player.playSound(SoundTypes.RECORD_STRAD, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2266: - this.player.playSound(SoundTypes.RECORD_WAIT, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - case 2267: - this.player.playSound(SoundTypes.RECORD_WARD, - SpongeUtil.getLocation(location).getPosition(), 1); - break; - } - } - - @Override public void kick(String message) { - this.player.kick(SpongeUtil.getText(message)); - } - - @Override public void stopSpectating() { - //Not Implemented - } - - @Override public boolean isBanned() { - Optional service = Sponge.getServiceManager().provide(BanService.class); - return service.isPresent() && service.get().isBanned(this.player.getProfile()); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/KillRoadMobs.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/KillRoadMobs.java deleted file mode 100644 index ee8ee3659..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/KillRoadMobs.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -public class KillRoadMobs { - public void run() { - // TODO kill road mobs - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeChatManager.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeChatManager.java deleted file mode 100644 index 000e71352..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeChatManager.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.config.Settings; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotMessage; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.ChatManager; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import org.spongepowered.api.text.Text; -import org.spongepowered.api.text.action.TextActions; -import org.spongepowered.api.text.format.TextColor; -import org.spongepowered.api.text.format.TextColors; -import org.spongepowered.api.text.format.TextStyle; -import org.spongepowered.api.text.format.TextStyles; - -import java.util.List; - -public class SpongeChatManager extends ChatManager { - - @Override public Text.Builder builder() { - return Text.builder(); - } - - @Override public void color(PlotMessage message, String color) { - TextColor tc = null; - TextStyle ts = null; - switch (color.charAt(1)) { - case 'a': - tc = TextColors.GREEN; - break; - case 'b': - tc = TextColors.AQUA; - break; - case 'c': - tc = TextColors.RED; - break; - case 'd': - tc = TextColors.LIGHT_PURPLE; - break; - case 'e': - tc = TextColors.YELLOW; - break; - case 'f': - tc = TextColors.WHITE; - break; - case '1': - tc = TextColors.DARK_BLUE; - break; - case '2': - tc = TextColors.DARK_GREEN; - break; - case '3': - tc = TextColors.DARK_AQUA; - break; - case '4': - tc = TextColors.DARK_RED; - break; - case '5': - tc = TextColors.DARK_PURPLE; - break; - case '6': - tc = TextColors.GOLD; - break; - case '7': - tc = TextColors.GRAY; - break; - case '8': - tc = TextColors.DARK_GRAY; - break; - case '9': - tc = TextColors.BLUE; - break; - case '0': - tc = TextColors.BLACK; - break; - case 'k': - ts = TextStyles.OBFUSCATED; - break; - case 'l': - ts = TextStyles.BOLD; - break; - case 'm': - ts = TextStyles.UNDERLINE; - break; - case 'n': - ts = TextStyles.STRIKETHROUGH; - break; - case 'o': - ts = TextStyles.ITALIC; - break; - case 'r': - tc = TextColors.RESET; - break; - } - if (tc != null) { - apply(message, getChild(message).color(tc)); - } - if (ts != null) { - apply(message, getChild(message).style(ts)); - } - } - - public Text.Builder getChild(PlotMessage m) { - Text.Builder builder = m.$(this); - List children = builder.getChildren(); - Text last = children.get(children.size() - 1); - builder.remove(last); - return Text.builder().append(last); - } - - public void apply(PlotMessage m, Text.Builder builder) { - m.$(this).append(builder.build()); - } - - @Override public void tooltip(PlotMessage message, PlotMessage... tooltips) { - Text.Builder builder = Text.builder(); - boolean lb = false; - for (PlotMessage tooltip : tooltips) { - if (lb) { - builder.append(Text.of("\n")); - } - builder.append(tooltip.$(this).build()); - lb = true; - } - apply(message, getChild(message).onHover(TextActions.showText(builder.toText()))); - } - - @Override public void command(PlotMessage message, String command) { - apply(message, getChild(message).onClick(TextActions.runCommand(command))); - } - - @Override public void text(PlotMessage message, String text) { - message.$(this).append(SpongeUtil.getText(text)); - } - - @Override public void send(PlotMessage plotMessage, PlotPlayer player) { - if (player instanceof ConsolePlayer || !Settings.Chat.INTERACTIVE) { - player.sendMessage(plotMessage.$(this).build().toPlain()); - } else { - ((SpongePlayer) player).player.sendMessage(plotMessage.$(this).build()); - } - } - - @Override public void suggest(PlotMessage plotMessage, String command) { - apply(plotMessage, getChild(plotMessage).onClick(TextActions.suggestCommand(command))); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeChunkManager.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeChunkManager.java deleted file mode 100644 index f5a26c306..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeChunkManager.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.object.BlockVector2; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.Plot; -import com.github.intellectualsites.plotsquared.plot.util.ChunkManager; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import org.spongepowered.api.entity.Entity; -import org.spongepowered.api.entity.living.Living; -import org.spongepowered.api.entity.living.animal.Animal; -import org.spongepowered.api.entity.living.monster.Monster; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.world.Chunk; -import org.spongepowered.api.world.World; - -import java.util.Optional; -import java.util.Set; -import java.util.function.Predicate; - -public class SpongeChunkManager extends ChunkManager { - - @Override public int[] countEntities(Plot plot) { - Location pos1 = plot.getBottomAbs(); - Location pos2 = plot.getTopAbs(); - World world = SpongeUtil.getWorld(pos1.getWorld()); - int bx = pos1.getX(); - int bz = pos1.getZ(); - int tx = pos2.getX(); - int tz = pos2.getZ(); - int[] count = new int[6]; - world.getEntities(entity -> { - org.spongepowered.api.world.Location loc = entity.getLocation(); - int x = loc.getBlockX(); - if ((x >= bx) && (x <= tx)) { - int z = loc.getBlockZ(); - if ((z >= bz) && (z <= tz)) { - count[0]++; - if (entity instanceof Living) { - count[3]++; - if (entity instanceof Animal) { - count[1]++; - } else if (entity instanceof Monster) { - count[2]++; - } - } else { - count[4]++; - } - } - } - return false; - }); - - return count; - } - - @Override public boolean loadChunk(String world, BlockVector2 loc, boolean force) { - World worldObj = SpongeUtil.getWorld(world); - return worldObj.loadChunk(loc.x << 4, 0, loc.z << 4, force).isPresent(); - } - - @Override public Set getChunkChunks(String world) { - // TODO save world; - return super.getChunkChunks(world); - } - - @Override - public boolean copyRegion(Location pos1, Location pos2, Location newPos, Runnable whenDone) { - // TODO copy a region - TaskManager.runTask(whenDone); - return false; - } - - @Override public void clearAllEntities(Location pos1, Location pos2) { - String worldName = pos1.getWorld(); - World world = SpongeUtil.getWorld(worldName); - int bx = pos1.getX(); - int bz = pos1.getZ(); - int tx = pos2.getX(); - int tz = pos2.getZ(); - world.getEntities(new Predicate() { - @Override public boolean test(Entity entity) { - org.spongepowered.api.world.Location loc = entity.getLocation(); - int x = loc.getBlockX(); - if ((x >= bx) && (x <= tx)) { - int z = loc.getBlockZ(); - if ((z >= bz) && (z <= tz)) { - if (!(entity instanceof Player)) { - entity.remove(); - } - } - } - return false; - } - }); - } - - @Override public void swap(Location bot1, Location top1, Location bot2, Location top2, - Runnable whenDone) { - // TODO swap region - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public void unloadChunk(String world, BlockVector2 loc, boolean save, boolean safe) { - World worldObj = SpongeUtil.getWorld(world); - Optional chunk = worldObj.getChunk(loc.x << 4, 0, loc.z << 4); - if (chunk.isPresent()) { - worldObj.unloadChunk(chunk.get()); - } - } - - @Override public boolean regenerateRegion(Location pos1, Location pos2, boolean ignoreAugment, - Runnable whenDone) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeCommand.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeCommand.java deleted file mode 100644 index 21ab4b19e..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeCommand.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.commands.MainCommand; -import com.github.intellectualsites.plotsquared.plot.object.ConsolePlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import com.google.common.collect.ImmutableList; -import org.spongepowered.api.command.CommandCallable; -import org.spongepowered.api.command.CommandException; -import org.spongepowered.api.command.CommandResult; -import org.spongepowered.api.command.CommandSource; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.text.Text; -import org.spongepowered.api.world.Location; -import org.spongepowered.api.world.World; - -public class SpongeCommand implements CommandCallable { - - @Override public CommandResult process(CommandSource source, String arguments) - throws CommandException { - TaskManager.runTask(() -> { - String id = source.getIdentifier(); - PlotPlayer plotPlayer = null; - try { - UUID uuid = UUID.fromString(id); - - Optional player = SpongeMain.THIS.getServer().getPlayer(uuid); - if (player.isPresent()) { - plotPlayer = SpongeUtil.getPlayer(player.get()); - } - } catch (Exception ignored) { - plotPlayer = ConsolePlayer.getConsole(); - } - MainCommand.onCommand(plotPlayer, - arguments.isEmpty() ? new String[] {} : arguments.split(" ")); - }); - return CommandResult.success(); - } - - @Override public List getSuggestions(CommandSource source, String arguments, - Location targetPosition) throws CommandException { - if (!(source instanceof Player)) { - return ImmutableList.of(); - } - PlotPlayer player = SpongeUtil.getPlayer((Player) source); - String[] args = arguments.split(" "); - if (args.length == 0) { - return Collections.singletonList(MainCommand.getInstance().toString()); - } - Collection objects = MainCommand.getInstance().tab(player, args, arguments.endsWith(" ")); - if (objects != null && !objects.isEmpty()) { - List result = new ArrayList<>(); - for (Object o : objects) { - result.add(o.toString()); - } - return result; - } - List names = new ArrayList<>(); - String startsWith = arguments.endsWith(" ") ? "" : args[args.length - 1]; - for (Map.Entry entry : UUIDHandler.getPlayers().entrySet()) { - String name = entry.getKey(); - if (name.startsWith(startsWith)) { - names.add(name); - } - } - return names; - } - - @Override public boolean testPermission(CommandSource source) { - return true; - } - - @Override public Optional getShortDescription(CommandSource source) { - return Optional.of(Text.of("Shows plot help")); - } - - @Override public Optional getHelp(CommandSource source) { - return Optional.of(Text.of("/plot")); - } - - @Override public Text getUsage(CommandSource source) { - return Text.of("/plot "); - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeEconHandler.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeEconHandler.java deleted file mode 100644 index 1a3ff7a19..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeEconHandler.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.EconHandler; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import org.spongepowered.api.Sponge; -import org.spongepowered.api.event.Listener; -import org.spongepowered.api.event.service.ChangeServiceProviderEvent; -import org.spongepowered.api.service.economy.EconomyService; -import org.spongepowered.api.service.economy.account.UniqueAccount; - -import java.math.BigDecimal; -import java.util.Optional; - -public class SpongeEconHandler extends EconHandler { - private EconomyService econ; - - public SpongeEconHandler() { - if (Sponge.getServiceManager().isRegistered(EconomyService.class)) { - econ = Sponge.getServiceManager().provide(EconomyService.class).get(); - } - } - - @Listener public void onChangeServiceProvider(ChangeServiceProviderEvent event) { - if (event.getService().equals(EconomyService.class)) { - econ = (EconomyService) event.getNewProviderRegistration().getProvider(); - } - } - - @Override public void withdrawMoney(PlotPlayer player, double amount) { - if (econ != null) { - Optional accOpt = econ.getOrCreateAccount(player.getUUID()); - if (accOpt.isPresent()) { - UniqueAccount acc = accOpt.get(); - - acc.withdraw(econ.getDefaultCurrency(), new BigDecimal(amount), SpongeUtil.CAUSE); - } - } - } - - @Override public void depositMoney(PlotPlayer player, double amount) { - if (econ != null) { - Optional accOpt = econ.getOrCreateAccount(player.getUUID()); - if (accOpt.isPresent()) { - UniqueAccount acc = accOpt.get(); - acc.deposit(econ.getDefaultCurrency(), new BigDecimal(amount), SpongeUtil.CAUSE); - } - } - } - - @Override public void depositMoney(OfflinePlotPlayer player, double amount) { - if (econ != null) { - Optional accOpt = econ.getOrCreateAccount(player.getUUID()); - if (accOpt.isPresent()) { - UniqueAccount acc = accOpt.get(); - acc.deposit(econ.getDefaultCurrency(), new BigDecimal(amount), SpongeUtil.CAUSE); - } - } - } - - @Override public boolean hasPermission(String world, String player, String perm) { - SpongePlayer obj = (SpongePlayer) UUIDHandler.getPlayer(player); - if (obj != null) { - return obj.player.hasPermission(perm); - } - // TODO offline - return false; - } - - @Override public double getBalance(PlotPlayer player) { - if (econ != null) { - Optional accOpt = econ.getOrCreateAccount(player.getUUID()); - if (accOpt.isPresent()) { - UniqueAccount acc = accOpt.get(); - BigDecimal balance = acc.getBalance(econ.getDefaultCurrency()); - return balance.doubleValue(); - } - } - return 0; - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeEventUtil.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeEventUtil.java deleted file mode 100644 index 2f46e6da7..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeEventUtil.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.flag.Flag; -import com.github.intellectualsites.plotsquared.plot.util.EventUtil; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import com.github.intellectualsites.plotsquared.sponge.events.*; -import org.spongepowered.api.event.Event; -import org.spongepowered.api.event.EventManager; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.UUID; - -public class SpongeEventUtil extends EventUtil { - - public EventManager events; - - public SpongeEventUtil() { - this.events = SpongeMain.THIS.getGame().getEventManager(); - } - - public boolean callEvent(Event event) { - return !this.events.post(event); - } - - @Override public boolean callClaim(PlotPlayer player, Plot plot, boolean auto) { - return callEvent(new PlayerClaimPlotEvent(SpongeUtil.getPlayer(player), plot, auto)); - } - - @Override public boolean callTeleport(PlotPlayer player, Location from, Plot plot) { - return callEvent(new PlayerTeleportToPlotEvent(SpongeUtil.getPlayer(player), from, plot)); - } - - @Override public boolean callComponentSet(Plot plot, String component) { - return callEvent(new PlotComponentSetEvent(plot, component)); - } - - @Override public boolean callClear(Plot plot) { - return callEvent(new PlotClearEvent(plot)); - } - - @Override public void callDelete(Plot plot) { - callEvent(new PlotDeleteEvent(plot)); - } - - @Override public boolean callFlagAdd(Flag flag, Plot plot) { - return callEvent(new PlotFlagAddEvent(flag, plot)); - } - - @Override public boolean callFlagRemove(Flag flag, Plot plot, Object value) { - return callEvent(new PlotFlagRemoveEvent(flag, plot)); - } - - @Override public boolean callMerge(Plot plot, ArrayList plots) { - return callEvent(new PlotMergeEvent(SpongeUtil.getWorld(plot.getWorldName()), plot, plots)); - } - - @Override public boolean callUnlink(PlotArea area, ArrayList plots) { - return callEvent(new PlotUnlinkEvent(SpongeUtil.getWorld(area.getWorldName()), plots)); - } - - @Override public void callEntry(PlotPlayer player, Plot plot) { - callEvent(new PlayerEnterPlotEvent(SpongeUtil.getPlayer(player), plot)); - } - - @Override public void callLeave(PlotPlayer player, Plot plot) { - callEvent(new PlayerLeavePlotEvent(SpongeUtil.getPlayer(player), plot)); - } - - @Override public void callDenied(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotDeniedEvent(SpongeUtil.getPlayer(initiator), plot, player, added)); - } - - @Override public void callTrusted(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotTrustedEvent(SpongeUtil.getPlayer(initiator), plot, player, added)); - } - - @Override public void callMember(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotHelperEvent(SpongeUtil.getPlayer(initiator), plot, player, added)); - } - - @Override - public boolean callOwnerChange(PlotPlayer initiator, Plot plot, UUID oldOwner, UUID newOwner, - boolean hasOldOwner) { - return callEvent( - new PlotChangeOwnerEvent(SpongeUtil.getPlayer(initiator), plot, oldOwner, newOwner, - hasOldOwner)); - } - - @Override public boolean callFlagRemove(Flag flag, Object object, PlotCluster cluster) { - return callEvent(new ClusterFlagRemoveEvent(flag, cluster)); - } - - @Override @Nullable public Rating callRating(PlotPlayer player, Plot plot, Rating rating) { - PlotRateEvent event = new PlotRateEvent(player, rating, plot); - this.events.post(event); - if (event.isCancelled()) { - return null; - } - return event.getRating(); - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeHybridUtils.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeHybridUtils.java deleted file mode 100644 index fefc868f6..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeHybridUtils.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils; -import com.github.intellectualsites.plotsquared.plot.object.RegionWrapper; -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis; - -public class SpongeHybridUtils extends HybridUtils { - - @Override public void analyzeRegion(String world, RegionWrapper region, - RunnableVal whenDone) { - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeInventoryUtil.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeInventoryUtil.java deleted file mode 100644 index ebda5279c..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeInventoryUtil.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.object.PlotInventory; -import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.item.ItemType; -import org.spongepowered.api.item.ItemTypes; -import org.spongepowered.api.item.inventory.Carrier; -import org.spongepowered.api.item.inventory.ItemStack; -import org.spongepowered.api.item.inventory.type.CarriedInventory; - -import java.util.ArrayList; - - -public class SpongeInventoryUtil extends InventoryUtil { - - public ItemStack.Builder builder; - - public SpongeInventoryUtil() { - builder = SpongeMain.THIS.getGame().getRegistry().createBuilder(ItemStack.Builder.class); - } - - @Override public void open(final PlotInventory inv) { -/* - // TODO Auto-generated method stub - final SpongePlayer sp = (SpongePlayer) inv.player; - final Player player = sp.player; - - final CustomInventory inventory = Inventory.builder().of(InventoryArchetypes.MENU_ROW)property("test", - InventoryTitle.of(org.spongepowered.api.text.Text.of(inv.getTitle()))) - .property("size",org.spongepowered.api.item.inventory.property.InventoryDimension.) - //name(SpongeUtil.getTranslation(inv.getTitle())).size(inv.size).build(); - final PlotItemStack[] items = inv.getItems(); - for (int i = 0; i < (inv.size * 9); i++) { - final PlotItemStack item = items[i]; - if (item != null) { - inventory.set(new SlotIndex(i), getItem(item)); - } - } - inv.player.setMeta("inventory", inv); - player.openInventory(inventory, SpongeUtil.CAUSE); -*/ - throw new UnsupportedOperationException("Broken as of 1.11"); - - } - - public ItemStack getItem(final PlotItemStack item) { - // FIXME item type, item data, item name, item lore - return builder.itemType(ItemTypes.SPONGE).quantity(item.amount).build(); - } - - @Override public void close(final PlotInventory inv) { - if (!inv.isOpen()) { - return; - } - inv.player.deleteMeta("inventory"); - final SpongePlayer sp = (SpongePlayer) inv.player; - sp.player.closeInventory(); - } - - @Override - public void setItem(final PlotInventory inv, final int index, final PlotItemStack item) { - if (!inv.isOpen()) { - return; - } - final SpongePlayer sp = (SpongePlayer) inv.player; - final Player player = sp.player; - player.getOpenInventory().get(); - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - - } - - public PlotItemStack getItem(final ItemStack item) { - if (item == null) { - return null; - } - final ItemType type = item.getItem(); - final String id = type.getId(); - final int amount = item.getQuantity(); - // TODO name / lore - return new PlotItemStack(id, amount, null); - } - - @Override public PlotItemStack[] getItems(final PlotPlayer player) { - final SpongePlayer sp = (SpongePlayer) player; - sp.player.getInventory(); - new ArrayList(); - - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - - // return list.toArray(); - } - - @Override public boolean isOpen(final PlotInventory inv) { - if (!inv.isOpen()) { - return false; - } - final SpongePlayer sp = (SpongePlayer) inv.player; - final Player player = sp.player; - if (player.isViewingInventory()) { - final CarriedInventory inventory = player.getInventory(); - return inv.getTitle().equals(inventory.getName().getId()); // TODO getId() - } - return false; - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeMetrics.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeMetrics.java deleted file mode 100644 index 4a221d4e9..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeMetrics.java +++ /dev/null @@ -1,514 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.google.inject.Inject; -import ninja.leaping.configurate.commented.CommentedConfigurationNode; -import ninja.leaping.configurate.hocon.HoconConfigurationLoader; -import ninja.leaping.configurate.loader.ConfigurationLoader; -import org.spongepowered.api.Game; -import org.spongepowered.api.plugin.PluginContainer; -import org.spongepowered.api.scheduler.Task; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.Proxy; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.util.UUID; -import java.util.concurrent.TimeUnit; -import java.util.zip.GZIPOutputStream; - -/* - * Copyright 2011-2013 Tyler Blair. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and contributors and should not be interpreted as representing official policies, - * either expressed or implied, of anybody else. - */ - -public class SpongeMetrics { - - /** - * The current revision number - */ - private final static int REVISION = 7; - - /** - * The base url of the metrics domain - */ - private static final String BASE_URL = "http://report.mcstats.org"; - - /** - * The url used to report a server's status - */ - private static final String REPORT_URL = "/plugin/%s"; - - /** - * Interval of time to ping (in minutes) - */ - private static final int PING_INTERVAL = 15; - - /** - * The game data is being sent for - */ - private final Game game; - - /** - * The plugin this metrics submits for - */ - private final PluginContainer plugin; - /** - * Lock for synchronization - */ - private final Object optOutLock = new Object(); - /** - * The plugin configuration file - */ - private CommentedConfigurationNode config; - /** - * The configuration loader - */ - private ConfigurationLoader configurationLoader; - /** - * The plugin configuration file - */ - private File configurationFile; - /** - * Unique server id - */ - private String guid; - /** - * Debug mode - */ - private boolean debug; - /** - * The scheduled task - */ - private volatile Task task = null; - - @Inject public SpongeMetrics(final Game game, final PluginContainer plugin) { - if (plugin == null) { - throw new IllegalArgumentException("Plugin cannot be null"); - } - - this.game = game; - this.plugin = plugin; - - loadConfiguration(); - } - - /** - * GZip compress a string of bytes - * - * @param input - * @return - */ - public static byte[] gzip(final String input) { - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - GZIPOutputStream gzos = null; - - try { - gzos = new GZIPOutputStream(baos); - gzos.write(input.getBytes("UTF-8")); - } catch (final IOException e) { - e.printStackTrace(); - } finally { - if (gzos != null) { - try { - gzos.close(); - } catch (final IOException ignore) { - } - } - } - - return baos.toByteArray(); - } - - /** - * Appends a json encoded key/value pair to the given string builder. - * - * @param json - * @param key - * @param value - * @throws UnsupportedEncodingException - */ - private static void appendJSONPair(final StringBuilder json, final String key, - final String value) { - boolean isValueNumeric = false; - - try { - if (value.equals("0") || !value.endsWith("0")) { - Double.parseDouble(value); - isValueNumeric = true; - } - } catch (final NumberFormatException ignored) { - isValueNumeric = false; - } - - if (json.charAt(json.length() - 1) != '{') { - json.append(','); - } - - json.append(escapeJSON(key)); - json.append(':'); - - if (isValueNumeric) { - json.append(value); - } else { - json.append(escapeJSON(value)); - } - } - - /** - * Escape a string to create a valid JSON string - * - * @param text - * @return - */ - private static String escapeJSON(final String text) { - final StringBuilder builder = new StringBuilder(); - - builder.append('"'); - for (int index = 0; index < text.length(); index++) { - final char chr = text.charAt(index); - - switch (chr) { - case '"': - case '\\': - builder.append('\\'); - builder.append(chr); - break; - case '\b': - builder.append("\\b"); - break; - case '\t': - builder.append("\\t"); - break; - case '\n': - builder.append("\\n"); - break; - case '\r': - builder.append("\\r"); - break; - default: - if (chr < ' ') { - final String t = "000" + Integer.toHexString(chr); - builder.append("\\u" + t.substring(t.length() - 4)); - } else { - builder.append(chr); - } - break; - } - } - builder.append('"'); - - return builder.toString(); - } - - /** - * Encode text as UTF-8 - * - * @param text the text to encode - * @return the encoded text, as UTF-8 - */ - private static String urlEncode(final String text) throws UnsupportedEncodingException { - return URLEncoder.encode(text, "UTF-8"); - } - - /** - * Loads the configuration - */ - private void loadConfiguration() { - configurationFile = getConfigFile(); - configurationLoader = HoconConfigurationLoader.builder().setFile(configurationFile).build(); - - try { - if (!configurationFile.exists()) { - configurationFile.createNewFile(); - config = configurationLoader.load(); - - config.setComment("This contains settings for MCStats: http://mcstats.org"); - config.getNode("mcstats.guid").setValue(UUID.randomUUID().toString()); - config.getNode("mcstats.opt-out").setValue(false); - config.getNode("mcstats.debug").setValue(false); - - configurationLoader.save(config); - } else { - config = configurationLoader.load(); - } - - guid = config.getNode("mcstats.guid").getString(); - debug = config.getNode("mcstats.debug").getBoolean(); - } catch (final IOException e) { - e.printStackTrace(); - } - } - - /** - * Start measuring statistics. This will immediately create an async repeating task as the plugin and send the - * initial data to the metrics backend, and then after that it will post in increments of PING_INTERVAL * 1200 - * ticks. - * - * @return True if statistics measuring is running, otherwise false. - */ - public boolean start() { - synchronized (optOutLock) { - // Did we opt out? - if (isOptOut()) { - return false; - } - - // Is metrics already running? - if (task != null) { - return true; - } - - // Begin hitting the server with glorious data - final Task.Builder builder = game.getScheduler().createTaskBuilder(); - builder.async().interval(PING_INTERVAL, TimeUnit.MINUTES).execute(new Runnable() { - - private boolean firstPost = true; - - @Override public void run() { - try { - // This has to be synchronized or it can collide with the disable method. - synchronized (optOutLock) { - // Disable Task, if it is running and the server owner decided to opt-out - if (isOptOut() && (task != null)) { - task.cancel(); - task = null; - } - } - - // We use the inverse of firstPost because if it is the first time we are posting, - // it is not a interval ping, so it evaluates to FALSE - // Each time thereafter it will evaluate to TRUE, i.e PING! - postPlugin(!firstPost); - - // After the first post we set firstPost to false - // Each post thereafter will be a ping - firstPost = false; - } catch (final IOException e) { - if (debug) { - PlotSquared.debug("[Metrics] " + e.getMessage()); - } - } - } - }); - return true; - } - } - - /** - * Has the server owner denied plugin metrics? - * - * @return true if metrics should be opted out of it - */ - public boolean isOptOut() { - synchronized (optOutLock) { - loadConfiguration(); - - return config.getNode("mcstats.opt-out").getBoolean(); - } - } - - /** - * Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task. - * - * @throws IOException - */ - public void enable() throws IOException { - // This has to be synchronized or it can collide with the check in the task. - synchronized (optOutLock) { - // Check if the server owner has already set opt-out, if not, set it. - if (isOptOut()) { - config.getNode("mcstats.opt-out").setValue(false); - configurationLoader.save(config); - } - - // Enable Task, if it is not running - if (task == null) { - start(); - } - } - } - - /** - * Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task. - * - * @throws IOException - */ - public void disable() throws IOException { - // This has to be synchronized or it can collide with the check in the task. - synchronized (optOutLock) { - // Check if the server owner has already set opt-out, if not, set it. - if (!isOptOut()) { - config.getNode("mcstats.opt-out").setValue(true); - configurationLoader.save(config); - } - - // Disable Task, if it is running - if (task != null) { - task.cancel(); - task = null; - } - } - } - - /** - * Gets the File object of the config file that should be used to store data such as the GUID and opt-out status - * - * @return the File object for the config file - */ - public File getConfigFile() { - // TODO configDir - final File configFolder = new File("config"); - - return new File(configFolder, "PluginMetrics.conf"); - } - - /** - * Generic method that posts a plugin to the metrics website - */ - private void postPlugin(final boolean isPing) throws IOException { - // Server software specific section - final String pluginName = plugin.getName(); - final boolean onlineMode = - game.getServer().getOnlineMode(); // TRUE if online mode is enabled - final String pluginVersion = plugin.getVersion().orElse("unknown"); - final String serverVersion = - String.format("%s %s", "Sponge", game.getPlatform().getMinecraftVersion()); - final int playersOnline = game.getServer().getOnlinePlayers().size(); - - // END server software specific section -- all code below does not use any code outside of this class / Java - - // Construct the post data - final StringBuilder json = new StringBuilder(1024); - json.append('{'); - - // The plugin's description file containg all of the plugin data such as name, version, author, etc - appendJSONPair(json, "guid", guid); - appendJSONPair(json, "plugin_version", pluginVersion); - appendJSONPair(json, "server_version", serverVersion); - appendJSONPair(json, "players_online", Integer.toString(playersOnline)); - - // New data as of R6 - final String osname = System.getProperty("os.name"); - String osarch = System.getProperty("os.arch"); - final String osversion = System.getProperty("os.version"); - final String java_version = System.getProperty("java.version"); - final int coreCount = Runtime.getRuntime().availableProcessors(); - - // normalize os arch .. amd64 -> x86_64 - if (osarch.equals("amd64")) { - osarch = "x86_64"; - } - - appendJSONPair(json, "osname", osname); - appendJSONPair(json, "osarch", osarch); - appendJSONPair(json, "osversion", osversion); - appendJSONPair(json, "cores", Integer.toString(coreCount)); - appendJSONPair(json, "auth_mode", onlineMode ? "1" : "0"); - appendJSONPair(json, "java_version", java_version); - - // If we're pinging, append it - if (isPing) { - appendJSONPair(json, "ping", "1"); - } - - // close json - json.append('}'); - - // Create the url - final URL url = new URL(BASE_URL + String.format(REPORT_URL, urlEncode(pluginName))); - - // Connect to the website - URLConnection connection; - - // Mineshafter creates a socks proxy, so we can safely bypass it - // It does not reroute POST requests so we need to go around it - if (isMineshafterPresent()) { - connection = url.openConnection(Proxy.NO_PROXY); - } else { - connection = url.openConnection(); - } - - final byte[] uncompressed = json.toString().getBytes(); - final byte[] compressed = gzip(json.toString()); - - // Headers - connection.addRequestProperty("User-Agent", "MCStats/" + REVISION); - connection.addRequestProperty("Content-Type", "application/json"); - connection.addRequestProperty("Content-Encoding", "gzip"); - connection.addRequestProperty("Content-Length", Integer.toString(compressed.length)); - connection.addRequestProperty("Accept", "application/json"); - connection.addRequestProperty("Connection", "close"); - - connection.setDoOutput(true); - - if (debug) { - PlotSquared.debug("[Metrics] Prepared request for " + pluginName + " uncompressed=" - + uncompressed.length + " compressed=" + compressed.length); - } - - // Write the data - final OutputStream os = connection.getOutputStream(); - os.write(compressed); - os.flush(); - - // Now read the response - final BufferedReader reader = - new BufferedReader(new InputStreamReader(connection.getInputStream())); - String response = reader.readLine(); - - // close resources - os.close(); - reader.close(); - - if ((response == null) || response.startsWith("ERR") || response.startsWith("7")) { - if (response == null) { - response = "null"; - } else if (response.startsWith("7")) { - response = response.substring(response.startsWith("7,") ? 2 : 1); - } - - throw new IOException(response); - } - } - - /** - * Check if mineshafter is present. If it is, we need to bypass it to send POST requests - * - * @return true if mineshafter is installed on the server - */ - private boolean isMineshafterPresent() { - try { - Class.forName("mineshafter.MineServer"); - return true; - } catch (final Exception ignored) { - return false; - } - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeSchematicHandler.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeSchematicHandler.java deleted file mode 100644 index ecfe61fe4..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeSchematicHandler.java +++ /dev/null @@ -1,298 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.jnbt.*; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; -import com.sk89q.worldedit.math.BlockVector2; -import org.spongepowered.api.block.BlockState; -import org.spongepowered.api.item.inventory.Carrier; -import org.spongepowered.api.item.inventory.type.CarriedInventory; -import org.spongepowered.api.world.World; - -import java.util.Map.Entry; - -public class SpongeSchematicHandler extends SchematicHandler { - - @Override - public boolean restoreTile(LocalBlockQueue queue, CompoundTag tag, int x, int y, int z) { - // TODO Auto-generated method stub - // This method should place the compound tag at a location e.g. chest contents - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public void getCompoundTag(String world, Set regions, - RunnableVal whenDone) { - // async - TaskManager.runTaskAsync(new Runnable() { - @Override public void run() { - // Main positions - Location[] corners = MainUtil.getCorners(world, regions); - Location bot = corners[0]; - Location top = corners[1]; - - int width = top.getX() - bot.getX() + 1; - int height = top.getY() - bot.getY() + 1; - int length = top.getZ() - bot.getZ() + 1; - // Main Schematic tag - HashMap schematic = new HashMap<>(); - schematic.put("Width", new ShortTag("Width", (short) width)); - schematic.put("Length", new ShortTag("Length", (short) length)); - schematic.put("Height", new ShortTag("Height", (short) height)); - schematic.put("Materials", new StringTag("Materials", "Alpha")); - schematic.put("WEOriginX", new IntTag("WEOriginX", 0)); - schematic.put("WEOriginY", new IntTag("WEOriginY", 0)); - schematic.put("WEOriginZ", new IntTag("WEOriginZ", 0)); - schematic.put("WEOffsetX", new IntTag("WEOffsetX", 0)); - schematic.put("WEOffsetY", new IntTag("WEOffsetY", 0)); - schematic.put("WEOffsetZ", new IntTag("WEOffsetZ", 0)); - // Arrays of data types - List tileEntities = new ArrayList<>(); - byte[] blocks = new byte[width * height * length]; - byte[] blockData = new byte[width * height * length]; - // Queue - ArrayDeque queue = new ArrayDeque<>(regions); - TaskManager.runTask(new Runnable() { - @Override public void run() { - if (queue.isEmpty()) { - TaskManager.runTaskAsync(new Runnable() { - @Override public void run() { - schematic.put("Blocks", new ByteArrayTag("Blocks", blocks)); - schematic.put("Data", new ByteArrayTag("Data", blockData)); - schematic.put("Entities", - new ListTag("Entities", CompoundTag.class, - new ArrayList<>())); - schematic.put("TileEntities", - new ListTag("TileEntities", CompoundTag.class, - tileEntities)); - whenDone.value = new CompoundTag("Schematic", schematic); - TaskManager.runTask(whenDone); - System.gc(); - System.gc(); - } - }); - return; - } - Runnable regionTask = this; - RegionWrapper region = queue.poll(); - Location pos1 = new Location(world, region.minX, region.minY, region.minZ); - Location pos2 = new Location(world, region.maxX, region.maxY, region.maxZ); - int bx = bot.getX(); - int bz = bot.getZ(); - int p1x = pos1.getX(); - int p1z = pos1.getZ(); - int p2x = pos2.getX(); - int p2z = pos2.getZ(); - int bcx = p1x >> 4; - int bcz = p1z >> 4; - int tcx = p2x >> 4; - int tcz = p2z >> 4; - int sy = pos1.getY(); - int ey = pos2.getY(); - // Generate list of chunks - ArrayList chunks = new ArrayList<>(); - for (int x = bcx; x <= tcx; x++) { - for (int z = bcz; z <= tcz; z++) { - chunks.add(BlockVector2.at(x, z)); - } - } - World worldObj = SpongeUtil.getWorld(world); - // Main thread - TaskManager.runTask(new Runnable() { - @Override public void run() { - long start = System.currentTimeMillis(); - while (!chunks.isEmpty() - && System.currentTimeMillis() - start < 20) { - // save schematics - BlockVector2 chunk = chunks.remove(0); - int X = chunk.x; - int Z = chunk.z; - if (!worldObj.getChunk(X, 0, Z).isPresent() && !worldObj - .loadChunk(X, 0, Z, false).isPresent()) { - continue; - } - int xxb = X << 4; - int zzb = Z << 4; - int xxt = xxb + 15; - int zzt = zzb + 15; - - if (X == bcx) { - xxb = p1x; - } - if (X == tcx) { - xxt = p2x; - } - if (Z == bcz) { - zzb = p1z; - } - if (Z == tcz) { - zzt = p2z; - } - for (int y = sy; y <= Math.min(255, ey); y++) { - int ry = y - sy; - int i1 = ry * width * length; - for (int z = zzb; z <= zzt; z++) { - int rz = z - bz; - int i2 = i1 + rz * width; - for (int x = xxb; x <= xxt; x++) { - int rx = x - bx; - int index = i2 + rx; - - BlockState state = worldObj.getBlock(x, y, z); - PlotBlock block = SpongeUtil.getPlotBlock(state); - int id = block.id; - switch (id) { - case 0: - case 2: - case 4: - case 13: - case 14: - case 15: - case 20: - case 21: - case 22: - case 24: - case 30: - case 32: - case 37: - case 39: - case 40: - case 41: - case 42: - case 45: - case 46: - case 47: - case 48: - case 49: - case 51: - case 55: - case 56: - case 57: - case 58: - case 60: - case 7: - case 8: - case 9: - case 10: - case 11: - case 73: - case 74: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 85: - case 87: - case 88: - case 101: - case 102: - case 103: - case 110: - case 112: - case 113: - case 121: - case 122: - case 129: - case 133: - case 165: - case 166: - case 169: - case 170: - case 172: - case 173: - case 174: - case 181: - case 182: - case 188: - case 189: - case 190: - case 191: - case 192: - break; - case 54: - case 130: - case 142: - case 27: - case 137: - case 52: - case 154: - case 84: - case 25: - case 144: - case 138: - case 176: - case 177: - case 63: - case 68: - case 323: - case 117: - case 116: - case 28: - case 66: - case 157: - case 61: - case 62: - case 140: - case 146: - case 149: - case 150: - case 158: - case 23: - case 123: - case 124: - case 29: - case 33: - case 151: - case 178: - CompoundTag rawTag; - if (state instanceof Carrier) { - Carrier chest = (Carrier) state; - CarriedInventory - inv = chest.getInventory(); - // TODO serialize inventory - rawTag = null; - } else { - rawTag = null; - } - if (rawTag != null) { - Map values = - new HashMap<>(); - for (Entry entry : rawTag - .getValue().entrySet()) { - values.put(entry.getKey(), - entry.getValue()); - } - values.put("id", - new StringTag("id", "Chest")); - values.put("x", new IntTag("x", x)); - values.put("y", new IntTag("y", y)); - values.put("z", new IntTag("z", z)); - CompoundTag tileEntityTag = - new CompoundTag(values); - tileEntities.add(tileEntityTag); - } - default: - blockData[index] = block.data; - } - blocks[index] = (byte) id; - } - } - } - } - if (!chunks.isEmpty()) { - TaskManager.runTaskLater(this, 1); - } else { - regionTask.run(); - } - } - }); - } - }); - } - }); - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeSetupUtils.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeSetupUtils.java deleted file mode 100644 index c45a04ff7..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeSetupUtils.java +++ /dev/null @@ -1,204 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.ConfigurationNode; -import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper; -import com.github.intellectualsites.plotsquared.plot.object.PlotArea; -import com.github.intellectualsites.plotsquared.plot.object.SetupObject; -import com.github.intellectualsites.plotsquared.plot.object.worlds.SingleWorldGenerator; -import com.github.intellectualsites.plotsquared.plot.util.SetupUtils; -import com.github.intellectualsites.plotsquared.sponge.generator.SpongePlotGenerator; -import org.spongepowered.api.Sponge; -import org.spongepowered.api.world.DimensionTypes; -import org.spongepowered.api.world.GeneratorTypes; -import org.spongepowered.api.world.World; -import org.spongepowered.api.world.WorldArchetype; -import org.spongepowered.api.world.gen.WorldGenerator; -import org.spongepowered.api.world.gen.WorldGeneratorModifier; -import org.spongepowered.api.world.storage.WorldProperties; - -import java.io.IOException; -import java.util.Map.Entry; - -public class SpongeSetupUtils extends SetupUtils { - - @Override public void updateGenerators() { - if (!SetupUtils.generators.isEmpty()) { - return; - } - SetupUtils.generators.put(PlotSquared.imp().getPluginName(), - new SpongePlotGenerator(PlotSquared.get().IMP.getDefaultGenerator())); - SetupUtils.generators.put(PlotSquared.imp().getPluginName() + ":single", - new SpongePlotGenerator(new SingleWorldGenerator())); - // TODO get external world generators - Collection wgms = - Sponge.getRegistry().getAllOf(WorldGeneratorModifier.class); - for (WorldGeneratorModifier wgm : wgms) { - String id = wgm.getId(); - String name = wgm.getName(); - if (wgm instanceof GeneratorWrapper) { - SetupUtils.generators.put(id, (GeneratorWrapper) wgm); - SetupUtils.generators.put(name, (GeneratorWrapper) wgm); - } else { - SpongePlotGenerator wrap = new SpongePlotGenerator(wgm); - SetupUtils.generators.put(id, wrap); - SetupUtils.generators.put(name, wrap); - } - } - } - - @Override public void unload(String worldName, boolean safe) { - Optional world = Sponge.getServer().getWorld(worldName); - if (world.isPresent()) { - Sponge.getServer().unloadWorld(world.get()); - } - } - - @Override public String getGenerator(PlotArea plotArea) { - if (SetupUtils.generators.isEmpty()) { - updateGenerators(); - } - World world = SpongeUtil.getWorld(plotArea.getWorldName()); - if (world == null) { - return null; - } - WorldGenerator generator = world.getWorldGenerator(); - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public String setupWorld(SetupObject object) { - SetupUtils.manager.updateGenerators(); - ConfigurationNode[] steps = object.step == null ? new ConfigurationNode[0] : object.step; - String world = object.world; - int type = object.type; - String worldPath = "worlds." + object.world; - switch (type) { - case 2: { - if (!PlotSquared.get().worlds.contains(worldPath)) { - PlotSquared.get().worlds.createSection(worldPath); - } - ConfigurationSection worldSection = - PlotSquared.get().worlds.getConfigurationSection(worldPath); - if (object.id != null) { - String areaName = object.id + "-" + object.min + "-" + object.max; - String areaPath = "areas." + areaName; - if (!worldSection.contains(areaPath)) { - worldSection.createSection(areaPath); - } - ConfigurationSection areaSection = - worldSection.getConfigurationSection(areaPath); - HashMap options = new HashMap<>(); - for (ConfigurationNode step : steps) { - options.put(step.getConstant(), step.getValue()); - } - options.put("generator.type", object.type); - options.put("generator.terrain", object.terrain); - options.put("generator.plugin", object.plotManager); - if (object.setupGenerator != null && !object.setupGenerator - .equals(object.plotManager)) { - options.put("generator.init", object.setupGenerator); - } - for (Entry entry : options.entrySet()) { - String key = entry.getKey(); - Object value = entry.getValue(); - if (worldSection.contains(key)) { - Object current = worldSection.get(key); - if (!Objects.equals(value, current)) { - areaSection.set(key, value); - } - } else { - worldSection.set(key, value); - } - } - } - GeneratorWrapper gen = SetupUtils.generators.get(object.setupGenerator); - if (gen != null && gen.isFull()) { - object.setupGenerator = null; - } - break; - } - case 1: { - if (!PlotSquared.get().worlds.contains(worldPath)) { - PlotSquared.get().worlds.createSection(worldPath); - } - ConfigurationSection worldSection = - PlotSquared.get().worlds.getConfigurationSection(worldPath); - for (ConfigurationNode step : steps) { - worldSection.set(step.getConstant(), step.getValue()); - } - PlotSquared.get().worlds.set("worlds." + world + ".generator.type", object.type); - PlotSquared.get().worlds - .set("worlds." + world + ".generator.terrain", object.terrain); - PlotSquared.get().worlds - .set("worlds." + world + ".generator.plugin", object.plotManager); - if (object.setupGenerator != null && !object.setupGenerator - .equals(object.plotManager)) { - PlotSquared.get().worlds - .set("worlds." + world + ".generator.init", object.setupGenerator); - } - GeneratorWrapper gen = SetupUtils.generators.get(object.setupGenerator); - if (gen != null && gen.isFull()) { - object.setupGenerator = null; - } - break; - } - case 0: { - if (steps.length != 0) { - if (!PlotSquared.get().worlds.contains(worldPath)) { - PlotSquared.get().worlds.createSection(worldPath); - } - ConfigurationSection worldSection = - PlotSquared.get().worlds.getConfigurationSection(worldPath); - for (ConfigurationNode step : steps) { - worldSection.set(step.getConstant(), step.getValue()); - } - } - break; - } - } - try { - PlotSquared.get().worlds.save(PlotSquared.get().worldsFile); - } catch (IOException e) { - e.printStackTrace(); - } - if (object.setupGenerator != null) { - // create world with generator - GeneratorWrapper gw = SetupUtils.generators.get(object.setupGenerator); - WorldGeneratorModifier wgm = (WorldGeneratorModifier) gw.getPlatformGenerator(); - WorldArchetype settings = - WorldArchetype.builder().loadsOnStartup(true).keepsSpawnLoaded(true) - .dimension(DimensionTypes.OVERWORLD).generator(GeneratorTypes.FLAT) - .usesMapFeatures(false).enabled(true).generatorModifiers(wgm) - .build("PS-" + UUID.randomUUID(), object.world); - WorldProperties properties = null; - try { - properties = Sponge.getServer().createWorldProperties(object.world, settings); - } catch (IOException e) { - e.printStackTrace(); - } - World worldObj; - Optional world1 = Sponge.getServer().loadWorld(properties); - if (world1.isPresent()) { - worldObj = world1.get(); - } - System.out.println("Create normal world"); - } else { - System.out.println("Create vanilla world"); - // create vanilla world - WorldArchetype settings = - WorldArchetype.builder().loadsOnStartup(true).keepsSpawnLoaded(true) - .dimension(DimensionTypes.OVERWORLD).generator(GeneratorTypes.OVERWORLD) - .usesMapFeatures(true).enabled(true) - .build("PS-" + UUID.randomUUID(), object.world); - WorldProperties properties = null; - try { - properties = Sponge.getServer().createWorldProperties(object.world, settings); - } catch (IOException e) { - e.printStackTrace(); - } - World worldObj = Sponge.getServer().loadWorld(properties).get(); - } - return object.world; - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeTaskManager.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeTaskManager.java deleted file mode 100644 index b7d94ef44..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeTaskManager.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import org.spongepowered.api.scheduler.Task; - -import java.util.HashMap; -import java.util.concurrent.atomic.AtomicInteger; - -public class SpongeTaskManager extends TaskManager { - - private final AtomicInteger i = new AtomicInteger(); - - private final HashMap tasks = new HashMap<>(); - private final SpongeMain spongeMain; - - public SpongeTaskManager(SpongeMain spongeMain) { - this.spongeMain = spongeMain; - } - - @Override public int taskRepeat(Runnable runnable, int interval) { - int val = this.i.incrementAndGet(); - Task.Builder builder = this.spongeMain.getGame().getScheduler().createTaskBuilder(); - Task.Builder built = builder.delayTicks(interval).intervalTicks(interval).execute(runnable); - Task task = built.submit(this.spongeMain.getPlugin()); - this.tasks.put(val, task); - return val; - } - - @Override public int taskRepeatAsync(Runnable runnable, int interval) { - int val = this.i.incrementAndGet(); - Task.Builder builder = this.spongeMain.getGame().getScheduler().createTaskBuilder(); - Task.Builder built = - builder.delayTicks(interval).async().intervalTicks(interval).execute(runnable); - Task task = built.submit(this.spongeMain.getPlugin()); - this.tasks.put(val, task); - return val; - } - - @Override public void taskAsync(Runnable runnable) { - Task.Builder builder = this.spongeMain.getGame().getScheduler().createTaskBuilder(); - builder.async().execute(runnable).submit(this.spongeMain.getPlugin()); - } - - @Override public void task(Runnable runnable) { - Task.Builder builder = this.spongeMain.getGame().getScheduler().createTaskBuilder(); - builder.execute(runnable).submit(this.spongeMain.getPlugin()); - } - - @Override public void taskLater(Runnable runnable, int delay) { - Task.Builder builder = this.spongeMain.getGame().getScheduler().createTaskBuilder(); - builder.delayTicks(delay).execute(runnable).submit(this.spongeMain.getPlugin()); - } - - @Override public void taskLaterAsync(Runnable runnable, int delay) { - Task.Builder builder = this.spongeMain.getGame().getScheduler().createTaskBuilder(); - builder.async().delayTicks(delay).execute(runnable).submit(this.spongeMain.getPlugin()); - } - - @Override public void cancelTask(int i) { - Task task = this.tasks.remove(i); - if (task != null) { - task.cancel(); - } - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeTitleManager.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeTitleManager.java deleted file mode 100644 index 3f2ecf521..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeTitleManager.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.AbstractTitle; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import org.spongepowered.api.text.title.Title; - -public class SpongeTitleManager extends AbstractTitle { - - @Override - public void sendTitle(PlotPlayer player, String head, String sub, int in, int delay, int out) { - Title title = - Title.builder().title(SpongeUtil.getText(head)).subtitle(SpongeUtil.getText(sub)) - .fadeIn(in * 20).stay(delay * 20).fadeOut(out * 20).build(); - ((SpongePlayer) player).player.sendTitle(title); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeUtil.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeUtil.java deleted file mode 100644 index 404006678..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeUtil.java +++ /dev/null @@ -1,414 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util; - -import com.flowpowered.math.vector.Vector3d; -import com.flowpowered.math.vector.Vector3i; -import com.github.intellectualsites.plotsquared.plot.PlotSquared; -import com.github.intellectualsites.plotsquared.plot.config.C; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.RegionWrapper; -import com.github.intellectualsites.plotsquared.plot.object.schematic.PlotItem; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.world.biome.Biome; -import org.spongepowered.api.Sponge; -import org.spongepowered.api.block.BlockState; -import org.spongepowered.api.block.BlockType; -import org.spongepowered.api.block.BlockTypes; -import org.spongepowered.api.block.tileentity.Sign; -import org.spongepowered.api.block.tileentity.TileEntity; -import org.spongepowered.api.data.key.Keys; -import org.spongepowered.api.data.manipulator.mutable.tileentity.SignData; -import org.spongepowered.api.data.property.block.SolidCubeProperty; -import org.spongepowered.api.data.value.mutable.ListValue; -import org.spongepowered.api.entity.Entity; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.event.cause.EventContext; -import org.spongepowered.api.text.Text; -import org.spongepowered.api.text.serializer.TextSerializers; -import org.spongepowered.api.text.translation.Translation; -import org.spongepowered.api.world.World; -import org.spongepowered.api.world.biome.BiomeType; -import org.spongepowered.api.world.biome.BiomeTypes; -import org.spongepowered.api.world.extent.Extent; - -import java.io.IOException; -import java.lang.reflect.Field; - -public class SpongeUtil extends WorldUtil { - - public static Cause CAUSE = - Cause.builder().append(Sponge.getPluginManager().fromInstance(SpongeMain.THIS).get()) - .build(EventContext.empty()); - private static BiomeType[] biomes; - private static HashMap biomeMap; - private static Player lastPlayer = null; - private static PlotPlayer lastPlotPlayer = null; - private static World lastWorld; - private static String last; - - public static Location getLocation(Entity player) { - String world = player.getWorld().getName(); - org.spongepowered.api.world.Location loc = player.getLocation(); - Vector3i pos = loc.getBlockPosition(); - return new Location(world, pos.getX(), pos.getY(), pos.getZ()); - } - - public static BiomeType getBiome(String biome) { - if (biomes == null) { - initBiomeCache(); - } - return biomes[biomeMap.get(biome.toUpperCase())]; - } - - public static T getCause(Cause cause, Class clazz) { - Optional root = Optional.of(cause.root()); - if (root.isPresent()) { - Object source = root.get(); - if (clazz.isInstance(source)) { - return (T) source; - } - } - return null; - } - - public static void printCause(String method, Cause cause) { - System.out.println(method + ": " + cause.toString()); - System.out.println(method + ": " + cause.getClass()); - System.out.println(method + ": " + StringMan.getString(cause.all())); - System.out.println(method + ": " + cause.root()); - } - - public static void initBiomeCache() { - try { - Field[] fields = BiomeTypes.class.getFields(); - biomes = new BiomeType[fields.length]; - biomeMap = new HashMap<>(); - for (int i = 0; i < fields.length; i++) { - Field field = fields[i]; - String name = field.getName(); - biomeMap.put(name, i); - biomes[i] = (BiomeType) field.get(null); - } - - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - } - } - - public static BiomeType getBiome(int index) { - return (BiomeType) Biome.getBiome(index); - } - - public static Text getText(String m) { - return TextSerializers.LEGACY_FORMATTING_CODE.deserialize(C.color(m)); - } - - public static Translation getTranslation(String m) { - return new Translation() { - - @Override public String getId() { - return m; - } - - @Override public String get(Locale l, Object... args) { - return m; - } - - @Override public String get(Locale l) { - return m; - } - }; - } - - public static BlockState getBlockState(int id, int data) { - return (BlockState) Block.getBlockById(id).getStateFromMeta(data); - } - - public static PlotBlock getPlotBlock(BlockState state) { - if (state == null) { - return PlotBlock.get(0, 0); - } - IBlockState ibs = ((IBlockState) state); - Block block = ibs.getBlock(); - int id = Block.getIdFromBlock(block); - int data = block.getMetaFromState(ibs); - return PlotBlock.get(id, data); - } - - public static Location getLocation(org.spongepowered.api.world.Location block) { - return getLocation(block.getExtent().getName(), block); - } - - public static Location getLocationFull(Entity player) { - String world = player.getWorld().getName(); - Vector3d rot = player.getRotation(); - float[] pitchYaw = - MathMan.getPitchAndYaw((float) rot.getX(), (float) rot.getY(), (float) rot.getZ()); - org.spongepowered.api.world.Location loc = player.getLocation(); - Vector3i pos = loc.getBlockPosition(); - return new Location(world, pos.getX(), pos.getY(), pos.getZ(), pitchYaw[1], pitchYaw[0]); - } - - public static PlotPlayer getPlayer(Player player) { - if (player == lastPlayer) { - return lastPlotPlayer; - } - String name = player.getName(); - PlotPlayer pp = UUIDHandler.getPlayer(name); - if (pp != null) { - return pp; - } - lastPlotPlayer = new SpongePlayer(player); - UUIDHandler.getPlayers().put(name, lastPlotPlayer); - lastPlayer = player; - return lastPlotPlayer; - } - - public static Player getPlayer(PlotPlayer player) { - if (player instanceof SpongePlayer) { - return ((SpongePlayer) player).player; - } - return null; - } - - public static World getWorld(String world) { - if (StringMan.isEqual(world, last)) { - return lastWorld; - } - Optional optional = Sponge.getServer().getWorld(world); - if (!optional.isPresent()) { - last = null; - return lastWorld = null; - } - last = world; - return lastWorld = optional.get(); - } - - public static void removePlayer(String player) { - lastPlayer = null; - lastPlotPlayer = null; - } - - public static Location getLocation(String world, org.spongepowered.api.world.Location spawn) { - return new Location(world, spawn.getBlockX(), spawn.getBlockY(), spawn.getBlockZ()); - } - - public static String getWorldName(org.spongepowered.api.world.Location origin) { - Extent extent = origin.getExtent(); - if (extent == lastWorld) { - return lastWorld.getName(); - } - if (extent instanceof World) { - lastWorld = (World) extent; - return lastWorld.getName(); - } - return null; - } - - public static org.spongepowered.api.world.Location getLocation(Location location) { - Collection worlds = Sponge.getServer().getWorlds(); - World world = Sponge.getServer().getWorld(location.getWorld()) - .orElse(worlds.toArray(new World[worlds.size()])[0]); - return new org.spongepowered.api.world.Location<>(world, location.getX(), location.getY(), - location.getZ()); - } - - public static Location getLocation(String world, Vector3i position) { - return new Location(world, position.getX(), position.getY(), position.getZ()); - } - - public static Location getLocation(String world, Vector3d position) { - return new Location(world, MathMan.roundInt(position.getX()), - MathMan.roundInt(position.getY()), MathMan.roundInt(position.getZ())); - } - - @Override public boolean isBlockSolid(PlotBlock block) { - BlockState state = SpongeUtil.getBlockState(block.id, block.data); - Optional property = state.getType().getProperty(SolidCubeProperty.class); - if (property.isPresent()) { - return property.get().getValue(); - } else { - return false; - } - } - - @Override public StringComparison.ComparisonResult getClosestBlock(String name) { - try { - - byte data; - String[] split = name.split(":"); - if (split.length == 2) { - data = Byte.parseByte(split[1]); - name = split[0]; - } else { - data = 0; - } - short id; - double match; - if (MathMan.isInteger(split[0])) { - id = Short.parseShort(split[0]); - match = 0; - } else { - List types = ReflectionUtils.getStaticFields(BlockTypes.class); - StringComparison.ComparisonResult comparison = - new StringComparison(name, - types.toArray(new BlockType[types.size()])) { - @Override public String getString(BlockType type) { - return type.getId(); - } - }.getBestMatchAdvanced(); - match = comparison.match; - id = SpongeUtil.getPlotBlock(comparison.best.getDefaultState()).id; - } - PlotBlock block = PlotBlock.get(id, data); - StringComparison outer = new StringComparison(); - return outer.new ComparisonResult(match, block); - - } catch (NumberFormatException ignored) { - } - return null; - } - - @Override public String getClosestMatchingName(PlotBlock block) { - // TODO Auto-generated method stub - return null; - } - - @Override public String[] getBiomeList() { - if (biomes == null) { - initBiomeCache(); - } - return biomeMap.keySet().toArray(new String[biomeMap.size()]); - } - - @Override public boolean addItems(String world, PlotItem items) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public int getBiomeFromString(String biome) { - if (biomes == null) { - initBiomeCache(); - } - return biomeMap.get(biome.toUpperCase()); - } - - @Override public String getBiome(String world, int x, int z) { - return SpongeUtil.getWorld(world).getBiome(x, 0, z).getName().toUpperCase(); - } - - @Override public PlotBlock getBlock(Location location) { - BlockState state = SpongeUtil.getWorld(location.getWorld()) - .getBlock(location.getX(), location.getY(), location.getZ()); - return SpongeUtil.getPlotBlock(state); - } - - @Override public Location getSpawn(PlotPlayer plotPlayer) { - World world = getWorld(plotPlayer.getLocation().getWorld()); - return SpongeUtil.getLocation(world.getSpawnLocation()); - } - - @Override public Location getSpawn(String world) { - Location result = - SpongeUtil.getLocation(world, SpongeUtil.getWorld(world).getSpawnLocation()); - result.setY(1 + getHighestBlock(world, result.getX(), result.getZ())); - return result; - } - - @Override public void setSpawn(Location location) { - World world = getWorld(location.getWorld()); - if (world != null) { - world.getProperties() - .setSpawnPosition(new Vector3i(location.getX(), location.getY(), location.getZ())); - } - } - - @Override public void saveWorld(String worldName) { - try { - SpongeUtil.getWorld(worldName).save(); - } catch (IOException e) { - e.printStackTrace(); - PlotSquared.debug("Failed to save world."); - } - } - - @Override public String[] getSign(Location location) { - World world = SpongeUtil.getWorld(location.getWorld()); - Optional block = - world.getTileEntity(location.getX(), location.getY(), location.getZ()); - if (!block.isPresent()) { - return null; - } - TileEntity tile = block.get(); - if (!(tile instanceof Sign)) { - return null; - } - Sign sign = (Sign) tile; - Optional optional = sign.get(SignData.class); - if (!optional.isPresent()) { - return null; - } - String[] result = new String[4]; - ListValue lines = optional.get().lines(); - for (int i = 0; i < 4; i++) { - result[i] = lines.get(i).toString(); - } - return result; - } - - @Override public boolean isWorld(String worldName) { - return SpongeUtil.getWorld(worldName) != null; - } - - @Override public String getMainWorld() { - return Sponge.getServer().getWorlds().iterator().next().getName(); - } - - @Override public int getHighestBlock(String worldName, int x, int z) { - World world = SpongeUtil.getWorld(worldName); - if (world == null) { - return 63; - } - for (int y = 255; y > 0; y--) { - BlockState block = world.getBlock(x, y, z); - if (block.getType() != BlockTypes.AIR) { - return y; - } - } - return 63; - } - - @Override public void setSign(String worldName, int x, int y, int z, String[] lines) { - World world = SpongeUtil.getWorld(worldName); - world.setBlock(x, y, z, BlockTypes.WALL_SIGN.getDefaultState()); - Optional block = world.getTileEntity(x, y, z); - if (!block.isPresent()) { - return; - } - TileEntity tile = block.get(); - if (!(tile instanceof Sign)) { - return; - } - Sign sign = (Sign) tile; - List text = new ArrayList<>(4); - for (int i = 0; i < 4; i++) { - text.add(SpongeUtil.getText(lines[i])); - } - sign.offer(Keys.SIGN_LINES, text); - } - - @Override public void setBiomes(String worldName, RegionWrapper region, String biomename) { - World world = SpongeUtil.getWorld(worldName); - BiomeType biome = SpongeUtil.getBiome(biomename); - for (int x = region.minX; x <= region.maxX; x++) { - for (int z = region.minZ; z <= region.maxZ; z++) { - world.setBiome(x, 0, z, biome); - } - } - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/block/GenChunk.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/block/GenChunk.java deleted file mode 100644 index 698befdf8..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/block/GenChunk.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util.block; - -import com.sk89q.worldedit.math.BlockVector2; - -import com.github.intellectualsites.plotsquared.plot.object.ChunkWrapper; -import com.github.intellectualsites.plotsquared.plot.object.Location; -import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; -import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import org.spongepowered.api.world.biome.BiomeType; -import org.spongepowered.api.world.extent.MutableBiomeVolume; -import org.spongepowered.api.world.extent.MutableBlockVolume; - -public class GenChunk extends ScopedLocalBlockQueue { - - private final MutableBlockVolume terrain; - private final MutableBiomeVolume biome; - private final int bz; - private final int bx; - private final String world; - - public boolean modified = false; - - public GenChunk(MutableBlockVolume terrain, MutableBiomeVolume biome, ChunkWrapper wrap) { - super(null, new Location(null, 0, 0, 0), new Location(null, 15, 255, 15)); - this.bx = wrap.x << 4; - this.bz = wrap.z << 4; - this.terrain = terrain; - this.biome = biome; - this.world = wrap.world; - } - - @Override public void fillBiome(String biomeName) { - if (this.biome == null) { - return; - } - BiomeType biome = SpongeUtil.getBiome(biomeName.toUpperCase()); - for (int x = 0; x < 16; x++) { - for (int z = 0; z < 16; z++) { - this.biome.setBiome(this.bx + x, 0, this.bz + z, biome); - } - } - } - - @Override public boolean setBiome(int x, int z, String biomeName) { - modified = true; - BiomeType biome = SpongeUtil.getBiome(biomeName.toUpperCase()); - this.biome.setBiome(this.bx + x, 0, this.bz + z, biome); - return true; - } - - @Override public boolean setBlock(int x, int y, int z, int id, int data) { - modified = true; - this.terrain.setBlock(this.bx + x, y, this.bz + z, SpongeUtil.getBlockState(id, data)); - return true; - } - - @Override public PlotBlock getBlock(int x, int y, int z) { - return SpongeUtil.getPlotBlock(this.terrain.getBlock(this.bx + x, y, this.bz + z)); - } - - @Override public String getWorld() { - return this.world; - } - - @Override public Location getMax() { - return new Location(getWorld(), 15 + bx, 255, 15 + bz); - } - - @Override public Location getMin() { - return new Location(getWorld(), bx, 0, bz); - } - - - - public GenChunk clone() { - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - public GenChunk shallowClone() { - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/block/SpongeLocalQueue.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/block/SpongeLocalQueue.java deleted file mode 100644 index 51efceeb2..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/block/SpongeLocalQueue.java +++ /dev/null @@ -1,508 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.util.block; - -import com.sk89q.worldedit.math.BlockVector2; - -import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; -import com.github.intellectualsites.plotsquared.plot.object.PseudoRandom; -import com.github.intellectualsites.plotsquared.plot.util.MainUtil; -import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.block.BasicLocalBlockQueue; -import com.github.intellectualsites.plotsquared.sponge.util.SpongeUtil; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityTracker; -import net.minecraft.entity.EntityTrackerEntry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.network.play.server.SPacketChunkData; -import net.minecraft.network.play.server.SPacketDestroyEntities; -import net.minecraft.server.management.PlayerChunkMap; -import net.minecraft.util.ClassInheritanceMultiMap; -import net.minecraft.util.IntHashMap; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.ChunkPos; -import net.minecraft.world.WorldServer; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.chunk.storage.ExtendedBlockStorage; -import org.spongepowered.api.block.BlockState; -import org.spongepowered.api.block.BlockTypes; -import org.spongepowered.api.world.World; -import org.spongepowered.api.world.biome.BiomeType; - -import java.lang.reflect.Field; -import java.util.Arrays; -import java.util.HashSet; - -public class SpongeLocalQueue extends BasicLocalBlockQueue { - - private BlockState AIR = BlockTypes.AIR.getDefaultState(); - - public SpongeLocalQueue(String world) { - super(world); - } - - @Override public LocalChunk getLocalChunk(int x, int z) { - return new CharLocalChunk_Sponge(this, x, z) { - // Custom stuff? - }; - } - - @Override public void optimize() { - - } - - public World getSpongeWorld() { - return SpongeUtil.getWorld(getWorld()); - } - - @Override public PlotBlock getBlock(int x, int y, int z) { - World worldObj = getSpongeWorld(); - BlockState block = worldObj.getBlock(x, y, z); - return SpongeUtil.getPlotBlock(block); - } - - @Override public void refreshChunk(int x, int z) { - World world = getSpongeWorld(); - Chunk nmsChunk = ((net.minecraft.world.World) world).getChunkProvider().provideChunk(x, z); - if (nmsChunk == null || !nmsChunk.isLoaded()) { - return; - } - try { - ChunkPos pos = nmsChunk.getPos(); - WorldServer w = (WorldServer) nmsChunk.getWorld(); - PlayerChunkMap chunkMap = w.getPlayerChunkMap(); - if (!chunkMap.contains(x, z)) { - return; - } - EntityTracker tracker = w.getEntityTracker(); - HashSet players = new HashSet<>(); - for (EntityPlayer player : w.playerEntities) { - if (player instanceof EntityPlayerMP) { - if (chunkMap.isPlayerWatchingChunk((EntityPlayerMP) player, x, z)) { - players.add((EntityPlayerMP) player); - } - } - } - if (players.isEmpty()) { - return; - } - HashSet entities = new HashSet<>(); - ClassInheritanceMultiMap[] entitieSlices = nmsChunk.getEntityLists(); - IntHashMap entries = null; - for (Field field : tracker.getClass().getDeclaredFields()) { - if (field.getType() == IntHashMap.class) { - field.setAccessible(true); - entries = (IntHashMap) field.get(tracker); - } - } - for (ClassInheritanceMultiMap slice : entitieSlices) { - if (slice == null) { - continue; - } - for (Entity ent : slice) { - EntityTrackerEntry entry = - entries != null ? entries.lookup(ent.getEntityId()) : null; - if (entry == null) { - continue; - } - entities.add(entry); - SPacketDestroyEntities packet = new SPacketDestroyEntities(ent.getEntityId()); - for (EntityPlayerMP player : players) { - player.connection.sendPacket(packet); - } - } - } - // Send chunks - SPacketChunkData packet = new SPacketChunkData(nmsChunk, 65535); - for (EntityPlayerMP player : players) { - player.connection.sendPacket(packet); - } - // send ents - for (EntityTrackerEntry entry : entities) { - try { - TaskManager.IMP.taskLater(new Runnable() { - @Override public void run() { - for (EntityPlayerMP player : players) { - if (entry.isVisibleTo(player)) { - entry.removeFromTrackedPlayers(player); - if (entry.getTrackedEntity() != player) { - entry.updatePlayerEntity(player); - } - } - } - } - }, 2); - } catch (Throwable e) { - e.printStackTrace(); - } - } - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Override public void fixChunkLighting(int x, int z) { - Chunk nmsChunk = getChunk(getSpongeWorld(), x, z); - nmsChunk.generateSkylightMap(); - } - - public boolean isSurrounded(char[][] sections, int x, int y, int z) { - return isSolid(getId(sections, x, y + 1, z)) && isSolid(getId(sections, x + 1, y - 1, z)) - && isSolid(getId(sections, x - 1, y, z)) && isSolid(getId(sections, x, y, z + 1)) - && isSolid(getId(sections, x, y, z - 1)); - } - - public boolean isSolid(int i) { - return i != 0 && Block.getBlockById(i) - .isOpaqueCube(Block.getBlockById(i).getDefaultState()); - } - - public int getId(char[][] sections, int x, int y, int z) { - if (x < 0 || x > 15 || z < 0 || z > 15) { - return 1; - } - if (y < 0 || y > 255) { - return 1; - } - int i = MainUtil.CACHE_I[y][x][z]; - char[] section = sections[i]; - if (section == null) { - return 0; - } - int j = MainUtil.CACHE_I[y][x][z]; - int combined = section[j]; - return combined >> 4; - } - - public boolean fixLighting(CharLocalChunk_Sponge bc, Chunk nmsChunk) { - try { - if (!nmsChunk.isLoaded()) { - return false; - } - ExtendedBlockStorage[] sections = nmsChunk.getBlockStorageArray(); - nmsChunk.generateSkylightMap(); - net.minecraft.world.World nmsWorld = nmsChunk.getWorld(); - - int X = bc.getX() << 4; - int Z = bc.getZ() << 4; - - BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(0, 0, 0); - for (int j = 0; j < sections.length; j++) { - ExtendedBlockStorage section = sections[j]; - if (section == null) { - continue; - } - if ((bc.getCount(j) == 0) || ((bc.getCount(j) >= 4096) && (bc.getAir(j) == 0)) - || bc.getAir(j) == 4096) { - continue; - } - char[] array = bc.getIdArray(j); - if (array != null) { - int l = PseudoRandom.random.random(2); - for (int k = 0; k < array.length; k++) { - int i = array[k]; - if (i < 16) { - continue; - } - short id = (short) (i >> 4); - switch (id) { // Lighting - default: - if ((k & 1) == l) { - l = 1 - l; - continue; - } - case 10: - case 11: - case 39: - case 40: - case 50: - case 51: - case 62: - case 74: - case 76: - case 89: - case 122: - case 124: - case 130: - case 138: - case 169: - int x = MainUtil.x_loc[j][k]; - int y = MainUtil.y_loc[j][k]; - int z = MainUtil.z_loc[j][k]; - if (isSurrounded(bc.blocks, x, y, z)) { - continue; - } - pos.setPos(X + x, y, Z + z); - nmsWorld.checkLight(pos); - } - } - } - } - return true; - } catch (Throwable e) { - e.printStackTrace(); - } - return false; - } - - @Override public final void regenChunk(int x, int z) { - World worldObj = getSpongeWorld(); - throw new UnsupportedOperationException("NOT SUPPORTED"); - } - - @Override public final void setComponents(LocalChunk lc) { - setBlocks(lc); - setBiomes(lc); - } - - public Chunk getChunk(World world, int x, int z) { - net.minecraft.world.chunk.Chunk chunk = - ((net.minecraft.world.World) world).getChunkProvider().provideChunk(x, z); - if (chunk != null && !chunk.isLoaded()) { - chunk.onLoad(); - } - return chunk; - } - - public void setBlocks(LocalChunk lc) { - World worldObj = getSpongeWorld(); - net.minecraft.world.World nmsWorld = ((net.minecraft.world.World) worldObj); - org.spongepowered.api.world.Chunk spongeChunk = - (org.spongepowered.api.world.Chunk) getChunk(worldObj, lc.getX(), lc.getZ()); - Chunk nmsChunk = (Chunk) spongeChunk; - char[][] ids = ((CharLocalChunk) lc).blocks; - for (int layer = 0; layer < 16; layer++) { - char[] array = ids[layer]; - if (array == null) { - continue; - } - ExtendedBlockStorage[] sections = nmsChunk.getBlockStorageArray(); - ExtendedBlockStorage section = sections[layer]; - if (section == null) { - section = sections[layer] = - new ExtendedBlockStorage(layer << 4, nmsWorld.provider.hasSkyLight()); - } - - short[] cacheX = MainUtil.x_loc[0]; - short[] cacheY = MainUtil.y_loc[0]; - short[] cacheZ = MainUtil.z_loc[0]; - for (int j = 0; j < array.length; j++) { - int combinedId = array[j]; - switch (combinedId) { - case 0: - continue; - case 1: - int x = cacheX[j]; - int y = cacheY[j]; - int z = cacheZ[j]; - section.set(x, y, z, Blocks.AIR.getDefaultState()); - continue; - default: - int id = combinedId >> 4; - Block block = Block.getBlockById(id); - int data = combinedId & 0xf; - IBlockState ibd; - if (data != 0) { - ibd = block.getStateFromMeta(data); - } else { - ibd = block.getDefaultState(); - } - x = cacheX[j]; - y = cacheY[j]; - z = cacheZ[j]; - section.set(x, y, z, ibd); - continue; - } - } - } - refreshChunk(nmsChunk.x, nmsChunk.z); - } - - public void setBiomes(LocalChunk lc) { - if (lc.biomes != null) { - World worldObj = getSpongeWorld(); - int bx = lc.getX() << 4; - int bz = lc.getX() << 4; - String last = null; - BiomeType biome = null; - for (int x = 0; x < lc.biomes.length; x++) { - String[] biomes2 = lc.biomes[x]; - if (biomes2 != null) { - for (int y = 0; y < biomes2.length; y++) { - String biomeStr = biomes2[y]; - if (biomeStr != null) { - if (last == null || !StringMan.isEqual(last, biomeStr)) { - biome = SpongeUtil.getBiome(biomeStr.toUpperCase()); - } - worldObj.setBiome(bx, 0, bz, biome); - } - } - } - } - } - } - - - public class CharLocalChunk_Sponge extends CharLocalChunk { - public short[] count; - public short[] air; - public short[] relight; - - public CharLocalChunk_Sponge(BasicLocalBlockQueue parent, int x, int z) { - super(parent, x, z); - this.count = new short[16]; - this.air = new short[16]; - this.relight = new short[16]; - } - - @Override public void setBlock(int x, int y, int z, int id, int data) { - int i = MainUtil.CACHE_I[y][x][z]; - int j = MainUtil.CACHE_J[y][x][z]; - char[] vs = this.blocks[i]; - if (vs == null) { - vs = this.blocks[i] = new char[4096]; - this.count[i]++; - } else if (vs[j] == 0) { - this.count[i]++; - } - switch (id) { - case 0: - this.air[i]++; - vs[j] = (char) 1; - return; - case 10: - case 11: - case 39: - case 40: - case 51: - case 74: - case 89: - case 122: - case 124: - case 138: - case 169: - this.relight[i]++; - case 2: - case 4: - case 13: - case 14: - case 15: - case 20: - case 21: - case 22: - case 30: - case 32: - case 37: - case 41: - case 42: - case 45: - case 46: - case 47: - case 48: - case 49: - case 55: - case 56: - case 57: - case 58: - case 60: - case 7: - case 8: - case 9: - case 73: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 85: - case 87: - case 88: - case 101: - case 102: - case 103: - case 110: - case 112: - case 113: - case 121: - case 129: - case 133: - case 165: - case 166: - case 170: - case 172: - case 173: - case 174: - case 181: - case 182: - case 188: - case 189: - case 190: - case 191: - case 192: - vs[j] = (char) (id << 4); - return; - case 130: - case 76: - case 62: - this.relight[i]++; - case 54: - case 146: - case 61: - case 65: - case 68: - case 50: - if (data < 2) { - data = 2; - } - default: - vs[j] = (char) ((id << 4) + data); - return; - } - } - - public char[] getIdArray(int i) { - return this.blocks[i]; - } - - public int getCount(int i) { - return this.count[i]; - } - - public int getAir(int i) { - return this.air[i]; - } - - public void setCount(int i, short value) { - this.count[i] = value; - } - - public int getRelight(int i) { - return this.relight[i]; - } - - public int getTotalCount() { - int total = 0; - for (int i = 0; i < 16; i++) { - total += this.count[i]; - } - return total; - } - - public int getTotalRelight() { - if (getTotalCount() == 0) { - Arrays.fill(this.count, (short) 1); - Arrays.fill(this.relight, Short.MAX_VALUE); - return Short.MAX_VALUE; - } - int total = 0; - for (int i = 0; i < 16; i++) { - total += this.relight[i]; - } - return total; - } - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeLowerOfflineUUIDWrapper.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeLowerOfflineUUIDWrapper.java deleted file mode 100644 index 1e5ef553d..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeLowerOfflineUUIDWrapper.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.uuid; - -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import com.google.common.base.Charsets; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.profile.GameProfile; - -import java.util.Collection; -import java.util.UUID; - -public class SpongeLowerOfflineUUIDWrapper extends UUIDWrapper { - - public SpongeLowerOfflineUUIDWrapper() { - // Anything? - } - - @Override public UUID getUUID(PlotPlayer player) { - return getUUID(player.getName()); - } - - @Override public UUID getUUID(OfflinePlotPlayer player) { - return getUUID(player.getName()); - } - - @Override public OfflinePlotPlayer getOfflinePlayer(UUID uuid) { - String name = UUIDHandler.getName(uuid); - if (name == null) { - try { - GameProfile profile = SpongeMain.THIS.getResolver().get(uuid).get(); - if (profile != null) { - name = profile.getName().orElse(null); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - if (name == null) { - for (GameProfile profile : SpongeMain.THIS.getResolver().getCache().getProfiles()) { - String tmp = profile.getName().orElse(null); - if (tmp != null) { - if (getUUID(name).equals(uuid)) { - name = tmp; - break; - } - } - } - } - String username = name; - return new OfflinePlotPlayer() { - @Override public boolean isOnline() { - return UUIDHandler.getPlayer(uuid) != null; - } - - @Override public UUID getUUID() { - return uuid; - } - - @Override public String getName() { - return username; - } - - @Override public long getLastPlayed() { - // TODO FIXME - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - }; - } - - public Player[] getOnlinePlayers() { - Collection onlinePlayers = SpongeMain.THIS.getServer().getOnlinePlayers(); - return onlinePlayers.toArray(new Player[onlinePlayers.size()]); - } - - @Override public UUID getUUID(String name) { - return UUID - .nameUUIDFromBytes(("OfflinePlayer:" + name.toLowerCase()).getBytes(Charsets.UTF_8)); - } - - @Override public OfflinePlotPlayer[] getOfflinePlayers() { - // TODO FIXME - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public OfflinePlotPlayer getOfflinePlayer(String name) { - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeOnlineUUIDWrapper.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeOnlineUUIDWrapper.java deleted file mode 100644 index 0ee7213f3..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeOnlineUUIDWrapper.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.uuid; - -import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer; -import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; -import com.github.intellectualsites.plotsquared.sponge.object.SpongeOfflinePlayer; -import com.github.intellectualsites.plotsquared.sponge.object.SpongePlayer; -import org.spongepowered.api.Sponge; -import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.entity.living.player.User; -import org.spongepowered.api.service.user.UserStorageService; -import org.spongepowered.api.util.Identifiable; - -import java.util.Optional; -import java.util.UUID; - -public class SpongeOnlineUUIDWrapper extends UUIDWrapper { - - private UserStorageService userStorageService; - - public SpongeOnlineUUIDWrapper() { - Optional userStorage = - Sponge.getServiceManager().provide(UserStorageService.class); - userStorage.ifPresent(userStorageService -> this.userStorageService = userStorageService); - - } - - @Override public UUID getUUID(PlotPlayer player) { - return ((SpongePlayer) player).player.getUniqueId(); - } - - @Override public UUID getUUID(OfflinePlotPlayer player) { - return player.getUUID(); - } - - @Override public UUID getUUID(String name) { - Optional player = Sponge.getServer().getPlayer(name); - if (player.isPresent()) { - return player.get().getUniqueId(); - } - Optional user = userStorageService.get(name); - return user.map(Identifiable::getUniqueId).orElse(null); - } - - @Override public OfflinePlotPlayer getOfflinePlayer(UUID uuid) { - Optional player = Sponge.getServer().getPlayer(uuid); - if (player.isPresent()) { - return new SpongeOfflinePlayer(player.get()); - } - Optional user = userStorageService.get(uuid); - return user.map(SpongeOfflinePlayer::new).orElse(null); - } - - @Override public OfflinePlotPlayer[] getOfflinePlayers() { - throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); - } - - @Override public OfflinePlotPlayer getOfflinePlayer(String name) { - Optional player = Sponge.getServer().getPlayer(name); - if (player.isPresent()) { - return new SpongeOfflinePlayer(player.get()); - } - Optional user = userStorageService.get(name); - return user.map(SpongeOfflinePlayer::new).orElse(null); - } - -} diff --git a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeUUIDHandler.java b/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeUUIDHandler.java deleted file mode 100644 index a5ded685a..000000000 --- a/Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/uuid/SpongeUUIDHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.github.intellectualsites.plotsquared.sponge.uuid; - -import com.github.intellectualsites.plotsquared.plot.object.RunnableVal; -import com.github.intellectualsites.plotsquared.plot.object.StringWrapper; -import com.github.intellectualsites.plotsquared.plot.util.TaskManager; -import com.github.intellectualsites.plotsquared.plot.util.UUIDHandlerImplementation; -import com.github.intellectualsites.plotsquared.plot.uuid.UUIDWrapper; -import com.github.intellectualsites.plotsquared.sponge.SpongeMain; -import org.spongepowered.api.profile.GameProfile; - -import java.util.UUID; - -public class SpongeUUIDHandler extends UUIDHandlerImplementation { - - public SpongeUUIDHandler(UUIDWrapper wrapper) { - super(wrapper); - } - - @Override public boolean startCaching(Runnable whenDone) { - if (!super.startCaching(whenDone)) { - return false; - } - return cache(whenDone); - } - - public boolean cache(Runnable whenDone) { - for (GameProfile profile : SpongeMain.THIS.getServer().getGameProfileManager().getCache() - .getProfiles()) { - String name = profile.getName().orElse(null); - if (name != null) { - add(new StringWrapper(name), profile.getUniqueId()); - } - } - return true; - } - - @Override public void fetchUUID(String name, RunnableVal ifFetch) { - TaskManager.runTaskAsync(new Runnable() { - @Override public void run() { - ifFetch.value = SpongeUUIDHandler.this.uuidWrapper.getUUID(name); - TaskManager.runTask(ifFetch); - } - }); - } - -} diff --git a/build.gradle b/build.gradle index 4a524f5a0..f9d7186d6 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ plugins { id "org.ajoberstar.grgit" version "4.0.1" } -group = "com.github.intellectualsites.plotsquared" +group = "com.plotsquared" def rootVersion = "5" def revision = "" @@ -71,7 +71,7 @@ subprojects { apply(plugin: "idea") apply(plugin: "com.github.johnrengelman.shadow") - group = "com.github.intellectualsites.plotsquared" + group = "com.plotsquared" clean.doFirst { delete("../target") @@ -122,8 +122,8 @@ subprojects { include(dependency("org.json:json:20190722")) include(dependency("net.kyori:text-api:3.0.2")) } - relocate("io.papermc.lib", "com.github.intellectualsites.plotsquared.bukkit.paperlib") - relocate("org.json", "com.github.intellectualsites.plotsquared.json") + relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib") + relocate("org.json", "com.plotsquared.json") // relocate('org.mcstats', 'com.plotsquared.stats') archiveFileName = "${parent.name}-${project.name}-${parent.version}.jar" destinationDirectory = file "../target" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4b442974..be8d8bb16 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,3 +1,11 @@ +# +# PlotSquared, a 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 . +# + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip