From 8efe8446401618bc1f855d826f158c87332f4aff Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Thu, 30 Sep 2021 22:08:26 -0500 Subject: [PATCH] Update to use Nexus --- build.gradle | 34 +++- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 0 gradlew.bat | 178 +++++++++--------- .../totalfreedommod/Pterodactyl.java | 4 +- 5 files changed, 121 insertions(+), 97 deletions(-) mode change 100644 => 100755 gradlew diff --git a/build.gradle b/build.gradle index 5f4ebe3b..d5a14c75 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'maven-publish' id 'idea' id 'com.github.johnrengelman.shadow' version '7.0.0' - id 'net.minecrell.plugin-yml.bukkit' version '0.4.0' + id 'net.minecrell.plugin-yml.bukkit' version '0.5.0' } repositories { @@ -20,6 +20,9 @@ repositories { maven { url = uri('https://repo.codemc.org/repository/nms/') + content { + includeGroup('org.spigotmc') + } } maven { @@ -32,6 +35,11 @@ repositories { maven { url = uri('https://maven.elmakers.com/repository/') + content { + includeGroup('org.bukkit') + includeGroup('net.goldtreeservers') + includeGroup('de.bananaco') + } } maven { @@ -40,6 +48,9 @@ repositories { maven { url = uri('https://maven.playpro.com/') + content { + includeGroup('net.coreprotect') + } } maven { @@ -58,13 +69,26 @@ repositories { url = uri('https://ci.ender.zone/plugin/repository/everything/') } + maven { + url = uri('https://nexus.telesphoreo.me/repository/totalfreedom/') + } + maven { url = uri('https://repo.mattmalec.com/repository/releases') + content { + includeGroup('com.mattmalec') + } } maven { url = uri('https://repo.essentialsx.net/releases/') + content { + content { + includeGroup('net.essentialsx') + } + } } + mavenCentral() } dependencies { @@ -74,13 +98,13 @@ dependencies { implementation('io.papermc:paperlib:1.0.6') implementation('org.reflections:reflections:0.9.12') implementation('org.javassist:javassist:3.28.0-GA') - implementation('org.jetbrains:annotations:21.0.1') + implementation('org.jetbrains:annotations:22.0.0') implementation('com.mattmalec:Pterodactyl4J:2.BETA_80') implementation('org.junit.jupiter:junit-jupiter:5.8.1') implementation('org.projectlombok:lombok:1.18.20') compileOnly('org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT') - compileOnly('com.github.TotalFreedomMC:BukkitTelnet:541e9fdb84') - compileOnly('com.github.TotalFreedomMC:TF-LibsDisguises:48f01cf2fe') + compileOnly('me.totalfreedom:bukkittelnet:4.6') + compileOnly('me.totalfreedom:TF-LibsDisguises:10.0.26-SNAPSHOT') compileOnly('com.sk89q.worldedit:worldedit-bukkit:7.3.0-SNAPSHOT') compileOnly('net.essentialsx:EssentialsX:2.19.0') compileOnly('net.dv8tion:JDA:4.3.0_277') @@ -88,7 +112,7 @@ dependencies { compileOnly('com.sk89q.worldguard:worldguard-bukkit:7.0.6') compileOnly('com.github.vexsoftware:votifier:v1.9') compileOnly('net.goldtreeservers:worldguardextraflags:4.0.0') - compileOnly('com.github.AtlasMediaGroup:TFGuilds:master-SNAPSHOT') + compileOnly('me.totalfreedom:TFGuilds:2021.06-RC3') } group = 'me.totalfreedom' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 69a97150..ffed3a25 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/gradlew.bat b/gradlew.bat index 107acd32..ac1b06f9 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/java/me/totalfreedom/totalfreedommod/Pterodactyl.java b/src/main/java/me/totalfreedom/totalfreedommod/Pterodactyl.java index 3fe2b326..3445352d 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/Pterodactyl.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/Pterodactyl.java @@ -102,14 +102,14 @@ public class Pterodactyl extends FreedomService public void restartServer() { ClientServer server = clientAPI.retrieveServerByIdentifier(IDENTIFIER).execute(); - clientAPI.setPower(server, PowerAction.RESTART).execute(); + server.setPower(PowerAction.RESTART).execute(); } public void fionnTheServer() { ClientServer server = clientAPI.retrieveServerByIdentifier(IDENTIFIER).execute(); clientAPI.setPower(server, PowerAction.STOP).execute(); - plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, () -> clientAPI.setPower(server, PowerAction.KILL).execute(), 0, 60); + plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, () -> server.setPower(PowerAction.KILL).execute(), 0, 60); } public String getURL()