mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-11-13 06:03:59 +01:00
Move core implementation to separate module
This commit is contained in:
parent
bf02837f9e
commit
619bc79cd8
118
core/pom.xml
Normal file
118
core/pom.xml
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>me.filoghost.holographicdisplays</groupId>
|
||||
<artifactId>holographicdisplays-parent</artifactId>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>holographicdisplays-core</artifactId>
|
||||
<name>HolographicDisplays Core</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-legacy-api-v1</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-legacy-api-v2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_8_r3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_9_r2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_10_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_11_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_12_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_13_r2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_14_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_15_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_16_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_16_r2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_16_r3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_17_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_18_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_18_r2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.filoghost.fcommons</groupId>
|
||||
<artifactId>fcommons</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (C) filoghost and contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.core;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.internal.HologramsAPIProvider;
|
||||
import me.filoghost.fcommons.FCommonsPlugin.PluginEnableException;
|
||||
import me.filoghost.fcommons.logging.ErrorCollector;
|
||||
import me.filoghost.holographicdisplays.api.beta.internal.HolographicDisplaysAPIProvider;
|
||||
import me.filoghost.holographicdisplays.core.NMSVersion.OutdatedVersionException;
|
||||
import me.filoghost.holographicdisplays.core.NMSVersion.UnknownVersionException;
|
||||
import me.filoghost.holographicdisplays.core.api.current.APIHologramManager;
|
||||
import me.filoghost.holographicdisplays.core.api.current.DefaultHolographicDisplaysAPIProvider;
|
||||
import me.filoghost.holographicdisplays.core.api.v2.V2HologramManager;
|
||||
import me.filoghost.holographicdisplays.core.api.v2.V2HologramsAPIProvider;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologram;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologramLines;
|
||||
import me.filoghost.holographicdisplays.core.listener.ChunkListener;
|
||||
import me.filoghost.holographicdisplays.core.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.core.listener.PlayerListener;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderRegistry;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickingTask;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class HolographicDisplaysCore {
|
||||
|
||||
private NMSManager nmsManager;
|
||||
private LineTrackerManager lineTrackerManager;
|
||||
private APIHologramManager apiHologramManager;
|
||||
private V2HologramManager v2HologramManager;
|
||||
|
||||
public void enable(Plugin plugin, ErrorCollector errorCollector) throws PluginEnableException {
|
||||
try {
|
||||
nmsManager = NMSVersion.getCurrent().createNMSManager(errorCollector);
|
||||
} catch (UnknownVersionException e) {
|
||||
throw new PluginEnableException("Holographic Displays only supports Spigot from 1.8 to 1.18.2.");
|
||||
} catch (OutdatedVersionException e) {
|
||||
throw new PluginEnableException("Holographic Displays only supports " + e.getMinimumSupportedVersion() + " and above.");
|
||||
} catch (Throwable t) {
|
||||
throw new PluginEnableException(t, "Couldn't initialize the NMS manager.");
|
||||
}
|
||||
|
||||
PlaceholderRegistry placeholderRegistry = new PlaceholderRegistry();
|
||||
TickClock tickClock = new TickClock();
|
||||
ActivePlaceholderTracker placeholderTracker = new ActivePlaceholderTracker(placeholderRegistry, tickClock);
|
||||
LineClickListener lineClickListener = new LineClickListener();
|
||||
lineTrackerManager = new LineTrackerManager(nmsManager, placeholderTracker, lineClickListener, tickClock);
|
||||
apiHologramManager = new APIHologramManager(lineTrackerManager);
|
||||
v2HologramManager = new V2HologramManager(lineTrackerManager);
|
||||
|
||||
// Add packet listener for players currently online
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
nmsManager.injectPacketListener(player, lineClickListener);
|
||||
}
|
||||
|
||||
// Tasks
|
||||
TickingTask tickingTask = new TickingTask(tickClock, placeholderTracker, lineTrackerManager, lineClickListener);
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, tickingTask, 0, 1);
|
||||
|
||||
// Listeners
|
||||
Bukkit.getPluginManager().registerEvents(new PlayerListener(nmsManager, lineClickListener, tickingTask), plugin);
|
||||
Bukkit.getPluginManager().registerEvents(new ChunkListener(plugin, apiHologramManager, v2HologramManager), plugin);
|
||||
|
||||
// Enable the APIs
|
||||
HolographicDisplaysAPIProvider.setImplementation(
|
||||
new DefaultHolographicDisplaysAPIProvider(apiHologramManager, placeholderRegistry));
|
||||
enableLegacyAPI(v2HologramManager, placeholderRegistry);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void enableLegacyAPI(V2HologramManager hologramManager, PlaceholderRegistry placeholderRegistry) {
|
||||
HologramsAPIProvider.setImplementation(new V2HologramsAPIProvider(hologramManager, placeholderRegistry));
|
||||
}
|
||||
|
||||
public void setSpaceBetweenHologramLines(double spaceBetweenLines) {
|
||||
BaseHologramLines.spaceBetweenLines = spaceBetweenLines;
|
||||
for (BaseHologram hologram : apiHologramManager.getHolograms()) {
|
||||
hologram.getLines().updatePositions();
|
||||
}
|
||||
for (BaseHologram hologram : v2HologramManager.getHolograms()) {
|
||||
hologram.getLines().updatePositions();
|
||||
}
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
if (lineTrackerManager != null) {
|
||||
lineTrackerManager.resetViewersAndSendDestroyPackets();
|
||||
}
|
||||
|
||||
if (nmsManager != null) {
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
nmsManager.uninjectPacketListener(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.util;
|
||||
package me.filoghost.holographicdisplays.core;
|
||||
|
||||
import me.filoghost.fcommons.logging.ErrorCollector;
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.ClickableHologramLine;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ClickCallbackProvider;
|
||||
import me.filoghost.holographicdisplays.core.base.ClickCallbackProvider;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
interface APIClickableHologramLine extends ClickableHologramLine, APIHologramLine, ClickCallbackProvider {
|
@ -3,15 +3,15 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.api.beta.Position;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.Hologram;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.PlaceholderSetting;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologram;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologram;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
@ -3,10 +3,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.EditableHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.EditableHologramLine;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
interface APIHologramLine extends HologramLine, EditableHologramLine {
|
@ -3,14 +3,14 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.HologramLines;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLine;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.ItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.TextHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramLines;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologramLines;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.Hologram;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramManager;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologramManager;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLineClickListener;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLinePickupListener;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.ItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseItemHologramLine;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.PlaceholderSetting;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLineClickListener;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.TextHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseTextHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseTextHologramLine;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class APITextHologramLine extends BaseTextHologramLine implements TextHologramLine, APIClickableHologramLine {
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.api.beta.HolographicDisplaysAPI;
|
||||
@ -15,8 +15,8 @@ import me.filoghost.holographicdisplays.api.beta.placeholder.GlobalPlaceholderRe
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholder;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholderFactory;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholderReplaceFunction;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderRegistry;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
@ -3,14 +3,14 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.api.beta.HolographicDisplaysAPI;
|
||||
import me.filoghost.holographicdisplays.api.beta.Position;
|
||||
import me.filoghost.holographicdisplays.api.beta.internal.HolographicDisplaysAPIProvider;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderRegistry;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.VisibilitySettings;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLineClickEvent;
|
||||
import org.bukkit.entity.Player;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.current;
|
||||
package me.filoghost.holographicdisplays.core.api.current;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLinePickupEvent;
|
||||
import org.bukkit.entity.Player;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.handler.PickupHandler;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.CollectableLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.PickupCallbackProvider;
|
||||
import me.filoghost.holographicdisplays.core.base.PickupCallbackProvider;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
interface V2CollectableLine extends CollectableLine, V2HologramLine, PickupCallbackProvider {
|
@ -3,17 +3,17 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.Hologram;
|
||||
import com.gmail.filoghost.holographicdisplays.api.VisibilityManager;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.HologramLine;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.ItemLine;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.TextLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologram;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramLines;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologram;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologramLines;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
@ -3,10 +3,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.HologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.EditableHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.EditableHologramLine;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramManager;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologramManager;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class V2HologramManager extends BaseHologramManager<V2Hologram> {
|
@ -3,16 +3,16 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.Hologram;
|
||||
import com.gmail.filoghost.holographicdisplays.api.internal.HologramsAPIProvider;
|
||||
import com.gmail.filoghost.holographicdisplays.api.placeholder.PlaceholderReplacer;
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.fcommons.collection.CollectionUtils;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.LegacyGlobalPlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.LegacyGlobalPlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderRegistry;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.plugin.Plugin;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.handler.PickupHandler;
|
||||
import com.gmail.filoghost.holographicdisplays.api.handler.TouchHandler;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.ItemLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseItemHologramLine;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.handler.TouchHandler;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.TextLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseTextHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseTextHologramLine;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
class V2TextLine extends BaseTextHologramLine implements TextLine, V2TouchableLine {
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.handler.TouchHandler;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.TouchableLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ClickCallbackProvider;
|
||||
import me.filoghost.holographicdisplays.core.base.ClickCallbackProvider;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
interface V2TouchableLine extends TouchableLine, V2HologramLine, ClickCallbackProvider {
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.VisibilityManager;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.VisibilitySettings.Visibility;
|
||||
import me.filoghost.holographicdisplays.plugin.api.current.DefaultVisibilitySettings;
|
||||
import me.filoghost.holographicdisplays.core.api.current.DefaultVisibilitySettings;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.holographicdisplays.common.PositionCoordinates;
|
||||
import org.bukkit.Location;
|
@ -3,10 +3,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import org.jetbrains.annotations.MustBeInvokedByOverriders;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.common.PositionCoordinates;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTracker;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTracker;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
@ -3,10 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.Position;
|
||||
import me.filoghost.holographicdisplays.plugin.config.Settings;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -16,6 +15,8 @@ import java.util.List;
|
||||
|
||||
public class BaseHologramLines<T extends EditableHologramLine> implements Iterable<T> {
|
||||
|
||||
public static double spaceBetweenLines;
|
||||
|
||||
private final BaseHologram hologram;
|
||||
private final List<T> lines;
|
||||
private final List<T> unmodifiableLinesView;
|
||||
@ -124,7 +125,7 @@ public class BaseHologramLines<T extends EditableHologramLine> implements Iterab
|
||||
|
||||
currentLineY -= line.getHeight();
|
||||
if (i > 0) {
|
||||
currentLineY -= Settings.spaceBetweenLines;
|
||||
currentLineY -= spaceBetweenLines;
|
||||
}
|
||||
|
||||
line.setPosition(hologramPosition.getX(), currentLineY, hologramPosition.getZ());
|
||||
@ -142,7 +143,7 @@ public class BaseHologramLines<T extends EditableHologramLine> implements Iterab
|
||||
height += line.getHeight();
|
||||
}
|
||||
|
||||
height += Settings.spaceBetweenLines * (lines.size() - 1);
|
||||
height += spaceBetweenLines * (lines.size() - 1);
|
||||
return height;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.ItemLineTracker;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.tracking.ItemLineTracker;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.entity.TextNMSPacketEntity;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.TextLineTracker;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.tracking.TextLineTracker;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class BaseTextHologramLine extends BaseClickableHologramLine {
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.fcommons.logging.Log;
|
||||
import org.bukkit.entity.Player;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
public interface EditableHologramLine {
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.api.beta.Position;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.base;
|
||||
package me.filoghost.holographicdisplays.core.base;
|
||||
|
||||
import me.filoghost.fcommons.logging.Log;
|
||||
import org.bukkit.entity.Player;
|
@ -3,10 +3,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.listener;
|
||||
package me.filoghost.holographicdisplays.core.listener;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.api.current.APIHologramManager;
|
||||
import me.filoghost.holographicdisplays.plugin.api.v2.V2HologramManager;
|
||||
import me.filoghost.holographicdisplays.core.api.current.APIHologramManager;
|
||||
import me.filoghost.holographicdisplays.core.api.v2.V2HologramManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.listener;
|
||||
package me.filoghost.holographicdisplays.core.listener;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.EntityID;
|
||||
import me.filoghost.holographicdisplays.nms.common.PacketListener;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseClickableHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseClickableHologramLine;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Collections;
|
@ -3,10 +3,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.listener;
|
||||
package me.filoghost.holographicdisplays.core.listener;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickingTask;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickingTask;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder;
|
||||
package me.filoghost.holographicdisplays.core.placeholder;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderExpansion;
|
||||
|
||||
public class PlaceholderException extends Exception {
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder;
|
||||
package me.filoghost.holographicdisplays.core.placeholder;
|
||||
|
||||
import me.filoghost.fcommons.collection.CaseInsensitiveString;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder;
|
||||
package me.filoghost.holographicdisplays.core.placeholder;
|
||||
|
||||
import me.filoghost.fcommons.Strings;
|
||||
import me.filoghost.fcommons.collection.CaseInsensitiveString;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder;
|
||||
package me.filoghost.holographicdisplays.core.placeholder;
|
||||
|
||||
import me.filoghost.fcommons.collection.CaseInsensitiveString;
|
||||
import org.bukkit.plugin.Plugin;
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder;
|
||||
package me.filoghost.holographicdisplays.core.placeholder;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderExpansion;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
interface Part {
|
||||
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.registry;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.registry;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.GlobalPlaceholder;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.GlobalPlaceholderFactory;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.StandardPlaceholder;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.registry;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.registry;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholder;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholderFactory;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.StandardPlaceholder;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.registry;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.registry;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.GlobalPlaceholderFactory;
|
||||
import org.bukkit.plugin.Plugin;
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.registry;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.registry;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderIdentifier;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PluginName;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderIdentifier;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PluginName;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.StandardPlaceholder;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.registry;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.registry;
|
||||
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Iterables;
|
||||
@ -17,9 +17,9 @@ import me.filoghost.holographicdisplays.api.beta.placeholder.GlobalPlaceholderRe
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholder;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholderFactory;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholderReplaceFunction;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderIdentifier;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PluginName;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderIdentifier;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PluginName;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.registry;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.registry;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.GlobalPlaceholder;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.GlobalPlaceholderReplaceFunction;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.registry;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.registry;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholder;
|
||||
import me.filoghost.holographicdisplays.api.beta.placeholder.IndividualPlaceholderReplaceFunction;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.tracking;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickExpiringValue;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickExpiringValue;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -3,17 +3,17 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.tracking;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.parsing.PlaceholderReplaceFunction;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.parsing.StringWithPlaceholders;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickExpiringMap;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.parsing.PlaceholderReplaceFunction;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.parsing.StringWithPlaceholders;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderRegistry;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickExpiringMap;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.tracking;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.StandardPlaceholder;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.tracking;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.StandardPlaceholder;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.tracking;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderExpansion;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.registry.PlaceholderExpansion;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -3,13 +3,13 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.tracking;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.tracking;
|
||||
|
||||
import me.filoghost.fcommons.collection.CaseInsensitiveString;
|
||||
import me.filoghost.fcommons.logging.Log;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.tracking;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.StandardPlaceholder;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderException;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.StandardPlaceholder;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.tick;
|
||||
package me.filoghost.holographicdisplays.core.tick;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.tick;
|
||||
package me.filoghost.holographicdisplays.core.tick;
|
||||
|
||||
public class TickClock {
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.tick;
|
||||
package me.filoghost.holographicdisplays.core.tick;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.BiPredicate;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.tick;
|
||||
package me.filoghost.holographicdisplays.core.tick;
|
||||
|
||||
public interface TickExpiringValue {
|
||||
|
@ -3,12 +3,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.tick;
|
||||
package me.filoghost.holographicdisplays.core.tick;
|
||||
|
||||
import me.filoghost.fcommons.logging.Log;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.core.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
@ -3,14 +3,14 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.common.PositionCoordinates;
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseClickableHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseClickableHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import org.jetbrains.annotations.MustBeInvokedByOverriders;
|
||||
|
||||
public abstract class ClickableLineTracker<T extends Viewer> extends PositionBasedLineTracker<T> {
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.common.PositionCoordinates;
|
||||
import org.bukkit.Location;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.function.Consumer;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.fcommons.Preconditions;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.parsing.StringWithPlaceholders;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.parsing.StringWithPlaceholders;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -3,14 +3,14 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.core.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.MustBeInvokedByOverriders;
|
||||
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.MustBeInvokedByOverriders;
|
||||
|
@ -3,15 +3,15 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseTextHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseItemHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseTextHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.core.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Collection;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.common.PositionCoordinates;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import org.bukkit.Location;
|
||||
import org.jetbrains.annotations.MustBeInvokedByOverriders;
|
||||
|
@ -3,16 +3,16 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.IndividualTextPacketGroup;
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import me.filoghost.holographicdisplays.nms.common.entity.TextNMSPacketEntity;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseTextHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.base.BaseTextHologramLine;
|
||||
import me.filoghost.holographicdisplays.core.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.core.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import org.jetbrains.annotations.MustBeInvokedByOverriders;
|
||||
|
||||
import java.util.Objects;
|
@ -3,10 +3,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.IndividualTextPacketGroup;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.core.tick.CachedPlayer;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
@ -3,11 +3,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.IndividualTextPacketGroup;
|
||||
import me.filoghost.holographicdisplays.nms.common.PacketGroup;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.CachedPlayer;
|
||||
import me.filoghost.holographicdisplays.core.tick.CachedPlayer;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
|
||||
package me.filoghost.holographicdisplays.core.tracking;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.PacketGroup;
|
||||
|
@ -3,15 +3,15 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.api.v2;
|
||||
package me.filoghost.holographicdisplays.core.api.v2;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.handler.PickupHandler;
|
||||
import com.gmail.filoghost.holographicdisplays.api.handler.TouchHandler;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.ItemLine;
|
||||
import com.gmail.filoghost.holographicdisplays.api.line.TextLine;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.test.Mocks;
|
||||
import me.filoghost.holographicdisplays.plugin.test.TestV2HologramManager;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.test.Mocks;
|
||||
import me.filoghost.holographicdisplays.core.test.TestV2HologramManager;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.placeholder.parsing;
|
||||
package me.filoghost.holographicdisplays.core.placeholder.parsing;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.PlaceholderOccurrence;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.PlaceholderOccurrence;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.test;
|
||||
package me.filoghost.holographicdisplays.core.test;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Server;
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.test;
|
||||
package me.filoghost.holographicdisplays.core.test;
|
||||
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import me.filoghost.holographicdisplays.nms.common.PacketListener;
|
@ -3,13 +3,13 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.test;
|
||||
package me.filoghost.holographicdisplays.core.test;
|
||||
|
||||
import me.filoghost.holographicdisplays.plugin.api.v2.V2HologramManager;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.api.v2.V2HologramManager;
|
||||
import me.filoghost.holographicdisplays.core.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.core.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.core.tracking.LineTrackerManager;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
@ -25,83 +25,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-legacy-api-v1</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-legacy-api-v2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_8_r3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_9_r2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_10_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_11_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_12_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_13_r2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_14_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_15_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_16_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_16_r2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_16_r3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_17_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_18_r1</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>holographicdisplays-nms-v1_18_r2</artifactId>
|
||||
<artifactId>holographicdisplays-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -5,69 +5,46 @@
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin;
|
||||
|
||||
import com.gmail.filoghost.holographicdisplays.api.internal.HologramsAPIProvider;
|
||||
import me.filoghost.fcommons.FCommonsPlugin;
|
||||
import me.filoghost.fcommons.FeatureSupport;
|
||||
import me.filoghost.fcommons.logging.ErrorCollector;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.Hologram;
|
||||
import me.filoghost.holographicdisplays.api.beta.internal.HolographicDisplaysAPIProvider;
|
||||
import me.filoghost.holographicdisplays.nms.common.NMSManager;
|
||||
import me.filoghost.holographicdisplays.plugin.api.current.APIHologramManager;
|
||||
import me.filoghost.holographicdisplays.plugin.api.current.DefaultHolographicDisplaysAPIProvider;
|
||||
import me.filoghost.holographicdisplays.plugin.api.v2.V2HologramManager;
|
||||
import me.filoghost.holographicdisplays.plugin.api.v2.V2HologramsAPIProvider;
|
||||
import me.filoghost.holographicdisplays.api.beta.HolographicDisplaysAPI;
|
||||
import me.filoghost.holographicdisplays.core.HolographicDisplaysCore;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.bridge.bungeecord.BungeeServerTracker;
|
||||
import me.filoghost.holographicdisplays.plugin.bridge.placeholderapi.PlaceholderAPIHook;
|
||||
import me.filoghost.holographicdisplays.plugin.commands.HologramCommandManager;
|
||||
import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
|
||||
import me.filoghost.holographicdisplays.plugin.config.ConfigManager;
|
||||
import me.filoghost.holographicdisplays.plugin.config.InternalHologramLoadException;
|
||||
import me.filoghost.holographicdisplays.plugin.config.InternalHologramConfig;
|
||||
import me.filoghost.holographicdisplays.plugin.config.InternalHologramLoadException;
|
||||
import me.filoghost.holographicdisplays.plugin.config.Settings;
|
||||
import me.filoghost.holographicdisplays.plugin.config.upgrade.AnimationsLegacyUpgrade;
|
||||
import me.filoghost.holographicdisplays.plugin.config.upgrade.DatabaseLegacyUpgrade;
|
||||
import me.filoghost.holographicdisplays.plugin.config.upgrade.SymbolsLegacyUpgrade;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologram;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramManager;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.placeholder.AnimationPlaceholderFactory;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.placeholder.DefaultPlaceholders;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.ChunkListener;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.LineClickListener;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.PlayerListener;
|
||||
import me.filoghost.holographicdisplays.plugin.listener.UpdateNotificationListener;
|
||||
import me.filoghost.holographicdisplays.plugin.log.PrintableErrorCollector;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.tracking.ActivePlaceholderTracker;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickClock;
|
||||
import me.filoghost.holographicdisplays.plugin.tick.TickingTask;
|
||||
import me.filoghost.holographicdisplays.plugin.util.NMSVersion;
|
||||
import me.filoghost.holographicdisplays.plugin.util.NMSVersion.OutdatedVersionException;
|
||||
import me.filoghost.holographicdisplays.plugin.util.NMSVersion.UnknownVersionException;
|
||||
import org.bstats.bukkit.MetricsLite;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class HolographicDisplays extends FCommonsPlugin {
|
||||
|
||||
private static HolographicDisplays instance;
|
||||
|
||||
private NMSManager nmsManager;
|
||||
private HolographicDisplaysCore core;
|
||||
private HolographicDisplaysAPI api;
|
||||
private ConfigManager configManager;
|
||||
private BungeeServerTracker bungeeServerTracker;
|
||||
private PlaceholderRegistry placeholderRegistry;
|
||||
private LineTrackerManager lineTrackerManager;
|
||||
private InternalHologramManager internalHologramManager;
|
||||
private APIHologramManager apiHologramManager;
|
||||
private V2HologramManager v2HologramManager;
|
||||
private InternalHologramEditor internalHologramEditor;
|
||||
|
||||
@Override
|
||||
@ -97,29 +74,13 @@ public class HolographicDisplays extends FCommonsPlugin {
|
||||
|
||||
PrintableErrorCollector errorCollector = new PrintableErrorCollector();
|
||||
|
||||
// Initialize class fields
|
||||
try {
|
||||
nmsManager = NMSVersion.getCurrent().createNMSManager(errorCollector);
|
||||
} catch (UnknownVersionException e) {
|
||||
throw new PluginEnableException("Holographic Displays only supports Spigot from 1.8 to 1.18.2.");
|
||||
} catch (OutdatedVersionException e) {
|
||||
throw new PluginEnableException("Holographic Displays only supports " + e.getMinimumSupportedVersion() + " and above.");
|
||||
} catch (Throwable t) {
|
||||
throw new PluginEnableException(t, "Couldn't initialize the NMS manager.");
|
||||
}
|
||||
core = new HolographicDisplaysCore();
|
||||
core.enable(this, errorCollector);
|
||||
api = HolographicDisplaysAPI.get(this);
|
||||
|
||||
configManager = new ConfigManager(getDataFolder().toPath());
|
||||
bungeeServerTracker = new BungeeServerTracker(this);
|
||||
placeholderRegistry = new PlaceholderRegistry();
|
||||
TickClock tickClock = new TickClock();
|
||||
ActivePlaceholderTracker placeholderTracker = new ActivePlaceholderTracker(placeholderRegistry, tickClock);
|
||||
LineClickListener lineClickListener = new LineClickListener();
|
||||
lineTrackerManager = new LineTrackerManager(nmsManager, placeholderTracker, lineClickListener, tickClock);
|
||||
apiHologramManager = new APIHologramManager(lineTrackerManager);
|
||||
v2HologramManager = new V2HologramManager(lineTrackerManager);
|
||||
Function<ImmutablePosition, Hologram> hologramFactory =
|
||||
(ImmutablePosition position) -> apiHologramManager.createHologram(position, this);
|
||||
internalHologramManager = new InternalHologramManager(hologramFactory);
|
||||
internalHologramManager = new InternalHologramManager(api);
|
||||
|
||||
// Run only once at startup, before loading the configuration
|
||||
new SymbolsLegacyUpgrade(configManager, errorCollector).tryRun();
|
||||
@ -129,31 +90,14 @@ public class HolographicDisplays extends FCommonsPlugin {
|
||||
// Load the configuration
|
||||
load(errorCollector);
|
||||
|
||||
// Add packet listener for currently online players (may happen if the plugin is disabled and re-enabled)
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
nmsManager.injectPacketListener(player, lineClickListener);
|
||||
}
|
||||
|
||||
// Commands
|
||||
internalHologramEditor = new InternalHologramEditor(internalHologramManager, configManager);
|
||||
new HologramCommandManager(this, internalHologramEditor).register(this);
|
||||
|
||||
// Tasks
|
||||
TickingTask tickingTask = new TickingTask(tickClock, placeholderTracker, lineTrackerManager, lineClickListener);
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, tickingTask, 0, 1);
|
||||
|
||||
// Listeners
|
||||
PlayerListener playerListener = new PlayerListener(nmsManager, lineClickListener, tickingTask);
|
||||
registerListener(playerListener);
|
||||
registerListener(new ChunkListener(this, apiHologramManager, v2HologramManager));
|
||||
// Listener
|
||||
UpdateNotificationListener updateNotificationListener = new UpdateNotificationListener();
|
||||
registerListener(updateNotificationListener);
|
||||
|
||||
// Enable the APIs
|
||||
HolographicDisplaysAPIProvider.setImplementation(
|
||||
new DefaultHolographicDisplaysAPIProvider(apiHologramManager, placeholderRegistry));
|
||||
enableLegacyAPI(v2HologramManager, placeholderRegistry);
|
||||
|
||||
// Setup external plugin hooks
|
||||
PlaceholderAPIHook.setup();
|
||||
|
||||
@ -171,11 +115,6 @@ public class HolographicDisplays extends FCommonsPlugin {
|
||||
updateNotificationListener.runAsyncUpdateCheck(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void enableLegacyAPI(V2HologramManager hologramManager, PlaceholderRegistry placeholderRegistry) {
|
||||
HologramsAPIProvider.setImplementation(new V2HologramsAPIProvider(hologramManager, placeholderRegistry));
|
||||
}
|
||||
|
||||
public void load(ErrorCollector errorCollector) {
|
||||
internalHologramManager.deleteHolograms();
|
||||
|
||||
@ -183,7 +122,7 @@ public class HolographicDisplays extends FCommonsPlugin {
|
||||
configManager.reloadMainSettings(errorCollector);
|
||||
|
||||
AnimationPlaceholderFactory animationPlaceholderFactory = configManager.loadAnimations(errorCollector);
|
||||
DefaultPlaceholders.resetAndRegister(this, placeholderRegistry, animationPlaceholderFactory, bungeeServerTracker);
|
||||
DefaultPlaceholders.resetAndRegister(api, animationPlaceholderFactory, bungeeServerTracker);
|
||||
|
||||
bungeeServerTracker.restart(Settings.bungeeRefreshSeconds, TimeUnit.SECONDS);
|
||||
|
||||
@ -200,25 +139,12 @@ public class HolographicDisplays extends FCommonsPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
for (BaseHologram hologram : apiHologramManager.getHolograms()) {
|
||||
hologram.getLines().updatePositions();
|
||||
}
|
||||
for (BaseHologram hologram : v2HologramManager.getHolograms()) {
|
||||
hologram.getLines().updatePositions();
|
||||
}
|
||||
core.setSpaceBetweenHologramLines(Settings.spaceBetweenLines);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
if (lineTrackerManager != null) {
|
||||
lineTrackerManager.resetViewersAndSendDestroyPackets();
|
||||
}
|
||||
|
||||
if (nmsManager != null) {
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
nmsManager.uninjectPacketListener(player);
|
||||
}
|
||||
}
|
||||
core.disable();
|
||||
}
|
||||
|
||||
public static HolographicDisplays getInstance() {
|
||||
|
@ -12,7 +12,7 @@ import me.filoghost.holographicdisplays.plugin.config.ConfigManager;
|
||||
import me.filoghost.holographicdisplays.plugin.config.InternalHologramLineParser;
|
||||
import me.filoghost.holographicdisplays.plugin.config.InternalHologramLoadException;
|
||||
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramManager;
|
||||
|
@ -12,7 +12,7 @@ import me.filoghost.holographicdisplays.plugin.commands.HologramSubCommand;
|
||||
import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
|
||||
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
|
||||
import me.filoghost.holographicdisplays.plugin.format.ColorScheme;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
|
||||
import me.filoghost.holographicdisplays.plugin.format.ColorScheme;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
@ -12,7 +12,7 @@ import me.filoghost.holographicdisplays.plugin.commands.HologramSubCommand;
|
||||
import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
|
||||
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
|
||||
import me.filoghost.holographicdisplays.plugin.format.ColorScheme;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -11,7 +11,7 @@ import me.filoghost.fcommons.command.validation.CommandValidate;
|
||||
import me.filoghost.holographicdisplays.plugin.commands.HologramSubCommand;
|
||||
import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
|
||||
import me.filoghost.holographicdisplays.plugin.format.DisplayFormat;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -9,7 +9,7 @@ import me.filoghost.fcommons.collection.CollectionUtils;
|
||||
import me.filoghost.fcommons.config.ConfigSection;
|
||||
import me.filoghost.fcommons.config.exception.ConfigValueException;
|
||||
import me.filoghost.holographicdisplays.api.beta.Position;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramLine;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import me.filoghost.holographicdisplays.plugin.internal.hologram.ItemInternalHol
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.TextInternalHologramLine;
|
||||
import me.filoghost.holographicdisplays.plugin.lib.nbt.parser.MojangsonParseException;
|
||||
import me.filoghost.holographicdisplays.plugin.lib.nbt.parser.MojangsonParser;
|
||||
import me.filoghost.holographicdisplays.plugin.placeholder.parsing.StringWithPlaceholders;
|
||||
import me.filoghost.holographicdisplays.core.placeholder.parsing.StringWithPlaceholders;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
@ -8,7 +8,7 @@ package me.filoghost.holographicdisplays.plugin.format;
|
||||
|
||||
import me.filoghost.fcommons.Colors;
|
||||
import me.filoghost.holographicdisplays.plugin.config.StaticReplacements;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
|
@ -5,17 +5,17 @@
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.plugin.internal.hologram;
|
||||
|
||||
import me.filoghost.holographicdisplays.api.beta.HolographicDisplaysAPI;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.Hologram;
|
||||
import me.filoghost.holographicdisplays.api.beta.hologram.PlaceholderSetting;
|
||||
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent;
|
||||
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
|
||||
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
|
||||
import me.filoghost.holographicdisplays.core.base.ImmutablePosition;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class InternalHologram {
|
||||
|
||||
@ -26,8 +26,8 @@ public class InternalHologram {
|
||||
private final List<InternalHologramLine> unmodifiableLinesView;
|
||||
private boolean deleted;
|
||||
|
||||
public InternalHologram(Function<ImmutablePosition, Hologram> hologramFactory, String name, ImmutablePosition position) {
|
||||
this.renderedHologram = hologramFactory.apply(position);
|
||||
public InternalHologram(HolographicDisplaysAPI api, String name, ImmutablePosition position) {
|
||||
this.renderedHologram = api.createHologram(position);
|
||||
this.renderedHologram.setPlaceholderSetting(PlaceholderSetting.ENABLE_ALL);
|
||||
this.name = name;
|
||||
this.position = position;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user