Guard the Navigator release against deployed plugin runtimes

This commit is contained in:
unimatrixgit 2026-11-29 23:44:50 +01:00
commit 9baca377a7

View file

@ -165,13 +165,11 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto
int centre=CENTRES[i];
var item=icon(p,name,reason==null?detail:reason,"drgui_transparent",reason==null?Material.ENDER_PEARL:Material.GRAY_DYE);
if(reason!=null){
var meta=item.getItemMeta();meta.displayName(Component.text(name,NamedTextColor.GRAY));item.setItemMeta(meta);
item.setType(Material.GRAY_DYE);
var meta=item.getItemMeta();meta.setItemModel(null);meta.displayName(Component.text(name,NamedTextColor.GRAY));item.setItemMeta(meta);
}
screen.inventory.setItem(centre,item);
if(reason==null){
Runnable book=()->bookPassage(p,data,route.world());
for(int row=i<3?-1:0;row<=1;row++)for(int col=-1;col<=1;col++)screen.actions.put(centre+row*9+col,book);
}
if(reason==null)screen.actions.put(centre,()->bookPassage(p,data,route.world()));
}
button(screen,p,45,"Your Mentat","Return to your House adviser",Material.ARROW,()->mentat(p,data));screen.actions.put(46,screen.actions.get(45));
button(screen,p,49,"Cancel booking","No fare is taken for a cancelled booking",Material.BARRIER,()->{cancelBooking(p);travelMenu(p,data);});for(int slot:new int[]{48,50})screen.actions.put(slot,screen.actions.get(49));