From 07988edd4a3c7d50622c7809c22333a4f48352a8 Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Sun, 31 May 2020 22:30:32 +0200 Subject: [PATCH] Updated AddonscriptJSON --- .../anvil/addonscript/v1/AddonscriptJSON.java | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/main/java/ley/anvil/addonscript/v1/AddonscriptJSON.java b/src/main/java/ley/anvil/addonscript/v1/AddonscriptJSON.java index 05b2716..2f662fa 100644 --- a/src/main/java/ley/anvil/addonscript/v1/AddonscriptJSON.java +++ b/src/main/java/ley/anvil/addonscript/v1/AddonscriptJSON.java @@ -74,13 +74,9 @@ public class AddonscriptJSON extends JSON { */ public List mcversion; /** - * The changelog of this version + * Meta Information about this version */ - public List changelog; - /** - * The UNIX Timestamp when this version was released - */ - public int timestamp; + public VersionMeta meta; /** * A link to another Addonscript JSON file, which handles this version */ @@ -145,6 +141,17 @@ public class AddonscriptJSON extends JSON { } + public static class VersionMeta { + /** + * The changelog of this version + */ + public List changelog; + /** + * The UNIX Timestamp when this version was released + */ + public int timestamp; + } + public static class Repository { /** * The ID of this repository @@ -196,17 +203,14 @@ public class AddonscriptJSON extends JSON { */ public String file; /** - * Should this file be on the client? + * A list of parameters for this file. + * Currently supportet parameters: + * "required" - This file is required for the addon + * "optional" - This file is optional for the addon + * "client" - This file works on the client side + * "server" - This file works on the server side */ - public boolean client = true; - /** - * Should this file be on the server? - */ - public boolean server = true; - /** - * Is this file required or optional? - */ - public boolean required = true; + public List params; } @@ -235,17 +239,14 @@ public class AddonscriptJSON extends JSON { public Meta meta; /** - * Should this file be on the client? + * A list of parameters for this relation. + * Currently supportet parameters: + * "required" - This relation is required for the addon + * "optional" - This relation is optional for the addon + * "client" - This relation works on the client side + * "server" - This relation works on the server side */ - public boolean client = true; - /** - * Should this file be on the server? - */ - public boolean server = true; - /** - * Is this file required or optional? - */ - public boolean required = true; + public List params; }