From 20da53789d3c7d10e79a0446dc59a389ddcd7197 Mon Sep 17 00:00:00 2001 From: james <75051061+notsceptor@users.noreply.github.com> Date: Fri, 31 May 2024 03:35:43 +0100 Subject: [PATCH] Moved into messages.yml --- src/main/java/dev/plex/extras/TFMExtras.java | 1 + .../java/dev/plex/extras/command/ExpelCommand.java | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/java/dev/plex/extras/TFMExtras.java b/src/main/java/dev/plex/extras/TFMExtras.java index 734ca22..41b396d 100755 --- a/src/main/java/dev/plex/extras/TFMExtras.java +++ b/src/main/java/dev/plex/extras/TFMExtras.java @@ -121,6 +121,7 @@ public class TFMExtras extends PlexModule addDefaultMessage("cantVisitIsland", "You can't visit this player's island!"); addDefaultMessage("islandMemberExists", "This player is already a member of your island!"); addDefaultMessage("receivedInviteForIsland", "You have been invited to join "); //TODO: Finish this message... my laptop isn't liking minecraft so I can't do formatting for it, and do receivedInviteForIsland message + addDefaultMessage("playersExpelled", "Pushed away players: {0}", "0 - The list of players"); } @Override diff --git a/src/main/java/dev/plex/extras/command/ExpelCommand.java b/src/main/java/dev/plex/extras/command/ExpelCommand.java index e18a89b..62bf8a6 100644 --- a/src/main/java/dev/plex/extras/command/ExpelCommand.java +++ b/src/main/java/dev/plex/extras/command/ExpelCommand.java @@ -3,7 +3,6 @@ package dev.plex.extras.command; import dev.plex.command.PlexCommand; import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandPermissions; -import dev.plex.util.PlexLog; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.minimessage.MiniMessage; import org.bukkit.Location; @@ -79,7 +78,7 @@ public class ExpelCommand extends PlexCommand if (!pushedPlayers.isEmpty()) { - return MiniMessage.miniMessage().deserialize("Pushed away players: " + String.join(", ", pushedPlayers)); + return messageComponent("playersExpelled", String.join(", ", pushedPlayers)); } return null; @@ -88,14 +87,6 @@ public class ExpelCommand extends PlexCommand @Override public @NotNull List smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) { - if (args.length == 1) - { - return Collections.singletonList(""); - } - else if (args.length == 2) - { - return Collections.singletonList(""); - } return Collections.emptyList(); } }