mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancyholograms-v3: Add a jdb storage for each trait
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user