mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-23 04:47:34 +01:00
Fixes pre-1.20 support
This commit is contained in:
parent
9f9e88ea43
commit
7a1ca884b9
@ -17,8 +17,6 @@ import org.bukkit.inventory.meta.trim.TrimPattern;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Jules
|
* @author Jules
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,10 @@ public class TrimMaterialStat extends ChooseStat implements GemStoneStat {
|
|||||||
public TrimMaterialStat() {
|
public TrimMaterialStat() {
|
||||||
super("TRIM_MATERIAL", Material.LEATHER_CHESTPLATE, "Trim Material", new String[]{"Material to trim your armor with."}, new String[]{"armor"});
|
super("TRIM_MATERIAL", Material.LEATHER_CHESTPLATE, "Trim Material", new String[]{"Material to trim your armor with."}, new String[]{"armor"});
|
||||||
|
|
||||||
if (MythicLib.plugin.getVersion().isBelowOrEqual(1, 19)) disable();
|
if (MythicLib.plugin.getVersion().isBelowOrEqual(1, 19)) {
|
||||||
|
disable();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (TrimMaterial mat : Registry.TRIM_MATERIAL)
|
for (TrimMaterial mat : Registry.TRIM_MATERIAL)
|
||||||
addChoices(new StatChoice(mat.getKey().getKey()));
|
addChoices(new StatChoice(mat.getKey().getKey()));
|
||||||
|
@ -24,7 +24,10 @@ public class TrimPatternStat extends ChooseStat implements GemStoneStat {
|
|||||||
public TrimPatternStat() {
|
public TrimPatternStat() {
|
||||||
super("TRIM_PATTERN", Material.LEATHER_CHESTPLATE, "Trim Pattern", new String[]{"Pattern of trimmed armor."}, new String[]{"armor"});
|
super("TRIM_PATTERN", Material.LEATHER_CHESTPLATE, "Trim Pattern", new String[]{"Pattern of trimmed armor."}, new String[]{"armor"});
|
||||||
|
|
||||||
if (MythicLib.plugin.getVersion().isBelowOrEqual(1, 19)) disable();
|
if (MythicLib.plugin.getVersion().isBelowOrEqual(1, 19)) {
|
||||||
|
disable();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (TrimPattern mat : Registry.TRIM_PATTERN)
|
for (TrimPattern mat : Registry.TRIM_PATTERN)
|
||||||
addChoices(new StatChoice(mat.getKey().getKey()));
|
addChoices(new StatChoice(mat.getKey().getKey()));
|
||||||
|
Loading…
Reference in New Issue
Block a user