1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 11:04:29 +02:00

Prevent inf loop when adding air to kits.

Should fix #4555
This commit is contained in:
KHobbits
2013-08-12 00:26:09 +01:00
parent 83529213d4
commit 68adbc6a37
3 changed files with 10 additions and 2 deletions

View File

@@ -186,6 +186,11 @@ public class Kit
final String[] parts = kitItem.split(" +");
final ItemStack parseStack = ess.getItemDb().get(parts[0], parts.length > 1 ? Integer.parseInt(parts[1]) : 1);
if (parseStack.getTypeId() == 0) {
continue;
}
final MetaItemStack metaStack = new MetaItemStack(parseStack);
if (parts.length > 2)

View File

@@ -150,6 +150,10 @@ public abstract class UserData extends PlayerExtension implements IConf
{
try
{
if (getHomes().isEmpty())
{
return null;
}
Location loc;
for (String home : getHomes())
{
@@ -476,7 +480,6 @@ public abstract class UserData extends PlayerExtension implements IConf
config.setProperty("teleportenabled", set);
config.save();
}
private List<String> ignoredPlayers;
public List<String> _getIgnoredPlayers()

View File

@@ -94,7 +94,7 @@ public final class InventoryWorkaround
for (int i = 0; i < combined.length; i++)
{
final ItemStack item = combined[i];
if (item == null)
if (item == null || item.getTypeId() == 0)
{
continue;
}