1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-06 16:27:59 +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> <target>1.7</target>
</configuration> </configuration>
</plugin> </plugin>
<!-- <plugin> --> <plugin>
<!-- <groupId>org.apache.maven.plugins</groupId> --> <groupId>org.apache.maven.plugins</groupId>
<!-- <artifactId>maven-jar-plugin</artifactId> --> <artifactId>maven-jar-plugin</artifactId>
<!-- <version>2.3.1</version> --> <version>2.3.1</version>
<!-- <configuration> --> <configuration>
<!-- <outputDirectory>C:\Users\Arte\Desktop\Server\plugins</outputDirectory> --> <outputDirectory>C:\Users\Arte\Desktop\Server 1.13\plugins</outputDirectory>
<!-- </configuration> --> </configuration>
<!-- </plugin> --> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

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

View File

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