Sueta
JS

JSON API

3.1.0

Create and send JSON messages easily.

·Plugin
  1. 3.1.0latestUpdate 3.1.0: Support for Minecraft 1.17, fail-softJun 25, 2021
    New Javadoc URL: http://javadocs.voidev.info/docs/JsonApi-v3.1.0/index.html Changelog · Added support for Minecraft version 1.17 · JsonApi will now fail silently for unsupported Minecraft versions and switch to a limited operating mode. In this mode, all messages sent are sent as console messages (using color codes). Compatibility Note: This version is backwards-compatible with 3.0.2, as defined by the semantic versioning scheme. However, it's been years since I've touched this project. If you have any questions or concerns, please contact me.
    343 downloads
  2. 3.0.2Update 3.0.2: Converting between color-coded and JSON messagesAug 1, 2017
    New Javadoc URL: http://javadocs.coloredcarrot.com/docs/JsonApi-v3.0.2/ind… Or as a compressed .jar: http://javadocs.coloredcarrot.com/docs/JsonApi-v3.0.2-jav… Changelog · Added constructor JsonMsg(String text, boolean allowStyleFallthrough) to convert from a color-code based text message to a JsonMsg · Added method JsonMsg#toConsoleMessage(boolean insertResetCodes) to convert from a JsonMsg to a color-code based text message .SpoilerTarget">Spoiler: Converting color-coded messages <-> JsonMsg You can convert any color-code based message to a JsonMsg using the constructor JsonMsg(String text, boolean allowStyleFallthrough). The allowStyleFallthrough parameter specifies whether the styles should be reset at every new "segment" of the text, where the segments are separated by a continuous set of color codes. Example: Code (Java): JsonMsg msg = new JsonMsg ( "§aHello, §o§lworld!", true ) ; // The §a (green color) carries over to "§o§lworld!", // since it does not specify a color itself and allowStyleFallthrough is true To convert a JsonMsg back to a color-coded message, use the method JsonMsg.toConsoleMessage(boolean insertResetCodes). The insertResetCodes parameter specifies whether the message and each extra message should be prefixed with a reset code (§r). Example: Code (Java): String codeBased = msg. toConsoleMessage ( true ) ; // codeBased is now "§r§r§aHello, §r§a§l§oworld!"
    5973 downloads
  3. 3.0.1Update 3.0.1: Support vor MC 1.12-pre5May 25, 2017
    New Javadoc URL: http://javadocs.coloredcarrot.com/docs/JsonApi-v3.0.1/ Changelog · Added support for Minecraft 1.12-pre5 · Added constructor JsonMsg(JsonMsg... extra) · Fixed a bug where invoking style(ChatColor.MAGIC) would change the italic status of the JsonMsg · Fixed the javadoc of JsonMsg#extra(List)
    1013 downloads
  4. 3.0.0UPDATE 3.0.0: Major Update, Complete Code Rewrite, Refactoring RequiredJan 26, 2017
    This is a HUUGE update to JsonApi. It has been completely re-written and features tons of new features, ease-of-use and a better documentation. Attention developers: You will have to refactor your plugins depending on this API, however it is highly recommend to update as soon as possible as version 2.x will no longer be updated and therefore not support Minecraft 1.11 etc. To all server owners: From now on, you're going to have to install this API as a plugin. However, it is fair to say that it is going to take the plugins depending on this API a while to update, so you should consider waiting some time before updating. Changelog: · Added support for Minecraft 1.10.x, 1.11.x · Class prefix is now "Json" instead of "JSON" · Removed JSONComponent(Simple) in favor of only one JsonMsg class · Added extras to JsonMsg · Added a command "/jsonapi" to display version information · Click and hover action construction changed to the format JsonClickEvent#runCommand(String).
    1923 downloads
  5. 2.3Update 2.3Jun 30, 2016
    Changelog · Added class JSONHoverAction.ShowItemStack written by LordBoos
    2285 downloads
  6. 2.2Update 2.2Jun 30, 2016
    Changelog · Added compatibility for MC 1.9.x, 1.10 · Fixed some bugs with the NMS setup code
    160 downloads
  7. 2.1Critical BugfixApr 15, 2016
    Changelog: - fixed a critical bug
    339 downloads
  8. 2.0No version dependency!Apr 15, 2016
    Changelog: - removed version dependency, now works with versions 1.8, 1.8.3, 1.8.8, 1.9 Please follow the following steps: .SpoilerTarget">Spoiler: Version Dependency This API used to be version-dependent, but since v2.0, that's fixed. Compatible versions: - 1.8.x - 1.9.x You need to add the following code into your onEnable() method: Code (Text): NMSSetupResponse nmsSetupResponse = JSON.setup(this); if (nmsSetupResponse.isCompatible()) getLogger().info("[VersionManager] Hooked server version " + nmsSetupResponse.getVersion()); else { getLogger().warning("[VersionManager] Your server version (" + (nmsSetupResponse.getVersion() == null ? "UNKNOWN" : nmsSetupResponse.getVersion()) + ") is not compatible with this plugin!"); getServer().getPluginManager().disablePlugin(this); return; }
    179 downloads
  9. 1.0-MC1.9Apr 1, 2016
    302 downloads

Similar projects

Plugin →