Human pass over commands

This commit is contained in:
Mariell Hoversholm committed 2020-09-09 22:16:57 +02:00
1 parent a9f068cc94
commit 830722a2b8
16 files changed
+68 -50

No files matched your search

@@ -18,9 +18,10 @@ import java.util.LinkedHashMap;
public class MeCommand {
@NonNull
private final CarbonChat carbonChat;
public MeCommand(CarbonChat carbonChat, @NonNull CommandSettings commandSettings) {
public MeCommand(@NonNull CarbonChat carbonChat, @NonNull CommandSettings commandSettings) {
this.carbonChat = carbonChat;
if (!commandSettings.isEnabled()) {
@@ -40,7 +41,7 @@ public class MeCommand {
.register();
}
private void execute(@NonNull Player player, Object[] args) {
private void execute(@NonNull Player player, @NonNull Object @NonNull [] args) {
String message = ((String) args[0]).replace("</pre>", "");
String format = PlaceholderAPI.setPlaceholders(player, carbonChat.getLanguage().getString("me"));
@@ -48,7 +49,7 @@ public class MeCommand {
format = format.replace("<message>", "<pre><message></pre>");
}
Component component = carbonChat.getAdventureManager().processMessage(format, "br", "\n",
Component component = carbonChat.getAdventureManager().processMessage(format, "br", "\n",
"displayname", player.getDisplayName(), "message", message);
ChatUser user = carbonChat.getUserService().wrap(player);