9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2025-12-19 14:59:19 +00:00

Add XMaterial compatibility to icons

This commit is contained in:
SamB440
2020-02-21 16:58:42 +00:00
parent e5669808d7
commit 2a50f01175
3 changed files with 12 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="RPGRegions" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="net.islandearth" external.system.module.version="1.0.5" type="JAVA_MODULE" version="4"> <module external.linked.project.id="RPGRegions" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="net.islandearth" external.system.module.version="1.0.5" type="JAVA_MODULE" version="4">
<component name="ExternalSystem" externalSystem="GRADLE" externalSystemModuleGroup="net.islandearth" externalSystemModuleVersion="1.1.2" linkedProjectId="RPGRegions" linkedProjectPath="$MODULE_DIR$" rootProjectPath="$MODULE_DIR$" /> <component name="ExternalSystem" externalSystem="GRADLE" externalSystemModuleGroup="net.islandearth" externalSystemModuleVersion="1.1.3" linkedProjectId="RPGRegions" linkedProjectPath="$MODULE_DIR$" rootProjectPath="$MODULE_DIR$" />
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">

View File

@@ -1,2 +1,2 @@
pluginGroup=net.islandearth pluginGroup=net.islandearth
pluginVersion=1.1.2 pluginVersion=1.1.4

View File

@@ -198,7 +198,16 @@ public class DiscoveryGUI extends RPGRegionsGUI {
&& hasDiscovered && hasDiscovered
? Translations.TELEPORT.get(player) ? Translations.TELEPORT.get(player)
: null; : null;
items.add(new GuiItem(new ItemStackBuilder(hasDiscovered ? configuredRegion.getIcon() : configuredRegion.getUndiscoveredIcon()) ItemStack item = hasDiscovered
?
new ItemStackBuilder(XMaterial.matchXMaterial(
configuredRegion.getIcon()).parseItem(true))
.build()
:
new ItemStackBuilder(XMaterial.matchXMaterial(
configuredRegion.getUndiscoveredIcon()).parseItem(true))
.build();
items.add(new GuiItem(new ItemStackBuilder(item)
.withName(colour + configuredRegion.getCustomName()) .withName(colour + configuredRegion.getCustomName())
.withLore(lore) .withLore(lore)
.withLore(lore2) .withLore(lore2)