fix prayer reorder shutdown

This commit is contained in:
Dennis
2018-04-28 11:23:26 +02:00
parent 1decbb6495
commit 8a12e1bfd8

View File

@@ -229,7 +229,7 @@ public class ReorderPrayersPlugin extends Plugin
{ {
clearPrayerTabMenus(); clearPrayerTabMenus();
prayerOrder = Prayer.values(); prayerOrder = Prayer.values();
reorderPrayers(); reorderPrayers(false);
} }
@Subscribe @Subscribe
@@ -361,6 +361,11 @@ public class ReorderPrayersPlugin extends Plugin
} }
private void reorderPrayers() private void reorderPrayers()
{
reorderPrayers(config.unlockPrayerReordering());
}
private void reorderPrayers(boolean unlocked)
{ {
if (client.getGameState() != GameState.LOGGED_IN) if (client.getGameState() != GameState.LOGGED_IN)
{ {
@@ -387,7 +392,7 @@ public class ReorderPrayersPlugin extends Plugin
Widget prayerWidget = prayerWidgets.get(prayer.ordinal()); Widget prayerWidget = prayerWidgets.get(prayer.ordinal());
int widgetConfig = prayerWidget.getClickMask(); int widgetConfig = prayerWidget.getClickMask();
if (config.unlockPrayerReordering()) if (unlocked)
{ {
// allow dragging of this widget // allow dragging of this widget
widgetConfig |= DRAG; widgetConfig |= DRAG;