mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-10 10:28:21 +01:00
Removed redundant code in TabbedPanel
This commit is contained in:
parent
83c0713ddf
commit
0126c44a06
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user