diff --git a/pom.xml b/pom.xml index 78a620f..f879ac7 100644 --- a/pom.xml +++ b/pom.xml @@ -68,8 +68,8 @@ - spigotmc-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + papermc + https://repo.papermc.io/repository/maven-public/ sonatype @@ -97,9 +97,9 @@ provided - org.spigotmc - spigot-api - 1.8.8-R0.1-SNAPSHOT + io.papermc.paper + paper-api + 1.19.1-R0.1-SNAPSHOT provided diff --git a/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateChecker.java b/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateChecker.java index 46aa65f..7593b62 100644 --- a/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateChecker.java +++ b/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateChecker.java @@ -21,6 +21,7 @@ import com.google.gson.Gson; import in.arcadelabs.labaide.LabAide; import in.arcadelabs.labaide.updatechecker.downloads.DownloadManager; +import net.kyori.adventure.text.minimessage.MiniMessage; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; @@ -225,9 +226,9 @@ private void checkForUpdate() { public void run() { processMessage(); for (Player player : Bukkit.getOnlinePlayers()) { - if (Bukkit.getOnlinePlayers().size() > 0 && player.hasPermission("greetings.update")) { + if (Bukkit.getOnlinePlayers().size() > 0 && player.hasPermission(getNotificationPermission())) { for (final String message : instance.getMessage()) { - LabAide.getMessenger().sendMessage(player, message); + player.sendMessage(MiniMessage.miniMessage().deserialize(message)); } } } diff --git a/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateListener.java b/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateListener.java index a4a5958..00c7f4a 100644 --- a/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateListener.java +++ b/src/main/java/in/arcadelabs/labaide/updatechecker/UpdateListener.java @@ -18,7 +18,7 @@ package in.arcadelabs.labaide.updatechecker; -import in.arcadelabs.labaide.LabAide; +import net.kyori.adventure.text.minimessage.MiniMessage; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -39,7 +39,7 @@ public void playerJoinNotification(PlayerJoinEvent event) { (instance.getNotificationPermission() != null && player.hasPermission(instance.getNotificationPermission()))) { for (final String message : instance.getMessage()) { - LabAide.getMessenger().sendMessage(player, message); + player.sendMessage(MiniMessage.miniMessage().deserialize(message)); } } }