1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-10 16:48:05 +02:00

Lets clean up the recipe window on player quit, just in case.

This commit is contained in:
KHobbits
2012-12-29 06:55:48 +00:00
parent f6dd34e980
commit 06d3f9f41c

View File

@@ -131,6 +131,10 @@ public class EssentialsPlayerListener implements Listener
{
user.setLastLocation();
}
if (user.isRecipeSee())
{
user.getPlayer().getOpenInventory().getTopInventory().clear();
}
user.updateActivity(false);
user.dispose();
}
@@ -563,7 +567,7 @@ public class EssentialsPlayerListener implements Listener
if (event.getView().getTopInventory().getType() == InventoryType.WORKBENCH)
{
final User user = ess.getUser(event.getPlayer());
if(user.isRecipeSee())
if (user.isRecipeSee())
{
user.setRecipeSee(false);
event.getView().getTopInventory().clear();