forked from Upstream/CommandPanels
Fix for unclosable and leaving.
This commit is contained in:
parent
31cea874c0
commit
4da33349a5
@ -55,6 +55,9 @@ public class UtilsPanelsLoader implements Listener {
|
|||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
//end the old panel session and copy a new one
|
//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;
|
plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).isOpen = false;
|
||||||
Panel reopenedPanel = plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).copy();
|
Panel reopenedPanel = plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).copy();
|
||||||
//re-add placeholders as they are not transferred in the Panel object
|
//re-add placeholders as they are not transferred in the Panel object
|
||||||
|
Loading…
Reference in New Issue
Block a user