mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-12 10:24:29 +01:00
update the entire project
This commit is contained in:
parent
79435f7863
commit
32f0f642ab
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,12 +1,16 @@
|
||||
.gradle
|
||||
.idea
|
||||
|
||||
api/build
|
||||
api/.gradle
|
||||
core/.gradle
|
||||
core/build
|
||||
|
||||
jars
|
||||
fabric/.gradle
|
||||
fabric/build
|
||||
|
||||
platforms/paper/.gradle
|
||||
platforms/paper/build
|
||||
paper/.gradle
|
||||
paper/build
|
||||
|
||||
build
|
||||
build
|
||||
|
||||
buildSrc/build
|
||||
buildSrc/.gradle
|
@ -1,5 +1,3 @@
|
||||
# RalphAuctions, the code you forked is incomplete and is a part of a full re-write. You might as well start from scratch.
|
||||
|
||||
<br />
|
||||
|
||||
[![crazyauctions](https://raw.githubusercontent.com/RyderBelserion/Assets/main/crazycrew/webp/CrazyAuctionsBanner.webp)](https://modrinth.com/plugin/crazyauctions)
|
||||
|
@ -1,13 +0,0 @@
|
||||
plugins {
|
||||
id("crazyauctions.root-plugin")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//compileOnly(libs.adventure.api)
|
||||
//compileOnly(libs.adventure.text)
|
||||
|
||||
compileOnly(libs.config.me)
|
||||
compileOnly(libs.yaml)
|
||||
|
||||
compileOnly(libs.crazycore.api)
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package us.crazycrew.crazyauctions.configurations;
|
||||
|
||||
import ch.jalu.configme.SettingsHolder;
|
||||
import ch.jalu.configme.configurationdata.CommentsConfiguration;
|
||||
|
||||
/**
|
||||
* Description: The locale file.
|
||||
*/
|
||||
public class LocaleSettings implements SettingsHolder {
|
||||
|
||||
// Empty constructor required by SettingsHolder
|
||||
public LocaleSettings() {}
|
||||
|
||||
@Override
|
||||
public void registerComments(CommentsConfiguration conf) {
|
||||
String[] header = {
|
||||
"Support: https://discord.gg/crazycrew",
|
||||
"Github: https://github.com/Crazy-Crew",
|
||||
"",
|
||||
"Issues: https://github.com/Crazy-Crew/CrazyAuctions/issues",
|
||||
"Features: https://github.com/Crazy-Crew/CrazyAuctions/discussions",
|
||||
"",
|
||||
"We need translations for this locale file. Please don't hesitate to submit any."
|
||||
};
|
||||
|
||||
conf.setComment("misc", header);
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package us.crazycrew.crazyauctions.configurations;
|
||||
|
||||
import ch.jalu.configme.Comment;
|
||||
import ch.jalu.configme.SettingsHolder;
|
||||
import ch.jalu.configme.configurationdata.CommentsConfiguration;
|
||||
import ch.jalu.configme.properties.Property;
|
||||
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
|
||||
|
||||
/**
|
||||
* Description: The plugin-settings.yml options.
|
||||
*/
|
||||
public class PluginSettings implements SettingsHolder {
|
||||
|
||||
// Empty constructor required by SettingsHolder
|
||||
public PluginSettings() {}
|
||||
|
||||
@Override
|
||||
public void registerComments(CommentsConfiguration conf) {
|
||||
String[] header = {
|
||||
"Support: https://discord.gg/crazycrew",
|
||||
"Github: https://github.com/Crazy-Crew",
|
||||
"",
|
||||
"Issues: https://github.com/Crazy-Crew/CrazyAuctions/issues",
|
||||
"Features: https://github.com/Crazy-Crew/CrazyAuctions/discussions"
|
||||
};
|
||||
|
||||
conf.setComment("settings", header);
|
||||
}
|
||||
|
||||
@Comment({
|
||||
"Choose what prefix you want to use for the permission i.e crazyauctions.command.player.help",
|
||||
"",
|
||||
"Warning: any changes requires a restart!"
|
||||
})
|
||||
public static final Property<String> COMMAND_PERMISSION = newProperty("settings.permission", "crazyauctions");
|
||||
|
||||
@Comment("The command prefix that is shown at the beginning of every message.")
|
||||
public static final Property<String> COMMAND_PREFIX = newProperty("settings.prefix.command", "<red>[</red><green>CrazyAuctions</green><red>]</green> ");
|
||||
|
||||
@Comment("The prefix that is shown for messages sent in console such as logging messages.")
|
||||
public static final Property<String> CONSOLE_PREFIX = newProperty("settings.prefix.console", "<gradient:#fe5f55:#6b55b5>[CrazyAuctions]</gradient> ");
|
||||
|
||||
@Comment({
|
||||
"Choose the language you prefer to use on your server!",
|
||||
"",
|
||||
"Currently Available:",
|
||||
" > en-US ( English )",
|
||||
"",
|
||||
"If you do not see your language above, You can contribute by modifying the current en-US.yml",
|
||||
"https://github.com/Crazy-Crew/CrazyAuctions/blob/main/platforms/paper/src/main/resources/locale/en-US.yml",
|
||||
"Submit your finalized config using https://bin.bloom.host/ and send it to us in https://discord.gg/crazycrew",
|
||||
""
|
||||
})
|
||||
public static final Property<String> LOCALE_FILE = newProperty("settings.locale-file", "en-US.yml");
|
||||
|
||||
@Comment("Whether you want to have verbose logging enabled or not.")
|
||||
public static final Property<Boolean> VERBOSE_LOGGING = newProperty("settings.verbose-logging", true);
|
||||
|
||||
@Comment("Whether or not you would like to check for plugin updates on startup.")
|
||||
public static final Property<Boolean> UPDATE_CHECKER = newProperty("settings.update-checker", true);
|
||||
|
||||
@Comment("Whether or not you would like to allow us to collect statistics on how our plugin is used.")
|
||||
public static final Property<Boolean> PLUGIN_METRICS = newProperty("settings.toggle-metrics", true);
|
||||
|
||||
@Comment({
|
||||
"What command aliases do you want to use?",
|
||||
"You can use as many as you would like, Separate each command using : and do not use any spaces!",
|
||||
"",
|
||||
"Warning: any changes requires a restart!"
|
||||
})
|
||||
public static final Property<String> PLUGIN_ALIASES = newProperty("settings.plugin-aliases", "crazyauctions:auctions");
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package us.crazycrew.crazyauctions.configurations.migrations;
|
||||
|
||||
import ch.jalu.configme.configurationdata.ConfigurationData;
|
||||
import ch.jalu.configme.migration.PlainMigrationService;
|
||||
import ch.jalu.configme.resource.PropertyReader;
|
||||
import org.simpleyaml.configuration.file.YamlConfiguration;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
|
||||
/**
|
||||
* Description: Migrate old values to new values.
|
||||
*/
|
||||
public class PluginMigrationService extends PlainMigrationService {
|
||||
|
||||
@Override
|
||||
protected boolean performMigrations(PropertyReader reader, ConfigurationData configurationData) {
|
||||
//return moveProperty(oldPrefix, newPrefix, reader, configurationData);
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean convert(PropertyReader reader, String oldValue, String newFile, boolean cascade) {
|
||||
if (reader.contains(oldValue)) {
|
||||
//Path nFile = CrazyCore.api().getDirectory().resolve(newFile);
|
||||
|
||||
Path nFile = null;
|
||||
|
||||
YamlConfiguration yamlNewFile = null;
|
||||
|
||||
try {
|
||||
yamlNewFile = YamlConfiguration.loadConfiguration(nFile.toFile());
|
||||
} catch (IOException exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
||||
//CrazyLogger.info("Starting the config migration process...");
|
||||
//CrazyLogger.info("Found old config value (" + oldValue + ")");
|
||||
|
||||
if (!nFile.toFile().exists()) {
|
||||
try {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
nFile.toFile().createNewFile();
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (yamlNewFile == null) return false;
|
||||
|
||||
for (String child : reader.getChildKeys(oldValue)) {
|
||||
if (cascade) {
|
||||
for (String doubleChild : reader.getChildKeys(child)) {
|
||||
yamlNewFile.set(doubleChild, reader.getObject(doubleChild));
|
||||
}
|
||||
} else {
|
||||
yamlNewFile.set(child, reader.getObject(child));
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
yamlNewFile.save(nFile.toFile());
|
||||
|
||||
//CrazyLogger.info("The migration process is complete!");
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
101
build.gradle.kts
101
build.gradle.kts
@ -1,68 +1,67 @@
|
||||
import com.lordcodes.turtle.shellRun
|
||||
import task.WebhookExtension
|
||||
import java.awt.Color
|
||||
|
||||
plugins {
|
||||
id("crazyauctions.root-plugin")
|
||||
id("root-plugin")
|
||||
}
|
||||
|
||||
val releaseUpdate = Color(27, 217, 106)
|
||||
val betaUpdate = Color(255, 163, 71)
|
||||
val changeLogs = Color(37, 137, 204)
|
||||
defaultTasks("build")
|
||||
|
||||
val beta = settings.versions.beta.get().toBoolean()
|
||||
val extension = settings.versions.extension.get()
|
||||
rootProject.group = "com.badbones69.crazyauctions"
|
||||
rootProject.description = "Auction off your items in style!"
|
||||
rootProject.version = "2.0.0-rc1"
|
||||
|
||||
val color = if (beta) betaUpdate else releaseUpdate
|
||||
val repo = if (beta) "beta" else "releases"
|
||||
val combine by tasks.registering(Jar::class) {
|
||||
dependsOn("build")
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
val url = if (beta) "https://ci.crazycrew.us/job/${rootProject.name}/" else "https://modrinth.com/$extension/${rootProject.name.lowercase()}/versions"
|
||||
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>"
|
||||
from(files(subprojects.map {
|
||||
it.layout.buildDirectory.file("libs/${rootProject.name}-${it.name}-${it.version}.jar").get()
|
||||
}).filter { it.name != "MANIFEST.MF" }.map { if (it.isDirectory) it else zipTree(it) })
|
||||
}
|
||||
|
||||
val hash = shellRun("git", listOf("rev-parse", "--short", "HEAD"))
|
||||
allprojects {
|
||||
listOf(
|
||||
":core",
|
||||
":paper"
|
||||
).forEach {
|
||||
project(it) {
|
||||
apply(plugin = "java")
|
||||
|
||||
rootProject.version = if (beta) hash else "1.11.14.3"
|
||||
if (this.name == "paper") {
|
||||
dependencies {
|
||||
compileOnly("de.tr7zw", "item-nbt-api", "2.11.3")
|
||||
compileOnly("org.bstats", "bstats-bukkit", "3.0.2")
|
||||
|
||||
webhook {
|
||||
this.avatar("https://en.gravatar.com/avatar/${WebhookExtension.Gravatar().md5Hex("no-reply@ryderbelserion.com")}.jpeg")
|
||||
|
||||
this.username("Ryder Belserion")
|
||||
|
||||
this.content(msg)
|
||||
|
||||
this.embeds {
|
||||
this.embed {
|
||||
this.color(color)
|
||||
|
||||
this.fields {
|
||||
this.field(
|
||||
"Download: ",
|
||||
url
|
||||
)
|
||||
|
||||
this.field(
|
||||
"API: ",
|
||||
"https://repo.crazycrew.us/#/$repo/${rootProject.group.toString().replace(".", "/")}/${rootProject.name.lowercase()}-api/${rootProject.version}"
|
||||
)
|
||||
compileOnly("com.github.MilkBowl", "VaultAPI", "1.7")
|
||||
}
|
||||
}
|
||||
|
||||
this.author(
|
||||
"${rootProject.name} | Version ${rootProject.version}",
|
||||
url,
|
||||
"https://git.crazycrew.us/ryderbelserion/assets/raw/branch/main/crazycrew/png/${rootProject.name}Website.png"
|
||||
)
|
||||
}
|
||||
//if (this.name == "core") {
|
||||
// dependencies {
|
||||
//compileOnly("net.kyori", "adventure-api", "4.12.0")
|
||||
//compileOnly("net.kyori", "adventure-text-minimessage", "4.12.0")
|
||||
|
||||
this.embed {
|
||||
this.color(changeLogs)
|
||||
//compileOnly("com.google.code.gson", "gson", "2.10.1")
|
||||
// }
|
||||
//}
|
||||
|
||||
this.title("What changed?")
|
||||
dependencies {
|
||||
compileOnly("net.kyori", "adventure-platform-bukkit", "4.3.0")
|
||||
|
||||
this.description("""
|
||||
Changes:
|
||||
» N/A
|
||||
""".trimIndent())
|
||||
compileOnly("ch.jalu", "configme", "1.3.1")
|
||||
|
||||
compileOnly("com.github.Carleslc.Simple-YAML", "Simple-Yaml", "1.8.4") {
|
||||
exclude("org.yaml", "snakeyaml")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
assemble {
|
||||
subprojects.forEach {
|
||||
dependsOn(":${it.project.name}:build")
|
||||
}
|
||||
|
||||
finalizedBy(combine)
|
||||
}
|
||||
}
|
@ -4,20 +4,16 @@ plugins {
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
||||
maven("https://repo.crazycrew.us/first-party/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.kotlin)
|
||||
implementation(libs.shadow)
|
||||
implementation("com.github.johnrengelman", "shadow", "8.1.1")
|
||||
|
||||
implementation(libs.paperweight)
|
||||
implementation("io.papermc.paperweight", "paperweight-userdev", "1.5.5")
|
||||
|
||||
implementation(libs.ktor.core)
|
||||
implementation(libs.ktor.cio)
|
||||
implementation(libs.ktor.content)
|
||||
implementation(libs.ktor.gson)
|
||||
implementation("com.ryderbelserion.feather", "feather-plugin", "0.0.0.4");
|
||||
|
||||
implementation(libs.kotlin.coroutines)
|
||||
|
||||
implementation(libs.turtle)
|
||||
implementation("com.modrinth.minotaur", "Minotaur", "2.8.0")
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user