Huge amounts of derp.

This commit is contained in:
Olof Larsson 2011-12-12 17:28:33 +01:00
parent 9f246386db
commit 93b11e8980
132 changed files with 1309 additions and 553 deletions

View File

@ -1,8 +1,8 @@
name: mcore name: mcore1
version: 1.0.0 version: 1
main: com.massivecraft.core.plugin.MCore main: com.massivecraft.core1.MCore
authors: [Olof Larsson] authors: [Olof Larsson]
softdepend: [Vault, Spout] softdepend: [Vault, Spout]
commands: commands:
mcore: mcoresilenteater:
description: Reference command for mcore. description: ignore me.

View File

@ -1,11 +0,0 @@
/**
* This package provides the {@link com.massivecraft.core.lib.gson2.Gson} class to convert Json to Java and
* vice-versa.
*
* <p>The primary class to use is {@link com.massivecraft.core.lib.gson2.Gson} which can be constructed with
* {@code new Gson()} (using default settings) or by using {@link com.massivecraft.core.lib.gson2.GsonBuilder}
* (to configure various options such as using versioning and so on).</p>
*
* @author Inderjeet Singh, Joel Leitch
*/
package com.massivecraft.core.lib.gson2;

View File

@ -1,17 +0,0 @@
package com.massivecraft.core.persist;
import java.util.HashMap;
import java.util.Map;
public class Persist
{
private static Map<Object, PersistRealm> realms = new HashMap<Object, PersistRealm>();
public static Map<Object, PersistRealm> getRealms() { return realms; }
public static PersistRealm getRealm(Object realmOwner) { return realms.get(realmOwner); }
public static void createRealm(Object realmOwner)
{
if (realms.containsKey(realmOwner)) return;
realms.put(realmOwner, new PersistRealm());
}
public static void removeRealm(Object realmOwner) { realms.remove(realmOwner); }
}

View File

@ -1,60 +0,0 @@
package com.massivecraft.core.plugin;
import org.bukkit.Bukkit;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.Event.Type;
import org.bukkit.plugin.java.JavaPlugin;
import com.massivecraft.core.persist.Persist;
import com.massivecraft.core.persist.PersistRealm;
import com.massivecraft.core.plugin.listener.PluginPlayerListener;
import com.massivecraft.core.plugin.listener.PluginServerListener;
import com.massivecraft.core.plugin.listener.PluginServerListenerMonitor;
import com.massivecraft.core.text.TextUtil;
public class MCore extends JavaPlugin
{
PluginServerListener serverListener;
PluginServerListenerMonitor serverListenerMonitor;
PluginPlayerListener playerListener;
public static MCore p;
//public static PersistRealm persist;
public static TextUtil text = new TextUtil();
public MCore()
{
p = this;
Persist.createRealm(this);
//persist = Persist.getRealm(this);
this.serverListener = new PluginServerListener(this);
this.serverListenerMonitor = new PluginServerListenerMonitor(this);
this.playerListener = new PluginPlayerListener(this);
}
public static PersistRealm getPersist()
{
return Persist.getRealm(p);
}
@Override
public void onDisable()
{
// Avoid memleak by clearing ???
// Or will this trigger errors???
//Persist.getRealms().clear();
}
@Override
public void onEnable()
{
// This is safe since all plugins using Persist should bukkit-depend this plugin.
Persist.getRealms().clear();
// Register events
//Bukkit.getPluginManager().registerEvent(Type.PLUGIN_ENABLE, this.serverListener, Priority.Lowest, this); // Dangerous!?!?!
//Bukkit.getPluginManager().registerEvent(Type.PLUGIN_DISABLE, this.serverListenerMonitor, Priority.Monitor, this); // Dangerous!?!?!
Bukkit.getPluginManager().registerEvent(Type.PLAYER_JOIN, this.playerListener, Priority.Lowest, this);
}
}

View File

@ -1,36 +0,0 @@
package com.massivecraft.core.plugin.listener;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.player.PlayerLoginEvent;
import com.massivecraft.core.persist.IClassManager;
import com.massivecraft.core.persist.Persist;
import com.massivecraft.core.persist.PersistRealm;
import com.massivecraft.core.plugin.MCore;
public class PluginPlayerListener extends PlayerListener
{
MCore p;
public PluginPlayerListener(MCore p)
{
this.p = p;
}
@Override
public void onPlayerLogin(PlayerLoginEvent event)
{
Player player = event.getPlayer();
for (PersistRealm realm : Persist.getRealms().values())
{
for (IClassManager<?> manager : realm.getClassManagers().values())
{
if (manager.idFix(player) == null) continue;
if (manager.containsId(player)) continue;
manager.create(player);
}
}
}
}

View File

@ -1,24 +0,0 @@
package com.massivecraft.core.plugin.listener;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.event.server.ServerListener;
import com.massivecraft.core.persist.Persist;
import com.massivecraft.core.plugin.MCore;
public class PluginServerListener extends ServerListener
{
MCore p;
public PluginServerListener(MCore p)
{
this.p = p;
}
@Override
public void onPluginEnable(PluginEnableEvent event)
{
// TODO: Is this run after or before???
Persist.createRealm(event.getPlugin());
}
}

View File

@ -1,31 +0,0 @@
package com.massivecraft.core.plugin.listener;
import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.event.server.ServerListener;
import com.massivecraft.core.persist.Persist;
import com.massivecraft.core.plugin.MCore;
public class PluginServerListenerMonitor extends ServerListener
{
MCore p;
public PluginServerListenerMonitor(MCore p)
{
this.p = p;
}
@Override
public void onPluginDisable(PluginDisableEvent event)
{
Persist.removeRealm(event.getPlugin());
}
@Override
public void onPluginEnable(PluginEnableEvent event)
{
// TODO: Is this run after or before???
Persist.createRealm(event.getPlugin());
}
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.core; package com.massivecraft.mcore1;
public class Lang public class Lang
{ {

View File

@ -0,0 +1,133 @@
package com.massivecraft.mcore1;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Event;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.Event.Type;
import org.bukkit.plugin.java.JavaPlugin;
import com.massivecraft.mcore1.cmd.Cmd;
import com.massivecraft.mcore1.lib.gson.GsonBuilder;
import com.massivecraft.mcore1.perm.Perm;
import com.massivecraft.mcore1.persist.Persist;
import com.massivecraft.mcore1.text.Txt;
public class MCore extends JavaPlugin
{
MCoreServerListener serverListener;
MCoreServerListenerMonitor serverListenerMonitor;
MCorePlayerListener playerListener;
// -------------------------------------------- //
// PERSIST
// -------------------------------------------- //
private static Map<Object, Persist> persistInstances = new HashMap<Object, Persist>();
public static Map<Object, Persist> getPersistInstances() { return persistInstances; }
public static Persist getPersist(Object owner) { return persistInstances.get(owner); }
public static void removePersist(Object owner) { persistInstances.remove(owner); }
public static void createPersist(Object owner)
{
if (persistInstances.containsKey(owner)) return;
persistInstances.put(owner, new Persist());
}
// -------------------------------------------- //
// CMD
// -------------------------------------------- //
private static Map<Object, Cmd> cmdInstances = new HashMap<Object, Cmd>();
public static Map<Object, Cmd> getCmdInstances() { return cmdInstances; }
public static Cmd getCmd(Object owner) { return cmdInstances.get(owner); }
public static void removeCmd(Object owner) { cmdInstances.remove(owner); }
public static void createCmd(Object owner)
{
if (cmdInstances.containsKey(owner)) return;
cmdInstances.put(owner, new Cmd());
}
public static boolean handleCommand(CommandSender sender, String commandString, boolean testOnly)
{
List<String> args = new ArrayList<String>(Arrays.asList(commandString.split("\\s+")));
if (args.size() == 0) return false;
String alias = args.get(0);
args.remove(0);
for (Cmd cmd : cmdInstances.values())
{
if (cmd.handleCommand(sender, alias, args, testOnly)) return true;
}
return false;
}
// -------------------------------------------- //
// TXT
// -------------------------------------------- //
private static Map<Object, Txt> txtInstances = new HashMap<Object, Txt>();
public static Map<Object, Txt> getTxtInstances() { return txtInstances; }
public static Txt getTxt(Object owner) { return txtInstances.get(owner); }
public static void removeTxt(Object owner) { txtInstances.remove(owner); }
public static void createTxt(Object owner)
{
if (txtInstances.containsKey(owner)) return;
txtInstances.put(owner, new Txt());
}
// -------------------------------------------- //
// PERM
// -------------------------------------------- //
private static Map<Object, Perm> permInstances = new HashMap<Object, Perm>();
public static Map<Object, Perm> getPermInstances() { return permInstances; }
public static Perm getPerm(Object owner) { return permInstances.get(owner); }
public static void removePerm(Object owner) { permInstances.remove(owner); }
public static void createPerm(Object owner)
{
if (permInstances.containsKey(owner)) return;
createTxt(owner);
permInstances.put(owner, new Perm(getTxt(owner)));
}
// -------------------------------------------- //
// DERP
// -------------------------------------------- //
public MCore()
{
this.serverListener = new MCoreServerListener(this);
this.serverListenerMonitor = new MCoreServerListenerMonitor(this);
this.playerListener = new MCorePlayerListener(this);
}
@Override
public void onDisable()
{
// Avoid memleak by clearing ???
// Or will this trigger errors???
//Persist.getRealms().clear();
}
@Override
public void onEnable()
{
// This is safe since all plugins using Persist should bukkit-depend this plugin.
getPersistInstances().clear();
// Register events
Bukkit.getPluginManager().registerEvent(Type.PLAYER_PRELOGIN, this.playerListener, Priority.Lowest, this);
Bukkit.getPluginManager().registerEvent(Type.PLAYER_COMMAND_PREPROCESS, this.playerListener, Event.Priority.Lowest, this);
Bukkit.getPluginManager().registerEvent(Type.SERVER_COMMAND, this.serverListener, Event.Priority.Lowest, this);
}
public GsonBuilder getGsonBuilder()
{
return new GsonBuilder()
.setPrettyPrinting()
.disableHtmlEscaping()
.excludeFieldsWithModifiers(Modifier.TRANSIENT);
}
}

View File

@ -0,0 +1,45 @@
package com.massivecraft.mcore1;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.player.PlayerPreLoginEvent;
import com.massivecraft.mcore1.persist.IClassManager;
import com.massivecraft.mcore1.persist.Persist;
public class MCorePlayerListener extends PlayerListener
{
MCore p;
public MCorePlayerListener(MCore p)
{
this.p = p;
}
@Override
public void onPlayerPreLogin(PlayerPreLoginEvent event)
{
String id = event.getName();
for (Persist realm : MCore.getPersistInstances().values())
{
for (IClassManager<?> manager : realm.getClassManagers().values())
{
if (manager.idCanFix(Player.class) == false) continue;
if (manager.containsId(id)) continue;
manager.create(id);
}
}
}
@Override
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
{
if (event.isCancelled()) return;
if (MCore.handleCommand(event.getPlayer(), event.getMessage().substring(1), false))
{
event.setCancelled(true);
}
}
}

View File

@ -0,0 +1,27 @@
package com.massivecraft.mcore1;
import org.bukkit.event.server.ServerCommandEvent;
import org.bukkit.event.server.ServerListener;
public class MCoreServerListener extends ServerListener
{
MCore p;
private final static String refCommand = "mcoresilenteater";
public MCoreServerListener(MCore p)
{
this.p = p;
}
@Override
public void onServerCommand(ServerCommandEvent event)
{
if (event.getCommand().length() == 0) return;
if (MCore.handleCommand(event.getSender(), event.getCommand(), false))
{
event.setCommand(refCommand);
}
}
}

View File

@ -0,0 +1,14 @@
package com.massivecraft.mcore1;
import org.bukkit.event.server.ServerListener;
public class MCoreServerListenerMonitor extends ServerListener
{
MCore p;
public MCoreServerListenerMonitor(MCore p)
{
this.p = p;
}
}

View File

@ -0,0 +1,19 @@
package com.massivecraft.mcore1.cmd;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore1.plugin.MPlugin;
public abstract class AHBase<T> implements IArgHandler<T>
{
protected String error = null;
@Override
public abstract T parse(String str, String style, CommandSender sender, MPlugin p);
@Override
public String error()
{
return this.error;
}
}

View File

@ -0,0 +1,21 @@
package com.massivecraft.mcore1.cmd;
public class AHBoolean extends AHPrimitive<Boolean>
{
@Override
protected String getPrimitiveName()
{
return "boolean";
}
@Override
protected Boolean unsafeConvert(String str) throws Exception
{
str = str.toLowerCase();
if (str.startsWith("y") || str.startsWith("t") || str.startsWith("on") || str.startsWith("+") || str.startsWith("1"))
{
return true;
}
return false;
}
}

View File

@ -0,0 +1,16 @@
package com.massivecraft.mcore1.cmd;
public class AHDouble extends AHPrimitive<Double>
{
@Override
protected String getPrimitiveName()
{
return "double";
}
@Override
protected Double unsafeConvert(String str) throws Exception
{
return Double.parseDouble(str);
}
}

View File

@ -0,0 +1,16 @@
package com.massivecraft.mcore1.cmd;
public class AHFloat extends AHPrimitive<Float>
{
@Override
protected String getPrimitiveName()
{
return "integer";
}
@Override
protected Float unsafeConvert(String str) throws Exception
{
return Float.parseFloat(str);
}
}

View File

@ -0,0 +1,16 @@
package com.massivecraft.mcore1.cmd;
public class AHInteger extends AHPrimitive<Integer>
{
@Override
protected String getPrimitiveName()
{
return "integer";
}
@Override
protected Integer unsafeConvert(String str) throws Exception
{
return Integer.parseInt(str);
}
}

View File

@ -0,0 +1,36 @@
package com.massivecraft.mcore1.cmd;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.massivecraft.mcore1.plugin.MPlugin;
public class AHPlayer extends AHBase<Player>
{
@Override
public Player parse(String str, String style, CommandSender sender, MPlugin p)
{
this.error = null;
if (str == null) return null;
if (style.equals("match"))
{
List<Player> players = Bukkit.getServer().matchPlayer(str);
if (players.size() > 0)
{
return players.get(0);
}
this.error = "<b>\"<p>"+str+"<b>\" did not match any online player.";
}
Player player = Bukkit.getServer().getPlayer(str);
if (player == null)
{
this.error = "<b>No player online with the exact name \"<p>"+str+"<b>\".";
}
return player;
}
}

View File

@ -0,0 +1,29 @@
package com.massivecraft.mcore1.cmd;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore1.plugin.MPlugin;
public abstract class AHPrimitive<T> extends AHBase<T>
{
protected abstract String getPrimitiveName();
protected abstract T unsafeConvert(String str) throws Exception;
@Override
public T parse(String str, String style, CommandSender sender, MPlugin p)
{
this.error = null;
if (str == null) return null;
try
{
T ret = this.unsafeConvert(str);
return ret;
}
catch (Exception e)
{
this.error = "<b>\"<p>"+str+"<b>\" is not a valid "+this.getPrimitiveName()+".";
}
return null;
}
}

View File

@ -0,0 +1,49 @@
package com.massivecraft.mcore1.cmd;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Cmd
{
protected Map<Class<?>, IArgHandler<?>> argHandlers = new HashMap<Class<?>, IArgHandler<?>>();
public Map<Class<?>, IArgHandler<?>> getArgHandlers() { return this.argHandlers; }
@SuppressWarnings("unchecked")
public <T> IArgHandler<T> getArgHandler(Class<T> clazz) { return (IArgHandler<T>) this.argHandlers.get(clazz); }
public <T> void setArgHandler(Class<T> clazz, IArgHandler<T> handler) { this.argHandlers.put(clazz, handler); }
protected Set<MCommand> commands = new HashSet<MCommand>();
public Set<MCommand> getCommands() { return this.commands; }
public void addCommand(MCommand mcommand) { this.commands.add(mcommand); }
public MCommand getCommand(String alias)
{
for (MCommand command : this.commands)
{
if (command.aliases.contains(alias)) return command;
}
return null;
}
public boolean handleCommand(CommandSender sender, String alias, List<String> args, boolean testOnly)
{
MCommand mcommand = this.getCommand(alias);
if (mcommand == null) return false;
if (testOnly) return true;
mcommand.execute(sender, args);
return true;
}
public Cmd()
{
this.setArgHandler(Boolean.class, new AHBoolean());
this.setArgHandler(Integer.class, new AHInteger());
this.setArgHandler(Float.class, new AHFloat());
this.setArgHandler(Double.class, new AHDouble());
this.setArgHandler(Player.class, new AHPlayer());
}
}

View File

@ -0,0 +1,14 @@
package com.massivecraft.mcore1.cmd;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore1.plugin.MPlugin;
public interface IArgHandler<T>
{
// Parse result returned - or null and something in the error message.
public T parse(String str, String style, CommandSender sender, MPlugin p);
// Error here - or null.
public String error();
}

View File

@ -0,0 +1,353 @@
package com.massivecraft.mcore1.cmd;
import java.util.*;
import java.util.Map.Entry;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.massivecraft.mcore1.Lang;
import com.massivecraft.mcore1.plugin.MPlugin;
public abstract class MCommand
{
public abstract MPlugin getPlugin();
// The sub-commands to this command
public List<MCommand> subCommands;
public void addSubCommand(MCommand subCommand)
{
subCommand.commandChain.addAll(this.commandChain);
subCommand.commandChain.add(this);
this.subCommands.add(subCommand);
}
// The different names this commands will react to
public List<String> aliases;
// Information on the args
public List<String> requiredArgs;
public LinkedHashMap<String, String> optionalArgs;
public boolean errorOnToManyArgs = true;
// FIELD: Help Short
// This field may be left blank and will in such case be loaded from the permissions node instead.
// Thus make sure the permissions node description is an action description like "eat hamburgers" or "do admin stuff".
private String helpShort;
public void setHelpShort(String val) { this.helpShort = val; }
public String getHelpShort()
{
if (this.helpShort == null)
{
String pdesc = getPlugin().perm.getPermissionDescription(this.permission);
if (pdesc != null)
{
return pdesc;
}
return "*info unavailable*";
}
return this.helpShort;
}
public List<String> helpLong;
//public CommandVisibility visibility; // ??? abstract method only??
// Some information on permissions
public boolean senderMustBePlayer;
public String permission;
// Information available on execution of the command
public CommandSender sender; // Will always be set
public Player me; // Will only be set when the sender is a player
public boolean senderIsConsole;
public List<String> args; // Will contain the arguments, or and empty list if there are none.
public List<MCommand> commandChain = new ArrayList<MCommand>(); // The command chain used to execute this command
public MCommand()
{
this.permission = null;
this.subCommands = new ArrayList<MCommand>();
this.aliases = new ArrayList<String>();
this.requiredArgs = new ArrayList<String>();
this.optionalArgs = new LinkedHashMap<String, String>();
this.helpShort = null;
this.helpLong = new ArrayList<String>();
//this.visibility = CommandVisibility.VISIBLE;
}
// The commandChain is a list of the parent command chain used to get to this command.
public void execute(CommandSender sender, List<String> args, List<MCommand> commandChain)
{
// Set the execution-time specific variables
this.sender = sender;
if (sender instanceof Player)
{
this.me = (Player)sender;
this.senderIsConsole = false;
}
else
{
this.me = null;
this.senderIsConsole = true;
}
this.args = args;
this.commandChain = commandChain;
// Is there a matching sub command?
if (args.size() > 0 )
{
for (MCommand subCommand: this.subCommands)
{
if (subCommand.aliases.contains(args.get(0)))
{
args.remove(0);
commandChain.add(this);
subCommand.execute(sender, args, commandChain);
return;
}
}
}
if ( ! validCall(this.sender, this.args)) return;
if ( ! this.isEnabled()) return;
perform();
}
public void execute(CommandSender sender, List<String> args)
{
execute(sender, args, new ArrayList<MCommand>());
}
// This is where the command action is performed.
public abstract void perform();
// -------------------------------------------- //
// Call Validation
// -------------------------------------------- //
/**
* In this method we validate that all prerequisites to perform this command has been met.
*/
public boolean validCall(CommandSender sender, List<String> args)
{
if ( ! validSenderType(sender, true))
{
return false;
}
if ( ! validSenderPermissions(sender, true))
{
return false;
}
if ( ! validArgs(args, sender))
{
return false;
}
return true;
}
public boolean isEnabled()
{
return true;
}
public boolean validSenderType(CommandSender sender, boolean informSenderIfNot)
{
if (this.senderMustBePlayer && ! (sender instanceof Player))
{
if (informSenderIfNot)
{
msg(Lang.commandSenderMustBePlayer);
}
return false;
}
return true;
}
public boolean validSenderPermissions(CommandSender sender, boolean informSenderIfNot)
{
if (this.permission == null) return true;
return getPlugin().perm.has(sender, this.permission, informSenderIfNot);
}
public boolean validArgs(List<String> args, CommandSender sender)
{
if (args.size() < this.requiredArgs.size())
{
if (sender != null)
{
msg(Lang.commandToFewArgs);
sender.sendMessage(this.getUseageTemplate());
}
return false;
}
if (args.size() > this.requiredArgs.size() + this.optionalArgs.size() && this.errorOnToManyArgs)
{
if (sender != null)
{
// Get the to many string slice
List<String> theToMany = args.subList(this.requiredArgs.size() + this.optionalArgs.size(), args.size());
msg(Lang.commandToManyArgs, getPlugin().txt.implode(theToMany, " "));
sender.sendMessage(this.getUseageTemplate());
}
return false;
}
return true;
}
public boolean validArgs(List<String> args)
{
return this.validArgs(args, null);
}
// -------------------------------------------- //
// Help and Usage information
// -------------------------------------------- //
public String getUseageTemplate(List<MCommand> commandChain, boolean addShortHelp)
{
StringBuilder ret = new StringBuilder();
ret.append(getPlugin().txt.getDesign().getColorCommand());
ret.append('/');
for (MCommand mc : commandChain)
{
ret.append(getPlugin().txt.implode(mc.aliases, ","));
ret.append(' ');
}
ret.append(getPlugin().txt.implode(this.aliases, ","));
List<String> args = new ArrayList<String>();
for (String requiredArg : this.requiredArgs)
{
args.add("<"+requiredArg+">");
}
for (Entry<String, String> optionalArg : this.optionalArgs.entrySet())
{
String val = optionalArg.getValue();
if (val == null)
{
val = "";
}
else
{
val = "="+val;
}
args.add("["+optionalArg.getKey()+val+"]");
}
if (args.size() > 0)
{
ret.append(getPlugin().txt.getDesign().getColorParameter());
ret.append(' ');
ret.append(getPlugin().txt.implode(args, " "));
}
if (addShortHelp)
{
ret.append(' ');
ret.append(getPlugin().txt.getDesign().getColorInfo());
ret.append(this.getHelpShort());
}
return ret.toString();
}
public String getUseageTemplate(boolean addShortHelp)
{
return getUseageTemplate(this.commandChain, addShortHelp);
}
public String getUseageTemplate()
{
return getUseageTemplate(false);
}
// -------------------------------------------- //
// Message Sending Helpers
// -------------------------------------------- //
public void msg(String str, Object... args)
{
sender.sendMessage(getPlugin().txt.parse(str, args));
}
public void msg(String str)
{
sender.sendMessage(getPlugin().txt.parse(str));
}
public void sendMessage(String msg)
{
sender.sendMessage(msg);
}
public void sendMessage(List<String> msgs)
{
for(String msg : msgs)
{
this.sendMessage(msg);
}
}
// -------------------------------------------- //
// Argument Readers
// -------------------------------------------- //
public String arg(int idx)
{
if ( ! this.argIsSet(idx)) return null;
return this.args.get(idx);
}
public boolean argIsSet(int idx)
{
if (this.args.size() < idx+1)
{
return false;
}
return true;
}
public synchronized <T> T argAs(int idx, Class<T> clazz, String style, T defaultNotSet, T defaultNotFound)
{
if ( ! this.argIsSet(idx))
{
return defaultNotSet;
}
IArgHandler<T> handler = getPlugin().cmd.getArgHandler(clazz);
T ret = handler.parse(this.arg(idx), style, this.sender, getPlugin());
if (ret == null)
{
this.msg(handler.error());
return defaultNotFound;
}
return ret;
}
public <T> T argAs(int idx, Class<T> clazz,T defaultNotSet, T defaultNotFound)
{
return this.argAs(idx, clazz, null, defaultNotSet, defaultNotFound);
}
public <T> T argAs(int idx, Class<T> clazz,T defaultNotSet)
{
return this.argAs(idx, clazz, null, defaultNotSet, null);
}
public <T> T argAs(int idx, Class<T> clazz)
{
return this.argAs(idx, clazz, null, null);
}
}

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* Strategy for excluding anonymous and local classes. * Strategy for excluding anonymous and local classes.

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* Defines generic cache interface. * Defines generic cache interface.

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.sql.Timestamp; import java.sql.Timestamp;

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import java.util.Collection; import java.util.Collection;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* A strategy (or policy) definition that is used to decide whether or not a field or top-level * A strategy (or policy) definition that is used to decide whether or not a field or top-level

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.annotations.Expose; import com.massivecraft.mcore1.lib.gson.annotations.Expose;
/** /**
* Excludes fields that do not have the {@link Expose} annotation * Excludes fields that do not have the {@link Expose} annotation

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.annotations.Expose; import com.massivecraft.mcore1.lib.gson.annotations.Expose;
/** /**
* Excludes fields that do not have the {@link Expose} annotation * Excludes fields that do not have the {@link Expose} annotation

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import com.massivecraft.core.lib.gson2.internal.Pair; import com.massivecraft.mcore1.lib.gson.internal.Pair;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View File

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* An enumeration that defines a few standard naming conventions for JSON field names. * An enumeration that defines a few standard naming conventions for JSON field names.
* This enumeration should be used in conjunction with {@link com.massivecraft.core.lib.gson2.GsonBuilder} * This enumeration should be used in conjunction with {@link com.massivecraft.mcore1.lib.gson.GsonBuilder}
* to configure a {@link com.massivecraft.core.lib.gson2.Gson} instance to properly translate Java field * to configure a {@link com.massivecraft.mcore1.lib.gson.Gson} instance to properly translate Java field
* names into the desired JSON field names. * names into the desired JSON field names.
* *
* @author Inderjeet Singh * @author Inderjeet Singh

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* The new mechanism for providing custom field naming in Gson. This allows the client code * The new mechanism for providing custom field naming in Gson. This allows the client code

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
/** /**
* Adapts the old FieldNamingStrategy to the new {@link FieldNamingStrategy2} * Adapts the old FieldNamingStrategy to the new {@link FieldNamingStrategy2}

View File

@ -14,33 +14,33 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.ConstructorConstructor; import com.massivecraft.mcore1.lib.gson.internal.ConstructorConstructor;
import com.massivecraft.core.lib.gson2.internal.ParameterizedTypeHandlerMap; import com.massivecraft.mcore1.lib.gson.internal.ParameterizedTypeHandlerMap;
import com.massivecraft.core.lib.gson2.internal.Primitives; import com.massivecraft.mcore1.lib.gson.internal.Primitives;
import com.massivecraft.core.lib.gson2.internal.Streams; import com.massivecraft.mcore1.lib.gson.internal.Streams;
import com.massivecraft.core.lib.gson2.internal.bind.ArrayTypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.ArrayTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.BigDecimalTypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.BigDecimalTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.BigIntegerTypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.BigIntegerTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.CollectionTypeAdapterFactory; import com.massivecraft.mcore1.lib.gson.internal.bind.CollectionTypeAdapterFactory;
import com.massivecraft.core.lib.gson2.internal.bind.DateTypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.DateTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.ExcludedTypeAdapterFactory; import com.massivecraft.mcore1.lib.gson.internal.bind.ExcludedTypeAdapterFactory;
import com.massivecraft.core.lib.gson2.internal.bind.JsonElementReader; import com.massivecraft.mcore1.lib.gson.internal.bind.JsonElementReader;
import com.massivecraft.core.lib.gson2.internal.bind.JsonElementWriter; import com.massivecraft.mcore1.lib.gson.internal.bind.JsonElementWriter;
import com.massivecraft.core.lib.gson2.internal.bind.MapTypeAdapterFactory; import com.massivecraft.mcore1.lib.gson.internal.bind.MapTypeAdapterFactory;
import com.massivecraft.core.lib.gson2.internal.bind.MiniGson; import com.massivecraft.mcore1.lib.gson.internal.bind.MiniGson;
import com.massivecraft.core.lib.gson2.internal.bind.ObjectTypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.ObjectTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.ReflectiveTypeAdapterFactory; import com.massivecraft.mcore1.lib.gson.internal.bind.ReflectiveTypeAdapterFactory;
import com.massivecraft.core.lib.gson2.internal.bind.SqlDateTypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.SqlDateTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.TimeTypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.TimeTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.TypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.TypeAdapter;
import com.massivecraft.core.lib.gson2.internal.bind.TypeAdapters; import com.massivecraft.mcore1.lib.gson.internal.bind.TypeAdapters;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import com.massivecraft.core.lib.gson2.stream.MalformedJsonException; import com.massivecraft.mcore1.lib.gson.stream.MalformedJsonException;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;
@ -95,7 +95,7 @@ import java.util.Map;
* <p>See the <a href="https://sites.google.com/site/gson/gson-user-guide">Gson User Guide</a> * <p>See the <a href="https://sites.google.com/site/gson/gson-user-guide">Gson User Guide</a>
* for a more complete set of examples.</p> * for a more complete set of examples.</p>
* *
* @see com.massivecraft.core.lib.gson2.reflect.TypeToken * @see com.massivecraft.mcore1.lib.gson.reflect.TypeToken
* *
* @author Inderjeet Singh * @author Inderjeet Singh
* @author Joel Leitch * @author Joel Leitch
@ -158,10 +158,10 @@ public final class Gson {
* ignores the millisecond portion of the date during serialization. You can change * ignores the millisecond portion of the date during serialization. You can change
* this by invoking {@link GsonBuilder#setDateFormat(int)} or * this by invoking {@link GsonBuilder#setDateFormat(int)} or
* {@link GsonBuilder#setDateFormat(String)}. </li> * {@link GsonBuilder#setDateFormat(String)}. </li>
* <li>By default, Gson ignores the {@link com.massivecraft.core.lib.gson2.annotations.Expose} annotation. * <li>By default, Gson ignores the {@link com.massivecraft.mcore1.lib.gson.annotations.Expose} annotation.
* You can enable Gson to serialize/deserialize only those fields marked with this annotation * You can enable Gson to serialize/deserialize only those fields marked with this annotation
* through {@link GsonBuilder#excludeFieldsWithoutExposeAnnotation()}. </li> * through {@link GsonBuilder#excludeFieldsWithoutExposeAnnotation()}. </li>
* <li>By default, Gson ignores the {@link com.massivecraft.core.lib.gson2.annotations.Since} annotation. You * <li>By default, Gson ignores the {@link com.massivecraft.mcore1.lib.gson.annotations.Since} annotation. You
* can enable Gson to use this annotation through {@link GsonBuilder#setVersion(double)}.</li> * can enable Gson to use this annotation through {@link GsonBuilder#setVersion(double)}.</li>
* <li>The default field naming policy for the output Json is same as in Java. So, a Java class * <li>The default field naming policy for the output Json is same as in Java. So, a Java class
* field <code>versionNumber</code> will be output as <code>&quot;versionNumber@quot;</code> in * field <code>versionNumber</code> will be output as <code>&quot;versionNumber@quot;</code> in
@ -392,7 +392,7 @@ public final class Gson {
* *
* @param src the object for which JSON representation is to be created * @param src the object for which JSON representation is to be created
* @param typeOfSrc The specific genericized type of src. You can obtain * @param typeOfSrc The specific genericized type of src. You can obtain
* this type by using the {@link com.massivecraft.core.lib.gson2.reflect.TypeToken} class. For example, * this type by using the {@link com.massivecraft.mcore1.lib.gson.reflect.TypeToken} class. For example,
* to get the type for {@code Collection<Foo>}, you should use: * to get the type for {@code Collection<Foo>}, you should use:
* <pre> * <pre>
* Type typeOfSrc = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType(); * Type typeOfSrc = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType();
@ -435,7 +435,7 @@ public final class Gson {
* *
* @param src the object for which JSON representation is to be created * @param src the object for which JSON representation is to be created
* @param typeOfSrc The specific genericized type of src. You can obtain * @param typeOfSrc The specific genericized type of src. You can obtain
* this type by using the {@link com.massivecraft.core.lib.gson2.reflect.TypeToken} class. For example, * this type by using the {@link com.massivecraft.mcore1.lib.gson.reflect.TypeToken} class. For example,
* to get the type for {@code Collection<Foo>}, you should use: * to get the type for {@code Collection<Foo>}, you should use:
* <pre> * <pre>
* Type typeOfSrc = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType(); * Type typeOfSrc = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType();
@ -477,7 +477,7 @@ public final class Gson {
* *
* @param src the object for which JSON representation is to be created * @param src the object for which JSON representation is to be created
* @param typeOfSrc The specific genericized type of src. You can obtain * @param typeOfSrc The specific genericized type of src. You can obtain
* this type by using the {@link com.massivecraft.core.lib.gson2.reflect.TypeToken} class. For example, * this type by using the {@link com.massivecraft.mcore1.lib.gson.reflect.TypeToken} class. For example,
* to get the type for {@code Collection<Foo>}, you should use: * to get the type for {@code Collection<Foo>}, you should use:
* <pre> * <pre>
* Type typeOfSrc = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType(); * Type typeOfSrc = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType();
@ -619,7 +619,7 @@ public final class Gson {
* @param <T> the type of the desired object * @param <T> the type of the desired object
* @param json the string from which the object is to be deserialized * @param json the string from which the object is to be deserialized
* @param typeOfT The specific genericized type of src. You can obtain this type by using the * @param typeOfT The specific genericized type of src. You can obtain this type by using the
* {@link com.massivecraft.core.lib.gson2.reflect.TypeToken} class. For example, to get the type for * {@link com.massivecraft.mcore1.lib.gson.reflect.TypeToken} class. For example, to get the type for
* {@code Collection<Foo>}, you should use: * {@code Collection<Foo>}, you should use:
* <pre> * <pre>
* Type typeOfT = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType(); * Type typeOfT = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType();
@ -672,7 +672,7 @@ public final class Gson {
* @param <T> the type of the desired object * @param <T> the type of the desired object
* @param json the reader producing Json from which the object is to be deserialized * @param json the reader producing Json from which the object is to be deserialized
* @param typeOfT The specific genericized type of src. You can obtain this type by using the * @param typeOfT The specific genericized type of src. You can obtain this type by using the
* {@link com.massivecraft.core.lib.gson2.reflect.TypeToken} class. For example, to get the type for * {@link com.massivecraft.mcore1.lib.gson.reflect.TypeToken} class. For example, to get the type for
* {@code Collection<Foo>}, you should use: * {@code Collection<Foo>}, you should use:
* <pre> * <pre>
* Type typeOfT = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType(); * Type typeOfT = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType();
@ -769,7 +769,7 @@ public <T> T fromJson(Reader json, Type typeOfT) throws JsonIOException, JsonSyn
* @param json the root of the parse tree of {@link JsonElement}s from which the object is to * @param json the root of the parse tree of {@link JsonElement}s from which the object is to
* be deserialized * be deserialized
* @param typeOfT The specific genericized type of src. You can obtain this type by using the * @param typeOfT The specific genericized type of src. You can obtain this type by using the
* {@link com.massivecraft.core.lib.gson2.reflect.TypeToken} class. For example, to get the type for * {@link com.massivecraft.mcore1.lib.gson.reflect.TypeToken} class. For example, to get the type for
* {@code Collection<Foo>}, you should use: * {@code Collection<Foo>}, you should use:
* <pre> * <pre>
* Type typeOfT = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType(); * Type typeOfT = new TypeToken&lt;Collection&lt;Foo&gt;&gt;(){}.getType();

View File

@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.DefaultTypeAdapters.DefaultDateTypeAdapter; import com.massivecraft.mcore1.lib.gson.DefaultTypeAdapters.DefaultDateTypeAdapter;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import com.massivecraft.core.lib.gson2.internal.ParameterizedTypeHandlerMap; import com.massivecraft.mcore1.lib.gson.internal.ParameterizedTypeHandlerMap;
import com.massivecraft.core.lib.gson2.internal.Primitives; import com.massivecraft.mcore1.lib.gson.internal.Primitives;
import com.massivecraft.core.lib.gson2.internal.bind.TypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.TypeAdapter;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.sql.Timestamp; import java.sql.Timestamp;
@ -178,7 +178,7 @@ public final class GsonBuilder {
/** /**
* Configures Gson to exclude all fields from consideration for serialization or deserialization * Configures Gson to exclude all fields from consideration for serialization or deserialization
* that do not have the {@link com.massivecraft.core.lib.gson2.annotations.Expose} annotation. * that do not have the {@link com.massivecraft.mcore1.lib.gson.annotations.Expose} annotation.
* *
* @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
*/ */

View File

@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.ParameterizedTypeHandlerMap; import com.massivecraft.mcore1.lib.gson.internal.ParameterizedTypeHandlerMap;
import com.massivecraft.core.lib.gson2.internal.Streams; import com.massivecraft.mcore1.lib.gson.internal.Streams;
import com.massivecraft.core.lib.gson2.internal.bind.MiniGson; import com.massivecraft.mcore1.lib.gson.internal.bind.MiniGson;
import com.massivecraft.core.lib.gson2.internal.bind.TypeAdapter; import com.massivecraft.mcore1.lib.gson.internal.bind.TypeAdapter;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.Streams; import com.massivecraft.mcore1.lib.gson.internal.Streams;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.io.StringWriter; import java.io.StringWriter;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.io.IOException; import java.io.IOException;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* This exception is raised when Gson was unable to read an input stream * This exception is raised when Gson was unable to read an input stream

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* A class representing a Json {@code null} value. * A class representing a Json {@code null} value.

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* This exception is raised if there is a serious issue that occurs during parsing of a Json * This exception is raised if there is a serious issue that occurs during parsing of a Json

View File

@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.Streams; import com.massivecraft.mcore1.lib.gson.internal.Streams;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.MalformedJsonException; import com.massivecraft.mcore1.lib.gson.stream.MalformedJsonException;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import com.massivecraft.core.lib.gson2.internal.LazilyParsedNumber; import com.massivecraft.mcore1.lib.gson.internal.LazilyParsedNumber;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.reflect.Type; import java.lang.reflect.Type;
/** /**
* Interface representing a custom serializer for Json. You should write a custom serializer, if * Interface representing a custom serializer for Json. You should write a custom serializer, if
* you are not happy with the default serialization done by Gson. You will also need to register * you are not happy with the default serialization done by Gson. You will also need to register
* this serializer through {@link com.massivecraft.core.lib.gson2.GsonBuilder#registerTypeAdapter(Type, Object)}. * this serializer through {@link com.massivecraft.mcore1.lib.gson.GsonBuilder#registerTypeAdapter(Type, Object)}.
* *
* <p>Let us look at example where defining a serializer will be useful. The {@code Id} class * <p>Let us look at example where defining a serializer will be useful. The {@code Id} class
* defined below has two fields: {@code clazz} and {@code value}.</p> * defined below has two fields: {@code clazz} and {@code value}.</p>

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;
@ -22,10 +22,10 @@ import java.io.StringReader;
import java.util.Iterator; import java.util.Iterator;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import com.massivecraft.core.lib.gson2.internal.Streams; import com.massivecraft.mcore1.lib.gson.internal.Streams;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.MalformedJsonException; import com.massivecraft.mcore1.lib.gson.stream.MalformedJsonException;
/** /**
* A streaming parser that allows reading of multiple {@link JsonElement}s from the specified reader * A streaming parser that allows reading of multiple {@link JsonElement}s from the specified reader

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* This exception is raised when Gson attempts to read (or write) a malformed * This exception is raised when Gson attempts to read (or write) a malformed

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* Defines the expected format for a {@code long} or {@code Long} type when its serialized. * Defines the expected format for a {@code long} or {@code Long} type when its serialized.

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* A {@link FieldNamingStrategy2} that ensures the JSON field names consist of only * A {@link FieldNamingStrategy2} that ensures the JSON field names consist of only

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.annotations.SerializedName; import com.massivecraft.mcore1.lib.gson.annotations.SerializedName;
/** /**
* A {@link FieldNamingStrategy2} that acts as a chain of responsibility. If the * A {@link FieldNamingStrategy2} that acts as a chain of responsibility. If the
* {@link com.massivecraft.core.lib.gson2.annotations.SerializedName} annotation is applied to a * {@link com.massivecraft.mcore1.lib.gson.annotations.SerializedName} annotation is applied to a
* field then this strategy will translate the name to the {@code * field then this strategy will translate the name to the {@code
* serializedName.value()}; otherwise it delegates to the wrapped * serializedName.value()}; otherwise it delegates to the wrapped
* {@link FieldNamingStrategy2}. * {@link FieldNamingStrategy2}.

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* A data object that stores attributes of a field. * A data object that stores attributes of a field.

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* A {@link FieldNamingStrategy2} that ensures the JSON field names consist of mixed * A {@link FieldNamingStrategy2} that ensures the JSON field names consist of mixed

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
/** /**
* Class contain all constants for versioning support. * Class contain all constants for versioning support.

View File

@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2; package com.massivecraft.mcore1.lib.gson;
import com.massivecraft.core.lib.gson2.annotations.Since; import com.massivecraft.mcore1.lib.gson.annotations.Since;
import com.massivecraft.core.lib.gson2.annotations.Until; import com.massivecraft.mcore1.lib.gson.annotations.Until;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
/** /**
* This strategy will exclude any files and/or class that are passed the * This strategy will exclude any files and/or class that are passed the

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.annotations; package com.massivecraft.mcore1.lib.gson.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -25,9 +25,9 @@ import java.lang.annotation.Target;
* An annotation that indicates this member should be exposed for JSON * An annotation that indicates this member should be exposed for JSON
* serialization or deserialization. * serialization or deserialization.
* *
* <p>This annotation has no effect unless you build {@link com.massivecraft.core.lib.gson2.Gson} * <p>This annotation has no effect unless you build {@link com.massivecraft.mcore1.lib.gson.Gson}
* with a {@link com.massivecraft.core.lib.gson2.GsonBuilder} and invoke * with a {@link com.massivecraft.mcore1.lib.gson.GsonBuilder} and invoke
* {@link com.massivecraft.core.lib.gson2.GsonBuilder#excludeFieldsWithoutExposeAnnotation()} * {@link com.massivecraft.mcore1.lib.gson.GsonBuilder#excludeFieldsWithoutExposeAnnotation()}
* method.</p> * method.</p>
* *
* <p>Here is an example of how this annotation is meant to be used: * <p>Here is an example of how this annotation is meant to be used:

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.annotations; package com.massivecraft.mcore1.lib.gson.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -25,10 +25,10 @@ import java.lang.annotation.Target;
* An annotation that indicates this member should be serialized to JSON with * An annotation that indicates this member should be serialized to JSON with
* the provided name value as its field name. * the provided name value as its field name.
* *
* <p>This annotation will override any {@link com.massivecraft.core.lib.gson2.FieldNamingPolicy}, including * <p>This annotation will override any {@link com.massivecraft.mcore1.lib.gson.FieldNamingPolicy}, including
* the default field naming policy, that may have been set on the {@link com.massivecraft.core.lib.gson2.Gson} * the default field naming policy, that may have been set on the {@link com.massivecraft.mcore1.lib.gson.Gson}
* instance. A different naming policy can set using the {@code GsonBuilder} class. See * instance. A different naming policy can set using the {@code GsonBuilder} class. See
* {@link com.massivecraft.core.lib.gson2.GsonBuilder#setFieldNamingPolicy(com.massivecraft.core.lib.gson2.FieldNamingPolicy)} * {@link com.massivecraft.mcore1.lib.gson.GsonBuilder#setFieldNamingPolicy(com.massivecraft.mcore1.lib.gson.FieldNamingPolicy)}
* for more information.</p> * for more information.</p>
* *
* <p>Here is an example of how this annotation is meant to be used:</p> * <p>Here is an example of how this annotation is meant to be used:</p>
@ -58,7 +58,7 @@ import java.lang.annotation.Target;
* *
* <p>NOTE: The value you specify in this annotation must be a valid JSON field name.</p> * <p>NOTE: The value you specify in this annotation must be a valid JSON field name.</p>
* *
* @see com.massivecraft.core.lib.gson2.FieldNamingPolicy * @see com.massivecraft.mcore1.lib.gson.FieldNamingPolicy
* *
* @author Inderjeet Singh * @author Inderjeet Singh
* @author Joel Leitch * @author Joel Leitch

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.annotations; package com.massivecraft.mcore1.lib.gson.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -26,9 +26,9 @@ import java.lang.annotation.Target;
* This annotation is useful to manage versioning of your Json classes for a web-service. * This annotation is useful to manage versioning of your Json classes for a web-service.
* *
* <p> * <p>
* This annotation has no effect unless you build {@link com.massivecraft.core.lib.gson2.Gson} with a * This annotation has no effect unless you build {@link com.massivecraft.mcore1.lib.gson.Gson} with a
* {@link com.massivecraft.core.lib.gson2.GsonBuilder} and invoke * {@link com.massivecraft.mcore1.lib.gson.GsonBuilder} and invoke
* {@link com.massivecraft.core.lib.gson2.GsonBuilder#setVersion(double)} method. * {@link com.massivecraft.mcore1.lib.gson.GsonBuilder#setVersion(double)} method.
* *
* <p>Here is an example of how this annotation is meant to be used:</p> * <p>Here is an example of how this annotation is meant to be used:</p>
* <pre> * <pre>

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.annotations; package com.massivecraft.mcore1.lib.gson.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -28,9 +28,9 @@ import java.lang.annotation.Target;
* is useful to manage versioning of your JSON classes for a web-service. * is useful to manage versioning of your JSON classes for a web-service.
* *
* <p> * <p>
* This annotation has no effect unless you build {@link com.massivecraft.core.lib.gson2.Gson} with a * This annotation has no effect unless you build {@link com.massivecraft.mcore1.lib.gson.Gson} with a
* {@link com.massivecraft.core.lib.gson2.GsonBuilder} and invoke * {@link com.massivecraft.mcore1.lib.gson.GsonBuilder} and invoke
* {@link com.massivecraft.core.lib.gson2.GsonBuilder#setVersion(double)} method. * {@link com.massivecraft.mcore1.lib.gson.GsonBuilder#setVersion(double)} method.
* *
* <p>Here is an example of how this annotation is meant to be used:</p> * <p>Here is an example of how this annotation is meant to be used:</p>
* <pre> * <pre>

View File

@ -1,6 +1,6 @@
/** /**
* This package provides annotations that can be used with {@link com.massivecraft.core.lib.gson2.Gson}. * This package provides annotations that can be used with {@link com.massivecraft.mcore1.lib.gson.Gson}.
* *
* @author Inderjeet Singh, Joel Leitch * @author Inderjeet Singh, Joel Leitch
*/ */
package com.massivecraft.core.lib.gson2.annotations; package com.massivecraft.mcore1.lib.gson.annotations;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
/** /**
* A simple utility class used to check method Preconditions. * A simple utility class used to check method Preconditions.

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
import static com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions.checkArgument; import static com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions.checkArgument;
import static com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions.checkNotNull; import static com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions.checkNotNull;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Array; import java.lang.reflect.Array;

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
import com.massivecraft.core.lib.gson2.InstanceCreator; import com.massivecraft.mcore1.lib.gson.InstanceCreator;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
import java.math.BigInteger; import java.math.BigInteger;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
/** /**
* Defines a generic object construction factory. The purpose of this class * Defines a generic object construction factory. The purpose of this class

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
/** /**
* A simple object that holds onto a pair of object references, first and second. * A simple object that holds onto a pair of object references, first and second.

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
import com.massivecraft.core.lib.gson2.internal.$Gson$Preconditions; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Preconditions;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.Collections; import java.util.Collections;

View File

@ -14,17 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
import com.massivecraft.core.lib.gson2.JsonElement; import com.massivecraft.mcore1.lib.gson.JsonElement;
import com.massivecraft.core.lib.gson2.JsonIOException; import com.massivecraft.mcore1.lib.gson.JsonIOException;
import com.massivecraft.core.lib.gson2.JsonNull; import com.massivecraft.mcore1.lib.gson.JsonNull;
import com.massivecraft.core.lib.gson2.JsonParseException; import com.massivecraft.mcore1.lib.gson.JsonParseException;
import com.massivecraft.core.lib.gson2.JsonSyntaxException; import com.massivecraft.mcore1.lib.gson.JsonSyntaxException;
import com.massivecraft.core.lib.gson2.internal.bind.TypeAdapters; import com.massivecraft.mcore1.lib.gson.internal.bind.TypeAdapters;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import com.massivecraft.core.lib.gson2.stream.MalformedJsonException; import com.massivecraft.mcore1.lib.gson.stream.MalformedJsonException;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal; package com.massivecraft.mcore1.lib.gson.internal;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.io.ObjectStreamClass; import java.io.ObjectStreamClass;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Array; import java.lang.reflect.Array;
@ -23,11 +23,11 @@ import java.lang.reflect.Type;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.massivecraft.core.lib.gson2.internal.$Gson$Types; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Types;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
/** /**
* Adapt an array of objects. * Adapt an array of objects.

View File

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonSyntaxException; import com.massivecraft.mcore1.lib.gson.JsonSyntaxException;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;

View File

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonSyntaxException; import com.massivecraft.mcore1.lib.gson.JsonSyntaxException;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.math.BigInteger; import java.math.BigInteger;

View File

@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.internal.$Gson$Types; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Types;
import com.massivecraft.core.lib.gson2.internal.ConstructorConstructor; import com.massivecraft.mcore1.lib.gson.internal.ConstructorConstructor;
import com.massivecraft.core.lib.gson2.internal.ObjectConstructor; import com.massivecraft.mcore1.lib.gson.internal.ObjectConstructor;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonSyntaxException; import com.massivecraft.mcore1.lib.gson.JsonSyntaxException;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.text.DateFormat; import java.text.DateFormat;

View File

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.ExclusionStrategy; import com.massivecraft.mcore1.lib.gson.ExclusionStrategy;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;

View File

@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonArray; import com.massivecraft.mcore1.lib.gson.JsonArray;
import com.massivecraft.core.lib.gson2.JsonElement; import com.massivecraft.mcore1.lib.gson.JsonElement;
import com.massivecraft.core.lib.gson2.JsonNull; import com.massivecraft.mcore1.lib.gson.JsonNull;
import com.massivecraft.core.lib.gson2.JsonObject; import com.massivecraft.mcore1.lib.gson.JsonObject;
import com.massivecraft.core.lib.gson2.JsonPrimitive; import com.massivecraft.mcore1.lib.gson.JsonPrimitive;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;

View File

@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonArray; import com.massivecraft.mcore1.lib.gson.JsonArray;
import com.massivecraft.core.lib.gson2.JsonElement; import com.massivecraft.mcore1.lib.gson.JsonElement;
import com.massivecraft.core.lib.gson2.JsonNull; import com.massivecraft.mcore1.lib.gson.JsonNull;
import com.massivecraft.core.lib.gson2.JsonObject; import com.massivecraft.mcore1.lib.gson.JsonObject;
import com.massivecraft.core.lib.gson2.JsonPrimitive; import com.massivecraft.mcore1.lib.gson.JsonPrimitive;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.io.Writer; import java.io.Writer;

View File

@ -14,19 +14,19 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonElement; import com.massivecraft.mcore1.lib.gson.JsonElement;
import com.massivecraft.core.lib.gson2.JsonPrimitive; import com.massivecraft.mcore1.lib.gson.JsonPrimitive;
import com.massivecraft.core.lib.gson2.JsonSyntaxException; import com.massivecraft.mcore1.lib.gson.JsonSyntaxException;
import com.massivecraft.core.lib.gson2.internal.$Gson$Types; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Types;
import com.massivecraft.core.lib.gson2.internal.ConstructorConstructor; import com.massivecraft.mcore1.lib.gson.internal.ConstructorConstructor;
import com.massivecraft.core.lib.gson2.internal.ObjectConstructor; import com.massivecraft.mcore1.lib.gson.internal.ObjectConstructor;
import com.massivecraft.core.lib.gson2.internal.Streams; import com.massivecraft.mcore1.lib.gson.internal.Streams;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View File

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.internal.ConstructorConstructor; import com.massivecraft.mcore1.lib.gson.internal.ConstructorConstructor;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable; import java.lang.reflect.TypeVariable;

View File

@ -14,17 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonSyntaxException; import com.massivecraft.mcore1.lib.gson.JsonSyntaxException;
import com.massivecraft.core.lib.gson2.internal.$Gson$Types; import com.massivecraft.mcore1.lib.gson.internal.$Gson$Types;
import com.massivecraft.core.lib.gson2.internal.ConstructorConstructor; import com.massivecraft.mcore1.lib.gson.internal.ConstructorConstructor;
import com.massivecraft.core.lib.gson2.internal.ObjectConstructor; import com.massivecraft.mcore1.lib.gson.internal.ObjectConstructor;
import com.massivecraft.core.lib.gson2.internal.Primitives; import com.massivecraft.mcore1.lib.gson.internal.Primitives;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.AccessibleObject; import java.lang.reflect.AccessibleObject;

View File

@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.massivecraft.core.lib.gson2.internal.bind; package com.massivecraft.mcore1.lib.gson.internal.bind;
import com.massivecraft.core.lib.gson2.JsonSyntaxException; import com.massivecraft.mcore1.lib.gson.JsonSyntaxException;
import com.massivecraft.core.lib.gson2.reflect.TypeToken; import com.massivecraft.mcore1.lib.gson.reflect.TypeToken;
import com.massivecraft.core.lib.gson2.stream.JsonReader; import com.massivecraft.mcore1.lib.gson.stream.JsonReader;
import com.massivecraft.core.lib.gson2.stream.JsonToken; import com.massivecraft.mcore1.lib.gson.stream.JsonToken;
import com.massivecraft.core.lib.gson2.stream.JsonWriter; import com.massivecraft.mcore1.lib.gson.stream.JsonWriter;
import java.io.IOException; import java.io.IOException;
import java.text.DateFormat; import java.text.DateFormat;

Some files were not shown because too many files have changed in this diff Show More