Skip to content

Commit

Permalink
Fixed bugs in TFM 5.0
Browse files Browse the repository at this point in the history
Added /saconfig setrank
Added /saconfig reload
Small changes
  • Loading branch information
JeromSar committed Mar 7, 2016
1 parent 6edb6be commit 924f718
Show file tree
Hide file tree
Showing 18 changed files with 539 additions and 431 deletions.
11 changes: 5 additions & 6 deletions src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ private void handleChatEvent(AsyncPlayerChatEvent event)
final Player player = event.getPlayer();
String message = event.getMessage().trim();

final FPlayer playerdata = plugin.pl.getPlayerSync(player);

// Strip color from messages
message = ChatColor.stripColor(message);

Expand Down Expand Up @@ -75,9 +73,10 @@ private void handleChatEvent(AsyncPlayerChatEvent event)
}

// Check for adminchat
if (playerdata.inAdminChat())
final FPlayer fPlayer = plugin.pl.getPlayerSync(player);
if (fPlayer.inAdminChat())
{
FSync.adminChatMessage(player, message, false);
FSync.adminChatMessage(player, message);
event.setCancelled(true);
return;
}
Expand All @@ -86,9 +85,9 @@ private void handleChatEvent(AsyncPlayerChatEvent event)
event.setMessage(message);

// Set the tag
if (playerdata.getTag() != null)
if (fPlayer.getTag() != null)
{
event.setFormat("<" + playerdata.getTag().replaceAll("%", "%%") + " %1$s> %2$s");
event.setFormat("<" + fPlayer.getTag().replaceAll("%", "%%") + " %1$s> %2$s");
}
}

Expand Down
Loading

0 comments on commit 924f718

Please sign in to comment.