equipmentinspectorplugin: Remove the navigation button when disabling the plugin

This commit is contained in:
Owain van Brakel
2019-07-20 23:49:41 +02:00
parent 3fd290b2a8
commit f36ef96e87

View File

@@ -137,7 +137,6 @@ public class EquipmentInspectorPlugin extends Plugin
.panel(equipmentInspectorPanel) .panel(equipmentInspectorPanel)
.build(); .build();
pluginToolbar.addNavigation(navButton); pluginToolbar.addNavigation(navButton);
} }
@@ -148,6 +147,7 @@ public class EquipmentInspectorPlugin extends Plugin
eventBus.unregister(this); eventBus.unregister(this);
menuManager.removePlayerMenuItem(INSPECT_EQUIPMENT); menuManager.removePlayerMenuItem(INSPECT_EQUIPMENT);
pluginToolbar.removeNavigation(navButton);
} }
private void addSubscriptions() private void addSubscriptions()
@@ -160,8 +160,6 @@ public class EquipmentInspectorPlugin extends Plugin
{ {
if (event.getMenuOption().equals(INSPECT_EQUIPMENT)) if (event.getMenuOption().equals(INSPECT_EQUIPMENT))
{ {
executor.execute(() -> executor.execute(() ->
{ {
try try