1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Empty is not empty by Mojang logic...

This commit is contained in:
Zrips 2018-11-12 12:49:02 +02:00
parent 66f2c4e743
commit 9d8c9532c1
3 changed files with 19 additions and 9 deletions

16
pom.xml
View File

@ -154,14 +154,14 @@
<target>1.7</target>
</configuration>
</plugin>
<!-- <plugin> -->
<!-- <groupId>org.apache.maven.plugins</groupId> -->
<!-- <artifactId>maven-jar-plugin</artifactId> -->
<!-- <version>2.3.1</version> -->
<!-- <configuration> -->
<!-- <outputDirectory>C:\Users\Arte\Desktop\Server\plugins</outputDirectory> -->
<!-- </configuration> -->
<!-- </plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>C:\Users\Arte\Desktop\Server 1.13\plugins</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1706,6 +1706,7 @@ public class ItemManager {
public static CMIMaterial get(String id) {
Integer ids = null;
Integer data = null;
id = id.replace("_", "").replace(" ", "").toLowerCase();
try {
ids = Integer.parseInt(id);
@ -1785,7 +1786,13 @@ public class ItemManager {
return one;
if (one.getName().replace("_", "").replace(" ", "").equalsIgnoreCase(id))
return one;
}
for (CMIMaterial one : CMIMaterial.values()) {
if (one.name().replace("_", "").toLowerCase().endsWith(id))
return one;
}
return CMIMaterial.NONE;
}

View File

@ -37,6 +37,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.CMILib.ItemManager.CMIMaterial;
import com.gamingmesh.jobs.resources.jfep.Parser;
import com.gamingmesh.jobs.stuff.Debug;
import com.gamingmesh.jobs.container.CurrencyLimit;
import com.gamingmesh.jobs.container.CurrencyType;
import com.gamingmesh.jobs.container.LocaleReader;
@ -937,9 +938,11 @@ public class GeneralConfigManager {
guiBackButton = tmat == null ? CMIMaterial.JACK_O_LANTERN.newItemStack() : tmat.newItemStack();
tmat = CMIMaterial.get(c.get("JobsGUI.Filler.Material", "STAINED_GLASS_PANE"));
Debug.D(c.get("JobsGUI.Filler.Material", "STAINED_GLASS_PANE"));
Debug.D( CMIMaterial.get(c.get("JobsGUI.Filler.Material", "STAINED_GLASS_PANE")));
guiFiller = tmat == null ? CMIMaterial.GREEN_STAINED_GLASS_PANE.newItemStack() : tmat.newItemStack();
ItemMeta meta = guiFiller.getItemMeta();
meta.setDisplayName("");
meta.setDisplayName(" ");
guiFiller.setItemMeta(meta);
// c.getW().addComment("Schedule.Boost.Enable", "Do you want to enable scheduler for global boost");