<%# Very ugly ejs code to hide the Players button if the playerManager plugin isn`t installed %> <% sidebarPluginButtonsHtml = ""; masterPlugins.forEach(plug => { if(plug.main && plug.main.ui && typeof plug.main.ui.sidebar == "object" && Array.isArray(plug.main.ui.sidebar)){ let sidebarEntries = plug.main.ui.sidebar; sidebarEntries.forEach(button => { if(button.getHtml && typeof button.getHtml == "function"){ sidebarPluginButtonsHtml += button.getHtml(); } }); } }); %> <%- sidebarPluginButtonsHtml %>