Bug fix
This commit is contained in:
parent
33c201d6de
commit
ef2f76c4c4
@ -120,11 +120,14 @@ public class TerritoryAccess
|
||||
|
||||
public static TerritoryAccess valueOf(String hostFactionId, Boolean hostFactionAllowed, Collection<String> grantedIds)
|
||||
{
|
||||
if (hostFactionId == null) throw new NullPointerException("hostFactionId");
|
||||
if (grantedIds == null) throw new NullPointerException("grantedIds");
|
||||
return new TerritoryAccess(hostFactionId, hostFactionAllowed, grantedIds);
|
||||
}
|
||||
|
||||
public static TerritoryAccess valueOf(String hostFactionId)
|
||||
{
|
||||
if (hostFactionId == null) throw new NullPointerException("hostFactionId");
|
||||
return valueOf(hostFactionId, null, Collections.emptySet());
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ import com.massivecraft.factions.TerritoryAccess;
|
||||
import com.massivecraft.massivecore.store.migrator.MigratorUtil;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class TerritoryAccessAdapter implements JsonDeserializer<TerritoryAccess>, JsonSerializer<TerritoryAccess>
|
||||
@ -57,7 +58,7 @@ public class TerritoryAccessAdapter implements JsonDeserializer<TerritoryAccess>
|
||||
// Prepare variables
|
||||
String hostFactionId = null;
|
||||
Boolean hostFactionAllowed = null;
|
||||
Set<String> grantedIds = null;
|
||||
Set<String> grantedIds = Collections.emptySet();
|
||||
|
||||
// Read variables (test old values first)
|
||||
JsonElement element = null;
|
||||
|
Loading…
Reference in New Issue
Block a user