Fixed item build method for perm menu, used multiversion material check on runtime along with startup.

This commit is contained in:
ProSavage 2019-04-01 16:52:04 -05:00
parent e13c60843a
commit a367d73dae
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package com.massivecraft.factions.struct;
import com.massivecraft.factions.Conf; import com.massivecraft.factions.Conf;
import com.massivecraft.factions.SavageFactions; import com.massivecraft.factions.SavageFactions;
import com.massivecraft.factions.util.MultiversionMaterials;
import com.massivecraft.factions.zcore.fperms.Permissable; import com.massivecraft.factions.zcore.fperms.Permissable;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -203,7 +204,7 @@ public enum Relation implements Permissable {
String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", "")); String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", ""));
List<String> lore = new ArrayList<>(); List<String> lore = new ArrayList<>();
Material material = Material.matchMaterial(RELATION_CONFIG.getString("materials." + name().toLowerCase())); Material material = MultiversionMaterials.fromString(RELATION_CONFIG.getString("materials." + name().toLowerCase())).parseMaterial();
if (material == null) { if (material == null) {
return null; return null;
} }

View File

@ -2,6 +2,7 @@ package com.massivecraft.factions.struct;
import com.massivecraft.factions.Conf; import com.massivecraft.factions.Conf;
import com.massivecraft.factions.SavageFactions; import com.massivecraft.factions.SavageFactions;
import com.massivecraft.factions.util.MultiversionMaterials;
import com.massivecraft.factions.zcore.fperms.Permissable; import com.massivecraft.factions.zcore.fperms.Permissable;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -117,7 +118,7 @@ public enum Role implements Permissable {
String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", "")); String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", ""));
List<String> lore = new ArrayList<>(); List<String> lore = new ArrayList<>();
Material material = Material.matchMaterial(RELATION_CONFIG.getString("materials." + name().toLowerCase(), "STAINED_CLAY")); Material material = MultiversionMaterials.fromString(RELATION_CONFIG.getString("materials." + name().toLowerCase(), "STAINED_CLAY")).parseMaterial();
if (material == null) { if (material == null) {
return null; return null;
} }