Skip to content

Commit

Permalink
also notify emote moderators of new requests on join
Browse files Browse the repository at this point in the history
  • Loading branch information
RoboMWM committed Mar 17, 2018
1 parent e242786 commit d939065
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/com/robomwm/customemotes/CustomEmotes.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.bukkit.event.Listener;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.ArrayList;
Expand Down Expand Up @@ -127,6 +128,12 @@ private void saveEmotes()
UsefulUtil.saveYamlFileDelayed(this, "emotes.yml", emoteYaml);
}

@EventHandler(priority = EventPriority.HIGHEST)
private void onEmoteModJoin(PlayerJoinEvent event)
{
notifyNewRequests(event.getPlayer());
}

@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
private void chatter(AsyncPlayerChatEvent event)
{
Expand Down

0 comments on commit d939065

Please sign in to comment.