From 955773791522eded47a51a6030cf5afae0927a23 Mon Sep 17 00:00:00 2001 From: Taah Date: Sat, 7 May 2022 17:37:47 -0700 Subject: [PATCH] add messageComponent that takes a component parameter --- .../src/main/java/dev/plex/command/PlexCommand.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/src/main/java/dev/plex/command/PlexCommand.java b/server/src/main/java/dev/plex/command/PlexCommand.java index e6ae4ef..f28ec88 100644 --- a/server/src/main/java/dev/plex/command/PlexCommand.java +++ b/server/src/main/java/dev/plex/command/PlexCommand.java @@ -518,6 +518,18 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC return PlexUtils.messageComponent(s, objects); } + /** + * Converts a message entry from the "messages.yml" to a Component + * + * @param s The message entry + * @param objects Any objects to replace in order + * @return A Kyori Component + */ + protected Component messageComponent(String s, Component... objects) + { + return PlexUtils.messageComponent(s, objects); + } + /** * Converts a message entry from the "messages.yml" to a String *