Close player report if the reported player leaves the game mid-report.

This commit is contained in:
Keir 2015-10-27 22:15:06 +00:00
parent d9fb0adabb
commit cb1c779f37

View File

@ -5,6 +5,8 @@ import mineplex.core.report.command.ReportCloseCommand;
import mineplex.core.report.command.ReportCommand;
import mineplex.core.report.command.ReportHandleCommand;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class ReportPlugin extends MiniPlugin
@ -28,4 +30,10 @@ public class ReportPlugin extends MiniPlugin
addCommand(new ReportCloseCommand(this));
//AddCommand(new ReportDebugCommand(this));
}
@EventHandler
public void onPlayerQuit(PlayerQuitEvent e)
{
ReportManager.getInstance().onPlayerQuit(e.getPlayer());
}
}