1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Is it possible to get console typing just like on nukkit

Discussion in 'Development' started by Yexeed, Sep 20, 2017.

  1. Yexeed

    Yexeed Slime

    Messages:
    76
    Actually, i asking about, why on pocketmine input is bad, but on nukkit its is good. On nukkit your words doesnt getting away when someone is saying something on server. On pocketmine you cant press ArrowUP and get your last command typed automatically

    pocketmine:
    [​IMG]
    and nukkit:
    [​IMG]

    P.S. Sorry for my bad english
     
    Last edited: Sep 20, 2017
  2. sharletsings123

    sharletsings123 Baby Zombie

    Messages:
    116
    GitHub:
    sharletk
    First of all please put a little more effort in your "english" as no one will or can help you if you don't.

    Yes, even I have had this problem but it won't effect as much you can easily complete the command you wanted to do and it will be done.

    I think they are fixing it but yes its an issue for Linux users but it will get fixed soon.

    Why you want to get back an command by doing a Arrow UP when you can easily type it down...?
     
    jasonwynn10 and Muqsit like this.
  3. Yexeed

    Yexeed Slime

    Messages:
    76
    Idk, its just makes my life a bit easier, cuz i dont have to repeat one command many times if i want, for example, give diamonds to ten players with different names.
     
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    First of all, I must clarify, it is not "on pocketmine it is bad, on nukkit it is good". It depends on your terminal wrapper, which is actually related to the PHP terminal (and mintty php on Windows) and Nukkit's Java terminal.

    I wrote a plugin that doesn't perfectly solve this problem but at least prevents typing wrong commands: https://github.com/PEMapModder/Small-ZC-Plugins/tree/master/ConsolePush
    The plugin was back in API 2.0.0, but I think it should work perfectly even with the expectable changes in API 3.0.0-ALPHA8.

    To truly solve this problem, we need an extension like ncurses updated for latest PHP, or have a good terminal wrapper.

    As I have tested on my Windows 10 distribution, if you don't use mintty and directly use cmd.exe to execute the command "php PocketMine-MP.phar --enable-ansi", common terminal keys like arrow-up/down/left/right, Delete etc. will also work.

    Some wrappers like PocketMine-GUI (I don't think it works correctly) could also be a workaround.

    If you don't like the cmd.exe interface, you may even use wrappers like jediterm. However, note that jediterm is actually the same as the emulated Terminal you get in IDEA/PhpStorm/other JetBrains product (with Alt+F12 on my keymap)
     
    Last edited: Sep 20, 2017
  5. Yexeed

    Yexeed Slime

    Messages:
    76
    Thanks alot for your answer. So how can i make terminal wrapper looks better on Linux. Or i cant at this moment?
     
  6. sharletsings123

    sharletsings123 Baby Zombie

    Messages:
    116
    GitHub:
    sharletk
    You can't just go and edit a terminal just like that.
     
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Another possibility is to buffer the output until the user enters a command. The user can type something like a backslash to signify the start of typing a command. I'll work on a simple plugin demonstrating this shortly.
     
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    jasonwynn10 likes this.
  9. Marabou

    Marabou Baby Zombie

    Messages:
    137
    GitHub:
    wiligangster
    I think yes because all the time he talks about the projects of PEMapModder.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.