Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Doing it the Fancy Way

Comments in 'Plugin Development' started by Samueljh1, Mar 17, 2015.

  1. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    Hi, is there any way to detect when some data is sent to a server? Say I pressed a button on my website (external) how could i detect that within a plugin? also, what would be the most effective way for this to work ? eg: how the data is sent when the button is pressed. Thanks! :)
  2. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    You could have a plugin which starts a small server alongside PocketMine to communicate with your website.
  3. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    using what? :p
  4. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    I know I've said before I don't want to make plugins anymore. But making a plugin for this sounds like a fun project to me. I could make it.
  5. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    really? an example would be really helpful :D Thanks :)
  6. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    You can create a query system between your website and PocketMine (to access it you must make a PocketMine plugin obviously).
    Or if you want to do it in a simply way, you can save data to a MySQL database and get it from a PocketMine plugin
    PEMapModder likes this.
  7. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    please could you make a query example? :D
  8. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    It's too long to write and it depends on what you want to obtain
  9. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    aww :eek: {i would ask for mysql but i am a complete noob at it xD} - but how long would mysql be?
  10. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    I recommend you to use MySQLi for MySQL queries. It's a PHP extension that simplify database queries.
    Working with MySQLi queries is not difficult. On PHP website are explained all MySQLi functions ;)
    PEMapModder likes this.
  11. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Another option that doesn't require a new plugin is to use RCON. So you could start an RCON connection from the web server to PocketMine-MP. I think there is a WebRCON somewhere else in the forums.
    EvolSoft likes this.
  12. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    I completely forgot the existence of RCON xD

Share This Page

Advertisement