diff --git a/.gitignore b/.gitignore index 2f98ae1..614d851 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ /.idea/codeStyles/codeStyleConfig.xml *.iml /target/ -/src/main/resources/build.properties +Plex-Core/src/main/resources/build.properties # OS .DS_Store @@ -15,3 +15,6 @@ Thumbs.db # Gradle /build/ /.gradle/ +Plex-Core/build/ +Plex-API/build/ +/jars/ \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 86bb373..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index f66eeb0..50dcd0d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { } } } - stage("publish") { + /*stage("publish") { when { branch "master" } @@ -19,12 +19,12 @@ pipeline { } } } - } + }*/ } post { always { - archiveArtifacts artifacts: "build/libs/*.jar", fingerprint: true - javadoc javadocDir: "build/docs/javadoc", keepAll: false + archiveArtifacts artifacts: "jars/*.jar", fingerprint: true + javadoc javadocDir: "Plex-Core/build/docs/javadoc", keepAll: false discordSend description: "**Build:** ${env.BUILD_NUMBER}\n**Status:** ${currentBuild.currentResult}", enableArtifactsList: true, footer: "Built with Jenkins", link: env.BUILD_URL, result: currentBuild.currentResult, scmWebUrl: "https://github.com/plexusorg/Plex", showChangeset: true, title: env.JOB_NAME, webhookURL: env.PLEX_WEBHOOK_URL cleanWs() } diff --git a/Plex-API/build.gradle b/Plex-API/build.gradle new file mode 100644 index 0000000..aebbee1 --- /dev/null +++ b/Plex-API/build.gradle @@ -0,0 +1,9 @@ +group = "dev.plex" +version = rootProject.version +description = "Plex-API" + +tasks.jar { + archiveBaseName.set("Plex-API") + archiveVersion.set("") +} + diff --git a/Plex-Core/build.gradle b/Plex-Core/build.gradle new file mode 100644 index 0000000..f89af1a --- /dev/null +++ b/Plex-Core/build.gradle @@ -0,0 +1,110 @@ +plugins { + id "java" + id "maven-publish" + id "net.minecrell.plugin-yml.bukkit" version "0.5.1" + id "com.github.johnrengelman.shadow" version "7.1.2" +} + +dependencies { + library "org.projectlombok:lombok:1.18.22" + annotationProcessor "org.projectlombok:lombok:1.18.22" + library "org.json:json:20220320" + library "commons-io:commons-io:2.11.0" + library "dev.morphia.morphia:morphia-core:2.2.6" + library "redis.clients:jedis:4.2.1" + library "org.mariadb.jdbc:mariadb-java-client:3.0.4" + library "com.zaxxer:HikariCP:5.0.1" + library "org.apache.httpcomponents:httpclient:4.5.13" + library "org.apache.commons:commons-lang3:3.12.0" + library "org.apache.maven.resolver:maven-resolver-api:1.7.3" + library "org.apache.maven.resolver:maven-resolver-impl:1.7.3" + library "org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3" + library "org.apache.maven.resolver:maven-resolver-transport-http:1.7.3" + library "org.apache.maven:maven-resolver-provider:3.8.5" + library "org.eclipse.jetty:jetty-server:11.0.9" + library "org.eclipse.jetty:jetty-servlet:11.0.9" + library "org.eclipse.jetty:jetty-proxy:11.0.9" + library "com.google.code.gson:gson:2.9.0" + compileOnly "io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT" + implementation "org.bstats:bstats-base:3.0.0" + implementation "org.bstats:bstats-bukkit:3.0.0" +} + +group = "dev.plex" +version = rootProject.version +description = "Plex-Core" + +shadowJar { + archiveClassifier.set("") + archiveBaseName.set("Plex") + archiveVersion.set("") + relocate "org.bstats", "dev.plex" +} + +tasks.jar { + archiveBaseName.set("Plex") + archiveVersion.set("") +} + +bukkit { + name = "Plex" + version = rootProject.version + description = "Plex provides a new experience for freedom servers." + main = "dev.plex.Plex" + website = "https://plex.us.org" + authors = ["Telesphoreo", "taahanis", "super"] + apiVersion = "1.18" +} + +String getGitHash() { + def stdout = new ByteArrayOutputStream() + try { + exec { + commandLine "git", "rev-parse", "--short", "HEAD" + standardOutput = stdout + ignoreExitValue = true + } + } catch (GradleException e) { + logger.error("Couldn't determine Git head because Git is not installed. " + e.getMessage()) + } + return stdout.size() > 0 ? stdout.toString().trim() : "unknown" +} + +String getBuildNumber() { + def stdout = new ByteArrayOutputStream() + try { + exec { + commandLine "git", "rev-list", "HEAD", "--count" + standardOutput = stdout + ignoreExitValue = true + } + } catch (GradleException e) { + logger.error("Couldn't determine build number because Git is not installed. " + e.getMessage()) + } + return stdout.size() ? stdout.toString().trim() + " (local)" : "unknown" +} + +static def getDate() { + return new Date().format("MM/dd/yyyy 'at' hh:mm:ss a") +} + +task buildProperties { + ant.propertyfile(file: "$project.projectDir/src/main/resources/build.properties") { + entry(key: "buildAuthor", default: System.getenv("JENKINS_URL") != null ? "jenkins" : "unknown") + entry(key: "buildNumber", value: System.getenv("JENKINS_URL") != null ? System.getenv("BUILD_NUMBER") + " (Jenkins)" : getBuildNumber()) + entry(key: "buildDate", value: getDate()) + entry(key: "buildHead", value: getGitHash()) + } +} + +tasks { + build { + dependsOn(shadowJar) + finalizedBy(buildProperties) + finalizedBy(rootProject.tasks.copyJars) + } + + javadoc { + options.memberLevel = JavadocMemberLevel.PRIVATE + } +} \ No newline at end of file diff --git a/src/main/java/dev/plex/Plex.java b/Plex-Core/src/main/java/dev/plex/Plex.java similarity index 100% rename from src/main/java/dev/plex/Plex.java rename to Plex-Core/src/main/java/dev/plex/Plex.java diff --git a/src/main/java/dev/plex/PlexBase.java b/Plex-Core/src/main/java/dev/plex/PlexBase.java similarity index 100% rename from src/main/java/dev/plex/PlexBase.java rename to Plex-Core/src/main/java/dev/plex/PlexBase.java diff --git a/src/main/java/dev/plex/admin/Admin.java b/Plex-Core/src/main/java/dev/plex/admin/Admin.java similarity index 100% rename from src/main/java/dev/plex/admin/Admin.java rename to Plex-Core/src/main/java/dev/plex/admin/Admin.java diff --git a/src/main/java/dev/plex/admin/AdminList.java b/Plex-Core/src/main/java/dev/plex/admin/AdminList.java similarity index 100% rename from src/main/java/dev/plex/admin/AdminList.java rename to Plex-Core/src/main/java/dev/plex/admin/AdminList.java diff --git a/src/main/java/dev/plex/cache/DataUtils.java b/Plex-Core/src/main/java/dev/plex/cache/DataUtils.java similarity index 99% rename from src/main/java/dev/plex/cache/DataUtils.java rename to Plex-Core/src/main/java/dev/plex/cache/DataUtils.java index 156f291..d038660 100644 --- a/src/main/java/dev/plex/cache/DataUtils.java +++ b/Plex-Core/src/main/java/dev/plex/cache/DataUtils.java @@ -5,7 +5,6 @@ import dev.plex.cache.player.PlayerCache; import dev.plex.player.PlexPlayer; import dev.plex.storage.StorageType; import java.util.UUID; -import org.bukkit.Bukkit; /** * Parent cache class diff --git a/src/main/java/dev/plex/cache/notes/PlayerNotes.java b/Plex-Core/src/main/java/dev/plex/cache/notes/PlayerNotes.java similarity index 90% rename from src/main/java/dev/plex/cache/notes/PlayerNotes.java rename to Plex-Core/src/main/java/dev/plex/cache/notes/PlayerNotes.java index 658d455..397e8ef 100644 --- a/src/main/java/dev/plex/cache/notes/PlayerNotes.java +++ b/Plex-Core/src/main/java/dev/plex/cache/notes/PlayerNotes.java @@ -1,15 +1,11 @@ package dev.plex.cache.notes; -import com.google.common.reflect.TypeToken; -import com.google.gson.Gson; import dev.plex.Plex; -import dev.plex.cache.player.PlayerCache; import dev.plex.player.PlexPlayer; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.List; import java.util.UUID; public class PlayerNotes diff --git a/src/main/java/dev/plex/cache/player/MongoPlayerData.java b/Plex-Core/src/main/java/dev/plex/cache/player/MongoPlayerData.java similarity index 100% rename from src/main/java/dev/plex/cache/player/MongoPlayerData.java rename to Plex-Core/src/main/java/dev/plex/cache/player/MongoPlayerData.java diff --git a/src/main/java/dev/plex/cache/player/PlayerCache.java b/Plex-Core/src/main/java/dev/plex/cache/player/PlayerCache.java similarity index 100% rename from src/main/java/dev/plex/cache/player/PlayerCache.java rename to Plex-Core/src/main/java/dev/plex/cache/player/PlayerCache.java diff --git a/src/main/java/dev/plex/cache/player/SQLPlayerData.java b/Plex-Core/src/main/java/dev/plex/cache/player/SQLPlayerData.java similarity index 100% rename from src/main/java/dev/plex/cache/player/SQLPlayerData.java rename to Plex-Core/src/main/java/dev/plex/cache/player/SQLPlayerData.java diff --git a/src/main/java/dev/plex/cache/sql/SQLNotes.java b/Plex-Core/src/main/java/dev/plex/cache/sql/SQLNotes.java similarity index 100% rename from src/main/java/dev/plex/cache/sql/SQLNotes.java rename to Plex-Core/src/main/java/dev/plex/cache/sql/SQLNotes.java diff --git a/src/main/java/dev/plex/cache/sql/SQLPunishment.java b/Plex-Core/src/main/java/dev/plex/cache/sql/SQLPunishment.java similarity index 100% rename from src/main/java/dev/plex/cache/sql/SQLPunishment.java rename to Plex-Core/src/main/java/dev/plex/cache/sql/SQLPunishment.java diff --git a/src/main/java/dev/plex/command/PlexCommand.java b/Plex-Core/src/main/java/dev/plex/command/PlexCommand.java similarity index 100% rename from src/main/java/dev/plex/command/PlexCommand.java rename to Plex-Core/src/main/java/dev/plex/command/PlexCommand.java diff --git a/src/main/java/dev/plex/command/annotation/CommandParameters.java b/Plex-Core/src/main/java/dev/plex/command/annotation/CommandParameters.java similarity index 100% rename from src/main/java/dev/plex/command/annotation/CommandParameters.java rename to Plex-Core/src/main/java/dev/plex/command/annotation/CommandParameters.java diff --git a/src/main/java/dev/plex/command/annotation/CommandPermissions.java b/Plex-Core/src/main/java/dev/plex/command/annotation/CommandPermissions.java similarity index 100% rename from src/main/java/dev/plex/command/annotation/CommandPermissions.java rename to Plex-Core/src/main/java/dev/plex/command/annotation/CommandPermissions.java diff --git a/src/main/java/dev/plex/command/annotation/System.java b/Plex-Core/src/main/java/dev/plex/command/annotation/System.java similarity index 100% rename from src/main/java/dev/plex/command/annotation/System.java rename to Plex-Core/src/main/java/dev/plex/command/annotation/System.java diff --git a/src/main/java/dev/plex/command/blocker/BaseCommand.java b/Plex-Core/src/main/java/dev/plex/command/blocker/BaseCommand.java similarity index 100% rename from src/main/java/dev/plex/command/blocker/BaseCommand.java rename to Plex-Core/src/main/java/dev/plex/command/blocker/BaseCommand.java diff --git a/src/main/java/dev/plex/command/blocker/CommandBlockerManager.java b/Plex-Core/src/main/java/dev/plex/command/blocker/CommandBlockerManager.java similarity index 100% rename from src/main/java/dev/plex/command/blocker/CommandBlockerManager.java rename to Plex-Core/src/main/java/dev/plex/command/blocker/CommandBlockerManager.java diff --git a/src/main/java/dev/plex/command/blocker/MatchCommand.java b/Plex-Core/src/main/java/dev/plex/command/blocker/MatchCommand.java similarity index 100% rename from src/main/java/dev/plex/command/blocker/MatchCommand.java rename to Plex-Core/src/main/java/dev/plex/command/blocker/MatchCommand.java diff --git a/src/main/java/dev/plex/command/blocker/RegexCommand.java b/Plex-Core/src/main/java/dev/plex/command/blocker/RegexCommand.java similarity index 100% rename from src/main/java/dev/plex/command/blocker/RegexCommand.java rename to Plex-Core/src/main/java/dev/plex/command/blocker/RegexCommand.java diff --git a/src/main/java/dev/plex/command/exception/CommandFailException.java b/Plex-Core/src/main/java/dev/plex/command/exception/CommandFailException.java similarity index 100% rename from src/main/java/dev/plex/command/exception/CommandFailException.java rename to Plex-Core/src/main/java/dev/plex/command/exception/CommandFailException.java diff --git a/src/main/java/dev/plex/command/exception/ConsoleMustDefinePlayerException.java b/Plex-Core/src/main/java/dev/plex/command/exception/ConsoleMustDefinePlayerException.java similarity index 100% rename from src/main/java/dev/plex/command/exception/ConsoleMustDefinePlayerException.java rename to Plex-Core/src/main/java/dev/plex/command/exception/ConsoleMustDefinePlayerException.java diff --git a/src/main/java/dev/plex/command/exception/ConsoleOnlyException.java b/Plex-Core/src/main/java/dev/plex/command/exception/ConsoleOnlyException.java similarity index 100% rename from src/main/java/dev/plex/command/exception/ConsoleOnlyException.java rename to Plex-Core/src/main/java/dev/plex/command/exception/ConsoleOnlyException.java diff --git a/src/main/java/dev/plex/command/exception/PlayerNotBannedException.java b/Plex-Core/src/main/java/dev/plex/command/exception/PlayerNotBannedException.java similarity index 100% rename from src/main/java/dev/plex/command/exception/PlayerNotBannedException.java rename to Plex-Core/src/main/java/dev/plex/command/exception/PlayerNotBannedException.java diff --git a/src/main/java/dev/plex/command/exception/PlayerNotFoundException.java b/Plex-Core/src/main/java/dev/plex/command/exception/PlayerNotFoundException.java similarity index 100% rename from src/main/java/dev/plex/command/exception/PlayerNotFoundException.java rename to Plex-Core/src/main/java/dev/plex/command/exception/PlayerNotFoundException.java diff --git a/src/main/java/dev/plex/command/impl/AdminCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/AdminCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/AdminCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/AdminCMD.java diff --git a/src/main/java/dev/plex/command/impl/AdminChatCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/AdminChatCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/AdminChatCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/AdminChatCMD.java diff --git a/src/main/java/dev/plex/command/impl/AdminworldCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/AdminworldCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/AdminworldCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/AdminworldCMD.java diff --git a/src/main/java/dev/plex/command/impl/AdventureCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/AdventureCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/AdventureCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/AdventureCMD.java diff --git a/src/main/java/dev/plex/command/impl/BanCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/BanCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/BanCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/BanCMD.java diff --git a/src/main/java/dev/plex/command/impl/BlockEditCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/BlockEditCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/BlockEditCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/BlockEditCMD.java diff --git a/src/main/java/dev/plex/command/impl/CommandSpyCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/CommandSpyCMD.java similarity index 94% rename from src/main/java/dev/plex/command/impl/CommandSpyCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/CommandSpyCMD.java index 652fad3..f043adf 100644 --- a/src/main/java/dev/plex/command/impl/CommandSpyCMD.java +++ b/Plex-Core/src/main/java/dev/plex/command/impl/CommandSpyCMD.java @@ -7,9 +7,7 @@ import dev.plex.command.annotation.CommandPermissions; import dev.plex.command.source.RequiredCommandSource; import dev.plex.player.PlexPlayer; import dev.plex.rank.enums.Rank; -import dev.plex.util.PlexUtils; import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/dev/plex/command/impl/CreativeCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/CreativeCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/CreativeCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/CreativeCMD.java diff --git a/src/main/java/dev/plex/command/impl/DebugCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/DebugCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/DebugCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/DebugCMD.java diff --git a/src/main/java/dev/plex/command/impl/DeopAllCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/DeopAllCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/DeopAllCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/DeopAllCMD.java diff --git a/src/main/java/dev/plex/command/impl/DeopCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/DeopCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/DeopCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/DeopCMD.java diff --git a/src/main/java/dev/plex/command/impl/EntityWipeCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/EntityWipeCMD.java similarity index 97% rename from src/main/java/dev/plex/command/impl/EntityWipeCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/EntityWipeCMD.java index a31a625..d22179d 100644 --- a/src/main/java/dev/plex/command/impl/EntityWipeCMD.java +++ b/Plex-Core/src/main/java/dev/plex/command/impl/EntityWipeCMD.java @@ -1,6 +1,5 @@ package dev.plex.command.impl; -import com.google.common.collect.ImmutableList; import dev.plex.command.PlexCommand; import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandPermissions; @@ -8,10 +7,8 @@ import dev.plex.command.source.RequiredCommandSource; import dev.plex.rank.enums.Rank; import dev.plex.util.PlexUtils; import java.util.ArrayList; -import java.util.Collections; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; -import org.bukkit.Location; import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.Entity; diff --git a/src/main/java/dev/plex/command/impl/FlatlandsCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/FlatlandsCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/FlatlandsCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/FlatlandsCMD.java diff --git a/src/main/java/dev/plex/command/impl/FreezeCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/FreezeCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/FreezeCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/FreezeCMD.java diff --git a/src/main/java/dev/plex/command/impl/KickCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/KickCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/KickCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/KickCMD.java diff --git a/src/main/java/dev/plex/command/impl/ListCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/ListCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/ListCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/ListCMD.java diff --git a/src/main/java/dev/plex/command/impl/LocalSpawnCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/LocalSpawnCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/LocalSpawnCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/LocalSpawnCMD.java diff --git a/src/main/java/dev/plex/command/impl/LockupCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/LockupCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/LockupCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/LockupCMD.java diff --git a/src/main/java/dev/plex/command/impl/MasterbuilderworldCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/MasterbuilderworldCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/MasterbuilderworldCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/MasterbuilderworldCMD.java diff --git a/src/main/java/dev/plex/command/impl/MobPurgeCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/MobPurgeCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/MobPurgeCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/MobPurgeCMD.java diff --git a/src/main/java/dev/plex/command/impl/MuteCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/MuteCMD.java similarity index 99% rename from src/main/java/dev/plex/command/impl/MuteCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/MuteCMD.java index e300c19..1d3640d 100644 --- a/src/main/java/dev/plex/command/impl/MuteCMD.java +++ b/Plex-Core/src/main/java/dev/plex/command/impl/MuteCMD.java @@ -11,7 +11,6 @@ import dev.plex.rank.enums.Rank; import dev.plex.util.PlexUtils; import java.time.LocalDateTime; import java.util.List; -import java.util.UUID; import net.kyori.adventure.text.Component; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/main/java/dev/plex/command/impl/NameHistoryCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/NameHistoryCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/NameHistoryCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/NameHistoryCMD.java diff --git a/src/main/java/dev/plex/command/impl/NotesCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/NotesCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/NotesCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/NotesCMD.java diff --git a/src/main/java/dev/plex/command/impl/OpAllCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/OpAllCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/OpAllCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/OpAllCMD.java diff --git a/src/main/java/dev/plex/command/impl/OpCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/OpCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/OpCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/OpCMD.java diff --git a/src/main/java/dev/plex/command/impl/PlexCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/PlexCMD.java similarity index 99% rename from src/main/java/dev/plex/command/impl/PlexCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/PlexCMD.java index 8f90a0f..1eef019 100644 --- a/src/main/java/dev/plex/command/impl/PlexCMD.java +++ b/Plex-Core/src/main/java/dev/plex/command/impl/PlexCMD.java @@ -18,7 +18,6 @@ import dev.plex.util.PlexLog; import dev.plex.util.PlexUtils; import net.kyori.adventure.text.Component; import org.apache.commons.lang.StringUtils; -import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/dev/plex/command/impl/PunishmentsCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/PunishmentsCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/PunishmentsCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/PunishmentsCMD.java diff --git a/src/main/java/dev/plex/command/impl/RankCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/RankCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/RankCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/RankCMD.java diff --git a/src/main/java/dev/plex/command/impl/RawSayCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/RawSayCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/RawSayCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/RawSayCMD.java diff --git a/src/main/java/dev/plex/command/impl/SayCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/SayCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/SayCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/SayCMD.java diff --git a/src/main/java/dev/plex/command/impl/SmiteCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/SmiteCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/SmiteCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/SmiteCMD.java diff --git a/src/main/java/dev/plex/command/impl/SpectatorCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/SpectatorCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/SpectatorCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/SpectatorCMD.java diff --git a/src/main/java/dev/plex/command/impl/SurvivalCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/SurvivalCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/SurvivalCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/SurvivalCMD.java diff --git a/src/main/java/dev/plex/command/impl/TagCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/TagCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/TagCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/TagCMD.java diff --git a/src/main/java/dev/plex/command/impl/TempbanCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/TempbanCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/TempbanCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/TempbanCMD.java diff --git a/src/main/java/dev/plex/command/impl/ToggleDropsCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/ToggleDropsCMD.java similarity index 77% rename from src/main/java/dev/plex/command/impl/ToggleDropsCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/ToggleDropsCMD.java index ca396ea..67e51f2 100644 --- a/src/main/java/dev/plex/command/impl/ToggleDropsCMD.java +++ b/Plex-Core/src/main/java/dev/plex/command/impl/ToggleDropsCMD.java @@ -5,24 +5,12 @@ import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandPermissions; import dev.plex.command.source.RequiredCommandSource; import dev.plex.rank.enums.Rank; -import dev.plex.services.ServiceManager; -import dev.plex.services.impl.AutoWipeService; -import dev.plex.util.PlexUtils; import net.kyori.adventure.text.Component; -import org.bukkit.Bukkit; -import org.bukkit.World; import org.bukkit.command.CommandSender; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; - @CommandPermissions(level = Rank.ADMIN, permission = "plex.toggledrops", source = RequiredCommandSource.ANY) @CommandParameters(name = "toggledrops", description = "Toggle immediately removing drops.", usage = "/", aliases = "td") public class ToggleDropsCMD extends PlexCommand diff --git a/src/main/java/dev/plex/command/impl/UnbanCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/UnbanCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/UnbanCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/UnbanCMD.java diff --git a/src/main/java/dev/plex/command/impl/UnfreezeCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/UnfreezeCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/UnfreezeCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/UnfreezeCMD.java diff --git a/src/main/java/dev/plex/command/impl/UnmuteCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/UnmuteCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/UnmuteCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/UnmuteCMD.java diff --git a/src/main/java/dev/plex/command/impl/WorldCMD.java b/Plex-Core/src/main/java/dev/plex/command/impl/WorldCMD.java similarity index 100% rename from src/main/java/dev/plex/command/impl/WorldCMD.java rename to Plex-Core/src/main/java/dev/plex/command/impl/WorldCMD.java diff --git a/src/main/java/dev/plex/command/source/RequiredCommandSource.java b/Plex-Core/src/main/java/dev/plex/command/source/RequiredCommandSource.java similarity index 100% rename from src/main/java/dev/plex/command/source/RequiredCommandSource.java rename to Plex-Core/src/main/java/dev/plex/command/source/RequiredCommandSource.java diff --git a/src/main/java/dev/plex/config/Config.java b/Plex-Core/src/main/java/dev/plex/config/Config.java similarity index 100% rename from src/main/java/dev/plex/config/Config.java rename to Plex-Core/src/main/java/dev/plex/config/Config.java diff --git a/src/main/java/dev/plex/config/ModuleConfig.java b/Plex-Core/src/main/java/dev/plex/config/ModuleConfig.java similarity index 100% rename from src/main/java/dev/plex/config/ModuleConfig.java rename to Plex-Core/src/main/java/dev/plex/config/ModuleConfig.java diff --git a/src/main/java/dev/plex/event/AdminAddEvent.java b/Plex-Core/src/main/java/dev/plex/event/AdminAddEvent.java similarity index 100% rename from src/main/java/dev/plex/event/AdminAddEvent.java rename to Plex-Core/src/main/java/dev/plex/event/AdminAddEvent.java diff --git a/src/main/java/dev/plex/event/AdminRemoveEvent.java b/Plex-Core/src/main/java/dev/plex/event/AdminRemoveEvent.java similarity index 100% rename from src/main/java/dev/plex/event/AdminRemoveEvent.java rename to Plex-Core/src/main/java/dev/plex/event/AdminRemoveEvent.java diff --git a/src/main/java/dev/plex/event/AdminSetRankEvent.java b/Plex-Core/src/main/java/dev/plex/event/AdminSetRankEvent.java similarity index 100% rename from src/main/java/dev/plex/event/AdminSetRankEvent.java rename to Plex-Core/src/main/java/dev/plex/event/AdminSetRankEvent.java diff --git a/src/main/java/dev/plex/event/GameModeUpdateEvent.java b/Plex-Core/src/main/java/dev/plex/event/GameModeUpdateEvent.java similarity index 100% rename from src/main/java/dev/plex/event/GameModeUpdateEvent.java rename to Plex-Core/src/main/java/dev/plex/event/GameModeUpdateEvent.java diff --git a/src/main/java/dev/plex/event/PunishedPlayerEvent.java b/Plex-Core/src/main/java/dev/plex/event/PunishedPlayerEvent.java similarity index 97% rename from src/main/java/dev/plex/event/PunishedPlayerEvent.java rename to Plex-Core/src/main/java/dev/plex/event/PunishedPlayerEvent.java index 92bf4e7..4b4f04d 100644 --- a/src/main/java/dev/plex/event/PunishedPlayerEvent.java +++ b/Plex-Core/src/main/java/dev/plex/event/PunishedPlayerEvent.java @@ -1,7 +1,6 @@ package dev.plex.event; import dev.plex.player.PlexPlayer; -import java.util.UUID; import lombok.Getter; import lombok.Setter; import org.bukkit.Bukkit; diff --git a/src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java b/Plex-Core/src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java similarity index 100% rename from src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java rename to Plex-Core/src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java diff --git a/src/main/java/dev/plex/event/PunishedPlayerLockupEvent.java b/Plex-Core/src/main/java/dev/plex/event/PunishedPlayerLockupEvent.java similarity index 100% rename from src/main/java/dev/plex/event/PunishedPlayerLockupEvent.java rename to Plex-Core/src/main/java/dev/plex/event/PunishedPlayerLockupEvent.java diff --git a/src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java b/Plex-Core/src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java similarity index 100% rename from src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java rename to Plex-Core/src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java diff --git a/src/main/java/dev/plex/handlers/CommandHandler.java b/Plex-Core/src/main/java/dev/plex/handlers/CommandHandler.java similarity index 100% rename from src/main/java/dev/plex/handlers/CommandHandler.java rename to Plex-Core/src/main/java/dev/plex/handlers/CommandHandler.java diff --git a/src/main/java/dev/plex/handlers/ListenerHandler.java b/Plex-Core/src/main/java/dev/plex/handlers/ListenerHandler.java similarity index 100% rename from src/main/java/dev/plex/handlers/ListenerHandler.java rename to Plex-Core/src/main/java/dev/plex/handlers/ListenerHandler.java diff --git a/src/main/java/dev/plex/listener/PlexListener.java b/Plex-Core/src/main/java/dev/plex/listener/PlexListener.java similarity index 100% rename from src/main/java/dev/plex/listener/PlexListener.java rename to Plex-Core/src/main/java/dev/plex/listener/PlexListener.java diff --git a/src/main/java/dev/plex/listener/annotation/Toggleable.java b/Plex-Core/src/main/java/dev/plex/listener/annotation/Toggleable.java similarity index 100% rename from src/main/java/dev/plex/listener/annotation/Toggleable.java rename to Plex-Core/src/main/java/dev/plex/listener/annotation/Toggleable.java diff --git a/src/main/java/dev/plex/listener/impl/AdminListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/AdminListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/AdminListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/AdminListener.java diff --git a/src/main/java/dev/plex/listener/impl/BanListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/BanListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/BanListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/BanListener.java diff --git a/src/main/java/dev/plex/listener/impl/BlockListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/BlockListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/BlockListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/BlockListener.java diff --git a/src/main/java/dev/plex/listener/impl/ChatListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/ChatListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/ChatListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/ChatListener.java diff --git a/src/main/java/dev/plex/listener/impl/CommandListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/CommandListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/CommandListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/CommandListener.java diff --git a/src/main/java/dev/plex/listener/impl/DropListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/DropListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/DropListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/DropListener.java diff --git a/src/main/java/dev/plex/listener/impl/FreezeListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/FreezeListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/FreezeListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/FreezeListener.java diff --git a/src/main/java/dev/plex/listener/impl/GameModeListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/GameModeListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/GameModeListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/GameModeListener.java diff --git a/src/main/java/dev/plex/listener/impl/MuteListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/MuteListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/MuteListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/MuteListener.java diff --git a/src/main/java/dev/plex/listener/impl/PlayerListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/PlayerListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/PlayerListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/PlayerListener.java diff --git a/src/main/java/dev/plex/listener/impl/ServerListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/ServerListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/ServerListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/ServerListener.java diff --git a/src/main/java/dev/plex/listener/impl/SpawnListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/SpawnListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/SpawnListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/SpawnListener.java diff --git a/src/main/java/dev/plex/listener/impl/TabListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/TabListener.java similarity index 100% rename from src/main/java/dev/plex/listener/impl/TabListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/TabListener.java diff --git a/src/main/java/dev/plex/listener/impl/WorldListener.java b/Plex-Core/src/main/java/dev/plex/listener/impl/WorldListener.java similarity index 99% rename from src/main/java/dev/plex/listener/impl/WorldListener.java rename to Plex-Core/src/main/java/dev/plex/listener/impl/WorldListener.java index b2b319e..355b212 100644 --- a/src/main/java/dev/plex/listener/impl/WorldListener.java +++ b/Plex-Core/src/main/java/dev/plex/listener/impl/WorldListener.java @@ -21,7 +21,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntitySpawnEvent; -import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerTeleportEvent; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/dev/plex/menu/PunishedPlayerMenu.java b/Plex-Core/src/main/java/dev/plex/menu/PunishedPlayerMenu.java similarity index 100% rename from src/main/java/dev/plex/menu/PunishedPlayerMenu.java rename to Plex-Core/src/main/java/dev/plex/menu/PunishedPlayerMenu.java diff --git a/src/main/java/dev/plex/menu/PunishmentMenu.java b/Plex-Core/src/main/java/dev/plex/menu/PunishmentMenu.java similarity index 100% rename from src/main/java/dev/plex/menu/PunishmentMenu.java rename to Plex-Core/src/main/java/dev/plex/menu/PunishmentMenu.java diff --git a/src/main/java/dev/plex/module/ModuleManager.java b/Plex-Core/src/main/java/dev/plex/module/ModuleManager.java similarity index 100% rename from src/main/java/dev/plex/module/ModuleManager.java rename to Plex-Core/src/main/java/dev/plex/module/ModuleManager.java diff --git a/src/main/java/dev/plex/module/PlexModule.java b/Plex-Core/src/main/java/dev/plex/module/PlexModule.java similarity index 100% rename from src/main/java/dev/plex/module/PlexModule.java rename to Plex-Core/src/main/java/dev/plex/module/PlexModule.java diff --git a/src/main/java/dev/plex/module/PlexModuleFile.java b/Plex-Core/src/main/java/dev/plex/module/PlexModuleFile.java similarity index 100% rename from src/main/java/dev/plex/module/PlexModuleFile.java rename to Plex-Core/src/main/java/dev/plex/module/PlexModuleFile.java diff --git a/src/main/java/dev/plex/module/exception/ModuleLoadException.java b/Plex-Core/src/main/java/dev/plex/module/exception/ModuleLoadException.java similarity index 100% rename from src/main/java/dev/plex/module/exception/ModuleLoadException.java rename to Plex-Core/src/main/java/dev/plex/module/exception/ModuleLoadException.java diff --git a/src/main/java/dev/plex/module/loader/CustomClassLoader.java b/Plex-Core/src/main/java/dev/plex/module/loader/CustomClassLoader.java similarity index 100% rename from src/main/java/dev/plex/module/loader/CustomClassLoader.java rename to Plex-Core/src/main/java/dev/plex/module/loader/CustomClassLoader.java diff --git a/src/main/java/dev/plex/module/loader/LibraryLoader.java b/Plex-Core/src/main/java/dev/plex/module/loader/LibraryLoader.java similarity index 100% rename from src/main/java/dev/plex/module/loader/LibraryLoader.java rename to Plex-Core/src/main/java/dev/plex/module/loader/LibraryLoader.java diff --git a/src/main/java/dev/plex/player/PlexPlayer.java b/Plex-Core/src/main/java/dev/plex/player/PlexPlayer.java similarity index 100% rename from src/main/java/dev/plex/player/PlexPlayer.java rename to Plex-Core/src/main/java/dev/plex/player/PlexPlayer.java diff --git a/src/main/java/dev/plex/punishment/Punishment.java b/Plex-Core/src/main/java/dev/plex/punishment/Punishment.java similarity index 100% rename from src/main/java/dev/plex/punishment/Punishment.java rename to Plex-Core/src/main/java/dev/plex/punishment/Punishment.java diff --git a/src/main/java/dev/plex/punishment/PunishmentManager.java b/Plex-Core/src/main/java/dev/plex/punishment/PunishmentManager.java similarity index 100% rename from src/main/java/dev/plex/punishment/PunishmentManager.java rename to Plex-Core/src/main/java/dev/plex/punishment/PunishmentManager.java diff --git a/src/main/java/dev/plex/punishment/PunishmentType.java b/Plex-Core/src/main/java/dev/plex/punishment/PunishmentType.java similarity index 100% rename from src/main/java/dev/plex/punishment/PunishmentType.java rename to Plex-Core/src/main/java/dev/plex/punishment/PunishmentType.java diff --git a/src/main/java/dev/plex/punishment/extra/Note.java b/Plex-Core/src/main/java/dev/plex/punishment/extra/Note.java similarity index 100% rename from src/main/java/dev/plex/punishment/extra/Note.java rename to Plex-Core/src/main/java/dev/plex/punishment/extra/Note.java diff --git a/src/main/java/dev/plex/rank/RankManager.java b/Plex-Core/src/main/java/dev/plex/rank/RankManager.java similarity index 100% rename from src/main/java/dev/plex/rank/RankManager.java rename to Plex-Core/src/main/java/dev/plex/rank/RankManager.java diff --git a/src/main/java/dev/plex/rank/enums/Rank.java b/Plex-Core/src/main/java/dev/plex/rank/enums/Rank.java similarity index 100% rename from src/main/java/dev/plex/rank/enums/Rank.java rename to Plex-Core/src/main/java/dev/plex/rank/enums/Rank.java diff --git a/src/main/java/dev/plex/rank/enums/Title.java b/Plex-Core/src/main/java/dev/plex/rank/enums/Title.java similarity index 100% rename from src/main/java/dev/plex/rank/enums/Title.java rename to Plex-Core/src/main/java/dev/plex/rank/enums/Title.java diff --git a/src/main/java/dev/plex/services/AbstractService.java b/Plex-Core/src/main/java/dev/plex/services/AbstractService.java similarity index 100% rename from src/main/java/dev/plex/services/AbstractService.java rename to Plex-Core/src/main/java/dev/plex/services/AbstractService.java diff --git a/src/main/java/dev/plex/services/IService.java b/Plex-Core/src/main/java/dev/plex/services/IService.java similarity index 100% rename from src/main/java/dev/plex/services/IService.java rename to Plex-Core/src/main/java/dev/plex/services/IService.java diff --git a/src/main/java/dev/plex/services/ServiceManager.java b/Plex-Core/src/main/java/dev/plex/services/ServiceManager.java similarity index 100% rename from src/main/java/dev/plex/services/ServiceManager.java rename to Plex-Core/src/main/java/dev/plex/services/ServiceManager.java diff --git a/src/main/java/dev/plex/services/impl/AutoWipeService.java b/Plex-Core/src/main/java/dev/plex/services/impl/AutoWipeService.java similarity index 96% rename from src/main/java/dev/plex/services/impl/AutoWipeService.java rename to Plex-Core/src/main/java/dev/plex/services/impl/AutoWipeService.java index aff79b5..92e5659 100644 --- a/src/main/java/dev/plex/services/impl/AutoWipeService.java +++ b/Plex-Core/src/main/java/dev/plex/services/impl/AutoWipeService.java @@ -5,7 +5,6 @@ import dev.plex.services.AbstractService; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; import java.util.List; diff --git a/src/main/java/dev/plex/services/impl/BanService.java b/Plex-Core/src/main/java/dev/plex/services/impl/BanService.java similarity index 100% rename from src/main/java/dev/plex/services/impl/BanService.java rename to Plex-Core/src/main/java/dev/plex/services/impl/BanService.java diff --git a/src/main/java/dev/plex/services/impl/CommandBlockerService.java b/Plex-Core/src/main/java/dev/plex/services/impl/CommandBlockerService.java similarity index 100% rename from src/main/java/dev/plex/services/impl/CommandBlockerService.java rename to Plex-Core/src/main/java/dev/plex/services/impl/CommandBlockerService.java diff --git a/src/main/java/dev/plex/services/impl/GameRuleService.java b/Plex-Core/src/main/java/dev/plex/services/impl/GameRuleService.java similarity index 100% rename from src/main/java/dev/plex/services/impl/GameRuleService.java rename to Plex-Core/src/main/java/dev/plex/services/impl/GameRuleService.java diff --git a/src/main/java/dev/plex/services/impl/UpdateCheckerService.java b/Plex-Core/src/main/java/dev/plex/services/impl/UpdateCheckerService.java similarity index 100% rename from src/main/java/dev/plex/services/impl/UpdateCheckerService.java rename to Plex-Core/src/main/java/dev/plex/services/impl/UpdateCheckerService.java diff --git a/src/main/java/dev/plex/storage/MongoConnection.java b/Plex-Core/src/main/java/dev/plex/storage/MongoConnection.java similarity index 98% rename from src/main/java/dev/plex/storage/MongoConnection.java rename to Plex-Core/src/main/java/dev/plex/storage/MongoConnection.java index d10c776..9f21631 100644 --- a/src/main/java/dev/plex/storage/MongoConnection.java +++ b/Plex-Core/src/main/java/dev/plex/storage/MongoConnection.java @@ -1,6 +1,5 @@ package dev.plex.storage; -import com.mongodb.*; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; import dev.morphia.Datastore; diff --git a/src/main/java/dev/plex/storage/RedisConnection.java b/Plex-Core/src/main/java/dev/plex/storage/RedisConnection.java similarity index 100% rename from src/main/java/dev/plex/storage/RedisConnection.java rename to Plex-Core/src/main/java/dev/plex/storage/RedisConnection.java diff --git a/src/main/java/dev/plex/storage/SQLConnection.java b/Plex-Core/src/main/java/dev/plex/storage/SQLConnection.java similarity index 100% rename from src/main/java/dev/plex/storage/SQLConnection.java rename to Plex-Core/src/main/java/dev/plex/storage/SQLConnection.java diff --git a/src/main/java/dev/plex/storage/StorageType.java b/Plex-Core/src/main/java/dev/plex/storage/StorageType.java similarity index 100% rename from src/main/java/dev/plex/storage/StorageType.java rename to Plex-Core/src/main/java/dev/plex/storage/StorageType.java diff --git a/src/main/java/dev/plex/util/AshconInfo.java b/Plex-Core/src/main/java/dev/plex/util/AshconInfo.java similarity index 100% rename from src/main/java/dev/plex/util/AshconInfo.java rename to Plex-Core/src/main/java/dev/plex/util/AshconInfo.java diff --git a/src/main/java/dev/plex/util/MojangUtils.java b/Plex-Core/src/main/java/dev/plex/util/MojangUtils.java similarity index 100% rename from src/main/java/dev/plex/util/MojangUtils.java rename to Plex-Core/src/main/java/dev/plex/util/MojangUtils.java diff --git a/src/main/java/dev/plex/util/PlexLog.java b/Plex-Core/src/main/java/dev/plex/util/PlexLog.java similarity index 100% rename from src/main/java/dev/plex/util/PlexLog.java rename to Plex-Core/src/main/java/dev/plex/util/PlexLog.java diff --git a/src/main/java/dev/plex/util/PlexUtils.java b/Plex-Core/src/main/java/dev/plex/util/PlexUtils.java similarity index 100% rename from src/main/java/dev/plex/util/PlexUtils.java rename to Plex-Core/src/main/java/dev/plex/util/PlexUtils.java diff --git a/src/main/java/dev/plex/util/TimeUnit.java b/Plex-Core/src/main/java/dev/plex/util/TimeUnit.java similarity index 100% rename from src/main/java/dev/plex/util/TimeUnit.java rename to Plex-Core/src/main/java/dev/plex/util/TimeUnit.java diff --git a/src/main/java/dev/plex/util/UpdateChecker.java b/Plex-Core/src/main/java/dev/plex/util/UpdateChecker.java similarity index 100% rename from src/main/java/dev/plex/util/UpdateChecker.java rename to Plex-Core/src/main/java/dev/plex/util/UpdateChecker.java diff --git a/src/main/java/dev/plex/util/adapter/LocalDateTimeDeserializer.java b/Plex-Core/src/main/java/dev/plex/util/adapter/LocalDateTimeDeserializer.java similarity index 100% rename from src/main/java/dev/plex/util/adapter/LocalDateTimeDeserializer.java rename to Plex-Core/src/main/java/dev/plex/util/adapter/LocalDateTimeDeserializer.java diff --git a/src/main/java/dev/plex/util/adapter/LocalDateTimeSerializer.java b/Plex-Core/src/main/java/dev/plex/util/adapter/LocalDateTimeSerializer.java similarity index 100% rename from src/main/java/dev/plex/util/adapter/LocalDateTimeSerializer.java rename to Plex-Core/src/main/java/dev/plex/util/adapter/LocalDateTimeSerializer.java diff --git a/src/main/java/dev/plex/util/item/ItemBuilder.java b/Plex-Core/src/main/java/dev/plex/util/item/ItemBuilder.java similarity index 100% rename from src/main/java/dev/plex/util/item/ItemBuilder.java rename to Plex-Core/src/main/java/dev/plex/util/item/ItemBuilder.java diff --git a/src/main/java/dev/plex/util/menu/AbstractMenu.java b/Plex-Core/src/main/java/dev/plex/util/menu/AbstractMenu.java similarity index 100% rename from src/main/java/dev/plex/util/menu/AbstractMenu.java rename to Plex-Core/src/main/java/dev/plex/util/menu/AbstractMenu.java diff --git a/src/main/java/dev/plex/util/menu/IMenu.java b/Plex-Core/src/main/java/dev/plex/util/menu/IMenu.java similarity index 100% rename from src/main/java/dev/plex/util/menu/IMenu.java rename to Plex-Core/src/main/java/dev/plex/util/menu/IMenu.java diff --git a/src/main/java/dev/plex/world/BlockMapChunkGenerator.java b/Plex-Core/src/main/java/dev/plex/world/BlockMapChunkGenerator.java similarity index 100% rename from src/main/java/dev/plex/world/BlockMapChunkGenerator.java rename to Plex-Core/src/main/java/dev/plex/world/BlockMapChunkGenerator.java diff --git a/src/main/java/dev/plex/world/ConfigurationChunkGenerator.java b/Plex-Core/src/main/java/dev/plex/world/ConfigurationChunkGenerator.java similarity index 100% rename from src/main/java/dev/plex/world/ConfigurationChunkGenerator.java rename to Plex-Core/src/main/java/dev/plex/world/ConfigurationChunkGenerator.java diff --git a/src/main/java/dev/plex/world/CustomChunkGenerator.java b/Plex-Core/src/main/java/dev/plex/world/CustomChunkGenerator.java similarity index 100% rename from src/main/java/dev/plex/world/CustomChunkGenerator.java rename to Plex-Core/src/main/java/dev/plex/world/CustomChunkGenerator.java diff --git a/src/main/java/dev/plex/world/CustomWorld.java b/Plex-Core/src/main/java/dev/plex/world/CustomWorld.java similarity index 100% rename from src/main/java/dev/plex/world/CustomWorld.java rename to Plex-Core/src/main/java/dev/plex/world/CustomWorld.java diff --git a/src/main/java/dev/plex/world/FlatChunkGenerator.java b/Plex-Core/src/main/java/dev/plex/world/FlatChunkGenerator.java similarity index 100% rename from src/main/java/dev/plex/world/FlatChunkGenerator.java rename to Plex-Core/src/main/java/dev/plex/world/FlatChunkGenerator.java diff --git a/src/main/java/dev/plex/world/NoiseChunkGenerator.java b/Plex-Core/src/main/java/dev/plex/world/NoiseChunkGenerator.java similarity index 100% rename from src/main/java/dev/plex/world/NoiseChunkGenerator.java rename to Plex-Core/src/main/java/dev/plex/world/NoiseChunkGenerator.java diff --git a/src/main/java/dev/plex/world/NoiseOptions.java b/Plex-Core/src/main/java/dev/plex/world/NoiseOptions.java similarity index 100% rename from src/main/java/dev/plex/world/NoiseOptions.java rename to Plex-Core/src/main/java/dev/plex/world/NoiseOptions.java diff --git a/src/main/java/dev/plex/world/OctaveChunkGenerator.java b/Plex-Core/src/main/java/dev/plex/world/OctaveChunkGenerator.java similarity index 100% rename from src/main/java/dev/plex/world/OctaveChunkGenerator.java rename to Plex-Core/src/main/java/dev/plex/world/OctaveChunkGenerator.java diff --git a/src/main/java/dev/plex/world/OctaveOptions.java b/Plex-Core/src/main/java/dev/plex/world/OctaveOptions.java similarity index 100% rename from src/main/java/dev/plex/world/OctaveOptions.java rename to Plex-Core/src/main/java/dev/plex/world/OctaveOptions.java diff --git a/src/main/resources/commands.yml b/Plex-Core/src/main/resources/commands.yml similarity index 100% rename from src/main/resources/commands.yml rename to Plex-Core/src/main/resources/commands.yml diff --git a/src/main/resources/config.yml b/Plex-Core/src/main/resources/config.yml similarity index 100% rename from src/main/resources/config.yml rename to Plex-Core/src/main/resources/config.yml diff --git a/src/main/resources/indefbans.yml b/Plex-Core/src/main/resources/indefbans.yml similarity index 100% rename from src/main/resources/indefbans.yml rename to Plex-Core/src/main/resources/indefbans.yml diff --git a/src/main/resources/messages.yml b/Plex-Core/src/main/resources/messages.yml similarity index 100% rename from src/main/resources/messages.yml rename to Plex-Core/src/main/resources/messages.yml diff --git a/build.gradle b/build.gradle index e4644ed..93f13cb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,153 +1,54 @@ -plugins { - id "java" - id "maven-publish" - id "net.minecrell.plugin-yml.bukkit" version "0.5.1" - id "com.github.johnrengelman.shadow" version "7.1.2" -} - -repositories { - mavenLocal() - maven { - url = uri("https://papermc.io/repo/repository/maven-public/") - } - - maven { - url = uri("https://repository.apache.org/content/repositories/snapshots/") - } - - maven { - url = uri("https://repo.maven.apache.org/maven2/") - } - - mavenCentral() -} - -dependencies { - library "org.projectlombok:lombok:1.18.22" - annotationProcessor "org.projectlombok:lombok:1.18.22" - library "org.json:json:20220320" - library "commons-io:commons-io:2.11.0" - library "dev.morphia.morphia:morphia-core:2.2.6" - library "redis.clients:jedis:4.2.1" - library "org.mariadb.jdbc:mariadb-java-client:3.0.4" - library "com.zaxxer:HikariCP:5.0.1" - library "org.apache.httpcomponents:httpclient:4.5.13" - library "org.apache.commons:commons-lang3:3.12.0" - library "org.apache.maven.resolver:maven-resolver-api:1.7.3" - library "org.apache.maven.resolver:maven-resolver-impl:1.7.3" - library "org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3" - library "org.apache.maven.resolver:maven-resolver-transport-http:1.7.3" - library "org.apache.maven:maven-resolver-provider:3.8.5" - library "org.eclipse.jetty:jetty-server:11.0.9" - library "org.eclipse.jetty:jetty-servlet:11.0.9" - library "org.eclipse.jetty:jetty-proxy:11.0.9" - library "com.google.code.gson:gson:2.9.0" - compileOnly "io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT" - implementation "org.bstats:bstats-base:3.0.0" - implementation "org.bstats:bstats-bukkit:3.0.0" -} - group = "dev.plex" version = "1.0.1-SNAPSHOT" -description = "Plex" -shadowJar { - archiveClassifier.set("") - archiveBaseName.set("Plex") - archiveVersion.set("") - relocate "org.bstats", "dev.plex" -} - -tasks.jar { - archiveBaseName.set("Plex") - archiveVersion.set("") -} - -bukkit { - name = "Plex" - version = rootProject.version - description = "Plex provides a new experience for freedom servers." - main = "dev.plex.Plex" - website = "https://plex.us.org" - authors = ["Telesphoreo", "taahanis", "super"] - apiVersion = "1.18" -} - -String getGitHash() { - def stdout = new ByteArrayOutputStream() - try { - exec { - commandLine "git", "rev-parse", "--short", "HEAD" - standardOutput = stdout - ignoreExitValue = true - } - } catch (GradleException e) { - logger.error("Couldn't determine Git head because Git is not installed. " + e.getMessage()) - } - return stdout.size() > 0 ? stdout.toString().trim() : "unknown" -} - -String getBuildNumber() { - def stdout = new ByteArrayOutputStream() - try { - exec { - commandLine "git", "rev-list", "HEAD", "--count" - standardOutput = stdout - ignoreExitValue = true - } - } catch (GradleException e) { - logger.error("Couldn't determine build number because Git is not installed. " + e.getMessage()) - } - return stdout.size() ? stdout.toString().trim() + " (local)" : "unknown" -} - -static def getDate() { - return new Date().format("MM/dd/yyyy 'at' hh:mm:ss a") -} - -task buildProperties { - ant.propertyfile(file: "$project.rootDir/src/main/resources/build.properties") { - entry(key: "buildAuthor", default: System.getenv("JENKINS_URL") != null ? "jenkins" : "unknown") - entry(key: "buildNumber", value: System.getenv("JENKINS_URL") != null ? System.getenv("BUILD_NUMBER") + " (Jenkins)" : getBuildNumber()) - entry(key: "buildDate", value: getDate()) - entry(key: "buildHead", value: getGitHash()) - } -} - -java { - toolchain.languageVersion.set(JavaLanguageVersion.of(17)) -} - -publishing { - publications { - maven(MavenPublication) { - from(components.java) - } - } +allprojects { + apply plugin: 'java' + apply plugin: "maven-publish" repositories { maven { - def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/") - def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/") - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - credentials { - username = System.getenv("plexUser") - password = System.getenv("plexPassword") + url = uri("https://papermc.io/repo/repository/maven-public/") + } + + maven { + url = uri("https://repository.apache.org/content/repositories/snapshots/") + } + + maven { + url = uri("https://repo.maven.apache.org/maven2/") + } + + mavenCentral() + } + + java { + toolchain.languageVersion.set(JavaLanguageVersion.of(17)) + } + + tasks.withType(JavaCompile) { + options.encoding = "UTF-8" + } + + publishing { + publications { + maven(MavenPublication) { + from(components.java) + } + } + repositories { + maven { + def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/") + def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/") + url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + credentials { + username = System.getenv("plexUser") + password = System.getenv("plexPassword") + } } } } } -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" -} - -tasks { - build { - dependsOn(shadowJar) - finalizedBy(buildProperties) - } - - javadoc { - options.memberLevel = JavadocMemberLevel.PRIVATE - } +task copyJars(type: Copy, dependsOn: subprojects.jar) { + from(subprojects.jar) + into project.file('jars') } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 642a692..7276427 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,4 @@ -rootProject.name = 'Plex' \ No newline at end of file +rootProject.name = "Plex" + +include "Plex-Core" +include "Plex-API" \ No newline at end of file