mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Revert API
This commit is contained in:
parent
f73c63f1e7
commit
dcecebdc8d
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -23,8 +23,8 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: "jars/*.jar", fingerprint: true
|
||||
javadoc javadocDir: "Plex-Core/build/docs/javadoc", keepAll: false
|
||||
archiveArtifacts artifacts: "build/libs/*.jar", fingerprint: true
|
||||
javadoc javadocDir: "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()
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
group = "dev.plex"
|
||||
version = rootProject.version
|
||||
description = "Plex-API"
|
||||
|
||||
dependencies {
|
||||
implementation project(":Plex-Core")
|
||||
compileOnly "io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT"
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
archiveBaseName.set("Plex-API")
|
||||
archiveVersion.set("")
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
package dev.plex.api;
|
||||
|
||||
import dev.plex.PlexBase;
|
||||
import dev.plex.player.PlexPlayer;
|
||||
import java.util.List;
|
||||
|
||||
public class AdminAPI extends PlexBase
|
||||
{
|
||||
/**
|
||||
* Gathers every admins username (cached and in the database)
|
||||
*
|
||||
* @return An array list of the names of every admin
|
||||
*/
|
||||
public List<String> getAllAdmins()
|
||||
{
|
||||
return plugin.getAdminList().getAllAdmins();
|
||||
}
|
||||
|
||||
public List<PlexPlayer> getAllAdminPlayers()
|
||||
{
|
||||
return plugin.getAdminList().getAllAdminPlayers();
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
187
build.gradle
187
build.gradle
@ -1,56 +1,153 @@
|
||||
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"
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: "maven-publish"
|
||||
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.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)
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
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()
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
afterEvaluate { project ->
|
||||
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")
|
||||
}
|
||||
}
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task copyJars(type: Copy, dependsOn: subprojects.jar) {
|
||||
from(subprojects.jar)
|
||||
into project.file('jars')
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
tasks {
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
finalizedBy(buildProperties)
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.memberLevel = JavadocMemberLevel.PRIVATE
|
||||
}
|
||||
}
|
@ -1,4 +1 @@
|
||||
rootProject.name = "Plex"
|
||||
|
||||
include "Plex-Core"
|
||||
include "Plex-API"
|
||||
rootProject.name = "Plex"
|
@ -79,10 +79,10 @@ public class Plex extends JavaPlugin
|
||||
public void onLoad()
|
||||
{
|
||||
plugin = this;
|
||||
config = new Config(this, "config.yml");
|
||||
messages = new Config(this, "messages.yml");
|
||||
indefBans = new Config(this, "indefbans.yml");
|
||||
blockedCommands = new Config(this, "commands.yml");
|
||||
config = new Config(this, "resources/config.yml");
|
||||
messages = new Config(this, "resources/messages.yml");
|
||||
indefBans = new Config(this, "resources/indefbans.yml");
|
||||
blockedCommands = new Config(this, "resources/commands.yml");
|
||||
build.load(this);
|
||||
|
||||
modulesFolder = new File(this.getDataFolder() + File.separator + "modules");
|
||||
@ -248,7 +248,7 @@ public class Plex extends JavaPlugin
|
||||
{
|
||||
final Properties props;
|
||||
|
||||
try (InputStream in = plugin.getResource("build.properties"))
|
||||
try (InputStream in = plugin.getResource("resources/build.properties"))
|
||||
{
|
||||
props = new Properties();
|
||||
props.load(in);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user