mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-12-22 16:48:11 +01:00
Add spigot module
This commit is contained in:
parent
017869c38a
commit
e8b64bf928
@ -16,8 +16,3 @@ license {
|
|||||||
|
|
||||||
include("**/*.java")
|
include("**/*.java")
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
@ -3,7 +3,25 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
exclusiveContent {
|
||||||
|
forRepository {
|
||||||
maven("https://repo.papermc.io/repository/maven-public/")
|
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())
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
import gradle.kotlin.dsl.accessors._8aa390c341e35d66485a63bc7873c757.java
|
||||||
|
import org.gradle.api.JavaVersion
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("crazyauctions.root-plugin")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
@ -4,10 +4,4 @@ org.gradle.warning.mode = all
|
|||||||
|
|
||||||
minecraft_version = 1.19.3
|
minecraft_version = 1.19.3
|
||||||
|
|
||||||
version = 1.2.18
|
|
||||||
group = com.badbones69.crazyauctions
|
|
||||||
name = CrazyAuctions
|
|
||||||
description = Auction off your items in style!
|
|
||||||
|
|
||||||
isBeta = true
|
|
||||||
java_version = 17
|
java_version = 17
|
@ -15,7 +15,6 @@ ruby = "0.0.1.2"
|
|||||||
papermc = { 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" }
|
spigot = { module = "org.spigotmc:spigot-api", version.ref = "paper" }
|
||||||
|
|
||||||
|
|
||||||
# Adventure
|
# Adventure
|
||||||
adventure_api = { module = "net.kyori:adventure-api", version.ref = "adventure" }
|
adventure_api = { module = "net.kyori:adventure-api", version.ref = "adventure" }
|
||||||
adventure_text = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure" }
|
adventure_text = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure" }
|
||||||
@ -23,6 +22,7 @@ adventure_text = { module = "net.kyori:adventure-text-minimessage", version.ref
|
|||||||
# RubyCore
|
# RubyCore
|
||||||
ruby_api = { module = "net.dehya.ruby:ruby-core", version.ref = "ruby" }
|
ruby_api = { module = "net.dehya.ruby:ruby-core", version.ref = "ruby" }
|
||||||
ruby_paper = { module = "net.dehya.ruby:ruby-paper", version.ref = "ruby" }
|
ruby_paper = { module = "net.dehya.ruby:ruby-paper", version.ref = "ruby" }
|
||||||
|
ruby_spigot = { module = "net.dehya.ruby:ruby-spigot", version = "0.0.1.3" }
|
||||||
|
|
||||||
# Configurations
|
# Configurations
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@Suppress("DSL_SCOPE_VIOLATION")
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("crazyauctions.paper-plugin")
|
id("crazyauctions.spigot-plugin")
|
||||||
|
|
||||||
alias(settings.plugins.minotaur)
|
alias(settings.plugins.minotaur)
|
||||||
alias(settings.plugins.run.paper)
|
alias(settings.plugins.run.paper)
|
||||||
@ -24,7 +24,7 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly(libs.spigot)
|
compileOnly(libs.spigot)
|
||||||
|
|
||||||
implementation(libs.ruby.paper)
|
implementation(libs.ruby.spigot)
|
||||||
|
|
||||||
implementation(libs.triumph.gui)
|
implementation(libs.triumph.gui)
|
||||||
implementation(libs.triumph.cmds)
|
implementation(libs.triumph.cmds)
|
||||||
@ -94,7 +94,7 @@ tasks {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
loaders.addAll(listOf("paper", "purpur"))
|
loaders.addAll(listOf("spigot", "paper", "purpur"))
|
||||||
|
|
||||||
//<h3>The first release for CrazyAuctions on Modrinth! 🎉🎉🎉🎉🎉<h3><br> If we want a header.
|
//<h3>The first release for CrazyAuctions on Modrinth! 🎉🎉🎉🎉🎉<h3><br> If we want a header.
|
||||||
changelog.set(
|
changelog.set(
|
||||||
|
@ -3,9 +3,10 @@ package com.badbones69.crazyauctions;
|
|||||||
import com.badbones69.crazyauctions.api.economy.vault.VaultSupport;
|
import com.badbones69.crazyauctions.api.economy.vault.VaultSupport;
|
||||||
import com.badbones69.crazyauctions.api.enums.PluginSupport;
|
import com.badbones69.crazyauctions.api.enums.PluginSupport;
|
||||||
import com.badbones69.crazyauctions.configs.Config;
|
import com.badbones69.crazyauctions.configs.Config;
|
||||||
import net.dehya.ruby.PaperRuby;
|
|
||||||
import net.dehya.ruby.RubyCore;
|
import net.dehya.ruby.RubyCore;
|
||||||
import net.dehya.ruby.command.RubyCommand;
|
import net.dehya.ruby.SpigotRuby;
|
||||||
|
import net.dehya.ruby.command.cloud.RubyCommand;
|
||||||
|
import net.dehya.ruby.files.SpigotFileManager;
|
||||||
import net.dehya.ruby.player.RubyPlayerRegistry;
|
import net.dehya.ruby.player.RubyPlayerRegistry;
|
||||||
import net.dehya.ruby.registry.senders.types.Console;
|
import net.dehya.ruby.registry.senders.types.Console;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
@ -19,7 +20,7 @@ public class CrazyAuctions extends JavaPlugin implements RubyCore {
|
|||||||
|
|
||||||
private static CrazyAuctions plugin;
|
private static CrazyAuctions plugin;
|
||||||
|
|
||||||
private final PaperRuby paperRuby = new PaperRuby(this);
|
private final SpigotRuby spigotRuby = new SpigotRuby(this);
|
||||||
|
|
||||||
private final PluginSupport pluginSupport;
|
private final PluginSupport pluginSupport;
|
||||||
|
|
||||||
@ -62,9 +63,15 @@ public class CrazyAuctions extends JavaPlugin implements RubyCore {
|
|||||||
return getDataFolder().toPath();
|
return getDataFolder().toPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ===================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These all can be null as we don't use them here.
|
||||||
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull Console getConsole() {
|
public @NotNull Console getConsole() {
|
||||||
return this.paperRuby.getConsole();
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -76,28 +83,51 @@ public class CrazyAuctions extends JavaPlugin implements RubyCore {
|
|||||||
public @NotNull List<RubyCommand> getCommands() {
|
public @NotNull List<RubyCommand> getCommands() {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
// ===================================================
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull String getPrefix() {
|
public @NotNull String getPrefix() {
|
||||||
return Config.PREFIX;
|
return Config.PREFIX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the plugin instance
|
||||||
|
*/
|
||||||
public static CrazyAuctions getPlugin() {
|
public static CrazyAuctions getPlugin() {
|
||||||
return plugin;
|
return plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PaperRuby getPaperManager() {
|
/**
|
||||||
return this.paperRuby;
|
* @return the spigot manager
|
||||||
|
*/
|
||||||
|
public SpigotRuby getSpigotManager() {
|
||||||
|
return this.spigotRuby;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the spigot file manager
|
||||||
|
*/
|
||||||
|
public SpigotFileManager getSpigotFileManager() {
|
||||||
|
return this.spigotRuby.getSpigotFileManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the plugin support class
|
||||||
|
*/
|
||||||
public PluginSupport getPluginSupport() {
|
public PluginSupport getPluginSupport() {
|
||||||
return this.pluginSupport;
|
return this.pluginSupport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the starter class
|
||||||
|
*/
|
||||||
public Starter getStarter() {
|
public Starter getStarter() {
|
||||||
return this.starter;
|
return this.starter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return vault support
|
||||||
|
*/
|
||||||
public VaultSupport getVaultSupport() {
|
public VaultSupport getVaultSupport() {
|
||||||
return this.starter.getVaultSupport();
|
return this.starter.getVaultSupport();
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,6 @@ public class Config extends FileExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void reload(CrazyAuctions plugin) {
|
public static void reload(CrazyAuctions plugin) {
|
||||||
plugin.getPaperManager().getPaperFileManager().addFile(new Config());
|
plugin.getSpigotFileManager().addFile(new Config());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -23,8 +23,8 @@ public class Locale extends FileExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void reload(CrazyAuctions plugin) {
|
public static void reload(CrazyAuctions plugin) {
|
||||||
plugin.getPaperManager().getPaperFileManager().extract("/locale", plugin.getDirectory());
|
plugin.getSpigotFileManager().extract("/locale", plugin.getDirectory());
|
||||||
|
|
||||||
plugin.getPaperManager().getPaperFileManager().addFile(new Locale(plugin.getDirectory()));
|
plugin.getSpigotFileManager().addFile(new Locale(plugin.getDirectory()));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user