mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 03:59:06 +00:00
Cleanup and prevent crash error
This commit is contained in:
@@ -16,6 +16,7 @@ import org.zeroturnaround.zip.commons.FileUtils;
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
@Data
|
||||
@@ -308,16 +309,16 @@ public class ProjectManager
|
||||
return cacheListing;
|
||||
}
|
||||
|
||||
JSONArray a = new JSONArray();
|
||||
JSONArray a;
|
||||
|
||||
if(cached)
|
||||
{
|
||||
a = new JSONArray(Iris.getCached("cachedlisting", LISTING));
|
||||
a = new JSONArray(Objects.requireNonNull(Iris.getCached("cachedlisting", LISTING)));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
a = new JSONArray(Iris.getNonCached(!cached + "listing", LISTING));
|
||||
a = new JSONArray(Iris.getNonCached(true + "listing", LISTING));
|
||||
}
|
||||
|
||||
KMap<String, String> l = new KMap<>();
|
||||
@@ -331,7 +332,7 @@ public class ProjectManager
|
||||
l.put(v[0], v[1]);
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
catch(Throwable ignored)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public class WandManager implements Listener
|
||||
{
|
||||
try
|
||||
{
|
||||
if(e.getHand().equals(EquipmentSlot.HAND) && isWand(e.getPlayer().getInventory().getItemInMainHand()))
|
||||
if(Objects.equals(e.getHand(), EquipmentSlot.HAND) && isWand(e.getPlayer().getInventory().getItemInMainHand()))
|
||||
{
|
||||
if(e.getAction().equals(Action.LEFT_CLICK_BLOCK))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user