diff --git a/plugin/pom.xml b/plugin/pom.xml index 0e3552a5..56ac737d 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -57,6 +57,11 @@ com.github.Anon8281 UniversalScheduler + + + io.papermc + paperlib + @@ -131,15 +136,16 @@ false false - - - ${project.groupId}:* - org.bstats - me.filoghost.updatechecker - me.filoghost.fcommons - com.github.Anon8281:UniversalScheduler - - + + + + + + + + + + *:* @@ -165,6 +171,10 @@ com.github.Anon8281.universalScheduler me.filoghost.holographicdisplays.plugin.lib.universalScheduler + + io.papermc.lib + me.filoghost.holographicdisplays.plugin.lib.paperlib + 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 b35c8368..6c4592e9 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 @@ -5,9 +5,11 @@ */ package me.filoghost.holographicdisplays.plugin.commands; +import io.papermc.lib.PaperLib; import me.filoghost.fcommons.Strings; import me.filoghost.fcommons.command.validation.CommandException; import me.filoghost.fcommons.command.validation.CommandValidate; +import me.filoghost.fcommons.logging.Log; import me.filoghost.holographicdisplays.api.Position; import me.filoghost.holographicdisplays.plugin.HolographicDisplays; import me.filoghost.holographicdisplays.plugin.config.ConfigManager; @@ -19,6 +21,7 @@ import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramManager; import me.filoghost.holographicdisplays.plugin.util.FileUtils; import org.bukkit.Location; +import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import org.jetbrains.annotations.NotNull; @@ -86,10 +89,8 @@ public void saveChanges(InternalHologram hologram, ChangeType changeType) { } public void teleportLookingDown(Player player, Location location) { - HolographicDisplays.getScheduler().runTask(()->{ location.setPitch(90); // Look down - player.teleport(location, TeleportCause.PLUGIN); - }); + PaperLib.teleportAsync(player, location, TeleportCause.PLUGIN); } public Path getUserReadableFile(String fileName) throws CommandException { diff --git a/pom.xml b/pom.xml index e2b111dc..8a665e50 100644 --- a/pom.xml +++ b/pom.xml @@ -76,6 +76,11 @@ jitpack.io https://jitpack.io + + + papermc + https://papermc.io/repo/repository/maven-public/ + @@ -256,6 +261,13 @@ 0.1.3 compile + + + io.papermc + paperlib + 1.0.7 + compile +