Fix keySetView issue on non java8 servers.

This commit is contained in:
drtshock 2014-11-08 14:59:45 -06:00
parent 109f14e9ed
commit ccd8720b09
4 changed files with 15 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>1.6.9.5-U0.1.10</version>
<version>1.6.9.5-U0.1.11-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Factions</name>

View File

@ -25,6 +25,8 @@ public interface Faction extends EconomyParticipator {
public boolean removeWarp(String name);
public boolean removeWarp(LazyLocation loc);
public void clearWarps();
public void addAnnouncement(FPlayer fPlayer, String msg);

View File

@ -3,6 +3,7 @@ package com.massivecraft.factions.zcore.persist;
import com.massivecraft.factions.*;
import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.util.AsciiCompass;
import com.massivecraft.factions.util.LazyLocation;
import org.bukkit.ChatColor;
import java.util.ArrayList;
@ -47,10 +48,9 @@ public abstract class MemoryBoard extends Board {
public void removeAt(FLocation flocation) {
Faction faction = getFactionAt(flocation);
for (String s : faction.getWarps().keySet()) {
if (flocation.isInChunk(faction.getWarp(s).getLocation())) {
faction.removeWarp(s);
P.p.log(Level.INFO, "Removed warp %s from faction %s", s, faction.getTag());
for(LazyLocation loc : faction.getWarps().values()) {
if(flocation.isInChunk(loc.getLocation())) {
faction.removeWarp(loc);
}
}
clearOwnershipAt(flocation);

View File

@ -92,6 +92,14 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
return false;
}
public boolean removeWarp(LazyLocation loc) {
if(warps.containsValue(loc)) {
warps.remove(loc);
return true;
}
return false;
}
public void clearWarps() {
warps.clear();
}