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

Possibility to code plugins in other languages.

Discussion in 'Development' started by BlazingFire007, Nov 14, 2016.

  1. BlazingFire007

    BlazingFire007 Creeper

    Messages:
    4
    Hello, I haven't been to these forums for about a year. Back then (and based on what code I've read so far now) plugins have to be written in PHP. This is extremely inconvenient for me as I really really dislike PHP. I was wondering if it would be possible to code plugins in Python, Node, C# even.
    My questions are:
    1.)Is it possible
    2.)Is it likely to happen
    3.)If so, what would it take to accomplish it?

    Thanks in advance.
     
    Primus likes this.
  2. Primus

    Primus Zombie Pigman

    Messages:
    749
    As programmer you should already know that it's implausible to do it with PocketMine unless you create some kind of bridge. However you want to check out Nukkit and MiNET. If you don't like PHP then PocketMine is just not for you. Bear with me you're not the only one on this forum who dislikes php now and then.

    PHP and Python bridge

    PiP - Python In PHP

    P.S. Node is a language? o_O
     
    Last edited: Nov 14, 2016
    Matthew, SOFe and dktapps like this.
  3. BlazingFire007

    BlazingFire007 Creeper

    Messages:
    4
    Thanks, the MiNET looks the most promising but I'll be sure to check out the PHP/Python bridge.
     
  4. Primus

    Primus Zombie Pigman

    Messages:
    749
    MiNET is fastest MCPE serve software out there but it has one great disadvantage - compatibility. I never got it to run on system. Some says it has bad API, but I'm not sure so see for yourself.
     
    Matthew likes this.
  5. BlazingFire007

    BlazingFire007 Creeper

    Messages:
    4
    Interesting, I'm not an expert at c# by any means, in fact, I'm still learning the language. I have plenty of time, however, since at the moment I have no devices capable of playing MCPE at a steady framerate. (Yes, my phone is that bad)
     
    Primus likes this.
  6. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    It would indeed be really cool if we would just be able to code the plugins in different languages...
     
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What I know is performance problems. It would definitely bring performance problems if you do that.
     
  8. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    That is very true.
     
  9. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    1. probably yes
    2. no
    3. some kind of bridge

    Why do you assume that the language of a project just changes? PM will always be php. And why exactly do you dislike PHP? No strong types? Performance?
     
  10. Matthew

    Matthew Baby Zombie

    Messages:
    167
    GitHub:
    matthww
    MiNET is probably the best performance wise. But installing it on Linux is pretty difficult. And some features won't work.
     
  11. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    I think we're not right talking about other server software here
     
    Thunder33345 and SOFe like this.
  12. BlazingFire007

    BlazingFire007 Creeper

    Messages:
    4
    The entire syntax of PHP just kills me inside haha. The language never felt natural to me.
     
  13. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    Lol, php is not that heard. When I first tried it, it was confusing but it's really not after you get the hang of it.
     
  14. Primus

    Primus Zombie Pigman

    Messages:
    749
    I'm sure his not talking about the difficulty of it. If you ever have worked with low level language or maybe with Java, you'll understand why php sucks.
     
  15. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    I don't think the syntax is that what kills you. The syntax is pretty much the same as in every other language
    func(args,args);
    obj->func(); (ok, the -> is often replaced with .)
    $var = 5; (the $ sign is special too, most langs don't need that)
    $arr = [72,82]
    vs.
    arr = {6,5}
    Java is low level? I consider it a mid level. You can do low level for sure, but there are many high level things. C is low level. (Raw C, not C#)
     
  16. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Guys how to use brainfuck to write PocketMine plugins?
     
    99leonchang likes this.
  17. Primus

    Primus Zombie Pigman

    Messages:
    749
    PHP:
    int $foo PHP_INT_MAX;
    bool $bar true;
    // VS. Javascript:
    var foo Number.MAX_VALUE;
    var 
    bar true;

    class 
    Foo {
       
       protected 
    $var false;

       public function 
    getVar() : bool {
          return 
    $var;
       }

       public function 
    reverseVar() {
          
    $this->var $var;
       }
    }
    // VS. Java:
    public class Foo {
       
        protected 
    boolean $var false;

        public 
    bool getVar() {
           return 
    this.var;
        }

        public 
    void reverseVar() {
           
    this.var = !var;
        }

    }

    for(
    int $i 0$i 10$i++) {
       print 
    $i;
    }
    // VS. Go:
    for := 010i++ {
       
    fmt.Println(i)
    }
    Every programming language has something common.
     
  18. PocketKiller

    PocketKiller Slime

    Messages:
    83
    GitHub:
    iPocket
    Node.js :)
     
  19. PocketKiller

    PocketKiller Slime

    Messages:
    83
    GitHub:
    iPocket
    It's actually Javascript but made to run in the background.
     
  20. PocketKiller

    PocketKiller Slime

    Messages:
    83
    GitHub:
    iPocket
    That's what I'm tryin gto say...
     
    HimbeersaftLP likes this.
  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.