promotional bannermobile promotional banner

InputGuiAPI

Abandoned
Use cmd block guis to input strings.

I have found a way to use the command block gui to read strings and using them, I made a small plugin with api for this so multiple plugin should be able to use it and making it a lot easier to use. :) The other text on the gui can be removed by using a modified resource pack. It already uses ProtocolLib to read incomming packets but doesn't use any nms.

Features:

  • Open a input gui and read the input string.
  • Intercept command block renaming.
  • Intercept anvil renaming events. (Including color support.)
  • Force a player to open a sign gui or command block edit gui.

Usefull Links:

Requirements:

How to use?

First you will need to import the api into your plugin build path.
You can also import the dependency using maven:

<dependency>
    <groupId>cybermaxke</groupId>
    <artifactId>inputgui</artifactId>
    <version>dev-SNAPSHOT</version>
</dependency>
<repository>
    <id>cybermaxkes-repo</id>
    <url>http://dl.dropbox.com/u/104060836/mvn-repo</url>
</repository>


Example:

This is how you should be able to get the api:

InputGuiAPI api = (InputGuiAPI) Bukkit.getPluginManager().getPlugin("InputGui");


Now, once you can acces the api, you can make the player opening a gui:

Player player = ...;
InputPlayer iplayer = api.getPlayer(player);
iplayer.openGui(new InputGui() {
    @Override
    public String getDefaultText() {
        return "This is a example!";
    }
    @Override
    public void onConfirm(InputPlayer player, String input) {
        player.getPlayer().sendMessage(this.getDefaultText() + " -> " + input);
    }
    @Override
    public void onCancel(InputPlayer player) {
    }
});

That is everything you need to do!
Please post issues on github.

The InputGuiAPI Team

profile avatar
  • 7
    Projects
  • 50.0K
    Downloads

More from _ForgeUser8034683View all

  • MobileTools project image

    MobileTools

    • 8.4K
    • Bukkit Plugins

    Portable workbench, anvil, furnace, ect.

    • 8.4K
    • April 19, 2014
    • Bukkit Plugins
  • StatsGui project image

    StatsGui

    • 25.3K
    • Bukkit Plugins

    mcMMO and Vault GUI

    • 25.3K
    • December 18, 2013
    • Bukkit Plugins
    • +1
  • MightyBiomesAPI project image

    MightyBiomesAPI

    • 0
    • Bukkit Plugins

    A extended biomes api!

    • 0
    • October 4, 2013
    • Bukkit Plugins
    • +2
  • ElementalArrows project image

    ElementalArrows

    • 8.3K
    • Bukkit Plugins

    Everybody needs more arrows!

    • 8.3K
    • July 19, 2013
    • Bukkit Plugins
    • +2
  • MobileTools project image

    MobileTools

    • 8.4K
    • Bukkit Plugins

    Portable workbench, anvil, furnace, ect.

    • 8.4K
    • April 19, 2014
    • Bukkit Plugins
  • StatsGui project image

    StatsGui

    • 25.3K
    • Bukkit Plugins

    mcMMO and Vault GUI

    • 25.3K
    • December 18, 2013
    • Bukkit Plugins
    • +1
  • MightyBiomesAPI project image

    MightyBiomesAPI

    • 0
    • Bukkit Plugins

    A extended biomes api!

    • 0
    • October 4, 2013
    • Bukkit Plugins
    • +2
  • ElementalArrows project image

    ElementalArrows

    • 8.3K
    • Bukkit Plugins

    Everybody needs more arrows!

    • 8.3K
    • July 19, 2013
    • Bukkit Plugins
    • +2