Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Fixed item build method for perm menu, used multiversion material che…
Browse files Browse the repository at this point in the history
…ck on runtime along with startup.
  • Loading branch information
prosavage committed Apr 1, 2019
1 parent e13c608 commit a367d73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/massivecraft/factions/struct/Relation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.massivecraft.factions.Conf;
import com.massivecraft.factions.SavageFactions;
import com.massivecraft.factions.util.MultiversionMaterials;
import com.massivecraft.factions.zcore.fperms.Permissable;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.ChatColor;
Expand Down Expand Up @@ -203,7 +204,7 @@ public ItemStack buildItem() {
String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", ""));
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) {
return null;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/massivecraft/factions/struct/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.massivecraft.factions.Conf;
import com.massivecraft.factions.SavageFactions;
import com.massivecraft.factions.util.MultiversionMaterials;
import com.massivecraft.factions.zcore.fperms.Permissable;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.ChatColor;
Expand Down Expand Up @@ -117,7 +118,7 @@ public ItemStack buildItem() {
String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", ""));
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) {
return null;
}
Expand Down

0 comments on commit a367d73

Please sign in to comment.