GithubHelp home page GithubHelp logo

toberocat / guiengine Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 3.47 MB

A powerful GUI Framework, allowing Server Owners and Developers to Craft Interactive Custom GUIs

Home Page: https://toberocat.github.io/GuiEngine/javadocs

License: GNU General Public License v3.0

Shell 0.16% Kotlin 99.83% JavaScript 0.01% HTML 0.01%
component-based easy-to-use graphical-user-interface minecraft-framework minecraft-plugin plugin-api spigot-gui well-documented

guiengine's Introduction

guiengine's People

Contributors

ling-ink avatar toberocat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

guiengine's Issues

Bug: Sign don't work when editing

Description

When placing signs the edit UI doesn't show and NBT copied signs are blank. Braking them shows this error.

Steps to reproduce

  1. Place sign
  2. Brake sign

Logs

error.txt

Versions

Plugin: 1.4.2
Server: Paper 1.20.1 build 196

PlaceHolders in Lore

Hi

For some reason whenever I place a placeholder inside of a lore, the whole lor disappears from the material/item.
Is there another way to place them or is it just missing?

Add better invaild GUi error handling

Description

Currently when making a GUI and it has an issue (currently tested with Improved Factions ones), I get a big not useful java error. What It should show is the file location including name and line number it has an issue with parsing

Steps to reproduce

None

Logs

None

Versions

Server: Paper 1.20.1 build 108
GUI engine: 1.2.3

Lost on-click function after edit

In this component:

<component type="item" id="green-button" x="3" y="2" material="GREEN_TERRACOTTA" name="§aGreen button">
    <lore>§7Click me</lore>
    <lore>§7I promise §ait's worth§7 it</lore>
    <on-click type="edit" target="green-button" attribute="name" set-value="§eYou clicked me :)"/>
    <on-click type="edit" target="green-button" attribute="material" set-value="YELLOW_TERRACOTTA"/>
</component>

After clicked once, the GREEN_TERRACOTTA replaced by YELLOW_TERRACOTTA, and the name changed
And then, if I continue to click, it will cause error:

[22:06:10 ERROR]: Could not pass event InventoryClickEvent to GuiEngine v1.2.1
java.lang.NullPointerException: Cannot invoke "io.github.toberocat.guiengine.function.GuiFunction.call(io.github.toberocat.guiengine.GuiEngineApi, io.github.toberocat.guiengine.context.GuiContext)" because "function" is null

I found that in DefaultInterpreter.java , after convertValue() method, the on-click will filled with null
image
image

Single line of lore does not displayed

I was following the User Beginner Guide and I found when I add single lore to a item, it does not displayed
image
image

I found that ParserContext.getOptionalStringArray() used foreach to process the lore array, but when there have only one lore, the getOptionalNode() returned JsonNode is String instead of Array
image
image

How to use the PagedComponent

Is this code correct?

<gui title="§eTag" width="9" height="2">
    <component type="item" material="IRON_BLOCK" name="§eBack">
        <on-click type="action">[container:previous]</on-click>
    </component>
    <component type="item" x="8" material="DIAMOND_BLOCK" name="§eNext">
        <on-click type="action">[container:next]</on-click>
    </component>
    <component type="paged" id="container" y="1" width="9" height="1" interactions="true"
            pattern="0,1,2,3,4,5,6,7,8">
        <fill-empty type="item" material="GLASS_PANE">
            <on-click type="action">[message] Nothing here</on-click>
        </fill-empty>
        <page>
            <component type="item" x="1" material="EMERALD_BLOCK" name="§ePage 1">
                <on-click type="action">[message] Page 1</on-click>
            </component>
        </page>
        <page>
            <component type="item" x="7" material="REDSTONE_BLOCK" name="§ePage 2">
                <on-click type="action">[message] Page 2</on-click>
            </component>
        </page>
    </component>
</gui>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.