Skip to content

Commit

Permalink
Merge pull request #8 from Orphey98/quality-updates
Browse files Browse the repository at this point in the history
- Updated HoloAPI to HoloLib 1.6.0
  • Loading branch information
Orphey98 authored Dec 27, 2024
2 parents b2ec589 + ae4f0e8 commit 6103a4c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
</dependency>
<dependency>
<groupId>com.github.max1mde</groupId>
<artifactId>HologramAPI</artifactId>
<version>1.4.7</version>
<artifactId>HologramLib</artifactId>
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/me/orphey/typinginchat/Holograms.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.orphey.typinginchat;

import com.maximde.hologramapi.hologram.HologramManager;
import com.maximde.hologramapi.hologram.TextAnimation;
import com.maximde.hologramapi.hologram.TextHologram;
import com.maximde.hologramlib.hologram.HologramManager;
import com.maximde.hologramlib.hologram.TextHologram;
import com.maximde.hologramlib.hologram.TextAnimation;
import org.bukkit.Color;
import org.bukkit.entity.Display;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -76,7 +76,7 @@ private static int[] backgroundColor() {
}

public static void remove(Player player) {
TextHologram hologram = getHologramAPI().getHologramsMap().get(player.getUniqueId().toString());
TextHologram hologram = (TextHologram) getHologramAPI().getHologramsMap().get(player.getUniqueId().toString());
if (hologram != null) {
getHologramAPI().cancelAnimation(hologram);
getHologramAPI().remove(player.getUniqueId().toString());
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/me/orphey/typinginchat/TypingInChat.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.github.retrooper.packetevents.PacketEvents;
import com.github.retrooper.packetevents.event.PacketListenerPriority;
import com.maximde.hologramapi.HologramAPI;
import com.maximde.hologramapi.hologram.HologramManager;
import com.maximde.hologramlib.HologramLib;
import com.maximde.hologramlib.hologram.HologramManager;
import io.github.retrooper.packetevents.factory.spigot.SpigotPacketEventsBuilder;
import net.milkbowl.vault.permission.Permission;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -41,7 +41,7 @@ public void onEnable() {
// END PACKET EVENTS

// HOLOGRAM API
hologramManager = HologramAPI.getManager().orElse(null);
hologramManager = HologramLib.getManager().orElse(null);
if (hologramManager == null) {
getLogger().severe("Failed to initialize HologramAPI manager.");
return;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ text-shadow: false
#Changing these values are not recommended
#Attached hologram spawn location offset, relative to player position.
#Custom value need to be adjusted to transformation value.
location: [0, 0.35, 0]
location: [0, 1.35, 0]
#Hologram entity position offset, relative to player position.
transformation: [0, 0.72F, 0]
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: TypingInChat
version: '1.0'
main: me.orphey.typinginchat.TypingInChat
api-version: '1.19'
depend: [HologramAPI, packetevents]
depend: [HologramLib, packetevents]
softdepend: [VaultAPI]
commands:
typinginchat:
Expand Down

0 comments on commit 6103a4c

Please sign in to comment.