mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-28 12:56:50 +01:00
Update buildscript
This commit is contained in:
parent
ef7c6f0041
commit
2f1931bcc2
@ -16,7 +16,7 @@
|
|||||||
![Purpur](https://cdn.jsdelivr.net/gh/intergrav/devins-badges/assets/compact/supported/purpur_vector.svg)
|
![Purpur](https://cdn.jsdelivr.net/gh/intergrav/devins-badges/assets/compact/supported/purpur_vector.svg)
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
A crates plugin that offers quality crates with ease!
|
Auction off your items in style!
|
||||||
<br />
|
<br />
|
||||||
<a href="https://github.com/Crazy-Crew/CrazyAuctions/wiki"><strong>Explore the docs »</strong></a>
|
<a href="https://github.com/Crazy-Crew/CrazyAuctions/wiki"><strong>Explore the docs »</strong></a>
|
||||||
<br />
|
<br />
|
||||||
@ -25,7 +25,7 @@
|
|||||||
·
|
·
|
||||||
<a href="https://github.com/Crazy-Crew/CrazyAuctions/discussions/categories/feature-requests">Request Feature</a>
|
<a href="https://github.com/Crazy-Crew/CrazyAuctions/discussions/categories/feature-requests">Request Feature</a>
|
||||||
·
|
·
|
||||||
<a href="https://discord.gg/crazycrew">Get Support</a>
|
<a href="https://discord.gg/badbones-s-live-chat-182615261403283459">Get Support</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2,14 +2,6 @@ plugins {
|
|||||||
id("crazyauctions.root-plugin")
|
id("crazyauctions.root-plugin")
|
||||||
}
|
}
|
||||||
|
|
||||||
val projectBeta = settings.versions.projectBeta.get().toBoolean()
|
|
||||||
val projectVersion = settings.versions.projectVersion.get()
|
|
||||||
val projectName = settings.versions.projectName.get()
|
|
||||||
|
|
||||||
val finalVersion = if (projectBeta) "$projectVersion+Beta" else projectVersion
|
|
||||||
|
|
||||||
project.version = finalVersion
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
//compileOnly(libs.adventure.api)
|
//compileOnly(libs.adventure.api)
|
||||||
//compileOnly(libs.adventure.text)
|
//compileOnly(libs.adventure.text)
|
||||||
@ -19,9 +11,3 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly(libs.crazycore.api)
|
compileOnly(libs.crazycore.api)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
|
||||||
shadowJar {
|
|
||||||
archiveFileName.set("$projectName+API+$finalVersion.jar")
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,13 +8,6 @@ import ch.jalu.configme.properties.Property;
|
|||||||
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
|
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Date: 3/4/2023
|
|
||||||
* Time: 10:22 PM
|
|
||||||
* Last Edited: 3/4/2023 @ 10:22 PM
|
|
||||||
*
|
|
||||||
* Description: The config.yml options.
|
* Description: The config.yml options.
|
||||||
*/
|
*/
|
||||||
public class ConfigSettings implements SettingsHolder {
|
public class ConfigSettings implements SettingsHolder {
|
||||||
|
@ -4,13 +4,6 @@ import ch.jalu.configme.SettingsHolder;
|
|||||||
import ch.jalu.configme.configurationdata.CommentsConfiguration;
|
import ch.jalu.configme.configurationdata.CommentsConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Date: 3/4/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 3/4/2023 @ 10:23 PM
|
|
||||||
*
|
|
||||||
* Description: The locale file.
|
* Description: The locale file.
|
||||||
*/
|
*/
|
||||||
public class LocaleSettings implements SettingsHolder {
|
public class LocaleSettings implements SettingsHolder {
|
||||||
|
@ -7,13 +7,6 @@ import ch.jalu.configme.properties.Property;
|
|||||||
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
|
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Date: 2/28/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 3/4/2023 @ 10:23 PM
|
|
||||||
*
|
|
||||||
* Description: The plugin-settings.yml options.
|
* Description: The plugin-settings.yml options.
|
||||||
*/
|
*/
|
||||||
public class PluginSettings implements SettingsHolder {
|
public class PluginSettings implements SettingsHolder {
|
||||||
|
@ -4,19 +4,10 @@ import ch.jalu.configme.configurationdata.ConfigurationData;
|
|||||||
import ch.jalu.configme.migration.PlainMigrationService;
|
import ch.jalu.configme.migration.PlainMigrationService;
|
||||||
import ch.jalu.configme.resource.PropertyReader;
|
import ch.jalu.configme.resource.PropertyReader;
|
||||||
import org.simpleyaml.configuration.file.YamlConfiguration;
|
import org.simpleyaml.configuration.file.YamlConfiguration;
|
||||||
import us.crazycrew.crazycore.CrazyCore;
|
|
||||||
import us.crazycrew.crazycore.CrazyLogger;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Date: 3/1/2023
|
|
||||||
* Time: 12:41 PM
|
|
||||||
* Last Edited: 3/1/2023 @ 12:42 PM
|
|
||||||
*
|
|
||||||
* Description: Migrate old values to new values.
|
* Description: Migrate old values to new values.
|
||||||
*/
|
*/
|
||||||
public class PluginMigrationService extends PlainMigrationService {
|
public class PluginMigrationService extends PlainMigrationService {
|
||||||
@ -29,7 +20,9 @@ public class PluginMigrationService extends PlainMigrationService {
|
|||||||
|
|
||||||
private boolean convert(PropertyReader reader, String oldValue, String newFile, boolean cascade) {
|
private boolean convert(PropertyReader reader, String oldValue, String newFile, boolean cascade) {
|
||||||
if (reader.contains(oldValue)) {
|
if (reader.contains(oldValue)) {
|
||||||
Path nFile = CrazyCore.api().getDirectory().resolve(newFile);
|
//Path nFile = CrazyCore.api().getDirectory().resolve(newFile);
|
||||||
|
|
||||||
|
Path nFile = null;
|
||||||
|
|
||||||
YamlConfiguration yamlNewFile = null;
|
YamlConfiguration yamlNewFile = null;
|
||||||
|
|
||||||
@ -39,8 +32,8 @@ public class PluginMigrationService extends PlainMigrationService {
|
|||||||
exception.printStackTrace();
|
exception.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
CrazyLogger.info("Starting the config migration process...");
|
//CrazyLogger.info("Starting the config migration process...");
|
||||||
CrazyLogger.info("Found old config value (" + oldValue + ")");
|
//CrazyLogger.info("Found old config value (" + oldValue + ")");
|
||||||
|
|
||||||
if (!nFile.toFile().exists()) {
|
if (!nFile.toFile().exists()) {
|
||||||
try {
|
try {
|
||||||
@ -66,7 +59,7 @@ public class PluginMigrationService extends PlainMigrationService {
|
|||||||
try {
|
try {
|
||||||
yamlNewFile.save(nFile.toFile());
|
yamlNewFile.save(nFile.toFile());
|
||||||
|
|
||||||
CrazyLogger.info("The migration process is complete!");
|
//CrazyLogger.info("The migration process is complete!");
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
exception.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
package us.crazycrew.crazyauctions.utils;
|
|
||||||
|
|
||||||
import us.crazycrew.crazycore.CrazyLogger;
|
|
||||||
import java.io.BufferedOutputStream;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.JarURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.zip.ZipEntry;
|
|
||||||
import java.util.zip.ZipFile;
|
|
||||||
|
|
||||||
public class FileUtils {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extracts files from inside the .jar into an output
|
|
||||||
* <p>
|
|
||||||
* @param input the directory in the .jar
|
|
||||||
* @param output the output wherever you use this.
|
|
||||||
* @param replace if we should replace or not.
|
|
||||||
*/
|
|
||||||
public static void extract(String input, Path output, boolean replace, boolean verbose) {
|
|
||||||
URL directory = FileUtils.class.getResource(input);
|
|
||||||
|
|
||||||
if (directory == null) if (verbose) CrazyLogger.debug("Could not find " + input + " in the jar.");
|
|
||||||
|
|
||||||
assert directory != null;
|
|
||||||
if (!directory.getProtocol().equals("jar")) if (verbose) CrazyLogger.debug("Failed because the protocol does not equal .jar!");
|
|
||||||
|
|
||||||
ZipFile jar;
|
|
||||||
try {
|
|
||||||
if (verbose) CrazyLogger.debug("Starting to extract files from <#11e092>" + input + " directory in the jar.");
|
|
||||||
|
|
||||||
jar = ((JarURLConnection) directory.openConnection()).getJarFile();
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
String filePath = input.substring(1);
|
|
||||||
Enumeration<? extends ZipEntry> fileEntries = jar.entries();
|
|
||||||
|
|
||||||
while (fileEntries.hasMoreElements()) {
|
|
||||||
ZipEntry entry = fileEntries.nextElement();
|
|
||||||
String entryName = entry.getName();
|
|
||||||
|
|
||||||
if (!entryName.startsWith(filePath)) continue;
|
|
||||||
|
|
||||||
Path outFile = output.resolve(entryName);
|
|
||||||
boolean exists = Files.exists(outFile);
|
|
||||||
|
|
||||||
if (!replace && exists) continue;
|
|
||||||
|
|
||||||
if (entry.isDirectory()) {
|
|
||||||
if (exists) {
|
|
||||||
if (verbose) CrazyLogger.debug("File already exists.");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
Files.createDirectories(outFile);
|
|
||||||
|
|
||||||
if (verbose) CrazyLogger.debug("Directories have been created.");
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
try (InputStream inputStream = jar.getInputStream(entry); OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(outFile.toFile()))) {
|
|
||||||
byte[] buffer = new byte[4096];
|
|
||||||
|
|
||||||
int readCount;
|
|
||||||
|
|
||||||
while ((readCount = inputStream.read(buffer)) > 0) {
|
|
||||||
outputStream.write(buffer, 0, readCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
outputStream.flush();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +1,6 @@
|
|||||||
package us.crazycrew.crazyauctions.utils.misc;
|
package us.crazycrew.crazyauctions.utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Number utilities.
|
* Description: Number utilities.
|
||||||
*/
|
*/
|
||||||
public class NumberUtils {
|
public class NumberUtils {
|
@ -1,20 +0,0 @@
|
|||||||
plugins {
|
|
||||||
`kotlin-dsl`
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation(tools.jetbrains)
|
|
||||||
implementation(tools.license)
|
|
||||||
implementation(tools.shadowJar)
|
|
||||||
|
|
||||||
// For the webhook tasks, this applies to the build-logic only
|
|
||||||
implementation(tools.ktor.gson)
|
|
||||||
implementation(tools.ktor.core)
|
|
||||||
implementation(tools.ktor.cio)
|
|
||||||
implementation(tools.ktor.cn)
|
|
||||||
implementation(tools.kotlinx)
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
@file:Suppress("UnstableApiUsage")
|
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
|
||||||
versionCatalogs {
|
|
||||||
create("tools") {
|
|
||||||
from(files("../gradle/tools.versions.toml"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories.gradlePluginPortal()
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id("crazyauctions.root-plugin")
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
exclusiveContent {
|
|
||||||
forRepository {
|
|
||||||
maven("https://repo.papermc.io/repository/maven-public/")
|
|
||||||
}
|
|
||||||
|
|
||||||
filter {
|
|
||||||
includeGroup("io.papermc.paper")
|
|
||||||
includeGroup("com.mojang")
|
|
||||||
includeGroup("net.md-5")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(project.properties["java_version"].toString()))
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks {
|
|
||||||
compileJava {
|
|
||||||
options.release.set(project.properties["java_version"].toString().toInt())
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +1,4 @@
|
|||||||
|
import com.lordcodes.turtle.shellRun
|
||||||
import task.WebhookExtension
|
import task.WebhookExtension
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
|
|
||||||
@ -5,26 +6,30 @@ plugins {
|
|||||||
id("crazyauctions.root-plugin")
|
id("crazyauctions.root-plugin")
|
||||||
}
|
}
|
||||||
|
|
||||||
val legacyUpdate = Color(255, 73, 110)
|
|
||||||
val releaseUpdate = Color(27, 217, 106)
|
val releaseUpdate = Color(27, 217, 106)
|
||||||
val betaUpdate = Color(255, 163, 71)
|
val betaUpdate = Color(255, 163, 71)
|
||||||
|
val changeLogs = Color(37, 137, 204)
|
||||||
|
|
||||||
val isBeta = settings.versions.projectBeta.get().toBoolean()
|
val beta = settings.versions.beta.get().toBoolean()
|
||||||
val projectVersion = settings.versions.projectVersion.get()
|
val extension = settings.versions.extension.get()
|
||||||
val projectName = settings.versions.projectName.get()
|
|
||||||
val projectExt = settings.versions.projectExtension.get()
|
|
||||||
|
|
||||||
val finalVersion = if (isBeta) "$projectVersion+beta" else projectVersion
|
val color = if (beta) betaUpdate else releaseUpdate
|
||||||
|
val repo = if (beta) "beta" else "releases"
|
||||||
|
|
||||||
val color = if (isBeta) betaUpdate else releaseUpdate
|
val url = if (beta) "https://ci.crazycrew.us/job/${rootProject.name}/" else "https://modrinth.com/$extension/${rootProject.name.lowercase()}/versions"
|
||||||
val repo = if (isBeta) "beta" else "releases"
|
val download = if (beta) "https://ci.crazycrew.us/job/${rootProject.name}/" else "https://modrinth.com/$extension/${rootProject.name.lowercase()}/version/${rootProject.version}"
|
||||||
|
val msg = if (beta) "New version of ${rootProject.name} is ready!" else "New version of ${rootProject.name} is ready! <@&929463441159254066>"
|
||||||
|
|
||||||
|
val hash = shellRun("git", listOf("rev-parse", "--short", "HEAD"))
|
||||||
|
|
||||||
|
rootProject.version = if (beta) hash else "1.11.14.3"
|
||||||
|
|
||||||
webhook {
|
webhook {
|
||||||
this.avatar("https://en.gravatar.com/avatar/${WebhookExtension.Gravatar().md5Hex("no-reply@ryderbelserion.com")}.jpeg")
|
this.avatar("https://en.gravatar.com/avatar/${WebhookExtension.Gravatar().md5Hex("no-reply@ryderbelserion.com")}.jpeg")
|
||||||
|
|
||||||
this.username("Ryder Belserion")
|
this.username("Ryder Belserion")
|
||||||
|
|
||||||
this.content("New version of $projectName is ready! <@&929463441159254066>")
|
this.content(msg)
|
||||||
|
|
||||||
this.embeds {
|
this.embeds {
|
||||||
this.embed {
|
this.embed {
|
||||||
@ -32,21 +37,32 @@ webhook {
|
|||||||
|
|
||||||
this.fields {
|
this.fields {
|
||||||
this.field(
|
this.field(
|
||||||
"Version $finalVersion",
|
"Download: ",
|
||||||
"Download Link: https://modrinth.com/$projectExt/${projectName.lowercase()}/version/$finalVersion"
|
url
|
||||||
)
|
)
|
||||||
|
|
||||||
this.field(
|
this.field(
|
||||||
"API Update",
|
"API: ",
|
||||||
"Version $finalVersion has been pushed to https://repo.crazycrew.us/#/$repo"
|
"https://repo.crazycrew.us/#/$repo/${rootProject.group.toString().replace(".", "/")}/${rootProject.name.lowercase()}-api/${rootProject.version}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.author(
|
this.author(
|
||||||
projectName,
|
"${rootProject.name} | Version ${rootProject.version}",
|
||||||
"https://modrinth.com/$projectExt/${projectName.lowercase()}/versions",
|
url,
|
||||||
"https://cdn-raw.modrinth.com/data/r3BBZyf3/4522ef0f83143c4803473d356160a3e877c2499c.png"
|
"https://git.crazycrew.us/ryderbelserion/assets/raw/branch/main/crazycrew/png/${rootProject.name}Website.png"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.embed {
|
||||||
|
this.color(changeLogs)
|
||||||
|
|
||||||
|
this.title("What changed?")
|
||||||
|
|
||||||
|
this.description("""
|
||||||
|
Changes:
|
||||||
|
» N/A
|
||||||
|
""".trimIndent())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
23
buildSrc/build.gradle.kts
Normal file
23
buildSrc/build.gradle.kts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.kotlin)
|
||||||
|
implementation(libs.shadow)
|
||||||
|
|
||||||
|
implementation(libs.paperweight)
|
||||||
|
|
||||||
|
implementation(libs.ktor.core)
|
||||||
|
implementation(libs.ktor.cio)
|
||||||
|
implementation(libs.ktor.content)
|
||||||
|
implementation(libs.ktor.gson)
|
||||||
|
|
||||||
|
implementation(libs.kotlin.coroutines)
|
||||||
|
|
||||||
|
implementation(libs.turtle)
|
||||||
|
}
|
9
buildSrc/settings.gradle.kts
Normal file
9
buildSrc/settings.gradle.kts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
dependencyResolutionManagement {
|
||||||
|
versionCatalogs {
|
||||||
|
create("libs") {
|
||||||
|
from(files("../gradle/libs.versions.toml"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories.gradlePluginPortal()
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
plugins {
|
||||||
|
id("crazyauctions.root-plugin")
|
||||||
|
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
assemble {
|
||||||
|
dependsOn(reobfJar)
|
||||||
|
}
|
||||||
|
|
||||||
|
reobfJar {
|
||||||
|
val file = File("$rootDir/jars")
|
||||||
|
|
||||||
|
if (!file.exists()) file.mkdirs()
|
||||||
|
|
||||||
|
outputJar.set(layout.buildDirectory.file("$file/${rootProject.name}-Paper-${rootProject.version}.jar"))
|
||||||
|
}
|
||||||
|
}
|
@ -3,37 +3,25 @@ import task.WebhookExtension
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
|
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
|
|
||||||
id("com.github.hierynomus.license")
|
|
||||||
|
|
||||||
id("com.github.johnrengelman.shadow")
|
id("com.github.johnrengelman.shadow")
|
||||||
}
|
}
|
||||||
|
|
||||||
license {
|
|
||||||
header = rootProject.file("LICENSE")
|
|
||||||
encoding = "UTF-8"
|
|
||||||
|
|
||||||
mapping("java", "JAVADOC_STYLE")
|
|
||||||
|
|
||||||
include("**/*.java")
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://repo.triumphteam.dev/snapshots/")
|
maven("https://repo.triumphteam.dev/snapshots/")
|
||||||
|
|
||||||
maven("https://repo.crazycrew.us/libraries/")
|
maven("https://repo.crazycrew.us/api/")
|
||||||
|
|
||||||
maven("https://repo.crazycrew.us/plugins/")
|
|
||||||
|
|
||||||
maven("https://libraries.minecraft.net/")
|
|
||||||
|
|
||||||
maven("https://jitpack.io/")
|
maven("https://jitpack.io/")
|
||||||
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
toolchain.languageVersion.set(JavaLanguageVersion.of("17"))
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
// Creating the extension to be available on the root gradle
|
// Creating the extension to be available on the root gradle
|
||||||
val webhookExtension = extensions.create("webhook", WebhookExtension::class)
|
val webhookExtension = extensions.create("webhook", WebhookExtension::class)
|
||||||
@ -42,4 +30,17 @@ tasks {
|
|||||||
register<ReleaseWebhook>("webhook") {
|
register<ReleaseWebhook>("webhook") {
|
||||||
extension = webhookExtension
|
extension = webhookExtension
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileJava {
|
||||||
|
options.encoding = Charsets.UTF_8.name()
|
||||||
|
options.release.set(17)
|
||||||
|
}
|
||||||
|
|
||||||
|
javadoc {
|
||||||
|
options.encoding = Charsets.UTF_8.name()
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
filteringCharset = Charsets.UTF_8.name()
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package task
|
package task
|
||||||
|
|
||||||
import io.ktor.client.HttpClient
|
import io.ktor.client.HttpClient
|
||||||
|
import io.ktor.client.call.body
|
||||||
import io.ktor.client.engine.cio.CIO
|
import io.ktor.client.engine.cio.CIO
|
||||||
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
|
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
|
||||||
import io.ktor.client.request.headers
|
import io.ktor.client.request.headers
|
@ -17,15 +17,15 @@ abstract class WebhookExtension {
|
|||||||
private val embeds: MutableList<Embed> = mutableListOf()
|
private val embeds: MutableList<Embed> = mutableListOf()
|
||||||
|
|
||||||
fun content(content: String) {
|
fun content(content: String) {
|
||||||
this.content = content;
|
this.content = content
|
||||||
}
|
}
|
||||||
|
|
||||||
fun username(username: String) {
|
fun username(username: String) {
|
||||||
this.username = username;
|
this.username = username
|
||||||
}
|
}
|
||||||
|
|
||||||
fun avatar(avatar: String) {
|
fun avatar(avatar: String) {
|
||||||
this.avatar = avatar;
|
this.avatar = avatar
|
||||||
}
|
}
|
||||||
|
|
||||||
fun embeds(builder: EmbedsBuilder.() -> Unit) {
|
fun embeds(builder: EmbedsBuilder.() -> Unit) {
|
||||||
@ -43,7 +43,6 @@ abstract class WebhookExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Gravatar {
|
class Gravatar {
|
||||||
|
|
||||||
private fun hexCode(array: ByteArray): String {
|
private fun hexCode(array: ByteArray): String {
|
||||||
val sb = StringBuffer()
|
val sb = StringBuffer()
|
||||||
for (i in array.indices) {
|
for (i in array.indices) {
|
@ -1,5 +1,7 @@
|
|||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.parallel=false
|
org.gradle.parallel=false
|
||||||
org.gradle.warning.mode = all
|
org.gradle.warning.mode = all
|
||||||
|
|
||||||
java_version = 17
|
name = CrazyAuctions
|
||||||
|
group = us.crazycrew.crazyauctions
|
||||||
|
description = Auction off your items in style.
|
@ -1,19 +1,23 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
# Minecraft
|
# Minecraft
|
||||||
paper = "1.19.3-R0.1-SNAPSHOT"
|
paper = "1.19.4-R0.1-SNAPSHOT"
|
||||||
|
|
||||||
# Adventure
|
|
||||||
adventure = "4.12.0"
|
|
||||||
|
|
||||||
# CrazyCore
|
# CrazyCore
|
||||||
crazycore = "1.1.0.0"
|
crazycore = "618b89a"
|
||||||
|
|
||||||
|
# Adventure
|
||||||
|
adventure = "4.13.0"
|
||||||
|
|
||||||
|
ktor = "2.2.4"
|
||||||
|
kotlin = "1.8.20-RC"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|
||||||
# Minecraft
|
# Minecraft
|
||||||
paper = { module = "io.papermc.paper:paper-api", version.ref = "paper" }
|
papermc = { module = "io.papermc.paper:paper-api", version.ref = "paper" }
|
||||||
spigot = { module = "org.spigotmc:spigot-api", version.ref = "paper" }
|
paperlib = { module = "io.papermc:paperlib", version = "1.0.8-SNAPSHOT" }
|
||||||
|
paperweight = { module = "io.papermc.paperweight:paperweight-userdev", version = "1.5.3" }
|
||||||
|
|
||||||
# Adventure
|
# Adventure
|
||||||
adventure_api = { module = "net.kyori:adventure-api", version.ref = "adventure" }
|
adventure_api = { module = "net.kyori:adventure-api", version.ref = "adventure" }
|
||||||
@ -36,11 +40,25 @@ bstats_bukkit = { module = "org.bstats:bstats-bukkit", version = "3.0.0" }
|
|||||||
vault_api = { module = "com.github.MilkBowl:VaultAPI", version = "1.7" }
|
vault_api = { module = "com.github.MilkBowl:VaultAPI", version = "1.7" }
|
||||||
|
|
||||||
# Holograms
|
# Holograms
|
||||||
holographic_displays = { module = "me.filoghost.holographicdisplays:holographicdisplays-api", version = "3.0.0" }
|
holographic_displays = { module = "me.filoghost.holographicdisplays:holographicdisplays-api", version = "3.0.1" }
|
||||||
decent_holograms = { module = "com.github.decentsoftware-eu:decentholograms", version = "2.7.8" }
|
decent_holograms = { module = "com.github.decentsoftware-eu:decentholograms", version = "2.8.1" }
|
||||||
|
|
||||||
cmi_api = { module = "com.Zrips.CMI:CMI-API", version = "9.2.6.1" }
|
cmi_api = { module = "com.Zrips.CMI:CMI-API", version = "9.3.1.5" }
|
||||||
cmi_lib = { module = "net.Zrips.CMILib:CMI-Lib", version = "1.2.4.1" }
|
cmi_lib = { module = "net.zrips.CMILib:cmi-lib-api", version = "1.2.5.3" }
|
||||||
|
|
||||||
# Placeholders
|
# Placeholders
|
||||||
placeholder_api = { module = "me.clip:placeholderapi", version = "2.11.2" }
|
placeholder_api = { module = "me.clip:placeholderapi", version = "2.11.2" }
|
||||||
|
|
||||||
|
# Kotlin
|
||||||
|
ktor-core = { module = "io.ktor:ktor-client-core-jvm", version.ref = "ktor" }
|
||||||
|
ktor-cio = { module = "io.ktor:ktor-client-cio-jvm", version.ref = "ktor" }
|
||||||
|
ktor-content = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
|
||||||
|
ktor-gson = { module = "io.ktor:ktor-serialization-gson", version.ref = "ktor" }
|
||||||
|
|
||||||
|
kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||||
|
kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin"}
|
||||||
|
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.6.4" }
|
||||||
|
|
||||||
|
shadow = { module = "com.github.johnrengelman:shadow", version = "8.1.0" }
|
||||||
|
|
||||||
|
turtle = { module = "com.lordcodes.turtle:turtle", version = "0.8.0" }
|
@ -1,15 +1,10 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
# Project Settings
|
github = "https://github.com/Crazy-Crew/CrazyAuctions"
|
||||||
projectVersion = "0.0.0.0"
|
beta = "true"
|
||||||
|
extension = "plugin"
|
||||||
projectGroup = "us.crazycrew.crazyauctions"
|
|
||||||
projectName = "CrazyAuctions"
|
|
||||||
projectDescription = "Auction off your items in style!"
|
|
||||||
projectGithub = "https://github.com/Crazy-Crew/CrazyAuctions"
|
|
||||||
projectBeta = "true"
|
|
||||||
projectExtension = "plugin"
|
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
|
|
||||||
minotaur = { id = "com.modrinth.minotaur", version = "2.7.2" }
|
minotaur = { id = "com.modrinth.minotaur", version = "2.7.2" }
|
||||||
|
run-paper = { id = "xyz.jpenilla.run-paper", version = "2.0.1" }
|
@ -1,20 +0,0 @@
|
|||||||
[versions]
|
|
||||||
|
|
||||||
# Gradle
|
|
||||||
shadow = "7.1.2"
|
|
||||||
ktor = "2.2.3"
|
|
||||||
kotlin = "1.7.21"
|
|
||||||
license = "0.16.1"
|
|
||||||
coroutines = "1.6.4"
|
|
||||||
|
|
||||||
[libraries]
|
|
||||||
jetbrains = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
|
||||||
license = { module = "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin", version.ref = "license" }
|
|
||||||
shadowJar = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "shadow" }
|
|
||||||
|
|
||||||
ktor-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
|
|
||||||
ktor-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
|
|
||||||
ktor-cn = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
|
|
||||||
ktor-gson = { module = "io.ktor:ktor-serialization-gson", version.ref = "ktor"}
|
|
||||||
|
|
||||||
kotlinx = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines"}
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
244
gradlew
vendored
Normal file
244
gradlew
vendored
Normal file
@ -0,0 +1,244 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "$( uname )" in #(
|
||||||
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
|
Darwin* ) darwin=true ;; #(
|
||||||
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
|
NONSTOP* ) nonstop=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
|
case $MAX_FD in #(
|
||||||
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
|
warn "Could not query maximum file descriptor limit"
|
||||||
|
esac
|
||||||
|
case $MAX_FD in #(
|
||||||
|
'' | soft) :;; #(
|
||||||
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
|
# * args from the command line
|
||||||
|
# * the main class name
|
||||||
|
# * -classpath
|
||||||
|
# * -D...appname settings
|
||||||
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command;
|
||||||
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
# double quotes to make sure that they get re-expanded; and
|
||||||
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
92
gradlew.bat
vendored
Normal file
92
gradlew.bat
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
@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=.
|
||||||
|
@rem This is normally unused
|
||||||
|
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% equ 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% equ 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!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
BIN
jars/CrazyAuctions-Paper-ef7c6f0.jar
Normal file
BIN
jars/CrazyAuctions-Paper-ef7c6f0.jar
Normal file
Binary file not shown.
@ -4,6 +4,7 @@ plugins {
|
|||||||
id("crazyauctions.paper-plugin")
|
id("crazyauctions.paper-plugin")
|
||||||
|
|
||||||
alias(settings.plugins.minotaur)
|
alias(settings.plugins.minotaur)
|
||||||
|
alias(settings.plugins.run.paper)
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -16,8 +17,6 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api(project(":crazyauctions-api"))
|
api(project(":crazyauctions-api"))
|
||||||
|
|
||||||
compileOnly(libs.paper)
|
|
||||||
|
|
||||||
compileOnly(libs.crazycore.paper)
|
compileOnly(libs.crazycore.paper)
|
||||||
|
|
||||||
compileOnly(libs.triumph.gui)
|
compileOnly(libs.triumph.gui)
|
||||||
@ -30,35 +29,32 @@ dependencies {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val projectDescription = settings.versions.projectDescription.get()
|
val github = settings.versions.github.get()
|
||||||
val projectGithub = settings.versions.projectGithub.get()
|
val extension = settings.versions.extension.get()
|
||||||
val projectGroup = settings.versions.projectGroup.get()
|
|
||||||
val projectName = settings.versions.projectName.get()
|
|
||||||
val projectExt = settings.versions.projectExtension.get()
|
|
||||||
|
|
||||||
val isBeta = settings.versions.projectBeta.get().toBoolean()
|
val beta = settings.versions.beta.get().toBoolean()
|
||||||
|
|
||||||
val projectVersion = settings.versions.projectVersion.get()
|
val type = if (beta) "beta" else "release"
|
||||||
|
|
||||||
val finalVersion = if (isBeta) "$projectVersion+Beta" else projectVersion
|
|
||||||
|
|
||||||
val type = if (isBeta) "beta" else "release"
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveFileName.set("${projectName}+Paper+$finalVersion.jar")
|
fun reloc(pkg: String) = relocate(pkg, "${rootProject.group}.dependency.$pkg")
|
||||||
|
|
||||||
listOf(
|
reloc("de.tr7zw.changeme.nbtapi")
|
||||||
"org.bstats"
|
reloc("org.bstats")
|
||||||
).forEach { relocate(it, "$projectGroup.library.$it") }
|
reloc("dev.triumphteam.cmd")
|
||||||
|
}
|
||||||
|
|
||||||
|
runServer {
|
||||||
|
minecraftVersion("1.19.4")
|
||||||
}
|
}
|
||||||
|
|
||||||
modrinth {
|
modrinth {
|
||||||
token.set(System.getenv("MODRINTH_TOKEN"))
|
token.set(System.getenv("MODRINTH_TOKEN"))
|
||||||
projectId.set(projectName.lowercase())
|
projectId.set(rootProject.name.lowercase())
|
||||||
|
|
||||||
versionName.set("$projectName $finalVersion")
|
versionName.set("${rootProject.name} ${rootProject.version}")
|
||||||
versionNumber.set(finalVersion)
|
versionNumber.set(rootProject.version.toString())
|
||||||
|
|
||||||
versionType.set(type)
|
versionType.set(type)
|
||||||
|
|
||||||
@ -66,17 +62,26 @@ tasks {
|
|||||||
|
|
||||||
autoAddDependsOn.set(true)
|
autoAddDependsOn.set(true)
|
||||||
|
|
||||||
gameVersions.addAll(listOf("1.19, 1.19.1, 1.19.2, 1.19.3"))
|
gameVersions.addAll(
|
||||||
|
listOf(
|
||||||
|
"1.19",
|
||||||
|
"1.19.1",
|
||||||
|
"1.19.2",
|
||||||
|
"1.19.3",
|
||||||
|
"1.19.4"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
loaders.addAll(listOf("paper", "purpur"))
|
loaders.addAll(listOf("paper", "purpur"))
|
||||||
|
|
||||||
//<h3>The first release for CrazyAuctions on Modrinth! 🎉🎉🎉🎉🎉<h3><br> If we want a header.
|
//<h3>The first release for CrazyCrates on Modrinth! 🎉🎉🎉🎉🎉<h3><br> If we want a header.
|
||||||
changelog.set(
|
changelog.set(
|
||||||
"""
|
"""
|
||||||
<h4>Changes:</h4>
|
<h4>Changes:</h4>
|
||||||
<p>N/A</p>
|
<p>Added 1.19.4 support</p>
|
||||||
|
<p>Removed 1.18.2 and below support</p>
|
||||||
<h4>Under the hood changes</h4>
|
<h4>Under the hood changes</h4>
|
||||||
<p>N/A</p>
|
<p>Simplified build script</p>
|
||||||
<h4>Bug Fixes:</h4>
|
<h4>Bug Fixes:</h4>
|
||||||
<p>N/A</p>
|
<p>N/A</p>
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
@ -84,12 +89,13 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
filesMatching("paper-plugin.yml") {
|
filesMatching("plugin.yml") {
|
||||||
expand(
|
expand(
|
||||||
"name" to projectName,
|
"name" to rootProject.name,
|
||||||
"group" to projectGroup,
|
"group" to rootProject.group,
|
||||||
"version" to finalVersion,
|
"version" to rootProject.version,
|
||||||
"description" to projectDescription
|
"description" to rootProject.description,
|
||||||
|
"website" to "https://modrinth.com/$extension/${rootProject.name.lowercase()}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,24 +103,18 @@ tasks {
|
|||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
val repo = if (isBeta) "beta" else "releases"
|
val repo = if (beta) "beta" else "releases"
|
||||||
maven("https://repo.crazycrew.us/$repo") {
|
maven("https://repo.crazycrew.us/$repo") {
|
||||||
name = "crazycrew"
|
name = "crazycrew"
|
||||||
// Used for locally publishing.
|
credentials(PasswordCredentials::class)
|
||||||
// credentials(PasswordCredentials::class)
|
|
||||||
|
|
||||||
credentials {
|
|
||||||
username = System.getenv("REPOSITORY_USERNAME")
|
|
||||||
password = System.getenv("REPOSITORY_PASSWORD")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publications {
|
publications {
|
||||||
create<MavenPublication>("maven") {
|
create<MavenPublication>("maven") {
|
||||||
groupId = projectGroup
|
groupId = rootProject.group.toString()
|
||||||
artifactId = "${projectName.lowercase()}-${projectDir.name}"
|
artifactId = "${rootProject.name.lowercase()}-api"
|
||||||
version = finalVersion
|
version = rootProject.version.toString()
|
||||||
|
|
||||||
from(components["java"])
|
from(components["java"])
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,12 @@
|
|||||||
package us.crazycrew.crazyauctions;
|
package us.crazycrew.crazyauctions;
|
||||||
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import us.crazycrew.crazyauctions.storage.StorageManager;
|
import us.crazycrew.crazyauctions.storage.StorageManager;
|
||||||
import us.crazycrew.crazycore.CrazyLogger;
|
|
||||||
import us.crazycrew.crazycore.paper.PaperCore;
|
import us.crazycrew.crazycore.paper.PaperCore;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/28/2023
|
|
||||||
* Time: 1:25 AM
|
|
||||||
* Last Edited: 2/28/2023 @ 3:13 AM
|
|
||||||
*
|
|
||||||
* Description: The java plugin instance of our plugin where we handle post world startup tasks.
|
* Description: The java plugin instance of our plugin where we handle post world startup tasks.
|
||||||
*/
|
*/
|
||||||
public class CrazyAuctions extends JavaPlugin {
|
public class CrazyAuctions extends JavaPlugin {
|
||||||
@ -36,18 +26,11 @@ public class CrazyAuctions extends JavaPlugin {
|
|||||||
|
|
||||||
this.users = new File(paperCore.getDirectory() + "/userdata");
|
this.users = new File(paperCore.getDirectory() + "/userdata");
|
||||||
|
|
||||||
if (users.mkdir()) CrazyLogger.info("Created the folder " + users.getName() + ".");
|
if (users.mkdir()) getLogger().info("Created the folder " + users.getName() + ".");
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @NotNull Logger getLogger() {
|
|
||||||
return CrazyLogger.getLogger();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
// Enable the player registry.
|
|
||||||
getCrazyCore().createPlayerRegistry(this);
|
|
||||||
|
|
||||||
this.storageManager = new StorageManager();
|
this.storageManager = new StorageManager();
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
package us.crazycrew.crazyauctions.api.economy;
|
package us.crazycrew.crazyauctions.api.economy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when an item is added to an auction house.
|
* Description: This event is fired when an item is added to an auction house.
|
||||||
*/
|
*/
|
||||||
public enum Currency {
|
public enum Currency {
|
||||||
|
@ -6,13 +6,6 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Defines what currency to use.
|
* Description: Defines what currency to use.
|
||||||
*/
|
*/
|
||||||
public class CurrencyAPI {
|
public class CurrencyAPI {
|
||||||
|
@ -5,13 +5,6 @@ import net.milkbowl.vault.economy.Economy;
|
|||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Vault support related code.
|
* Description: Vault support related code.
|
||||||
*/
|
*/
|
||||||
public class VaultSupport {
|
public class VaultSupport {
|
||||||
|
@ -8,13 +8,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Handles all our plugin support.
|
* Description: Handles all our plugin support.
|
||||||
*/
|
*/
|
||||||
public class PluginSupport {
|
public class PluginSupport {
|
||||||
|
@ -11,13 +11,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when an item is added to an auction house.
|
* Description: This event is fired when an item is added to an auction house.
|
||||||
*/
|
*/
|
||||||
public class AuctionAddEvent extends Event {
|
public class AuctionAddEvent extends Event {
|
||||||
|
@ -9,13 +9,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when a player bids on an auction.
|
* Description: This event is fired when a player bids on an auction.
|
||||||
*/
|
*/
|
||||||
public class AuctionBidEvent extends Event {
|
public class AuctionBidEvent extends Event {
|
||||||
|
@ -10,13 +10,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when a player buys an item.
|
* Description: This event is fired when a player buys an item.
|
||||||
*/
|
*/
|
||||||
public class AuctionBuyEvent extends Event {
|
public class AuctionBuyEvent extends Event {
|
||||||
|
@ -10,13 +10,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when an auction is cancelled.
|
* Description: This event is fired when an auction is cancelled.
|
||||||
*/
|
*/
|
||||||
public class AuctionCancelEvent extends Event {
|
public class AuctionCancelEvent extends Event {
|
||||||
|
@ -9,13 +9,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when an auction expires.
|
* Description: This event is fired when an auction expires.
|
||||||
*/
|
*/
|
||||||
public class AuctionExpireEvent extends Event {
|
public class AuctionExpireEvent extends Event {
|
||||||
|
@ -10,13 +10,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when a player lists an item.
|
* Description: This event is fired when a player lists an item.
|
||||||
*/
|
*/
|
||||||
public class AuctionListEvent extends Event {
|
public class AuctionListEvent extends Event {
|
||||||
|
@ -10,13 +10,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: This event is fired when an auction has a winner.
|
* Description: This event is fired when an auction has a winner.
|
||||||
*/
|
*/
|
||||||
public class AuctionWinEvent extends Event {
|
public class AuctionWinEvent extends Event {
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
package us.crazycrew.crazyauctions.api.manager.enums;
|
package us.crazycrew.crazyauctions.api.manager.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Defines the auction type to use
|
* Description: Defines the auction type to use
|
||||||
*/
|
*/
|
||||||
public enum AuctionType {
|
public enum AuctionType {
|
||||||
|
@ -5,13 +5,6 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/19/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Defines the auction type to use
|
* Description: Defines the auction type to use
|
||||||
*/
|
*/
|
||||||
public interface AuctionItem {
|
public interface AuctionItem {
|
||||||
|
@ -5,13 +5,6 @@ import org.bukkit.configuration.file.FileConfiguration;
|
|||||||
import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/19/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Creates the auction buttons
|
* Description: Creates the auction buttons
|
||||||
*/
|
*/
|
||||||
public class AuctionButtons {
|
public class AuctionButtons {
|
||||||
|
@ -5,13 +5,6 @@ import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/19/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Creates the auction categories
|
* Description: Creates the auction categories
|
||||||
*/
|
*/
|
||||||
public class AuctionCategory {
|
public class AuctionCategory {
|
||||||
|
@ -15,13 +15,6 @@ import java.util.UUID;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/19/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Creates the main auction house menu
|
* Description: Creates the main auction house menu
|
||||||
*/
|
*/
|
||||||
public class AuctionHouse {
|
public class AuctionHouse {
|
||||||
|
@ -3,13 +3,6 @@ package us.crazycrew.crazyauctions.api.manager.objects;
|
|||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/19/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Creates the auction house inventory settings
|
* Description: Creates the auction house inventory settings
|
||||||
*/
|
*/
|
||||||
public class InventorySettings {
|
public class InventorySettings {
|
||||||
|
@ -6,13 +6,6 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/19/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Creates the bidding auction type
|
* Description: Creates the bidding auction type
|
||||||
*/
|
*/
|
||||||
public class BiddingAuction implements AuctionItem {
|
public class BiddingAuction implements AuctionItem {
|
||||||
|
@ -7,13 +7,6 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/19/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Creates the selling auction type
|
* Description: Creates the selling auction type
|
||||||
*/
|
*/
|
||||||
public class SellingAuction implements AuctionItem {
|
public class SellingAuction implements AuctionItem {
|
||||||
|
@ -10,13 +10,6 @@ import java.util.EnumSet;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Date: 3/4/2023
|
|
||||||
* Time: 10:22 PM
|
|
||||||
* Last Edited: 3/4/2023 @ 10:22 PM
|
|
||||||
*
|
|
||||||
* Description: The permissions
|
* Description: The permissions
|
||||||
*/
|
*/
|
||||||
public enum Permissions implements Universal {
|
public enum Permissions implements Universal {
|
||||||
|
@ -9,13 +9,6 @@ import org.eclipse.aether.repository.RemoteRepository;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/28/2023
|
|
||||||
* Time: 1:25 AM
|
|
||||||
* Last Edited: 2/28/2023 @ 3:13 AM
|
|
||||||
*
|
|
||||||
* Description: The class path resolver where we download dependencies at run-time
|
* Description: The class path resolver where we download dependencies at run-time
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("UnstableApiUsage")
|
@SuppressWarnings("UnstableApiUsage")
|
||||||
@ -25,16 +18,17 @@ public class AuctionsLoader implements PluginLoader {
|
|||||||
public void classloader(@NotNull PluginClasspathBuilder classpathBuilder) {
|
public void classloader(@NotNull PluginClasspathBuilder classpathBuilder) {
|
||||||
MavenLibraryResolver resolver = new MavenLibraryResolver();
|
MavenLibraryResolver resolver = new MavenLibraryResolver();
|
||||||
|
|
||||||
resolver.addDependency(new Dependency(new DefaultArtifact("us.crazycrew.crazycore:crazycore-paper:1.1.0.0"), null));
|
resolver.addDependency(new Dependency(new DefaultArtifact("us.crazycrew.crazycore:crazycore-paper:618b89a"), null));
|
||||||
|
|
||||||
// Configs
|
// Configs
|
||||||
resolver.addDependency(new Dependency(new DefaultArtifact("ch.jalu:configme:1.3.0"), null));
|
resolver.addDependency(new Dependency(new DefaultArtifact("ch.jalu:configme:1.3.0"), null));
|
||||||
resolver.addDependency(new Dependency(new DefaultArtifact("me.carleslc.Simple-YAML:Simple-Yaml:1.8.3"), null));
|
resolver.addDependency(new Dependency(new DefaultArtifact("me.carleslc.Simple-YAML:Simple-Yaml:1.8.3"), null));
|
||||||
|
|
||||||
// TriumphTeam
|
// TriumphTeam.
|
||||||
resolver.addDependency(new Dependency(new DefaultArtifact("dev.triumphteam:triumph-gui:3.1.2"), null));
|
resolver.addDependency(new Dependency(new DefaultArtifact("dev.triumphteam:triumph-gui:3.1.2"), null));
|
||||||
resolver.addDependency(new Dependency(new DefaultArtifact("dev.triumphteam:triumph-cmd-bukkit:2.0.0-SNAPSHOT"), null));
|
resolver.addDependency(new Dependency(new DefaultArtifact("dev.triumphteam:triumph-cmd-bukkit:2.0.0-SNAPSHOT"), null));
|
||||||
|
|
||||||
|
// Repositories
|
||||||
resolver.addRepository(new RemoteRepository.Builder("maven2", "default", "https://repo1.maven.org/maven2").build());
|
resolver.addRepository(new RemoteRepository.Builder("maven2", "default", "https://repo1.maven.org/maven2").build());
|
||||||
resolver.addRepository(new RemoteRepository.Builder("crazycrew-libraries", "default", "https://repo.crazycrew.us/libraries").build());
|
resolver.addRepository(new RemoteRepository.Builder("crazycrew-libraries", "default", "https://repo.crazycrew.us/libraries").build());
|
||||||
resolver.addRepository(new RemoteRepository.Builder("triumphteam-snapshots", "default", "https://repo.triumphteam.dev/snapshots/").build());
|
resolver.addRepository(new RemoteRepository.Builder("triumphteam-snapshots", "default", "https://repo.triumphteam.dev/snapshots/").build());
|
||||||
|
@ -11,22 +11,12 @@ import us.crazycrew.crazyauctions.configurations.ConfigSettings;
|
|||||||
import us.crazycrew.crazyauctions.configurations.LocaleSettings;
|
import us.crazycrew.crazyauctions.configurations.LocaleSettings;
|
||||||
import us.crazycrew.crazyauctions.configurations.PluginSettings;
|
import us.crazycrew.crazyauctions.configurations.PluginSettings;
|
||||||
import us.crazycrew.crazyauctions.configurations.migrations.PluginMigrationService;
|
import us.crazycrew.crazyauctions.configurations.migrations.PluginMigrationService;
|
||||||
import us.crazycrew.crazyauctions.utils.FileUtils;
|
|
||||||
import us.crazycrew.crazycore.CrazyLogger;
|
|
||||||
import us.crazycrew.crazycore.paper.PaperConsole;
|
|
||||||
import us.crazycrew.crazycore.paper.PaperCore;
|
import us.crazycrew.crazycore.paper.PaperCore;
|
||||||
import us.crazycrew.crazycore.paper.player.PaperPlayerRegistry;
|
import us.crazycrew.crazycore.utils.FileUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.logging.LogManager;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/28/2023
|
|
||||||
* Time: 1:25 AM
|
|
||||||
* Last Edited: 3/4/2023 @ 10:23 PM
|
|
||||||
*
|
|
||||||
* Description: The starter class that thanks to paper is run directly at server startup and allows us to pass variables through the plugin class.
|
* Description: The starter class that thanks to paper is run directly at server startup and allows us to pass variables through the plugin class.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("UnstableApiUsage")
|
@SuppressWarnings("UnstableApiUsage")
|
||||||
@ -40,7 +30,7 @@ public class AuctionsStarter implements PluginBootstrap {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void bootstrap(@NotNull PluginProviderContext context) {
|
public void bootstrap(@NotNull PluginProviderContext context) {
|
||||||
this.paperCore = new PaperCore(context.getConfiguration().getName(), context.getDataDirectory());
|
this.paperCore = new PaperCore(context.getDataDirectory());
|
||||||
|
|
||||||
pluginConfig = SettingsManagerBuilder
|
pluginConfig = SettingsManagerBuilder
|
||||||
.withYamlFile(new File(context.getDataDirectory().toFile(), "plugin-settings.yml"))
|
.withYamlFile(new File(context.getDataDirectory().toFile(), "plugin-settings.yml"))
|
||||||
@ -55,22 +45,7 @@ public class AuctionsStarter implements PluginBootstrap {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull JavaPlugin createPlugin(@NotNull PluginProviderContext context) {
|
public @NotNull JavaPlugin createPlugin(@NotNull PluginProviderContext context) {
|
||||||
// Create the player registry.
|
FileUtils.extract("/locale", context.getDataDirectory(), false);
|
||||||
this.paperCore.setPaperPlayerRegistry(new PaperPlayerRegistry());
|
|
||||||
|
|
||||||
// Create the console instance.
|
|
||||||
this.paperCore.setPaperConsole(new PaperConsole());
|
|
||||||
|
|
||||||
// Set the project prefix.
|
|
||||||
this.paperCore.setProjectPrefix(getPluginConfig().getProperty(PluginSettings.CONSOLE_PREFIX));
|
|
||||||
|
|
||||||
// Set the logger name and create it.
|
|
||||||
CrazyLogger.setName(this.paperCore.getProjectName());
|
|
||||||
|
|
||||||
// Add the logger manager.
|
|
||||||
LogManager.getLogManager().addLogger(CrazyLogger.getLogger());
|
|
||||||
|
|
||||||
FileUtils.extract("/locale", context.getDataDirectory(), false, getPluginConfig().getProperty(PluginSettings.VERBOSE_LOGGING));
|
|
||||||
|
|
||||||
locale = SettingsManagerBuilder
|
locale = SettingsManagerBuilder
|
||||||
.withYamlFile(new File(context.getDataDirectory().toFile() + "/locale/", pluginConfig.getProperty(PluginSettings.LOCALE_FILE)))
|
.withYamlFile(new File(context.getDataDirectory().toFile() + "/locale/", pluginConfig.getProperty(PluginSettings.LOCALE_FILE)))
|
||||||
|
@ -9,13 +9,6 @@ import java.nio.file.Path;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/28/2023
|
|
||||||
* Time: 3:04 AM
|
|
||||||
* Last Edited: 2/28/2023 @ 3:11 AM
|
|
||||||
*
|
|
||||||
* Description: Handles player data for auctions.
|
* Description: Handles player data for auctions.
|
||||||
*/
|
*/
|
||||||
public class StorageManager implements Universal, UserCache {
|
public class StorageManager implements Universal, UserCache {
|
||||||
|
@ -3,6 +3,8 @@ package us.crazycrew.crazyauctions.storage.data;
|
|||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
import us.crazycrew.crazyauctions.api.interfaces.Universal;
|
import us.crazycrew.crazyauctions.api.interfaces.Universal;
|
||||||
import us.crazycrew.crazycore.files.FileExtension;
|
import us.crazycrew.crazycore.files.FileExtension;
|
||||||
|
import us.crazycrew.crazycore.files.enums.FileType;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
@ -22,7 +24,7 @@ public class PlayerData extends FileExtension implements Universal {
|
|||||||
public static ConcurrentHashMap<UUID, String> auctions = new ConcurrentHashMap<>();
|
public static ConcurrentHashMap<UUID, String> auctions = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
public PlayerData(UUID uuid) {
|
public PlayerData(UUID uuid) {
|
||||||
super(uuid + ".json", plugin.getUsers());
|
super(uuid + ".json", plugin.getUsers(), FileType.YAML);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void load(UUID uuid) {
|
public static void load(UUID uuid) {
|
||||||
|
@ -3,13 +3,6 @@ package us.crazycrew.crazyauctions.utils;
|
|||||||
import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
|
||||||
*
|
|
||||||
* Description: Item utilities.
|
* Description: Item utilities.
|
||||||
*/
|
*/
|
||||||
public class ItemUtils {
|
public class ItemUtils {
|
||||||
|
@ -10,13 +10,6 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author RyderBelserion
|
|
||||||
* @author BadBones69
|
|
||||||
*
|
|
||||||
* Created: 2/18/2023
|
|
||||||
* Time: Unknown
|
|
||||||
* Last Edited: 3/4/2023 @ 11:15 PM
|
|
||||||
*
|
|
||||||
* Description: Color utilities.
|
* Description: Color utilities.
|
||||||
*/
|
*/
|
||||||
public class ColorUtils implements Universal {
|
public class ColorUtils implements Universal {
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
@file:Suppress("UnstableApiUsage")
|
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
includeBuild("build-src")
|
|
||||||
|
|
||||||
versionCatalogs {
|
versionCatalogs {
|
||||||
create("settings") {
|
create("settings") {
|
||||||
from(files("gradle/settings.versions.toml"))
|
from(files("gradle/settings.versions.toml"))
|
||||||
@ -19,12 +15,11 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rootProject.name = "CrazyAuctions"
|
||||||
|
|
||||||
val lowerCase = rootProject.name.lowercase()
|
val lowerCase = rootProject.name.lowercase()
|
||||||
|
|
||||||
include("api")
|
listOf("api").forEach(::includeProject)
|
||||||
project(":api").name = "$lowerCase-api"
|
|
||||||
|
|
||||||
listOf("platforms").forEach(::includeProject)
|
|
||||||
|
|
||||||
listOf("paper").forEach(::includePlatform)
|
listOf("paper").forEach(::includePlatform)
|
||||||
|
|
||||||
@ -55,13 +50,6 @@ fun includePlatformModule(name: String, platform: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun includeDiscordType(name: String) {
|
|
||||||
include(name) {
|
|
||||||
this.name = "$lowerCase-$name"
|
|
||||||
this.projectDir = file("platforms/discord/$name")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun include(name: String, block: ProjectDescriptor.() -> Unit) {
|
fun include(name: String, block: ProjectDescriptor.() -> Unit) {
|
||||||
include(name)
|
include(name)
|
||||||
project(":$name").apply(block)
|
project(":$name").apply(block)
|
||||||
|
Loading…
Reference in New Issue
Block a user