Iodine: a mod-plugin pair for real GUIs

Discussion in 'Spigot Discussion' started by Trigary, Mar 14, 2020.

  1. What is Iodine?
    Iodine is a WIP project that allows plugin developers to open real GUIs to clients instead of inventory or chat menus. There is a catch though: these GUIs are only visible to players who install a mod.

    Similar projects
    You may have heard of Spoutcraft before, which also offered custom GUIs. Other projects also existed, such as Lithium and MinecraftGui. The main difference is that these are no longer being worked on: plugins that require a client-side mod are obviously not that popular.

    Features:
    • GUIs multiple players can view and modify simultaneously
    • Clickable buttons, sliders, checkboxes, linear and grid layouts, etc.
    • Minecraftian feeling: vanilla assets are reused whenever possible, new assets try to follow the same style
    • Support for overlays, allowing the creation of eg. minimaps, custom status bars
    • Powerful, well-documented API for plugin developers: this is a top priority since Iodine doesn't offer any content by itself

    For more information please visit the project on GitHub.

    All feedback, ideas and help are welcome. I don't bite, leave your thoughts; feel free to ask questions!

    Showcase of some of the implemented elements:

    [​IMG]

    Showcase of a proof-of-concept Factions minimap:

    [​IMG]

    [​IMG]

    Very simple, "Hello World" sample code:
    Code (Java):
    IodineApi.get().createGui()
        .addElement(GuiElements.TEXT, e -> e.setText("Hello, world!").setWidth(75))
        .addElement(GuiElements.BUTTON, 0, 15, e -> e.setText("Exit").setWidth(75)
            .onClicked((ee, p) -> p.closeOpenGui()))
        .onClosed((gui, p, byPlayer) -> p.sendMessage(
            byPlayer ? "You pressed the escape key" : "You clicked the exit button"))
        .openFor(IodineApi.get().getPlayer(player.getUniqueId()));
     
    • Like Like x 1
    • Winner Winner x 1
    • Informative Informative x 1
  2. Cool idea! Could definitely see this being useful.
     
  3. Strahan

    Benefactor

    Pretty cool, but
    kinda hits the nail on the head. I can't imagine members of a server being thrilled to have to install a mod just to use a GUI on one server. Does it work if they do not have the mod; like does it support sending a msg saying "Sorry, this command requires Iodine mod" or will it just not allow a login if they are missing the mod?
     
  4. The Iodine plugin requires nothing by default, it only expands the options plugins have when it comes to displaying visual information to players. Vanilla players can log in just fine and yes, I imagine plugins would send such a message, or even better: they would show an alternative, eg. an inventory-based GUI.
     
    • Like Like x 1