We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1ab3a5 commit 497afc7Copy full SHA for 497afc7
1 file changed
src/main/kotlin/com/mairwunnx/projectessentials/warps/Messaging.kt
@@ -0,0 +1,23 @@
1
+package com.mairwunnx.projectessentials.warps
2
+
3
+import com.mairwunnx.projectessentials.core.configuration.localization.LocalizationConfigurationUtils
4
+import com.mairwunnx.projectessentials.core.extensions.sendMsg
5
+import com.mairwunnx.projectessentials.core.localization.sendMsgV2
6
+import net.minecraft.command.CommandSource
7
8
+internal fun sendMessage(
9
+ source: CommandSource,
10
+ message: String,
11
+ vararg args: String
12
+) {
13
+ if (LocalizationConfigurationUtils.getConfig().enabled) {
14
+ sendMsgV2(
15
+ source.asPlayer(),
16
+ "project_essentials_warps.warp.$message", *args
17
+ )
18
+ } else {
19
+ sendMsg(
20
+ "warps", source, "warp.$message", *args
21
22
+ }
23
+}
0 commit comments