fancyholograms-v3: Add a jdb storage for each trait

This commit is contained in:
Oliver
2025-05-17 22:21:58 +02:00
parent f16b296347
commit ccd1a917ab
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ dependencies {
compileOnly("io.papermc.paper:paper-api:$minecraftVersion-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:$minecraftVersion-R0.1-SNAPSHOT")
compileOnly(project(":libraries:common")) compileOnly(project(":libraries:common"))
compileOnly(project(":libraries:jdb"))
compileOnly("de.oliver.FancyAnalytics:logger:0.0.6") compileOnly("de.oliver.FancyAnalytics:logger:0.0.6")
implementation("org.lushplugins:ChatColorHandler:5.1.3") implementation("org.lushplugins:ChatColorHandler:5.1.3")

View File

@@ -5,6 +5,7 @@ import de.oliver.fancyholograms.api.FancyHolograms;
import de.oliver.fancyholograms.api.HologramController; import de.oliver.fancyholograms.api.HologramController;
import de.oliver.fancyholograms.api.HologramRegistry; import de.oliver.fancyholograms.api.HologramRegistry;
import de.oliver.fancyholograms.api.hologram.Hologram; import de.oliver.fancyholograms.api.hologram.Hologram;
import de.oliver.jdb.JDB;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.ApiStatus;
@@ -28,7 +29,7 @@ public abstract class HologramTrait {
protected final HologramRegistry registry = api.getRegistry(); protected final HologramRegistry registry = api.getRegistry();
protected final ScheduledExecutorService hologramThread = api.getHologramThread(); protected final ScheduledExecutorService hologramThread = api.getHologramThread();
protected Hologram hologram; protected Hologram hologram;
protected JDB storage;
/** /**
* Creates a new hologram trait with the given name. * Creates a new hologram trait with the given name.
@@ -48,6 +49,7 @@ public abstract class HologramTrait {
} }
this.hologram = hologram; this.hologram = hologram;
this.storage = new JDB("plugins/FancyHolograms/data/traits/" + name + "/" + hologram.getData().getName());
} }
/** /**