Git Product home page Git Product logo

dynamicgui's Introduction

DynamicGui

build javadocs License

A plugin designed to make writing menus for Minecraft easy. Menus can be written in the configuration language of your choice: yaml, hocon, json or xml.

Features

  • A number of functions to use to customize menus
    • Asynchronous functions
    • Functions use latebinding
    • Addons can be written for more functions
    • Use conditions with replacers using EvalEx
  • Guis can be written in yaml, json, xml or hocon
  • Proxy support
    • Bungeecord
  • Custom replacers
    • Built-in replacer support
    • Support for PlaceholderAPI
    • User defined macros
      • Per Gui, Slot and Global
      • Supports macro chaining
  • Loading guis from a remote location
    • Currently supports loading from a webserver
    • Can also load from websites like Github using url parameters
  • Different gui types
    • Beacon
    • Brewing stand
    • Chest
    • Crafting Table
    • Dispenser
    • Dropper
    • Furnace
    • Hopper
    • Workbench

Future features

  • Support for sponge

Use cases

Just a few uses for DynamicGui.

  • Crafting recipes
  • Crate rewards
  • Help menu
  • Hub menu
  • Kit preview
  • Player information
  • Player statistics
  • Quests
  • Shop
  • Staff tools

Downloads

You can get development builds from Github actions but you will need a Github account.

Getting Started

Gui Documentation

You find find gui documentation here.

Contributing

Before contributing please read our documentation on contributing.

Dependency

Gradle

repositories {
  maven { 
    url 'https://jitpack.io' 
  }
}

dependencies {
  compileOnly 'com.github.clubobsidian.dynamicgui:api:6.3.0'
}

Maven

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>
<dependency>
	<groupId>com.github.ClubObsidian.DynamicGui</groupId>
	<artifactId>api</artifactId>
	<version>6.3.0</version>
</dependency>

Development

Eclipse

  1. Git clone the project
  2. Generate eclipse files with gradlew eclipse
  3. Import project
  4. Right click on the project
  5. Add gradle nature

Intellij

  1. Git clone the project
  2. Generate intellij files with gradlew idea
  3. Import project

Building

gradlew build

dynamicgui's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar felixobrien avatar haloflooder avatar njsharpe avatar virustotalop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dynamicgui's Issues

New function system for 4.0.0

New function system should work like this
Also allow for treeing of functions so fail functions can have fail functions and can have functions etc. Functions should also have branches out to be able to run other functions whenever those functions are ran.

title: "test gui title"
rows: 1
mode: "set"
close: true
npcs:
  citizens:
  - 5
  - 77

functions:
  function: #Fails on function fail, considered a global function, if you want bound to one slot put under own section
    type: "fail"
    fail-on: "function" #Can also be a list, if 'fail-on' is not specified runs for all.
    functions:
    - "function"

'0':
  name: "Some name"
  replacers:
     '%test%': "This is some text"
  functions:
    load:
      type: 
      - "load"
      functions:
      - "function: with data"
      - "function-to-normalize"
      depth-1-load:
        type:
        - "load"
        functions:
        - "function: with other data"
    leftclick:
      type:
      - "left"
      functions:
      - "function"
      depth-1-left:
        type:
        - "left"
        functions:
        - "function"
        depth-2-left:
          type: 
          - "left"
          functions:
          - "function: some other data"
      depth-1-other-left:
        type:
        - "left"
        functions:
        - "function"
    allclick:
      type:
      - "left"
      - "right"
      - "middle" 
      functions:
      - "function"
      - "function: with:a colon"
      - "functions:  test trimming   "
'1': #First SlotToken test
  name: "test"
  icon: "DIRT"
  nbt: "{SomeKey:\"some value\"}"
  close: true
  data: 1
  functions:
    left:
      type:
      - "left"
      functions:
      - "function"   

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Test temporary guis

Temporary guis as a concept no longer exist, they are just like all other guis. Test guis that are not loaded by the main DynamicGUI plugin.

Setclose function

Add a setclose: boolean function for whether or not to close the gui.

Add git support

Add git support, support grabbing data from private github repositories using oath.

Set item does not work correctly for sponge

When calling set item on a sponge itemstack the inventory does not update. The click handler is saying that the itemstack is null. Not sure why the itemstack is not updating.

Rewrite index system

Rewrite additem to return an index. Add item can be implemented by implementing setitem and checking backwards for null itemstacks.

Refactor away from "GUI"

Some code is still using GUI full caps this will likely be removed, should be investigated along with issue #22

Possible names

  • DynamicMenu(s)
  • DynamicGui

Use nbt tag from slot or remove it

Custom nbt support is up in the air due to multiple server support. Not sure if the nbt tag should be removed or should get full support.

Remove slot specific extra metadata

Slot permissions should no longer be available. If a slot needs to be removed a function can be used in a fail function. Additionally any other lingering data should be removed and should be replaced with functions.

Test economy

Vault has been partially tested and sponge economy is yet to be tested. Sponge economy will have to be tested when sponge inventories start working.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Cleanup guimanager code

The gui manager code is a mess and should be cleaned up, a number of methods do not need as much data passed as is currently being passed.

Add a way for plugin aliasing cleanup

Bukkit command aliasing is currently implemented but there is no cleanup functionality like in the legacy version. Cleanup is not currently possible with the current setup and some refactoring needs to be done.

Add support to refresh/update the gui slot/inventory

Being able to refresh/update a gui slot/inventory would be nice for live updates for replacers or to add a removed item back to the gui if they have permission for it.

e.g.

'20':
  icon: "BEDROCK"
  name: "&bTest"
  lore:
  - "&aYou have permission for test.test!"
  updateEvery: 20 # update every 20 ticks
  load-functions:
  - "permission: test.test"
  permission-loadfailfunctions:
  - "setlore: &cYou don't have permission for test.test"

or

'20':
  icon: "BEDROCK"
  name: "&bTest"
  lore:
  - "&aYou have permission for test.test!"
  load-functions:
  - "refreshSlotIn: 20"
  - "permission: test.test"
  permission-loadfailfunctions:
  - "setlore: &cYou don't have permission for test.test"

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

The inventory api is borked

The getItem and setItem methods are completely broken. Likely due to querying both inventories, the main and the custom, but more research needs to be done. Sponge support is currently broken.

Add gui load functions

A system for a more flexible DynamicGUI. Functions will be used for various tasks such as sounds, permission etc. Code for sounds etc will need to be removed from being loaded onto a 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.