File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/main/java/me/despical/commandframework Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 27
27
import org .jetbrains .annotations .NotNull ;
28
28
import org .jetbrains .annotations .Nullable ;
29
29
30
+ import java .text .MessageFormat ;
30
31
import java .util .Arrays ;
31
32
import java .util .Optional ;
32
33
@@ -166,6 +167,19 @@ public void sendMessage(String message) {
166
167
commandSender .sendMessage (CommandFramework .instance .colorFormatter .apply (message ));
167
168
}
168
169
170
+ /**
171
+ * Sends message to sender without receiving command
172
+ * sender with the given parameters.
173
+ *
174
+ * @param message the message will be sent to sender.
175
+ * @param params the parameters to format the message.
176
+ */
177
+ public void sendMessage (String message , Object ... params ) {
178
+ if (message == null )
179
+ return ;
180
+ commandSender .sendMessage (CommandFramework .instance .colorFormatter .apply (MessageFormat .format (message , params )));
181
+ }
182
+
169
183
/**
170
184
* Checks if command sender is console.
171
185
*
You can’t perform that action at this time.
0 commit comments