Removed redundant code in TabbedPanel

This commit is contained in:
tastybento 2020-07-04 17:17:35 -07:00
parent 83c0713ddf
commit 0126c44a06

View File

@ -137,9 +137,7 @@ public class TabbedPanel extends Panel implements PanelListener {
// Add icons // Add icons
for (Entry<Integer, Tab> tabPanel : tpb.getTabs().entrySet()) { for (Entry<Integer, Tab> tabPanel : tpb.getTabs().entrySet()) {
// Add the icon to the top row // Add the icon to the top row
if (tabPanel.getValue().getPermission().isEmpty() if (tpb.getUser().hasPermission(tabPanel.getValue().getPermission())) {
|| tpb.getUser().hasPermission(tabPanel.getValue().getPermission())
|| tpb.getUser().isOp()) {
PanelItem activeIcon = tabPanel.getValue().getIcon(); PanelItem activeIcon = tabPanel.getValue().getIcon();
// Set the glow of the active tab // Set the glow of the active tab
activeIcon.setGlow(tabPanel.getValue().equals(tab)); activeIcon.setGlow(tabPanel.getValue().equals(tab));