refactor: instance not necessary and final vars
This commit is contained in:
parent
875dcebe0b
commit
6f1ce8d5d9
2 changed files with 2 additions and 3 deletions
|
@ -20,7 +20,7 @@ public class BungeeCordCycling {
|
||||||
};
|
};
|
||||||
|
|
||||||
public BaseItem get(Player player) {
|
public BaseItem get(Player player) {
|
||||||
Optional<NickoProfile> profile = NickoBukkit.getInstance().getDataStore().getData(player.getUniqueId());
|
final Optional<NickoProfile> profile = NickoBukkit.getInstance().getDataStore().getData(player.getUniqueId());
|
||||||
if (profile.isPresent()) {
|
if (profile.isPresent()) {
|
||||||
final NickoProfile nickoProfile = profile.get();
|
final NickoProfile nickoProfile = profile.get();
|
||||||
int startingState = nickoProfile.isBungeecordTransfer() ? 0 : 1;
|
int startingState = nickoProfile.isBungeecordTransfer() ? 0 : 1;
|
||||||
|
|
|
@ -18,8 +18,7 @@ public class LanguageCycling {
|
||||||
private final ItemProvider[] providers = getItems();
|
private final ItemProvider[] providers = getItems();
|
||||||
|
|
||||||
public BaseItem get(Player player) {
|
public BaseItem get(Player player) {
|
||||||
final NickoBukkit instance = NickoBukkit.getInstance();
|
final Optional<NickoProfile> profile = NickoBukkit.getInstance().getDataStore().getData(player.getUniqueId());
|
||||||
Optional<NickoProfile> profile = instance.getDataStore().getData(player.getUniqueId());
|
|
||||||
if (profile.isPresent()) {
|
if (profile.isPresent()) {
|
||||||
final NickoProfile nickoProfile = profile.get();
|
final NickoProfile nickoProfile = profile.get();
|
||||||
int localeOrdinal = nickoProfile.getLocale().ordinal();
|
int localeOrdinal = nickoProfile.getLocale().ordinal();
|
||||||
|
|
Loading…
Reference in a new issue