make use storage contents final

This commit is contained in:
okx-code
2021-08-14 21:28:10 +01:00
parent 446a38aacd
commit 1ee0def617
@@ -12,15 +12,17 @@ import sh.okx.rankup.requirements.Requirement;
import java.util.Arrays;
public class ItemRequirement extends ProgressiveRequirement {
public static boolean USE_STORAGE_CONTENTS;
public static final boolean USE_STORAGE_CONTENTS;
static {
boolean getStorageContentsMethodExists;
try {
Inventory.class.getMethod("getStorageContents");
USE_STORAGE_CONTENTS = true;
getStorageContentsMethodExists = true;
} catch (NoSuchMethodException e) {
USE_STORAGE_CONTENTS = false;
getStorageContentsMethodExists = false;
}
USE_STORAGE_CONTENTS = getStorageContentsMethodExists;
}
public ItemRequirement(RankupPlugin plugin, String name) {