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

This commit is contained in:
Olof Larsson 2014-12-19 11:53:59 +01:00
parent 40bf1af44a
commit 10a19d00c4
2 changed files with 1 additions and 34 deletions

View File

@ -1,33 +0,0 @@
package com.massivecraft.factions;
import org.bukkit.World;
import com.massivecraft.massivecore.CaseInsensitiveComparator;
import com.massivecraft.massivecore.collections.MassiveTreeSet;
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());
}
}

View File

@ -14,10 +14,10 @@ import org.bukkit.event.EventPriority;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
import com.massivecraft.factions.WorldExceptionSet;
import com.massivecraft.factions.engine.EngineChat; import com.massivecraft.factions.engine.EngineChat;
import com.massivecraft.factions.event.EventFactionsChunkChangeType; import com.massivecraft.factions.event.EventFactionsChunkChangeType;
import com.massivecraft.massivecore.collections.BackstringEnumSet; import com.massivecraft.massivecore.collections.BackstringEnumSet;
import com.massivecraft.massivecore.collections.WorldExceptionSet;
import com.massivecraft.massivecore.store.Entity; import com.massivecraft.massivecore.store.Entity;
import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.TimeUnit;