Move WorldExceptionSet from Faction to MassiveCore. Closes MassiveCraft/MassiveCore#197.
This commit is contained in:
parent
61df6a2242
commit
559d907118
@ -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());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user