Refactoring applied
This commit is contained in:
parent
3cc9709955
commit
0b35637a01
1 changed files with 5 additions and 5 deletions
|
@ -12,17 +12,17 @@ public class PlayerListener implements Listener {
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void OnPlayerJoin(PlayerJoinEvent event) {
|
public void OnPlayerJoin(PlayerJoinEvent event) {
|
||||||
TBMCPlayer player = TBMCPlayer.LoadPlayer(event.getPlayer());
|
TBMCPlayer player = TBMCPlayer.loadPlayer(event.getPlayer());
|
||||||
if (player == null)
|
if (player == null)
|
||||||
event.getPlayer().sendMessage("§c[TBMC] Failed to load player data! Please contact a mod.");
|
event.getPlayer().sendMessage("§c[TBMC] Failed to load player data! Please contact a mod.");
|
||||||
else
|
else
|
||||||
TBMCPlayer.JoinPlayer(player);
|
TBMCPlayer.joinPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void OnPlayerLeave(PlayerQuitEvent event) {
|
public void OnPlayerLeave(PlayerQuitEvent event) {
|
||||||
TBMCPlayer player = TBMCPlayer.GetPlayer(event.getPlayer());
|
TBMCPlayer player = TBMCPlayer.getPlayer(event.getPlayer());
|
||||||
TBMCPlayer.SavePlayer(player);
|
TBMCPlayer.savePlayer(player);
|
||||||
TBMCPlayer.QuitPlayer(player);
|
TBMCPlayer.quitPlayer(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue