Sort members

This commit is contained in:
Robin Kupper
2011-05-25 13:17:21 +02:00
parent 1efba6bbe2
commit ba082ffc9a
6 changed files with 308 additions and 307 deletions
+18 -18
View File
@@ -18,24 +18,6 @@ import org.bukkit.inventory.ItemStack;
public class BukkitUtils
{
private static class ItemStackComparator implements Comparator<ItemStack>
{
@Override
public int compare(ItemStack a, ItemStack b) {
final int aType = a.getTypeId(), bType = b.getTypeId();
if (aType < bType)
return -1;
if (aType > bType)
return 1;
final byte aData = rawData(a), bData = rawData(b);
if (aData < bData)
return -1;
if (aData > bData)
return 1;
return 0;
}
}
private final static Set<Set<Integer>> blockEquivalents;
static {
@@ -159,4 +141,22 @@ public class BukkitUtils
return 0;
return item.getData().getData();
}
private static class ItemStackComparator implements Comparator<ItemStack>
{
@Override
public int compare(ItemStack a, ItemStack b) {
final int aType = a.getTypeId(), bType = b.getTypeId();
if (aType < bType)
return -1;
if (aType > bType)
return 1;
final byte aData = rawData(a), bData = rawData(b);
if (aData < bData)
return -1;
if (aData > bData)
return 1;
return 0;
}
}
}