mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2025-12-31 12:56:31 +00:00
Added CMI holograms support
This commit is contained in:
@@ -19,6 +19,7 @@ import com.willfp.ecoskills.integrations.EcoEnchantsEnchantingLeveller;
|
||||
import com.willfp.ecoskills.integrations.afk.AFKHandlerKt;
|
||||
import com.willfp.ecoskills.integrations.afk.impl.AFKIntegrationEssentials;
|
||||
import com.willfp.ecoskills.integrations.hologram.HologramManager;
|
||||
import com.willfp.ecoskills.integrations.hologram.wrappers.CMIWrapper;
|
||||
import com.willfp.ecoskills.integrations.hologram.wrappers.GHoloWrapper;
|
||||
import com.willfp.ecoskills.integrations.hologram.wrappers.HolographicDisplaysWrapper;
|
||||
import com.willfp.ecoskills.skills.Skill;
|
||||
@@ -138,6 +139,7 @@ public class EcoSkillsPlugin extends EcoPlugin {
|
||||
return Arrays.asList(
|
||||
new IntegrationLoader("HolographicDisplays", () -> HologramManager.Companion.register(new HolographicDisplaysWrapper())),
|
||||
new IntegrationLoader("GHolo", () -> HologramManager.Companion.register(new GHoloWrapper())),
|
||||
new IntegrationLoader("CMI", () -> HologramManager.Companion.register(new CMIWrapper())),
|
||||
new IntegrationLoader("EcoEnchants", () -> this.getEventManager().registerListener(new EcoEnchantsEnchantingLeveller(this))),
|
||||
new IntegrationLoader("Essentials", () -> AFKHandlerKt.registerIntegration(new AFKIntegrationEssentials()))
|
||||
);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.willfp.ecoskills.integrations.hologram.wrappers
|
||||
|
||||
import com.Zrips.CMI.CMI
|
||||
import com.willfp.ecoskills.integrations.hologram.HologramWrapper
|
||||
import com.Zrips.CMI.Modules.Holograms.CMIHologram
|
||||
import com.Zrips.CMI.Modules.Holograms.HologramManager
|
||||
import java.util.UUID
|
||||
import com.willfp.ecoskills.EcoSkillsPlugin
|
||||
import net.Zrips.CMILib.Container.CMILocation
|
||||
import org.bukkit.Location
|
||||
|
||||
class CMIWrapper : HologramWrapper {
|
||||
override fun spawnHolo(loc: Location, contents: List<String>, toRemove: Int) {
|
||||
val holo = CMIHologram(UUID.randomUUID().toString(), CMILocation(loc))
|
||||
holo.enable()
|
||||
holo.lines = contents
|
||||
CMI.getInstance().hologramManager.addHologram(holo);
|
||||
EcoSkillsPlugin.getInstance().scheduler.runLater(
|
||||
{ CMI.getInstance().hologramManager.removeHolo(holo); },
|
||||
30
|
||||
)
|
||||
}
|
||||
}
|
||||
BIN
lib/CMIAPI8.7.8.2.jar
Normal file
BIN
lib/CMIAPI8.7.8.2.jar
Normal file
Binary file not shown.
BIN
lib/CMILib1.0.4.1.jar
Normal file
BIN
lib/CMILib1.0.4.1.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user