Move WorldExceptionSet from Faction to MassiveCore. Closes MassiveCraft/MassiveCore#197.

This commit is contained in:
Olof Larsson 2014-12-19 11:54:20 +01:00
parent 61df6a2242
commit 559d907118

View File

@ -0,0 +1,32 @@
package com.massivecraft.massivecore.collections;
import org.bukkit.World;
import com.massivecraft.massivecore.CaseInsensitiveComparator;
public class WorldExceptionSet
{
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public boolean standard = true;
public MassiveTreeSet<String, CaseInsensitiveComparator> exceptions = new MassiveTreeSet<String, CaseInsensitiveComparator>(CaseInsensitiveComparator.get());
// -------------------------------------------- //
// CONTAINS
// -------------------------------------------- //
public boolean contains(String world)
{
if (this.exceptions.contains(world)) return !this.standard;
return this.standard;
}
public boolean contains(World world)
{
return this.contains(world.getName());
}
}