From 8d13ee731ea5ec884d92bda430c7454cca2f8dcd Mon Sep 17 00:00:00 2001 From: business-goose Date: Wed, 23 Mar 2022 20:57:17 +0000 Subject: [PATCH] Fix discord command sender not being senior (this is retarded) --- .../discord/sender/DiscordCommandSender.java | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/StevenLawson/TotalFreedomMod/discord/sender/DiscordCommandSender.java b/src/main/java/me/StevenLawson/TotalFreedomMod/discord/sender/DiscordCommandSender.java index d2729de..b55dd98 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/discord/sender/DiscordCommandSender.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/discord/sender/DiscordCommandSender.java @@ -3,6 +3,9 @@ package me.StevenLawson.TotalFreedomMod.discord.sender; import org.bukkit.Bukkit; import org.bukkit.Server; import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.conversations.Conversation; +import org.bukkit.conversations.ConversationAbandonedEvent; import org.bukkit.permissions.PermissibleBase; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionAttachment; @@ -12,7 +15,7 @@ import org.javacord.api.entity.user.User; import java.util.Set; -public class DiscordCommandSender implements CommandSender { +public class DiscordCommandSender implements ConsoleCommandSender { private final User user; protected final PermissibleBase perm; @@ -28,7 +31,7 @@ public class DiscordCommandSender implements CommandSender { @Override public void sendMessage(String[] strings) { - user.sendMessage(String.join("", strings)); + user.sendMessage(String.join("\n", strings)); } @Override @@ -104,4 +107,34 @@ public class DiscordCommandSender implements CommandSender { @Override public void setOp(boolean b) { } + + @Override + public boolean isConversing() { + return false; + } + + @Override + public void acceptConversationInput(String s) { + + } + + @Override + public boolean beginConversation(Conversation conversation) { + return false; + } + + @Override + public void abandonConversation(Conversation conversation) { + + } + + @Override + public void abandonConversation(Conversation conversation, ConversationAbandonedEvent conversationAbandonedEvent) { + + } + + @Override + public void sendRawMessage(String s) { + user.sendMessage(s); + } }