Merge remote-tracking branch 'origin/master'

# Conflicts:
#	Plex-Core/src/main/java/dev/plex/command/impl/SayCMD.java
This commit is contained in:
Taah 2022-04-09 22:11:06 -07:00
commit d16aa6de4c
152 changed files with 174 additions and 222 deletions

5
.gitignore vendored
View File

@ -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/

View File

@ -1,46 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JavaCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="20" />
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="" withSubpackages="true" static="false" />
<package name="" withSubpackages="true" static="true" />
</value>
</option>
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
</JetCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="BRACE_STYLE" value="2" />
<option name="CLASS_BRACE_STYLE" value="2" />
<option name="METHOD_BRACE_STYLE" value="2" />
<option name="LAMBDA_BRACE_STYLE" value="2" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
</codeStyleSettings>
</code_scheme>
</component>

8
Jenkinsfile vendored
View File

@ -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()
}

9
Plex-API/build.gradle Normal file
View File

@ -0,0 +1,9 @@
group = "dev.plex"
version = rootProject.version
description = "Plex-API"
tasks.jar {
archiveBaseName.set("Plex-API")
archiveVersion.set("")
}

110
Plex-Core/build.gradle Normal file
View File

@ -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 '<light_purple>at<gold>' 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
}
}

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 = "/<command>", aliases = "td")
public class ToggleDropsCMD extends PlexCommand

View File

@ -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;

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More