InputGui - Use the cmd block gui to read strings!

Discussion in 'Resources' started by Cybermaxke, Jul 18, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Toni


    Oh fantastic. I'll be using it then. My mistake for being so ignorant and not testing it first :)

    EDIT:

    Minowii


    Actually now I'm wondering if you even tested it. I just did and came out with these errors on execution of the API / load up on the plugin:

    http://pastebin.com/L4B1u163

    Unless I'm using different versions (which I'm unsure of as they're all dev-SNAPSHOT under his maven repository. Care to give which version you're using?
     
  2. Offline

    Monowii

    I just used dev snapshot as you. This is my compiled version of inputgui: <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 6, 2016
  3. Offline

    WizardCM

    I was wondering, is it currently possible for the two boxes to have different starting text? For example, I want the first box to be empty. As far as I can tell, currently getDefaultText() is designed to affect both.
     
  4. Offline

    Nojus

    Can someone update this api?
     
  5. Offline

    CMG

    Nojus Toni Guys, ive updated this for the latest version of bukkit; 1.7.9 and fixed a few bugs. Here is the new file download link, you will need to add this to your server plugins directory if you are a server owner and your plugin build path if you are a developer. I dont have a repo for maven sorry, but i will add it to my dropbox: https://dl.dropboxusercontent.com/u/51048904/InputGui.jar You will also need ProtocolLib for 1.7.9. There is a simple change you have to make also when instantiating a new instance of the pluign, instead of:
    Code:java
    1. InputGuiAPI api = (InputGuiAPI) Bukkit.getPluginManager().getPlugin("InputGui");

    You will do:
    Code:java
    1. InputGuiAPI api = (InputGuiAPI) Bukkit.getPluginManager().getPlugin("InputGuiAPI");

    Everything else is the same as what Cybermaxke said originally! :)
     
  6. Offline

    Quaro

    CMG What bugs did you fixed?
     
  7. Offline

    CMG

    There were not really bugs, just needed be updated to 1.7.9, as packet changes and i needed to add the new 1.7.9 protocol library to it as-well. It pretty much didn't work on 1.7.9
     
  8. Offline

    Nojus

    CMG Why can't i kick player if i enter the player name?
    Code:
    Code:java
    1. if (Bukkit.getServer().getOfflinePlayer(arg1).isOnline()) {
    2. Bukkit.getServer().getPlayer(arg1).getPlayer().kickPlayer(ChatColor.RED + "Kicked.");
    3. }

    I get no error in the console, but the player is not kicked.
     
  9. Offline

    CMG

    What do you mean exactly, can you show me your full code?
     
  10. Offline

    Foorack

    Is it possible to use this API even if command blocks are deactivated on the server? CMG
     
  11. Offline

    CMG

    I'm not sure man, I haven't tried it so have a go, it could work.
     
  12. Offline

    Foorack

    CMG Just tried and if command blocks are deactivated on the server it -awlays- returns cancel.. :/
    Is it possible to fix?
     
  13. Offline

    CMG

    Well there could be a feature in the API to enable command blocks, i may add it.
     
  14. Offline

    crolemol

  15. Offline

    crolemol

    bump i still need this
     
  16. Offline

    Cybermaxke

    In minecraft version 1.8, you can no longer open the command block with the same packet, only signs.
     
  17. Offline

    crolemol

    @Cybermaxke
    when you say " the same packet" do you mean it is still possible with multiple packets??
     
  18. Offline

    Cybermaxke

    I have checked the client code, but I haven't found a way to open it with packets, opening the command block is now completely client side.
     
  19. Offline

    crolemol

  20. Offline

    Schaffer79

    Hm I fixed error, thanks for advices from msg.
     
    Last edited: Feb 25, 2015
  21. Offline

    Schaffer79

  22. Offline

    chunza2542

    HI, i'm beiginer in java. i try to use inputgui but i got some error .
    please help me, thank you.
    When i send command gui I want to have inputgui pop up.

    I have 2 plugins in my plugins folder:
    1. AuthmeLoginGUI <= This is my plugin
    2. ProtocolLib

    This is my code.
    Code:
    package me.chun.AuthmeLoginGUI;
    
    import me.cybermaxke.inputgui.api.InputGui;
    import me.cybermaxke.inputgui.api.InputGuiAPI;
    import me.cybermaxke.inputgui.api.InputPlayer;
    import org.bukkit.Bukkit;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Main extends JavaPlugin{
       
        InputGuiAPI api = (InputGuiAPI) Bukkit.getPluginManager().getPlugin("InputGui");
       
        public boolean onCommand(CommandSender sender, Command command, String label, String[] args){
           
           
            if(label.equalsIgnoreCase("gui")){
               
                Player player = (Player) sender;
                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) {
    
                    }
    
                });
            }
    
            return false;
        }
       
    }
    
    This is my error
    [​IMG]

    Thank you
     
  23. Offline

    Letscrime

    As i see, you want to use the InputGUI in Minecraft 1.8.
    This isnt possible since Minecraft 1.8 has made the commandblock GUI clientside.
     
  24. Offline

    chunza2542

    @Letscrime
    I try to use minecraft v1.8 but i got some error again. :'(

    [​IMG]
    [​IMG]
     
  25. Offline

    mcdorli

    Can you read? This doesn't work with 1.8.
     
Thread Status:
Not open for further replies.

Share This Page