From df97aee854b0534a294ea7667accde26785cede2 Mon Sep 17 00:00:00 2001 From: aro Date: Wed, 7 Dec 2022 16:28:24 +0100 Subject: [PATCH] refactor: clearer variable name --- .../nicko/gui/items/settings/BungeeCordCyclingItem.java | 4 ++-- .../nicko/gui/items/settings/LanguageCyclingItem.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/BungeeCordCyclingItem.java b/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/BungeeCordCyclingItem.java index e96ccd1..21858bb 100644 --- a/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/BungeeCordCyclingItem.java +++ b/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/BungeeCordCyclingItem.java @@ -14,7 +14,7 @@ import org.bukkit.entity.Player; import java.util.Optional; public class BungeeCordCyclingItem { - private final ItemProvider[] possibleLocales = new ItemProvider[]{ + private final ItemProvider[] providers = new ItemProvider[]{ getItemProviderForValue(true), getItemProviderForValue(false) }; @@ -27,7 +27,7 @@ public class BungeeCordCyclingItem { return CycleItem.withStateChangeHandler((observer, integer) -> { nickoProfile.setBungeecordTransfer(integer != 1); observer.playSound(player, Sound.UI_BUTTON_CLICK, 1f, 0.707107f); // 0.707107 ~= C - }, startingState, possibleLocales); + }, startingState, providers); } return new SimpleItem(ItemProvider.EMPTY); diff --git a/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/LanguageCyclingItem.java b/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/LanguageCyclingItem.java index 58171a1..29cc6be 100644 --- a/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/LanguageCyclingItem.java +++ b/nicko-core/src/main/java/net/artelnatif/nicko/gui/items/settings/LanguageCyclingItem.java @@ -15,7 +15,7 @@ import org.bukkit.entity.Player; import java.util.Optional; public class LanguageCyclingItem { - private final ItemProvider[] possibleLocales = new ItemProvider[]{ + private final ItemProvider[] providers = new ItemProvider[]{ getItemProviderForLocale(Locale.ENGLISH), getItemProviderForLocale(Locale.FRENCH), getItemProviderForLocale(Locale.CUSTOM), @@ -29,7 +29,7 @@ public class LanguageCyclingItem { return CycleItem.withStateChangeHandler((observer, integer) -> { nickoProfile.setLocale(Locale.values()[integer]); observer.playSound(player, Sound.UI_BUTTON_CLICK, 1f, 0.707107f); // 0.707107 ~= C - }, localeOrdinal, possibleLocales); + }, localeOrdinal, providers); } return new SimpleItem(ItemProvider.EMPTY);