Skip to content

Commit 18417ff

Browse files
committed
0.4
1 parent c873117 commit 18417ff

29 files changed

+4521
-4701
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>me.brunorm.skywars</groupId>
77
<artifactId>Skywars</artifactId>
8-
<version>0.3.2.3.2</version>
8+
<version>0.4</version>
99
<name>Skywars</name>
1010

1111
<properties>
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
package me.brunorm.skywars;
2-
3-
import org.bukkit.ChatColor;
4-
import org.bukkit.entity.Player;
5-
6-
import me.brunorm.skywars.structures.Arena;
7-
import me.brunorm.skywars.structures.SkywarsUser;
8-
9-
public class Messager {
10-
11-
private Messager() {
12-
}
13-
14-
public static final char ALT_COLOR_CHAR = '&';
15-
16-
public static String color(String text) {
17-
return ChatColor.translateAlternateColorCodes(ALT_COLOR_CHAR, text);
18-
}
19-
20-
public static String colorFormat(String text, Object... format) {
21-
return Messager.color(String.format(text, format));
22-
}
23-
24-
public static String get(String name, Object... format) {
25-
return getMessage(name, format);
26-
}
27-
28-
public static String getMessage(String name, Object... format) {
29-
String msg = Skywars.langConfig.getString(name);
30-
if (msg == null)
31-
return name;
32-
for (int i = 0; i < format.length; i++) {
33-
msg = msg.replaceAll(String.format("\\{%s\\}", i), String.valueOf(format[i]));
34-
}
35-
return Messager.color(msg);
36-
}
37-
38-
public static String getFormattedMessage(String name, Player player, Arena arena, SkywarsUser swp,
39-
Object... format) {
40-
return Messager.color(SkywarsUtils.format(getMessage(name, format), player, arena, swp));
41-
}
42-
43-
}
1+
package me.brunorm.skywars;
2+
3+
import org.bukkit.ChatColor;
4+
import org.bukkit.entity.Player;
5+
6+
import me.brunorm.skywars.structures.Arena;
7+
import me.brunorm.skywars.structures.SkywarsUser;
8+
9+
public class Messager {
10+
11+
private Messager() {
12+
}
13+
14+
public static final char ALT_COLOR_CHAR = '&';
15+
16+
public static String color(String text) {
17+
return ChatColor.translateAlternateColorCodes(ALT_COLOR_CHAR, text);
18+
}
19+
20+
public static String colorFormat(String text, Object... format) {
21+
return Messager.color(String.format(text, format));
22+
}
23+
24+
public static String get(String name, Object... format) {
25+
return getMessage(name, format);
26+
}
27+
28+
public static String getMessage(String name, Object... format) {
29+
String msg = Skywars.langConfig.getString(name);
30+
if (msg == null)
31+
return name;
32+
for (int i = 0; i < format.length; i++) {
33+
msg = msg.replaceAll(String.format("\\{%s\\}", i), String.valueOf(format[i]));
34+
}
35+
return Messager.color(msg);
36+
}
37+
38+
public static String getFormattedMessage(String name, Player player, Arena arena, SkywarsUser swp,
39+
Object... format) {
40+
return Messager.color(SkywarsUtils.format(getMessage(name, format), player, arena, swp));
41+
}
42+
43+
}

0 commit comments

Comments
 (0)