@@ -0,0 +1,1370 @@
+package com.hyperfresh.mchyperchat.bukkit;%0A%0Aimport com.hyperfresh.mchyperchat.HyperChatEventPoster;%0Aimport com.hyperfresh.mchyperchat.Player;%0Aimport org.bukkit.Bukkit;%0Aimport org.bukkit.event.EventHandler;%0Aimport org.bukkit.event.player.AsyncPlayerChatEvent;%0Aimport org.bukkit.event.player.PlayerJoinEvent;%0Aimport org.bukkit.event.player.PlayerQuitEvent;%0Aimport org.bukkit.event.server.ServerCommandEvent;%0A%0Apublic class BukkitListener%0A%7B%0A%09private BukkitPlugin plugin;%0A%0A%09public BukkitListener(BukkitPlugin plugin)%0A%09%7B%0A%09%09this.plugin = plugin;%0A%09%7D%0A%0A%09@EventHandler%0A%09public void onPlayerJoin(PlayerJoinEvent event)%0A%09%7B%0A%09%09plugin.addPlayer(event.getPlayer());%0A%09%7D%0A%0A%09@EventHandler%0A%09public void onPlayerQuit(PlayerQuitEvent event)%0A%09%7B%0A%09%09plugin.removePlayer(event.getPlayer());%0A%09%7D%0A%0A%09@EventHandler%0A%09public void onPlayerChat(AsyncPlayerChatEvent event)%0A%09%7B%0A%09%09event.setCancelled(true);%0A%0A%09%09Player player = plugin.getPlayer(event.getPlayer());%0A%0A%09%09HyperChatEventPoster.onPlayerChat(player, event.getMessage());%0A%09%7D%0A%0A%09@EventHandler%0A%09public void onConsoleCommand(ServerCommandEvent event)%0A%09%7B%0A%09%09if(event.getSender().equals(Bukkit.getConsoleSender()))%0A%09%09%7B%0A%09%09%09String%5B%5D args = event.getCommand().split(%22 %22);%0A%09%09%09if(args%5B0%5D.equals(%22say%22))%0A%09%09%09%7B%0A%09%09%09%09event.setCommand(%22%22);%0A%0A%09%09%09%09//remove the %22say %22 part of the command%0A%09%09%09%09HyperChatEventPoster.onConsoleChat(event.getCommand().substring(4));%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D%0A

create class BukkitListener