diff --git a/build.gradle b/build.gradle index aa3bcd0c..5aa6906b 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,6 @@ repositories { maven { url = 'https://papermc.io/repo/repository/maven-public/' } maven { url = 'https://repo.mattstudios.me/artifactory/public/' } maven { url = 'https://jitpack.io' } - maven { url = 'https://repo.leonardobishop.com/releases/' } maven { url = 'https://repo.dmulloy2.net/repository/public/' } maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' } } @@ -24,7 +23,7 @@ dependencies { compileOnly 'org.jetbrains:annotations:22.0.0' compileOnly 'com.comphenix.protocol:ProtocolLib:4.7.0' compileOnly 'net.kyori:adventure-api:4.9.3' - compileOnly 'me.clip:placeholderapi:2.10.9' + compileOnly 'me.clip:placeholderapi:2.11.1' implementation 'net.kyori:adventure-text-minimessage:4.2.0-SNAPSHOT' implementation 'net.kyori:adventure-platform-bukkit:4.0.0' implementation 'dev.triumphteam:triumph-gui:3.0.3' diff --git a/src/main/java/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.java b/src/main/java/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.java index e7beab3a..f45ee1f7 100644 --- a/src/main/java/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.java +++ b/src/main/java/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.java @@ -89,7 +89,7 @@ public class DyeGuiSerializer implements TypeSerializer { return new DyeSelectorGui( plugin, Adventure.SERIALIZER.serialize( - Adventure.MINI_MESSAGE.parse(StringUtils.applyPapiPlaceholders(null, title))), + Adventure.MINI_MESSAGE.parse(title)), rowsNode.getInt(), guiItemMap); } diff --git a/src/main/java/io/github/fisher2911/hmccosmetics/config/GuiSerializer.java b/src/main/java/io/github/fisher2911/hmccosmetics/config/GuiSerializer.java index 59c7e95c..408f93fb 100644 --- a/src/main/java/io/github/fisher2911/hmccosmetics/config/GuiSerializer.java +++ b/src/main/java/io/github/fisher2911/hmccosmetics/config/GuiSerializer.java @@ -68,7 +68,7 @@ public class GuiSerializer implements TypeSerializer { return new CosmeticGui(plugin, Adventure.SERIALIZER.serialize( - Adventure.MINI_MESSAGE.parse(StringUtils.applyPapiPlaceholders(null, title))), + Adventure.MINI_MESSAGE.parse(title)), rowsNode.getInt(), guiItemMap); } diff --git a/src/main/java/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.java b/src/main/java/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.java index e60bb5f5..2c69b743 100644 --- a/src/main/java/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.java +++ b/src/main/java/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.java @@ -10,6 +10,7 @@ import io.github.fisher2911.hmccosmetics.message.MessageHandler; import io.github.fisher2911.hmccosmetics.message.Messages; import io.github.fisher2911.hmccosmetics.message.Placeholder; import io.github.fisher2911.hmccosmetics.user.User; +import io.github.fisher2911.hmccosmetics.util.StringUtils; import io.github.fisher2911.hmccosmetics.util.builder.ItemBuilder; import org.bukkit.Bukkit; import org.bukkit.entity.HumanEntity; @@ -165,7 +166,7 @@ public class CosmeticGui { final User user = optionalUser.get(); this.gui = Gui.gui(). - title(Adventure.MINI_MESSAGE.parse(this.title)). + title(Adventure.MINI_MESSAGE.parse(StringUtils.applyPapiPlaceholders(user.getPlayer(), this.title))). rows(this.rows). create(); diff --git a/src/main/java/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.java b/src/main/java/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.java index d8b36eaf..c116d8b6 100644 --- a/src/main/java/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.java +++ b/src/main/java/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.java @@ -5,6 +5,7 @@ import dev.triumphteam.gui.guis.GuiItem; import io.github.fisher2911.hmccosmetics.HMCCosmetics; import io.github.fisher2911.hmccosmetics.inventory.PlayerArmor; import io.github.fisher2911.hmccosmetics.user.User; +import io.github.fisher2911.hmccosmetics.util.StringUtils; import io.github.fisher2911.hmccosmetics.util.builder.ColorBuilder; import io.github.fisher2911.hmccosmetics.util.builder.ItemBuilder; import net.kyori.adventure.text.Component; @@ -30,7 +31,7 @@ public class DyeSelectorGui extends CosmeticGui { public Gui getGui(final User user, final ArmorItem armorItem) { final Gui gui = Gui.gui(). - title(Component.text(this.title)). + title(Component.text(StringUtils.applyPapiPlaceholders(user.getPlayer(), this.title))). rows(rows). create();