Added an automatic fix for the (0s) problem

This commit is contained in:
Norbi Peti 2016-04-28 22:19:11 +02:00
parent c8bb3a4ec7
commit d79b0dd687
2 changed files with 10 additions and 7 deletions

Binary file not shown.

View file

@ -84,6 +84,8 @@ public class PlayerListener implements Listener {
tt.mp = mp; tt.mp = mp;
timer.schedule(tt, 1000); timer.schedule(tt, 1000);
} else { } else {
if (mp.GetFlairTime() == 0x00)
mp.SetFlair(MaybeOfflinePlayer.FlairTimeNone);
Timer timer = new Timer(); Timer timer = new Timer();
PlayerJoinTimerTask tt = new PlayerJoinTimerTask() { PlayerJoinTimerTask tt = new PlayerJoinTimerTask() {
@Override @Override
@ -636,9 +638,9 @@ public class PlayerListener implements Listener {
} }
}); });
} }
MaybeOfflinePlayer mp=MaybeOfflinePlayer.GetFromPlayer(e.getPlayer()); MaybeOfflinePlayer mp = MaybeOfflinePlayer.GetFromPlayer(e.getPlayer());
if(mp.ChatOnly) if (mp.ChatOnly)
e.setCancelled(true); e.setCancelled(true);
} }
@ -658,11 +660,12 @@ public class PlayerListener implements Listener {
e.getPlayer().sendMessage( e.getPlayer().sendMessage(
"§cYou are not allowed to teleport to/from No Mans Land."); "§cYou are not allowed to teleport to/from No Mans Land.");
} }
if(MaybeOfflinePlayer.GetFromPlayer(e.getPlayer()).ChatOnly) if (MaybeOfflinePlayer.GetFromPlayer(e.getPlayer()).ChatOnly) {
{
e.setCancelled(true); e.setCancelled(true);
e.getPlayer().sendMessage("§cYou are not allowed to teleport while in chat-only mode."); e.getPlayer()
.sendMessage(
"§cYou are not allowed to teleport while in chat-only mode.");
} }
} }