From 619bc79cd80c3b2c14115ff8a12ce45e7828b4cd Mon Sep 17 00:00:00 2001 From: filoghost Date: Sun, 22 May 2022 00:10:31 +0200 Subject: [PATCH] Move core implementation to separate module --- core/pom.xml | 118 ++++++++++++++++++ .../core/HolographicDisplaysCore.java | 105 ++++++++++++++++ .../holographicdisplays/core}/NMSVersion.java | 2 +- .../api/current/APIClickableHologramLine.java | 4 +- .../core}/api/current/APIHologram.java | 8 +- .../core}/api/current/APIHologramLine.java | 4 +- .../core}/api/current/APIHologramLines.java | 4 +- .../core}/api/current/APIHologramManager.java | 8 +- .../api/current/APIItemHologramLine.java | 4 +- .../api/current/APITextHologramLine.java | 4 +- .../DefaultHolographicDisplaysAPI.java | 6 +- ...DefaultHolographicDisplaysAPIProvider.java | 6 +- .../current/DefaultVisibilitySettings.java | 2 +- .../current/SimpleHologramLineClickEvent.java | 2 +- .../SimpleHologramLinePickupEvent.java | 2 +- .../core}/api/v2/V2CollectableLine.java | 4 +- .../core}/api/v2/V2Hologram.java | 10 +- .../core}/api/v2/V2HologramLine.java | 4 +- .../core}/api/v2/V2HologramManager.java | 8 +- .../core}/api/v2/V2HologramsAPIProvider.java | 8 +- .../core}/api/v2/V2ItemLine.java | 4 +- .../core}/api/v2/V2TextLine.java | 4 +- .../core}/api/v2/V2TouchableLine.java | 4 +- .../core}/api/v2/V2VisibilityManager.java | 4 +- .../core}/base/BaseClickableHologramLine.java | 2 +- .../core}/base/BaseHologram.java | 4 +- .../core}/base/BaseHologramComponent.java | 2 +- .../core}/base/BaseHologramLine.java | 6 +- .../core}/base/BaseHologramLines.java | 9 +- .../core}/base/BaseHologramManager.java | 2 +- .../core}/base/BaseItemHologramLine.java | 6 +- .../core}/base/BaseTextHologramLine.java | 6 +- .../core}/base/ClickCallbackProvider.java | 2 +- .../core}/base/EditableHologramLine.java | 2 +- .../core}/base/HologramPosition.java | 2 +- .../core}/base/ImmutablePosition.java | 2 +- .../core}/base/PickupCallbackProvider.java | 2 +- .../core}/listener/ChunkListener.java | 6 +- .../core}/listener/LineClickListener.java | 4 +- .../core}/listener/PlayerListener.java | 4 +- .../placeholder/PlaceholderException.java | 4 +- .../placeholder/PlaceholderIdentifier.java | 2 +- .../placeholder/PlaceholderOccurrence.java | 2 +- .../core}/placeholder/PluginName.java | 2 +- .../placeholder/StandardPlaceholder.java | 4 +- .../core}/placeholder/parsing/Parser.java | 4 +- .../core}/placeholder/parsing/Part.java | 2 +- .../placeholder/parsing/PlaceholderPart.java | 4 +- .../parsing/PlaceholderReplaceFunction.java | 4 +- .../core}/placeholder/parsing/StringPart.java | 2 +- .../parsing/StringReplaceFunction.java | 2 +- .../parsing/StringWithPlaceholders.java | 4 +- .../registry/GlobalPlaceholderExpansion.java | 6 +- .../IndividualPlaceholderExpansion.java | 6 +- .../LegacyGlobalPlaceholderExpansion.java | 2 +- .../registry/PlaceholderExpansion.java | 10 +- .../registry/PlaceholderRegistry.java | 8 +- .../registry/SimpleGlobalPlaceholder.java | 2 +- .../registry/SimpleIndividualPlaceholder.java | 2 +- .../tracking/ActivePlaceholder.java | 8 +- .../tracking/ActivePlaceholderTracker.java | 20 +-- .../tracking/GlobalActivePlaceholder.java | 8 +- .../tracking/IndividualActivePlaceholder.java | 8 +- .../tracking/NullActivePlaceholder.java | 4 +- .../tracking/PlaceholderExceptionHandler.java | 8 +- .../tracking/ReplacementHolder.java | 8 +- .../core}/tick/CachedPlayer.java | 2 +- .../core}/tick/TickClock.java | 2 +- .../core}/tick/TickExpiringMap.java | 2 +- .../core}/tick/TickExpiringValue.java | 2 +- .../core}/tick/TickingTask.java | 8 +- .../core}/tracking/ClickableLineTracker.java | 8 +- .../core}/tracking/CollisionHelper.java | 2 +- .../core}/tracking/DelegateViewers.java | 2 +- .../core}/tracking/DisplayText.java | 6 +- .../core}/tracking/ItemLineTracker.java | 10 +- .../core}/tracking/LineTracker.java | 8 +- .../core}/tracking/LineTrackerManager.java | 14 +-- .../core}/tracking/MutableViewers.java | 2 +- .../tracking/PositionBasedLineTracker.java | 6 +- .../core}/tracking/TextLineTracker.java | 12 +- .../core}/tracking/TextLineViewer.java | 4 +- .../core}/tracking/Viewer.java | 4 +- .../core}/tracking/Viewers.java | 2 +- .../core}/api/v2/V2HologramTest.java | 8 +- .../parsing/StringWithPlaceholdersTest.java | 4 +- .../holographicdisplays/core}/test/Mocks.java | 2 +- .../core}/test/TestNMSManager.java | 2 +- .../core}/test/TestV2HologramManager.java | 12 +- plugin/pom.xml | 78 +----------- .../plugin/HolographicDisplays.java | 102 +++------------ .../commands/InternalHologramEditor.java | 2 +- .../plugin/commands/subs/AlignCommand.java | 2 +- .../plugin/commands/subs/CreateCommand.java | 2 +- .../plugin/commands/subs/MoveHereCommand.java | 2 +- .../plugin/commands/subs/NearCommand.java | 2 +- .../plugin/config/InternalHologramConfig.java | 2 +- .../config/InternalHologramLineParser.java | 2 +- .../plugin/format/DisplayFormat.java | 2 +- .../internal/hologram/InternalHologram.java | 8 +- .../hologram/InternalHologramManager.java | 13 +- .../placeholder/DefaultPlaceholders.java | 34 +++-- pom.xml | 7 ++ 103 files changed, 493 insertions(+), 415 deletions(-) create mode 100644 core/pom.xml create mode 100644 core/src/main/java/me/filoghost/holographicdisplays/core/HolographicDisplaysCore.java rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/util => core/src/main/java/me/filoghost/holographicdisplays/core}/NMSVersion.java (98%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/APIClickableHologramLine.java (86%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/APIHologram.java (89%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/APIHologramLine.java (70%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/APIHologramLines.java (93%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/APIHologramManager.java (79%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/APIItemHologramLine.java (92%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/APITextHologramLine.java (89%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/DefaultHolographicDisplaysAPI.java (96%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/DefaultHolographicDisplaysAPIProvider.java (90%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/DefaultVisibilitySettings.java (97%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/SimpleHologramLineClickEvent.java (91%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/current/SimpleHologramLinePickupEvent.java (91%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2CollectableLine.java (85%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2Hologram.java (91%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2HologramLine.java (79%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2HologramManager.java (67%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2HologramsAPIProvider.java (92%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2ItemLine.java (90%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2TextLine.java (87%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2TouchableLine.java (85%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/api/v2/V2VisibilityManager.java (91%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseClickableHologramLine.java (94%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseHologram.java (95%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseHologramComponent.java (93%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseHologramLine.java (90%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseHologramLines.java (93%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseHologramManager.java (96%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseItemHologramLine.java (88%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/BaseTextHologramLine.java (82%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/ClickCallbackProvider.java (90%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/EditableHologramLine.java (79%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/HologramPosition.java (97%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/ImmutablePosition.java (99%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/base/PickupCallbackProvider.java (90%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/listener/ChunkListener.java (92%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/listener/LineClickListener.java (95%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/listener/PlayerListener.java (92%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/PlaceholderException.java (76%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/PlaceholderIdentifier.java (93%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/PlaceholderOccurrence.java (98%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/PluginName.java (94%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/StandardPlaceholder.java (90%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/Parser.java (97%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/Part.java (63%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/PlaceholderPart.java (88%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/PlaceholderReplaceFunction.java (76%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/StringPart.java (86%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/StringReplaceFunction.java (82%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/StringWithPlaceholders.java (95%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/registry/GlobalPlaceholderExpansion.java (89%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/registry/IndividualPlaceholderExpansion.java (89%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/registry/LegacyGlobalPlaceholderExpansion.java (91%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/registry/PlaceholderExpansion.java (68%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/registry/PlaceholderRegistry.java (96%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/registry/SimpleGlobalPlaceholder.java (92%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/registry/SimpleIndividualPlaceholder.java (93%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/tracking/ActivePlaceholder.java (76%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/tracking/ActivePlaceholderTracker.java (83%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/tracking/GlobalActivePlaceholder.java (73%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/tracking/IndividualActivePlaceholder.java (79%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/tracking/NullActivePlaceholder.java (77%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/tracking/PlaceholderExceptionHandler.java (82%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/placeholder/tracking/ReplacementHolder.java (82%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/tick/CachedPlayer.java (96%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/tick/TickClock.java (84%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/tick/TickExpiringMap.java (94%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/tick/TickExpiringValue.java (75%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin => core/src/main/java/me/filoghost/holographicdisplays/core}/tick/TickingTask.java (89%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/ClickableLineTracker.java (92%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/CollisionHelper.java (97%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/DelegateViewers.java (87%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/DisplayText.java (92%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/ItemLineTracker.java (91%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/LineTracker.java (94%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/LineTrackerManager.java (81%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/MutableViewers.java (93%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/PositionBasedLineTracker.java (90%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/TextLineTracker.java (89%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/TextLineViewer.java (93%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/Viewer.java (86%) rename {plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram => core/src/main/java/me/filoghost/holographicdisplays/core}/tracking/Viewers.java (86%) rename {plugin/src/test/java/me/filoghost/holographicdisplays/plugin => core/src/test/java/me/filoghost/holographicdisplays/core}/api/v2/V2HologramTest.java (86%) rename {plugin/src/test/java/me/filoghost/holographicdisplays/plugin => core/src/test/java/me/filoghost/holographicdisplays/core}/placeholder/parsing/StringWithPlaceholdersTest.java (97%) rename {plugin/src/test/java/me/filoghost/holographicdisplays/plugin => core/src/test/java/me/filoghost/holographicdisplays/core}/test/Mocks.java (93%) rename {plugin/src/test/java/me/filoghost/holographicdisplays/plugin => core/src/test/java/me/filoghost/holographicdisplays/core}/test/TestNMSManager.java (95%) rename {plugin/src/test/java/me/filoghost/holographicdisplays/plugin => core/src/test/java/me/filoghost/holographicdisplays/core}/test/TestV2HologramManager.java (50%) diff --git a/core/pom.xml b/core/pom.xml new file mode 100644 index 00000000..f75cd2aa --- /dev/null +++ b/core/pom.xml @@ -0,0 +1,118 @@ + + + 4.0.0 + + + me.filoghost.holographicdisplays + holographicdisplays-parent + 3.0.0-SNAPSHOT + + + holographicdisplays-core + HolographicDisplays Core + + + + ${project.groupId} + holographicdisplays-api + + + + ${project.groupId} + holographicdisplays-common + + + + ${project.groupId} + holographicdisplays-legacy-api-v1 + runtime + + + + ${project.groupId} + holographicdisplays-legacy-api-v2 + + + + ${project.groupId} + holographicdisplays-nms-v1_8_r3 + + + + ${project.groupId} + holographicdisplays-nms-v1_9_r2 + + + + ${project.groupId} + holographicdisplays-nms-v1_10_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_11_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_12_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_13_r2 + + + + ${project.groupId} + holographicdisplays-nms-v1_14_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_15_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_16_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_16_r2 + + + + ${project.groupId} + holographicdisplays-nms-v1_16_r3 + + + + ${project.groupId} + holographicdisplays-nms-v1_17_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_18_r1 + + + + ${project.groupId} + holographicdisplays-nms-v1_18_r2 + + + + org.spigotmc + spigot-api + + + + me.filoghost.fcommons + fcommons + + + + diff --git a/core/src/main/java/me/filoghost/holographicdisplays/core/HolographicDisplaysCore.java b/core/src/main/java/me/filoghost/holographicdisplays/core/HolographicDisplaysCore.java new file mode 100644 index 00000000..bb5c4d0b --- /dev/null +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/HolographicDisplaysCore.java @@ -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); + } + } + } + +} diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/util/NMSVersion.java b/core/src/main/java/me/filoghost/holographicdisplays/core/NMSVersion.java similarity index 98% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/util/NMSVersion.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/NMSVersion.java index 78548c42..a015bd9b 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/util/NMSVersion.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/NMSVersion.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIClickableHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIClickableHologramLine.java similarity index 86% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIClickableHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIClickableHologramLine.java index 25f66b51..5d103a2d 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIClickableHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIClickableHologramLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologram.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologram.java similarity index 89% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologram.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologram.java index 7f54ccb2..82e8bdcf 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologram.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologram.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramLine.java similarity index 70% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramLine.java index 23f0dc92..c9a96c37 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramLines.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramLines.java similarity index 93% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramLines.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramLines.java index a50aaf24..8d30ca5c 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramLines.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramLines.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramManager.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramManager.java similarity index 79% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramManager.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramManager.java index 8a7b8867..a5f22f4f 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIHologramManager.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIHologramManager.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIItemHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIItemHologramLine.java similarity index 92% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIItemHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIItemHologramLine.java index 53b9b398..8b592a5e 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APIItemHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APIItemHologramLine.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APITextHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APITextHologramLine.java similarity index 89% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APITextHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APITextHologramLine.java index 7079531d..07fb81d8 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/APITextHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/APITextHologramLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultHolographicDisplaysAPI.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultHolographicDisplaysAPI.java similarity index 96% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultHolographicDisplaysAPI.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultHolographicDisplaysAPI.java index 983f8aad..dd8573e8 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultHolographicDisplaysAPI.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultHolographicDisplaysAPI.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultHolographicDisplaysAPIProvider.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultHolographicDisplaysAPIProvider.java similarity index 90% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultHolographicDisplaysAPIProvider.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultHolographicDisplaysAPIProvider.java index ddaae122..4893e6c9 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultHolographicDisplaysAPIProvider.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultHolographicDisplaysAPIProvider.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultVisibilitySettings.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultVisibilitySettings.java similarity index 97% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultVisibilitySettings.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultVisibilitySettings.java index de829b18..68dc7e26 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/DefaultVisibilitySettings.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/DefaultVisibilitySettings.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/SimpleHologramLineClickEvent.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/SimpleHologramLineClickEvent.java similarity index 91% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/SimpleHologramLineClickEvent.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/SimpleHologramLineClickEvent.java index 63b7f738..a38ea011 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/SimpleHologramLineClickEvent.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/SimpleHologramLineClickEvent.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/SimpleHologramLinePickupEvent.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/SimpleHologramLinePickupEvent.java similarity index 91% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/SimpleHologramLinePickupEvent.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/current/SimpleHologramLinePickupEvent.java index 114c04f8..bf6b267e 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/current/SimpleHologramLinePickupEvent.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/current/SimpleHologramLinePickupEvent.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2CollectableLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2CollectableLine.java similarity index 85% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2CollectableLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2CollectableLine.java index 120a2594..538ea1a4 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2CollectableLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2CollectableLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2Hologram.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2Hologram.java similarity index 91% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2Hologram.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2Hologram.java index 0b2f5404..58247e2e 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2Hologram.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2Hologram.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramLine.java similarity index 79% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramLine.java index 161b8740..f48138bd 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramLine.java @@ -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") diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramManager.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramManager.java similarity index 67% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramManager.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramManager.java index ef7206c5..da28bafe 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramManager.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramManager.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramsAPIProvider.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramsAPIProvider.java similarity index 92% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramsAPIProvider.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramsAPIProvider.java index 2b758865..47c586f8 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramsAPIProvider.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramsAPIProvider.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2ItemLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2ItemLine.java similarity index 90% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2ItemLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2ItemLine.java index 75890f5b..af7faab7 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2ItemLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2ItemLine.java @@ -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") diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2TextLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2TextLine.java similarity index 87% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2TextLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2TextLine.java index 4cef6848..bbe885a6 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2TextLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2TextLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2TouchableLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2TouchableLine.java similarity index 85% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2TouchableLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2TouchableLine.java index fa345c5b..f7bb7162 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2TouchableLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2TouchableLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2VisibilityManager.java b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2VisibilityManager.java similarity index 91% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2VisibilityManager.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2VisibilityManager.java index 0b1c412b..59832a2b 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/api/v2/V2VisibilityManager.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/api/v2/V2VisibilityManager.java @@ -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") diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseClickableHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseClickableHologramLine.java similarity index 94% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseClickableHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseClickableHologramLine.java index 409cf022..80a36abb 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseClickableHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseClickableHologramLine.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologram.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologram.java similarity index 95% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologram.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologram.java index 21973207..48c0192f 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologram.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologram.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramComponent.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramComponent.java similarity index 93% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramComponent.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramComponent.java index 8f5fb209..aa7e5b15 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramComponent.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramComponent.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramLine.java similarity index 90% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramLine.java index 5f63e6d7..82ec5d02 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramLine.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramLines.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramLines.java similarity index 93% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramLines.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramLines.java index 76d26b33..afb90ad6 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramLines.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramLines.java @@ -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 implements Iterable { + public static double spaceBetweenLines; + private final BaseHologram hologram; private final List lines; private final List unmodifiableLinesView; @@ -124,7 +125,7 @@ public class BaseHologramLines 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 implements Iterab height += line.getHeight(); } - height += Settings.spaceBetweenLines * (lines.size() - 1); + height += spaceBetweenLines * (lines.size() - 1); return height; } diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramManager.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramManager.java similarity index 96% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramManager.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramManager.java index 3f22042b..6e295afb 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseHologramManager.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseHologramManager.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseItemHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseItemHologramLine.java similarity index 88% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseItemHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseItemHologramLine.java index ea354f87..461eb744 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseItemHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseItemHologramLine.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseTextHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseTextHologramLine.java similarity index 82% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseTextHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseTextHologramLine.java index 089b6dc9..13dd8588 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/BaseTextHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/BaseTextHologramLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/ClickCallbackProvider.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/ClickCallbackProvider.java similarity index 90% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/ClickCallbackProvider.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/ClickCallbackProvider.java index 444c68f7..5ea8ceb4 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/ClickCallbackProvider.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/ClickCallbackProvider.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/EditableHologramLine.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/EditableHologramLine.java similarity index 79% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/EditableHologramLine.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/EditableHologramLine.java index a23bdcc9..0d42ac31 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/EditableHologramLine.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/EditableHologramLine.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/HologramPosition.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/HologramPosition.java similarity index 97% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/HologramPosition.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/HologramPosition.java index 60a502e9..fb1b1285 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/HologramPosition.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/HologramPosition.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/ImmutablePosition.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/ImmutablePosition.java similarity index 99% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/ImmutablePosition.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/ImmutablePosition.java index b18a487e..ec898578 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/ImmutablePosition.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/ImmutablePosition.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/PickupCallbackProvider.java b/core/src/main/java/me/filoghost/holographicdisplays/core/base/PickupCallbackProvider.java similarity index 90% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/PickupCallbackProvider.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/base/PickupCallbackProvider.java index ff542742..dd7b4fd0 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/base/PickupCallbackProvider.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/base/PickupCallbackProvider.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/ChunkListener.java b/core/src/main/java/me/filoghost/holographicdisplays/core/listener/ChunkListener.java similarity index 92% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/ChunkListener.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/listener/ChunkListener.java index 59bcb117..fc4be389 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/ChunkListener.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/listener/ChunkListener.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/LineClickListener.java b/core/src/main/java/me/filoghost/holographicdisplays/core/listener/LineClickListener.java similarity index 95% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/LineClickListener.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/listener/LineClickListener.java index 61d6105b..221b8ed7 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/LineClickListener.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/listener/LineClickListener.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/PlayerListener.java b/core/src/main/java/me/filoghost/holographicdisplays/core/listener/PlayerListener.java similarity index 92% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/PlayerListener.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/listener/PlayerListener.java index 17cfc7f3..84ecddda 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/listener/PlayerListener.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/listener/PlayerListener.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderException.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderException.java similarity index 76% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderException.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderException.java index dee53d77..414e93b4 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderException.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderException.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderIdentifier.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderIdentifier.java similarity index 93% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderIdentifier.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderIdentifier.java index 9a2e1d74..1df708d9 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderIdentifier.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderIdentifier.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderOccurrence.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderOccurrence.java similarity index 98% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderOccurrence.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderOccurrence.java index bd194556..59946a05 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PlaceholderOccurrence.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PlaceholderOccurrence.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PluginName.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PluginName.java similarity index 94% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PluginName.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PluginName.java index c364cb02..3cf51522 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/PluginName.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/PluginName.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/StandardPlaceholder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/StandardPlaceholder.java similarity index 90% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/StandardPlaceholder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/StandardPlaceholder.java index e31dd112..60ddcce3 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/StandardPlaceholder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/StandardPlaceholder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/Parser.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/Parser.java similarity index 97% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/Parser.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/Parser.java index 785cda41..f7fe7aee 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/Parser.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/Parser.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/Part.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/Part.java similarity index 63% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/Part.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/Part.java index 534bed7d..b4ee3ed8 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/Part.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/Part.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/PlaceholderPart.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/PlaceholderPart.java similarity index 88% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/PlaceholderPart.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/PlaceholderPart.java index 5c6a04d7..2486b160 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/PlaceholderPart.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/PlaceholderPart.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/PlaceholderReplaceFunction.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/PlaceholderReplaceFunction.java similarity index 76% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/PlaceholderReplaceFunction.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/PlaceholderReplaceFunction.java index 7dbda5ca..78938dd3 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/PlaceholderReplaceFunction.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/PlaceholderReplaceFunction.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringPart.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringPart.java similarity index 86% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringPart.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringPart.java index bb94cb16..cdee6c95 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringPart.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringPart.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringReplaceFunction.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringReplaceFunction.java similarity index 82% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringReplaceFunction.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringReplaceFunction.java index 5d1c957f..4e2f118c 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringReplaceFunction.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringReplaceFunction.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringWithPlaceholders.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringWithPlaceholders.java similarity index 95% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringWithPlaceholders.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringWithPlaceholders.java index 7280160c..b116216f 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringWithPlaceholders.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringWithPlaceholders.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/GlobalPlaceholderExpansion.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/GlobalPlaceholderExpansion.java similarity index 89% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/GlobalPlaceholderExpansion.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/GlobalPlaceholderExpansion.java index a28a5916..b6a5111d 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/GlobalPlaceholderExpansion.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/GlobalPlaceholderExpansion.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/IndividualPlaceholderExpansion.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/IndividualPlaceholderExpansion.java similarity index 89% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/IndividualPlaceholderExpansion.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/IndividualPlaceholderExpansion.java index 8a4e4399..b422f2a7 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/IndividualPlaceholderExpansion.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/IndividualPlaceholderExpansion.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/LegacyGlobalPlaceholderExpansion.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/LegacyGlobalPlaceholderExpansion.java similarity index 91% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/LegacyGlobalPlaceholderExpansion.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/LegacyGlobalPlaceholderExpansion.java index 7ae2cace..73a3524e 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/LegacyGlobalPlaceholderExpansion.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/LegacyGlobalPlaceholderExpansion.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/PlaceholderExpansion.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/PlaceholderExpansion.java similarity index 68% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/PlaceholderExpansion.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/PlaceholderExpansion.java index 82afac8e..ae84de6c 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/PlaceholderExpansion.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/PlaceholderExpansion.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/PlaceholderRegistry.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/PlaceholderRegistry.java similarity index 96% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/PlaceholderRegistry.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/PlaceholderRegistry.java index 25d59c14..b2632861 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/PlaceholderRegistry.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/PlaceholderRegistry.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/SimpleGlobalPlaceholder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/SimpleGlobalPlaceholder.java similarity index 92% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/SimpleGlobalPlaceholder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/SimpleGlobalPlaceholder.java index 9f6c6881..22d796e7 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/SimpleGlobalPlaceholder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/SimpleGlobalPlaceholder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/SimpleIndividualPlaceholder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/SimpleIndividualPlaceholder.java similarity index 93% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/SimpleIndividualPlaceholder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/SimpleIndividualPlaceholder.java index 946dc0c3..baccc112 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/registry/SimpleIndividualPlaceholder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/registry/SimpleIndividualPlaceholder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ActivePlaceholder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ActivePlaceholder.java similarity index 76% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ActivePlaceholder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ActivePlaceholder.java index 49e35e5b..16adb8b5 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ActivePlaceholder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ActivePlaceholder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ActivePlaceholderTracker.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ActivePlaceholderTracker.java similarity index 83% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ActivePlaceholderTracker.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ActivePlaceholderTracker.java index 36ab0f7b..31b1befa 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ActivePlaceholderTracker.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ActivePlaceholderTracker.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/GlobalActivePlaceholder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/GlobalActivePlaceholder.java similarity index 73% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/GlobalActivePlaceholder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/GlobalActivePlaceholder.java index eec543a5..e94b10b7 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/GlobalActivePlaceholder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/GlobalActivePlaceholder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/IndividualActivePlaceholder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/IndividualActivePlaceholder.java similarity index 79% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/IndividualActivePlaceholder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/IndividualActivePlaceholder.java index 5dbbcee7..755a90f1 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/IndividualActivePlaceholder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/IndividualActivePlaceholder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/NullActivePlaceholder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/NullActivePlaceholder.java similarity index 77% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/NullActivePlaceholder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/NullActivePlaceholder.java index 5a634bb8..df9d5dcf 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/NullActivePlaceholder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/NullActivePlaceholder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/PlaceholderExceptionHandler.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/PlaceholderExceptionHandler.java similarity index 82% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/PlaceholderExceptionHandler.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/PlaceholderExceptionHandler.java index b964f5e1..38e09585 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/PlaceholderExceptionHandler.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/PlaceholderExceptionHandler.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ReplacementHolder.java b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ReplacementHolder.java similarity index 82% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ReplacementHolder.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ReplacementHolder.java index 598f37ff..60991852 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/tracking/ReplacementHolder.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/placeholder/tracking/ReplacementHolder.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/CachedPlayer.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/CachedPlayer.java similarity index 96% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/CachedPlayer.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tick/CachedPlayer.java index 3630030d..a231a043 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/CachedPlayer.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/CachedPlayer.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickClock.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickClock.java similarity index 84% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickClock.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickClock.java index 6a66c6e8..cc6385b5 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickClock.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickClock.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickExpiringMap.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickExpiringMap.java similarity index 94% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickExpiringMap.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickExpiringMap.java index fb3a1867..4a333421 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickExpiringMap.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickExpiringMap.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickExpiringValue.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickExpiringValue.java similarity index 75% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickExpiringValue.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickExpiringValue.java index e01010cf..e4d80dca 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickExpiringValue.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickExpiringValue.java @@ -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 { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickingTask.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickingTask.java similarity index 89% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickingTask.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickingTask.java index f9f56296..c3976876 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/tick/TickingTask.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tick/TickingTask.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/ClickableLineTracker.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/ClickableLineTracker.java similarity index 92% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/ClickableLineTracker.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/ClickableLineTracker.java index 0f2a7105..96cc2deb 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/ClickableLineTracker.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/ClickableLineTracker.java @@ -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 extends PositionBasedLineTracker { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/CollisionHelper.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/CollisionHelper.java similarity index 97% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/CollisionHelper.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/CollisionHelper.java index a1dd33ae..a6f8be18 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/CollisionHelper.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/CollisionHelper.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/DelegateViewers.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/DelegateViewers.java similarity index 87% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/DelegateViewers.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/DelegateViewers.java index dbf5eb51..b240a7ad 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/DelegateViewers.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/DelegateViewers.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/DisplayText.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/DisplayText.java similarity index 92% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/DisplayText.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/DisplayText.java index e490c240..d9ee5864 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/DisplayText.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/DisplayText.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/ItemLineTracker.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/ItemLineTracker.java similarity index 91% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/ItemLineTracker.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/ItemLineTracker.java index 76c75bfa..485c4864 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/ItemLineTracker.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/ItemLineTracker.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTracker.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/LineTracker.java similarity index 94% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTracker.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/LineTracker.java index fb61decb..98a9092f 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTracker.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/LineTracker.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTrackerManager.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/LineTrackerManager.java similarity index 81% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTrackerManager.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/LineTrackerManager.java index def3b82e..454c9a09 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTrackerManager.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/LineTrackerManager.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/MutableViewers.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/MutableViewers.java similarity index 93% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/MutableViewers.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/MutableViewers.java index aa5cf15c..a730dc90 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/MutableViewers.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/MutableViewers.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/PositionBasedLineTracker.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/PositionBasedLineTracker.java similarity index 90% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/PositionBasedLineTracker.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/PositionBasedLineTracker.java index 9ea9b36b..3f0395a2 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/PositionBasedLineTracker.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/PositionBasedLineTracker.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/TextLineTracker.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/TextLineTracker.java similarity index 89% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/TextLineTracker.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/TextLineTracker.java index 03cf09db..645c4e77 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/TextLineTracker.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/TextLineTracker.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/TextLineViewer.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/TextLineViewer.java similarity index 93% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/TextLineViewer.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/TextLineViewer.java index 53d77481..960fc55e 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/TextLineViewer.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/TextLineViewer.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/Viewer.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/Viewer.java similarity index 86% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/Viewer.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/Viewer.java index 3c9e14ba..ee16825e 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/Viewer.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/Viewer.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/Viewers.java b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/Viewers.java similarity index 86% rename from plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/Viewers.java rename to core/src/main/java/me/filoghost/holographicdisplays/core/tracking/Viewers.java index fdc82855..3f00e291 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/Viewers.java +++ b/core/src/main/java/me/filoghost/holographicdisplays/core/tracking/Viewers.java @@ -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; diff --git a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramTest.java b/core/src/test/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramTest.java similarity index 86% rename from plugin/src/test/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramTest.java rename to core/src/test/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramTest.java index 3481628d..8d2cb65d 100644 --- a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/api/v2/V2HologramTest.java +++ b/core/src/test/java/me/filoghost/holographicdisplays/core/api/v2/V2HologramTest.java @@ -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; diff --git a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringWithPlaceholdersTest.java b/core/src/test/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringWithPlaceholdersTest.java similarity index 97% rename from plugin/src/test/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringWithPlaceholdersTest.java rename to core/src/test/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringWithPlaceholdersTest.java index 941ed2a0..f57dbba3 100644 --- a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/placeholder/parsing/StringWithPlaceholdersTest.java +++ b/core/src/test/java/me/filoghost/holographicdisplays/core/placeholder/parsing/StringWithPlaceholdersTest.java @@ -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; diff --git a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/Mocks.java b/core/src/test/java/me/filoghost/holographicdisplays/core/test/Mocks.java similarity index 93% rename from plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/Mocks.java rename to core/src/test/java/me/filoghost/holographicdisplays/core/test/Mocks.java index 307951f6..af8034ed 100644 --- a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/Mocks.java +++ b/core/src/test/java/me/filoghost/holographicdisplays/core/test/Mocks.java @@ -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; diff --git a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/TestNMSManager.java b/core/src/test/java/me/filoghost/holographicdisplays/core/test/TestNMSManager.java similarity index 95% rename from plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/TestNMSManager.java rename to core/src/test/java/me/filoghost/holographicdisplays/core/test/TestNMSManager.java index 8e7fd5f7..a8a8bb29 100644 --- a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/TestNMSManager.java +++ b/core/src/test/java/me/filoghost/holographicdisplays/core/test/TestNMSManager.java @@ -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; diff --git a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/TestV2HologramManager.java b/core/src/test/java/me/filoghost/holographicdisplays/core/test/TestV2HologramManager.java similarity index 50% rename from plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/TestV2HologramManager.java rename to core/src/test/java/me/filoghost/holographicdisplays/core/test/TestV2HologramManager.java index 590db163..fb3c9d6c 100644 --- a/plugin/src/test/java/me/filoghost/holographicdisplays/plugin/test/TestV2HologramManager.java +++ b/core/src/test/java/me/filoghost/holographicdisplays/core/test/TestV2HologramManager.java @@ -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.*; diff --git a/plugin/pom.xml b/plugin/pom.xml index f2cf19f8..de3876f7 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -25,83 +25,7 @@ ${project.groupId} - holographicdisplays-legacy-api-v1 - runtime - - - - ${project.groupId} - holographicdisplays-legacy-api-v2 - - - - ${project.groupId} - holographicdisplays-nms-v1_8_r3 - - - - ${project.groupId} - holographicdisplays-nms-v1_9_r2 - - - - ${project.groupId} - holographicdisplays-nms-v1_10_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_11_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_12_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_13_r2 - - - - ${project.groupId} - holographicdisplays-nms-v1_14_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_15_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_16_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_16_r2 - - - - ${project.groupId} - holographicdisplays-nms-v1_16_r3 - - - - ${project.groupId} - holographicdisplays-nms-v1_17_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_18_r1 - - - - ${project.groupId} - holographicdisplays-nms-v1_18_r2 + holographicdisplays-core diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/HolographicDisplays.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/HolographicDisplays.java index ab684810..af46871c 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/HolographicDisplays.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/HolographicDisplays.java @@ -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 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() { diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/InternalHologramEditor.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/InternalHologramEditor.java index 6f32eb6b..92b36cf9 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/InternalHologramEditor.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/InternalHologramEditor.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/AlignCommand.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/AlignCommand.java index a4004972..81f9cd77 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/AlignCommand.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/AlignCommand.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/CreateCommand.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/CreateCommand.java index 7457c5dd..44e4fc39 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/CreateCommand.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/CreateCommand.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/MoveHereCommand.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/MoveHereCommand.java index d891618b..b033c798 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/MoveHereCommand.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/MoveHereCommand.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/NearCommand.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/NearCommand.java index 9e8323fc..80968481 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/NearCommand.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/commands/subs/NearCommand.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramConfig.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramConfig.java index 38774b20..2b1a5c26 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramConfig.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramConfig.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramLineParser.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramLineParser.java index 344843b9..66f5f239 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramLineParser.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/config/InternalHologramLineParser.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/format/DisplayFormat.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/format/DisplayFormat.java index 5635dee0..0dc0fb89 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/format/DisplayFormat.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/format/DisplayFormat.java @@ -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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologram.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologram.java index 78b275a1..66e93ff1 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologram.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologram.java @@ -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 unmodifiableLinesView; private boolean deleted; - public InternalHologram(Function 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; diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologramManager.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologramManager.java index 8b9ded78..e6fefc97 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologramManager.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/hologram/InternalHologramManager.java @@ -5,22 +5,21 @@ */ package me.filoghost.holographicdisplays.plugin.internal.hologram; -import me.filoghost.holographicdisplays.api.beta.hologram.Hologram; -import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition; +import me.filoghost.holographicdisplays.api.beta.HolographicDisplaysAPI; +import me.filoghost.holographicdisplays.core.base.ImmutablePosition; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.function.Function; public class InternalHologramManager { - private final Function hologramFactory; + private final HolographicDisplaysAPI api; private final List holograms; - public InternalHologramManager(Function hologramFactory) { - this.hologramFactory = hologramFactory; + public InternalHologramManager(HolographicDisplaysAPI api) { + this.api = api; this.holograms = new ArrayList<>(); } @@ -37,7 +36,7 @@ public class InternalHologramManager { if (getHologramByName(name) != null) { throw new IllegalStateException("hologram named \"" + name + "\" already exists"); } - InternalHologram hologram = new InternalHologram(hologramFactory, name, position); + InternalHologram hologram = new InternalHologram(api, name, position); holograms.add(hologram); return hologram; } diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/placeholder/DefaultPlaceholders.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/placeholder/DefaultPlaceholders.java index 4a58f698..30f7abe2 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/placeholder/DefaultPlaceholders.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/internal/placeholder/DefaultPlaceholders.java @@ -6,13 +6,12 @@ package me.filoghost.holographicdisplays.plugin.internal.placeholder; import me.filoghost.fcommons.collection.CollectionUtils; +import me.filoghost.holographicdisplays.api.beta.HolographicDisplaysAPI; import me.filoghost.holographicdisplays.plugin.bridge.bungeecord.BungeeServerTracker; import me.filoghost.holographicdisplays.plugin.bridge.bungeecord.ServerInfo; import me.filoghost.holographicdisplays.plugin.config.Settings; -import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -import org.bukkit.plugin.Plugin; import java.time.Instant; import java.util.Arrays; @@ -24,17 +23,16 @@ public class DefaultPlaceholders { private static final String NO_SERVER_SPECIFIED_ERROR = "[No server specified]"; public static void resetAndRegister( - Plugin plugin, - PlaceholderRegistry placeholderRegistry, + HolographicDisplaysAPI api, AnimationPlaceholderFactory animationPlaceholderFactory, BungeeServerTracker bungeeServerTracker) { - placeholderRegistry.unregisterAll(plugin); + api.unregisterPlaceholders(); - placeholderRegistry.registerGlobalPlaceholder(plugin, "empty", Integer.MAX_VALUE, (argument) -> { + api.registerGlobalPlaceholder("empty", Integer.MAX_VALUE, (argument) -> { return ""; }); - placeholderRegistry.registerGlobalPlaceholder(plugin, "rainbow", new AnimationPlaceholder(4, toStringList( + api.registerGlobalPlaceholder("rainbow", new AnimationPlaceholder(4, toStringList( ChatColor.RED, ChatColor.GOLD, ChatColor.YELLOW, @@ -43,17 +41,17 @@ public class DefaultPlaceholders { ChatColor.LIGHT_PURPLE ))); - placeholderRegistry.registerGlobalPlaceholder(plugin, "time", 10, (argument) -> { + api.registerGlobalPlaceholder("time", 10, (argument) -> { return Settings.timeFormat.format(Instant.now()); }); - placeholderRegistry.registerGlobalPlaceholderFactory(plugin, "animation", animationPlaceholderFactory); + api.registerGlobalPlaceholderFactory("animation", animationPlaceholderFactory); - placeholderRegistry.registerGlobalPlaceholderFactory(plugin, "world", new WorldPlayersPlaceholderFactory()); + api.registerGlobalPlaceholderFactory("world", new WorldPlayersPlaceholderFactory()); - placeholderRegistry.registerGlobalPlaceholderFactory(plugin, "online", new OnlinePlayersPlaceholderFactory(bungeeServerTracker)); + api.registerGlobalPlaceholderFactory("online", new OnlinePlayersPlaceholderFactory(bungeeServerTracker)); - placeholderRegistry.registerGlobalPlaceholder(plugin, "max_players", 20, (serverName) -> { + api.registerGlobalPlaceholder("max_players", 20, (serverName) -> { if (serverName == null) { // No argument specified, return max players of this server return String.valueOf(Bukkit.getMaxPlayers()); @@ -66,7 +64,7 @@ public class DefaultPlaceholders { return String.valueOf(bungeeServerTracker.getCurrentServerInfo(serverName).getMaxPlayers()); }); - placeholderRegistry.registerGlobalPlaceholder(plugin, "status", 20, (serverName) -> { + api.registerGlobalPlaceholder("status", 20, (serverName) -> { if (serverName == null) { return NO_SERVER_SPECIFIED_ERROR; } @@ -83,7 +81,7 @@ public class DefaultPlaceholders { } }); - placeholderRegistry.registerGlobalPlaceholder(plugin, "motd", 20, (serverName) -> { + api.registerGlobalPlaceholder("motd", 20, (serverName) -> { if (serverName == null) { return NO_SERVER_SPECIFIED_ERROR; } @@ -95,7 +93,7 @@ public class DefaultPlaceholders { return bungeeServerTracker.getCurrentServerInfo(serverName).getMotdLine1(); }); - placeholderRegistry.registerGlobalPlaceholder(plugin, "motd2", 20, (serverName) -> { + api.registerGlobalPlaceholder("motd2", 20, (serverName) -> { if (serverName == null) { return NO_SERVER_SPECIFIED_ERROR; } @@ -107,15 +105,15 @@ public class DefaultPlaceholders { return bungeeServerTracker.getCurrentServerInfo(serverName).getMotdLine2(); }); - placeholderRegistry.registerIndividualPlaceholder(plugin, "player", Integer.MAX_VALUE, (player, argument) -> { + api.registerIndividualPlaceholder("player", Integer.MAX_VALUE, (player, argument) -> { return player.getName(); }); - placeholderRegistry.registerIndividualPlaceholder(plugin, "displayName", 20, (player, argument) -> { + api.registerIndividualPlaceholder("displayName", 20, (player, argument) -> { return player.getDisplayName(); }); - placeholderRegistry.registerIndividualPlaceholderFactory(plugin, "papi", new PlaceholderAPIPlaceholderFactory()); + api.registerIndividualPlaceholderFactory("papi", new PlaceholderAPIPlaceholderFactory()); } private static List toStringList(ChatColor... colors) { diff --git a/pom.xml b/pom.xml index 775f2077..4b12cfb7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ api legacy-api nms + core plugin example @@ -86,6 +87,12 @@ ${project.version} + + ${project.groupId} + holographicdisplays-core + ${project.version} + + ${project.groupId} holographicdisplays-legacy-api-v1