mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-12 11:21:28 +01:00
Lets clean up the recipe window on player quit, just in case.
This commit is contained in:
parent
03445e5b9b
commit
bbb478c51f
@ -131,6 +131,10 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
{
|
{
|
||||||
user.setLastLocation();
|
user.setLastLocation();
|
||||||
}
|
}
|
||||||
|
if (user.isRecipeSee())
|
||||||
|
{
|
||||||
|
user.getPlayer().getOpenInventory().getTopInventory().clear();
|
||||||
|
}
|
||||||
user.updateActivity(false);
|
user.updateActivity(false);
|
||||||
user.dispose();
|
user.dispose();
|
||||||
}
|
}
|
||||||
@ -563,7 +567,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
if (event.getView().getTopInventory().getType() == InventoryType.WORKBENCH)
|
if (event.getView().getTopInventory().getType() == InventoryType.WORKBENCH)
|
||||||
{
|
{
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
if(user.isRecipeSee())
|
if (user.isRecipeSee())
|
||||||
{
|
{
|
||||||
user.setRecipeSee(false);
|
user.setRecipeSee(false);
|
||||||
event.getView().getTopInventory().clear();
|
event.getView().getTopInventory().clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user