File tree Expand file tree Collapse file tree
src/main/java/simpleircbridge Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
1313apply plugin : ' eclipse'
1414apply plugin : ' maven-publish'
1515
16- version = ' 1.5.0 '
16+ version = ' 1.5.1 '
1717group = ' simpleircbridge' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
1818archivesBaseName = ' simpleircbridge'
1919
Original file line number Diff line number Diff line change 33import static simpleircbridge .SIBConstants .*;
44
55import net .minecraftforge .event .ServerChatEvent ;
6+ import net .minecraftforge .event .entity .player .PlayerEvent ;
67import net .minecraftforge .eventbus .api .SubscribeEvent ;
78import utils .IRCMinecraftConverter ;
89
@@ -13,15 +14,15 @@ public GameEventHandler(SimpleIRCBridge bridge) {
1314 this .bridge = bridge ;
1415 }
1516
16- // @SubscribeEvent
17- // public void playerLoggedIn(PlayerEvent.PlayerLoggedInEvent e) {
18- // toIrc(String.format(FORMAT1_MC_LOGIN, SIBUtil.mangle(e.getPlayer ().getDisplayName().getString())));
19- // }
20- //
21- // @SubscribeEvent
22- // public void playerLoggedOut(PlayerEvent.PlayerLoggedOutEvent e) {
23- // toIrc(String.format(FORMAT1_MC_LOGOUT, SIBUtil.mangle(e.getPlayer ().getDisplayName().getString())));
24- // }
17+ @ SubscribeEvent
18+ public void playerLoggedIn (PlayerEvent .PlayerLoggedInEvent e ) {
19+ toIrc (String .format (FORMAT1_MC_LOGIN , SIBUtil .mangle (e .getEntity ().getDisplayName ().getString ())));
20+ }
21+
22+ @ SubscribeEvent
23+ public void playerLoggedOut (PlayerEvent .PlayerLoggedOutEvent e ) {
24+ toIrc (String .format (FORMAT1_MC_LOGOUT , SIBUtil .mangle (e .getEntity ().getDisplayName ().getString ())));
25+ }
2526
2627// @SubscribeEvent
2728// public void command(CommandEvent e) {
Original file line number Diff line number Diff line change 66 */
77public class SIBConstants {
88 /* == MC FORMATS, 1 PARAMETER == */
9- public static final String FORMAT1_MC_LOGIN = "-- > %s joined the game" ;
10- public static final String FORMAT1_MC_LOGOUT = "<-- %s left the game" ;
9+ public static final String FORMAT1_MC_LOGIN = "> %s joined the game" ;
10+ public static final String FORMAT1_MC_LOGOUT = "< %s left the game" ;
1111 public static final String FORMAT1_MC_DEATH = "RIP: %s" ;
1212
1313 /* == MC FORMATS, 2 PARAMETERS == */
You can’t perform that action at this time.
0 commit comments