mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-25 12:25:20 +01:00
update vital api
This commit is contained in:
parent
07bae23126
commit
4ea09a4f49
@ -23,7 +23,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
paperweight {
|
paperweight {
|
||||||
reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
|
reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@ -44,11 +44,11 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assemble {
|
assemble {
|
||||||
dependsOn(reobfJar)
|
dependsOn(shadowJar)
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
copy {
|
copy {
|
||||||
from(reobfJar.get())
|
from(shadowJar.get())
|
||||||
into(rootProject.projectDir.resolve("jars"))
|
into(rootProject.projectDir.resolve("jars"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ import com.badbones69.crazyauctions.commands.AuctionTab;
|
|||||||
import com.badbones69.crazyauctions.controllers.GuiListener;
|
import com.badbones69.crazyauctions.controllers.GuiListener;
|
||||||
import com.badbones69.crazyauctions.controllers.MarcoListener;
|
import com.badbones69.crazyauctions.controllers.MarcoListener;
|
||||||
import com.badbones69.crazyauctions.currency.VaultSupport;
|
import com.badbones69.crazyauctions.currency.VaultSupport;
|
||||||
import com.ryderbelserion.vital.paper.VitalPaper;
|
import com.ryderbelserion.vital.paper.Vital;
|
||||||
import com.ryderbelserion.vital.paper.files.config.FileManager;
|
import com.ryderbelserion.vital.paper.api.files.FileManager;
|
||||||
import com.ryderbelserion.vital.paper.util.scheduler.FoliaRunnable;
|
import com.ryderbelserion.vital.paper.util.scheduler.FoliaRunnable;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -20,15 +20,16 @@ import org.bukkit.configuration.file.FileConfiguration;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
public class CrazyAuctions extends JavaPlugin {
|
public class CrazyAuctions extends Vital {
|
||||||
|
|
||||||
public @NotNull static CrazyAuctions getPlugin() {
|
public @NotNull static CrazyAuctions getPlugin() {
|
||||||
return JavaPlugin.getPlugin(CrazyAuctions.class);
|
return JavaPlugin.getPlugin(CrazyAuctions.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private FileManager fileManager;
|
|
||||||
private CrazyManager crazyManager;
|
private CrazyManager crazyManager;
|
||||||
|
|
||||||
private VaultSupport support;
|
private VaultSupport support;
|
||||||
@ -43,17 +44,13 @@ public class CrazyAuctions extends JavaPlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
new VitalPaper(this).setLogging(false);
|
getFileManager().addFile(new File(getDataFolder(), "config.yml"))
|
||||||
|
.addFile(new File(getDataFolder(), "data.yml"))
|
||||||
this.fileManager = new FileManager();
|
.addFile(new File(getDataFolder(), "messages.yml"))
|
||||||
this.crazyManager = new CrazyManager();
|
|
||||||
|
|
||||||
this.fileManager.addFile("config.yml")
|
|
||||||
.addFile("data.yml")
|
|
||||||
.addFile("messages.yml")
|
|
||||||
//.addFile("test-file.yml")
|
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
|
this.crazyManager = new CrazyManager();
|
||||||
|
|
||||||
FileConfiguration configuration = Files.data.getConfiguration();
|
FileConfiguration configuration = Files.data.getConfiguration();
|
||||||
|
|
||||||
if (configuration.contains("OutOfTime/Cancelled")) {
|
if (configuration.contains("OutOfTime/Cancelled")) {
|
||||||
@ -156,8 +153,4 @@ public class CrazyAuctions extends JavaPlugin {
|
|||||||
public final CrazyManager getCrazyManager() {
|
public final CrazyManager getCrazyManager() {
|
||||||
return this.crazyManager;
|
return this.crazyManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final FileManager getFileManager() {
|
|
||||||
return this.fileManager;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -3,7 +3,7 @@ package com.badbones69.crazyauctions.api.builders;
|
|||||||
import com.badbones69.crazyauctions.CrazyAuctions;
|
import com.badbones69.crazyauctions.CrazyAuctions;
|
||||||
import com.badbones69.crazyauctions.Methods;
|
import com.badbones69.crazyauctions.Methods;
|
||||||
import com.badbones69.crazyauctions.api.support.SkullCreator;
|
import com.badbones69.crazyauctions.api.support.SkullCreator;
|
||||||
import com.ryderbelserion.vital.paper.enums.Support;
|
import com.ryderbelserion.vital.paper.api.enums.Support;
|
||||||
import io.th0rgal.oraxen.api.OraxenItems;
|
import io.th0rgal.oraxen.api.OraxenItems;
|
||||||
import me.clip.placeholderapi.PlaceholderAPI;
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
|
@ -2,7 +2,7 @@ package com.badbones69.crazyauctions.api.enums;
|
|||||||
|
|
||||||
import com.badbones69.crazyauctions.Methods;
|
import com.badbones69.crazyauctions.Methods;
|
||||||
import com.badbones69.crazyauctions.api.enums.misc.Files;
|
import com.badbones69.crazyauctions.api.enums.misc.Files;
|
||||||
import com.ryderbelserion.vital.paper.enums.Support;
|
import com.ryderbelserion.vital.paper.api.enums.Support;
|
||||||
import me.clip.placeholderapi.PlaceholderAPI;
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package com.badbones69.crazyauctions.api.enums.misc;
|
package com.badbones69.crazyauctions.api.enums.misc;
|
||||||
|
|
||||||
import com.badbones69.crazyauctions.CrazyAuctions;
|
import com.badbones69.crazyauctions.CrazyAuctions;
|
||||||
import com.ryderbelserion.vital.paper.files.config.FileManager;
|
import com.ryderbelserion.vital.paper.api.files.FileManager;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
public enum Files {
|
public enum Files {
|
||||||
|
|
||||||
config("config.yml"),
|
config("config.yml"),
|
||||||
@ -31,7 +32,7 @@ public enum Files {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final YamlConfiguration getConfiguration() {
|
public final YamlConfiguration getConfiguration() {
|
||||||
return this.fileManager.getFile(this.fileName);
|
return this.fileManager.getFile(this.fileName).getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final String getStrippedName() {
|
public final String getStrippedName() {
|
||||||
@ -42,11 +43,11 @@ public enum Files {
|
|||||||
return this.fileName;
|
return this.fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void reload() {
|
||||||
|
this.fileManager.addFile(new File(this.plugin.getDataFolder(), this.fileName));
|
||||||
|
}
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
this.fileManager.saveFile(this.fileName);
|
this.fileManager.saveFile(this.fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reload() {
|
|
||||||
this.fileManager.reloadFile(this.fileName);
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
package com.badbones69.crazyauctions.api.support;
|
package com.badbones69.crazyauctions.api.support;
|
||||||
|
|
||||||
import com.badbones69.crazyauctions.CrazyAuctions;
|
import com.badbones69.crazyauctions.CrazyAuctions;
|
||||||
import com.ryderbelserion.vital.paper.bStats;
|
import com.ryderbelserion.vital.paper.api.bStats;
|
||||||
|
|
||||||
public class MetricsWrapper extends bStats {
|
public class MetricsWrapper extends bStats {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.badbones69.crazyauctions.api.enums.Messages;
|
|||||||
import com.badbones69.crazyauctions.api.enums.ShopType;
|
import com.badbones69.crazyauctions.api.enums.ShopType;
|
||||||
import com.badbones69.crazyauctions.api.events.AuctionListEvent;
|
import com.badbones69.crazyauctions.api.events.AuctionListEvent;
|
||||||
import com.badbones69.crazyauctions.controllers.GuiListener;
|
import com.badbones69.crazyauctions.controllers.GuiListener;
|
||||||
import com.ryderbelserion.vital.paper.files.config.FileManager;
|
import com.ryderbelserion.vital.paper.api.files.FileManager;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
Loading…
Reference in New Issue
Block a user