Fix for unclosable and leaving.

This commit is contained in:
TinyTank800 2024-02-02 18:05:50 -08:00
parent 31cea874c0
commit 4da33349a5

View File

@ -55,6 +55,9 @@ public class UtilsPanelsLoader implements Listener {
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
public void run() {
//end the old panel session and copy a new one
if(plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top) == null){
return;
}
plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).isOpen = false;
Panel reopenedPanel = plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).copy();
//re-add placeholders as they are not transferred in the Panel object