PS utility method
This commit is contained in:
parent
a4acf15094
commit
5308e63282
@ -862,7 +862,7 @@ public final class PS implements Cloneable, Serializable, Comparable<PS>
|
||||
|
||||
public static Set<PS> getDistinctChunks(Collection<PS> pss)
|
||||
{
|
||||
Set<PS> ret = new LinkedHashSet<PS>();
|
||||
Set<PS> ret = new LinkedHashSet<>();
|
||||
for (PS ps : pss)
|
||||
{
|
||||
ret.add(ps.getChunk(true));
|
||||
@ -870,6 +870,16 @@ public final class PS implements Cloneable, Serializable, Comparable<PS>
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static Set<String> getDistinctWorlds(Collection<PS> pss)
|
||||
{
|
||||
Set<String> ret = new LinkedHashSet<>();
|
||||
for (PS ps : pss)
|
||||
{
|
||||
ret.add(ps.getWorld());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// HASHCODE (CACHED)
|
||||
// -------------------------------------------- //
|
||||
|
Loading…
Reference in New Issue
Block a user