use of com.github.vaerys.objects.PatchObject in project DiscordSailv2 by Vaerys-Dawn.
the class PatchHandler method getJsonConfig.
private static PatchObject getJsonConfig(IGuild guild, String file, double patchID, String patch) {
String path = Utility.getFilePath(guild.getLongID(), file);
// check if file exists:
if (!FileHandler.exists(path))
return null;
JsonObject json = FileHandler.fileToJsonObject(path);
if (checkPatch(patchID, guild, patch, json))
return null;
return new PatchObject(json, path, patchID);
}
Aggregations