Skip to content

Commit 0267ead

Browse files
committed
Fixed sending "§e" before playername in join/quit messages (fixes #4)
1 parent bb894f4 commit 0267ead

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/selfcoders/matterbukkit/EventListener.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.selfcoders.matterbukkit.matterbridgeapi.API;
44
import com.selfcoders.matterbukkit.matterbridgeapi.Message;
5+
import org.bukkit.ChatColor;
56
import org.bukkit.configuration.file.FileConfiguration;
67
import org.bukkit.configuration.file.YamlConfiguration;
78
import org.bukkit.entity.Player;
@@ -169,7 +170,7 @@ public void onPlayerJoin(PlayerJoinEvent event) {
169170
}
170171

171172
try {
172-
matterBridgeApi.sendMessage(event.getJoinMessage());
173+
matterBridgeApi.sendMessage(ChatColor.stripColor(event.getJoinMessage()));
173174
} catch (IOException exception) {
174175
plugin.getLogger().log(Level.SEVERE, exception.toString(), exception);
175176
}
@@ -182,7 +183,7 @@ public void onPlayerQuit(PlayerQuitEvent event) {
182183
}
183184

184185
try {
185-
matterBridgeApi.sendMessage(event.getQuitMessage());
186+
matterBridgeApi.sendMessage(ChatColor.stripColor(event.getQuitMessage()));
186187
} catch (IOException exception) {
187188
plugin.getLogger().log(Level.SEVERE, exception.toString(), exception);
188189
}

0 commit comments

Comments
 (0)