Skip to content

Commit

Permalink
Add a code comment explaining why we do this
Browse files Browse the repository at this point in the history
Fixes #85
  • Loading branch information
RoboMWM committed Jul 22, 2017
1 parent 9a64220 commit 4cb2abe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/me/ryanhamshire/GriefPrevention/GriefPrevention.java
Expand Up @@ -3316,6 +3316,8 @@ static void sendMessage(Player player, ChatColor color, String message)
static void sendMessage(Player player, ChatColor color, String message, long delayInTicks)
{
SendPlayerMessageTask task = new SendPlayerMessageTask(player, color, message);

//Only schedule if there should be a delay. Otherwise, send the message right now, else the message will appear out of order.
if(delayInTicks > 0)
{
GriefPrevention.instance.getServer().getScheduler().runTaskLater(GriefPrevention.instance, task, delayInTicks);
Expand Down

0 comments on commit 4cb2abe

Please sign in to comment.