Reformat.
This commit is contained in:
parent
27bf2008f1
commit
35813c7210
@ -1,12 +1,13 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.massivecraft.factions.zcore.persist.json.JSONBoard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public abstract class Board {
|
||||
protected static Board instance = getBoardImpl();
|
||||
|
||||
//----------------------------------------------//
|
||||
// Get and Set
|
||||
//----------------------------------------------//
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
|
@ -1,17 +1,16 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.iface.RelationParticipator;
|
||||
import com.massivecraft.factions.struct.ChatMode;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Logged in players always have exactly one FPlayer instance. Logged out players may or may not have an FPlayer
|
||||
|
@ -1,11 +1,10 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.massivecraft.factions.zcore.persist.json.JSONFPlayers;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.massivecraft.factions.zcore.persist.json.JSONFPlayers;
|
||||
import java.util.Collection;
|
||||
|
||||
public abstract class FPlayers {
|
||||
protected static FPlayers instance = getFPlayersImpl();
|
||||
|
@ -4,7 +4,6 @@ import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.iface.RelationParticipator;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import com.massivecraft.factions.zcore.persist.json.JSONFactions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
|
||||
import com.massivecraft.factions.zcore.persist.json.JSONFactions;
|
||||
|
||||
public abstract class Factions {
|
||||
protected static Factions instance = getFactionsImpl();
|
||||
|
||||
|
@ -12,7 +12,6 @@ import com.massivecraft.factions.struct.ChatMode;
|
||||
import com.massivecraft.factions.util.*;
|
||||
import com.massivecraft.factions.zcore.MPlugin;
|
||||
import com.massivecraft.factions.zcore.util.TextUtil;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -123,7 +122,8 @@ public class P extends MPlugin {
|
||||
|
||||
@Override
|
||||
public GsonBuilder getGsonBuilder() {
|
||||
Type mapFLocToStringSetType = new TypeToken<Map<FLocation, Set<String>>>() {}.getType();
|
||||
Type mapFLocToStringSetType = new TypeToken<Map<FLocation, Set<String>>>() {
|
||||
}.getType();
|
||||
|
||||
return new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().excludeFieldsWithModifiers(Modifier.TRANSIENT, Modifier.VOLATILE).registerTypeAdapter(LazyLocation.class, new MyLocationTypeAdapter()).registerTypeAdapter(mapFLocToStringSetType, new MapFLocToStringSetTypeAdapter()).registerTypeAdapterFactory(EnumTypeAdapter.ENUM_FACTORY);
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Conf.Backend;
|
||||
import com.massivecraft.factions.zcore.persist.json.FactionsJSON;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
public class CmdConvert extends FCommand {
|
||||
|
||||
|
@ -6,7 +6,6 @@ import com.massivecraft.factions.event.FactionCreateEvent;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -44,15 +44,12 @@ public class CmdInvite extends FCommand {
|
||||
}
|
||||
|
||||
myFaction.invite(you);
|
||||
if(!you.isOnline()) return;
|
||||
if (!you.isOnline()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Tooltips, colors, and commands only apply to the string immediately before it.
|
||||
FancyMessage message = new FancyMessage(fme.describeTo(you, true))
|
||||
.tooltip("Click to join!").command("f join " + myFaction.getTag())
|
||||
.then(" has invited you to join ").color(ChatColor.YELLOW)
|
||||
.tooltip("Click to join!").command("f join " + myFaction.getTag())
|
||||
.then(myFaction.describeTo(you))
|
||||
.tooltip("Click to join!").command("f join " + myFaction.getTag());
|
||||
FancyMessage message = new FancyMessage(fme.describeTo(you, true)).tooltip("Click to join!").command("f join " + myFaction.getTag()).then(" has invited you to join ").color(ChatColor.YELLOW).tooltip("Click to join!").command("f join " + myFaction.getTag()).then(myFaction.describeTo(you)).tooltip("Click to join!").command("f join " + myFaction.getTag());
|
||||
|
||||
message.send(you.getPlayer());
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
|
||||
public class CmdReload extends FCommand {
|
||||
|
@ -54,7 +54,9 @@ public class CmdSeeChunk extends FCommand {
|
||||
public static void showPillar(Player player, World world, int blockX, int blockZ) {
|
||||
for (int blockY = 0; blockY < player.getLocation().getBlockY() + 30; blockY++) {
|
||||
Location loc = new Location(world, blockX, blockY, blockZ);
|
||||
if (loc.getBlock().getType() != Material.AIR) continue;
|
||||
if (loc.getBlock().getType() != Material.AIR) {
|
||||
continue;
|
||||
}
|
||||
int typeId = blockY % 5 == 0 ? Material.REDSTONE_LAMP_ON.getId() : Material.STAINED_GLASS.getId();
|
||||
VisualizeUtil.addLocation(player, loc, typeId);
|
||||
}
|
||||
|
@ -1,15 +1,10 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.event.FactionRenameEvent;
|
||||
import com.massivecraft.factions.scoreboards.FTeamWrapper;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.massivecraft.factions.integration;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.massivecraft.factions.scoreboards;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.P;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
@ -6,5 +6,6 @@ import java.util.List;
|
||||
|
||||
public abstract class FSidebarProvider {
|
||||
public abstract String getTitle(FPlayer fplayer);
|
||||
|
||||
public abstract List<String> getLines(FPlayer fplayer);
|
||||
}
|
||||
|
@ -30,12 +30,7 @@ public class FDefaultSidebar extends FSidebarProvider {
|
||||
|
||||
private String replace(FPlayer fplayer, String s) {
|
||||
String faction = !fplayer.getFaction().isNone() ? fplayer.getFaction().getTag() : "factionless";
|
||||
s = s.replace("{name}", fplayer.getName())
|
||||
.replace("{power}", String.valueOf(fplayer.getPowerRounded()))
|
||||
.replace("{balance}", String.valueOf(Econ.getFriendlyBalance(fplayer.getPlayer().getUniqueId())))
|
||||
.replace("{faction}", faction)
|
||||
.replace("{maxPower}", String.valueOf(fplayer.getPowerMaxRounded()))
|
||||
.replace("{totalOnline}", String.valueOf(Bukkit.getServer().getOnlinePlayers().length));
|
||||
s = s.replace("{name}", fplayer.getName()).replace("{power}", String.valueOf(fplayer.getPowerRounded())).replace("{balance}", String.valueOf(Econ.getFriendlyBalance(fplayer.getPlayer().getUniqueId()))).replace("{faction}", faction).replace("{maxPower}", String.valueOf(fplayer.getPowerMaxRounded())).replace("{totalOnline}", String.valueOf(Bukkit.getServer().getOnlinePlayers().length));
|
||||
return ChatColor.translateAlternateColorCodes('&', s);
|
||||
}
|
||||
}
|
||||
|
@ -37,11 +37,6 @@ public class FInfoSidebar extends FSidebarProvider {
|
||||
boolean raidable = faction.getLandRounded() > faction.getPower();
|
||||
FPlayer fLeader = faction.getFPlayerAdmin();
|
||||
String leader = fLeader == null ? "Server" : fLeader.getName().substring(0, fLeader.getName().length() > 14 ? 13 : fLeader.getName().length());
|
||||
return ChatColor.translateAlternateColorCodes('&', s.replace("{power}", String.valueOf(faction.getPowerRounded()))
|
||||
.replace("{online}", String.valueOf(faction.getOnlinePlayers().size()))
|
||||
.replace("{members}", String.valueOf(faction.getFPlayers().size()))
|
||||
.replace("{leader}", leader)
|
||||
.replace("{chunks}", String.valueOf(faction.getLandRounded()))
|
||||
.replace("{raidable}", String.valueOf(raidable)));
|
||||
return ChatColor.translateAlternateColorCodes('&', s.replace("{power}", String.valueOf(faction.getPowerRounded())).replace("{online}", String.valueOf(faction.getOnlinePlayers().size())).replace("{members}", String.valueOf(faction.getFPlayers().size())).replace("{leader}", leader).replace("{chunks}", String.valueOf(faction.getLandRounded())).replace("{raidable}", String.valueOf(raidable)));
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ public final class EnumTypeAdapter<T extends Enum<T>> extends TypeAdapter<T> {
|
||||
// ignore since it could be a modified enum
|
||||
}
|
||||
}
|
||||
|
||||
public T read(JsonReader in) throws IOException {
|
||||
if (in.peek() == JsonToken.NULL) {
|
||||
in.nextNull();
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.massivecraft.factions.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/*
|
||||
* This class provides a lazy-load Location, so that World doesn't need to be initialized
|
||||
* yet when an object of this class is created, only when the Location is first accessed.
|
||||
|
@ -1,13 +1,12 @@
|
||||
package com.massivecraft.factions.util;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
@ -67,7 +67,9 @@ public class VisualizeUtil {
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void clear(Player player) {
|
||||
Set<Location> locations = getPlayerLocations(player);
|
||||
if (locations == null) return;
|
||||
if (locations == null) {
|
||||
return;
|
||||
}
|
||||
for (Location location : locations) {
|
||||
Block block = location.getWorld().getBlockAt(location);
|
||||
player.sendBlockChange(location, block.getTypeId(), block.getData());
|
||||
|
@ -12,7 +12,6 @@ import com.massivecraft.factions.zcore.util.PermUtil;
|
||||
import com.massivecraft.factions.zcore.util.Persist;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TextUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
@ -1,17 +1,14 @@
|
||||
package com.massivecraft.factions.zcore.persist;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.util.AsciiCompass;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
|
||||
|
@ -1,13 +1,6 @@
|
||||
package com.massivecraft.factions.zcore.persist;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.event.FPlayerLeaveEvent;
|
||||
import com.massivecraft.factions.event.LandClaimEvent;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
@ -21,7 +14,6 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.RelationUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
@ -204,7 +196,8 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
return this.getId();
|
||||
}
|
||||
|
||||
public MemoryFPlayer() { }
|
||||
public MemoryFPlayer() {
|
||||
}
|
||||
|
||||
public MemoryFPlayer(String id) {
|
||||
this.id = id;
|
||||
@ -543,7 +536,9 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
|
||||
/**
|
||||
* Check if the scoreboard should be shown. Simple method to be used by above method.
|
||||
*
|
||||
* @param toShow Faction to be shown.
|
||||
*
|
||||
* @return true if should show, otherwise false.
|
||||
*/
|
||||
public boolean shouldShowScoreboard(Faction toShow) {
|
||||
|
@ -1,20 +1,14 @@
|
||||
package com.massivecraft.factions.zcore.persist;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentSkipListMap;
|
||||
|
||||
public abstract class MemoryFPlayers extends FPlayers {
|
||||
|
@ -1,13 +1,6 @@
|
||||
package com.massivecraft.factions.zcore.persist;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.iface.RelationParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
@ -17,7 +10,6 @@ import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.LazyLocation;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
import com.massivecraft.factions.util.RelationUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
@ -232,7 +224,8 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
|
||||
// -------------------------------------------- //
|
||||
// Construct
|
||||
// -------------------------------------------- //
|
||||
public MemoryFaction() { }
|
||||
public MemoryFaction() {
|
||||
}
|
||||
|
||||
public MemoryFaction(String id) {
|
||||
this.id = id;
|
||||
|
@ -122,6 +122,7 @@ public abstract class MemoryFactions extends Factions {
|
||||
public boolean isTagTaken(String str) {
|
||||
return this.getByTag(str) != null;
|
||||
}
|
||||
|
||||
public boolean isValidFactionId(String id) {
|
||||
return factions.containsKey(id);
|
||||
}
|
||||
|
@ -1,18 +1,12 @@
|
||||
package com.massivecraft.factions.zcore.persist.json;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryBoard;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryFPlayers;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryFactions;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class FactionsJSON {
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
package com.massivecraft.factions.zcore.persist.json;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryBoard;
|
||||
import com.massivecraft.factions.zcore.util.DiscUtil;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.TreeMap;
|
||||
|
||||
|
||||
public class JSONBoard extends MemoryBoard {
|
||||
|
@ -2,6 +2,8 @@ package com.massivecraft.factions.zcore.persist.json;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.P;
|
||||
@ -9,11 +11,8 @@ import com.massivecraft.factions.zcore.persist.MemoryFPlayer;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryFPlayers;
|
||||
import com.massivecraft.factions.zcore.util.DiscUtil;
|
||||
import com.massivecraft.factions.zcore.util.UUIDFetcher;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -85,7 +84,8 @@ public class JSONFPlayers extends MemoryFPlayers {
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<String, JSONFPlayer> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFPlayer>>(){}.getType());
|
||||
Map<String, JSONFPlayer> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFPlayer>>() {
|
||||
}.getType());
|
||||
Set<String> list = new HashSet<String>();
|
||||
Set<String> invalidList = new HashSet<String>();
|
||||
for (Entry<String, JSONFPlayer> entry : data.entrySet()) {
|
||||
|
@ -8,7 +8,8 @@ public class JSONFaction extends MemoryFaction {
|
||||
super(arg0);
|
||||
}
|
||||
|
||||
public JSONFaction() {}
|
||||
public JSONFaction() {
|
||||
}
|
||||
|
||||
public JSONFaction(String id) {
|
||||
super(id);
|
||||
|
@ -2,6 +2,8 @@ package com.massivecraft.factions.zcore.persist.json;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
@ -10,10 +12,7 @@ import com.massivecraft.factions.zcore.persist.MemoryFaction;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryFactions;
|
||||
import com.massivecraft.factions.zcore.util.DiscUtil;
|
||||
import com.massivecraft.factions.zcore.util.UUIDFetcher;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -86,7 +85,8 @@ public class JSONFactions extends MemoryFactions {
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<String, JSONFaction> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFaction>>(){}.getType());
|
||||
Map<String, JSONFaction> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFaction>>() {
|
||||
}.getType());
|
||||
|
||||
this.nextId = 1;
|
||||
// Do we have any names that need updating in claims or invites?
|
||||
|
Loading…
Reference in New Issue
Block a user