Skip to content

Commit 6439dfa

Browse files
committed
Added new utility method CommandArguments#sendMessage(Component)
1 parent 65bf4d3 commit 6439dfa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/me/despical/commandframework/CommandArguments.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package me.despical.commandframework;
2020

2121
import me.despical.commandframework.utils.Utils;
22+
import net.kyori.adventure.text.Component;
2223
import org.bukkit.Bukkit;
2324
import org.bukkit.command.Command;
2425
import org.bukkit.command.CommandSender;
@@ -246,6 +247,15 @@ public boolean sendMessage(Message message) {
246247
return message.sendMessage(command, this);
247248
}
248249

250+
/**
251+
* Sends the specified {@link Component} to command sender associated with this object.
252+
*
253+
* @param component the {@link Component} object to be sent.
254+
*/
255+
public void sendMessage(Component component) {
256+
commandSender.sendMessage(component);
257+
}
258+
249259
/**
250260
* Returns {@code true} if, and only if, command sender is console.
251261
*

0 commit comments

Comments
 (0)