mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Human pass over commands
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user