This repository has been archived by the owner on Jul 27, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...n/java/com/cnaude/purpleirc/GameListeners/GamePlayerPlayerAchievementAwardedListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* To change this template, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package com.cnaude.purpleirc.GameListeners; | ||
|
||
import com.cnaude.purpleirc.PurpleBot; | ||
import com.cnaude.purpleirc.PurpleIRC; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.EventPriority; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.player.PlayerAchievementAwardedEvent; | ||
|
||
/** | ||
* | ||
* @author cnaude | ||
*/ | ||
public class GamePlayerPlayerAchievementAwardedListener implements Listener { | ||
|
||
private final PurpleIRC plugin; | ||
|
||
/** | ||
* | ||
* @param plugin | ||
*/ | ||
public GamePlayerPlayerAchievementAwardedListener(PurpleIRC plugin) { | ||
this.plugin = plugin; | ||
} | ||
|
||
/** | ||
* | ||
* @param event | ||
*/ | ||
@EventHandler(priority = EventPriority.LOWEST) | ||
public void onPlayerAchievementAwardedEvent(PlayerAchievementAwardedEvent event) { | ||
plugin.logDebug("ACHIEVEMENT: " + event.getPlayer().getName() + " => " + event.getAchievement()); | ||
for (PurpleBot ircBot : plugin.ircBots.values()) { | ||
if (ircBot.isConnected()) { | ||
ircBot.gameAchievement(event.getPlayer(), event.getAchievement()); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters