Solved Google Firebase and Spigot

Discussion in 'Spigot Plugin Development' started by Hibbix, Sep 15, 2018.

Thread Status:
Not open for further replies.
  1. Is it possible to create a spigot plugin that accesses a Firebase Database? I want to create a ranking system through that database... (if possible). So when each player joins, the plugin will get their rank from the database and it will pop up in-game.

    Is this even possible?

    Thank you in advance :)
     
  2. You can probably just save the key in your config. You can use maven to add it to your project:
    Code (Text):
    <dependency>
      <groupId>com.google.firebase</groupId>
      <artifactId>firebase-admin</artifactId>
      <version>6.4.0</version>
    </dependency>
     
    • Useful Useful x 1
  3. Thanks! But where is the config? Sorry about all the questions :confused:
     
    #5 Hibbix, Sep 16, 2018
    Last edited: Sep 16, 2018
  4. Your plugin config
     
    • Agree Agree x 1
  5. Most plugins just tell the user to provide their own database. It's pretty common, you could just do that.
     
  6. Yes but I have a website with another ranking system and would like to connect them.
    So basically I have a database in the cloud and would like to link it with my plugin.

    And...

    Oh... sorry... I read your reply wrong... One last question... where is the Maven manager thingy?

    So where is does all of that ^ go?
    Do I have to make a pom.xml? If so then where do I put it?
     
    #8 Hibbix, Sep 16, 2018
    Last edited by a moderator: Sep 18, 2018
  7. FrostedSnowman

    Resource Staff

    your project should already be a maven project
     
  8. You have given me an idea of an api, now I believe it, xd
     
  9. I know... but where do I put the dependency stuff? Which file do I put in
    Code (Text):
    <dependency>
      <groupId>com.google.firebase</groupId>
      <artifactId>firebase-admin</artifactId>
      <version>6.4.0</version>
    </dependency>
     
  10. what IDE are you using?, It is usually added in
    POM.XML

    Something like that should have you
     
    #12 MicPixel, Sep 18, 2018
    Last edited by a moderator: Sep 18, 2018
  11. I'm using eclipse. Is POM.XML inside the project? If not... where is it?
     
  12. FrostedSnowman

    Resource Staff

    if you know, then your project should already have a pom, auto created
     
  13. I don't think mine does then...
    Here is my project setup:
    Code (Text):
    |-Project:
    |   -JRE System Library [JavaSE-9]
    |   -src:
    |     -[CODING]
    |     -plugin.yml
    |   -Referenced Libraries:
    |     -spigot.jar
     
     
    #15 Hibbix, Sep 18, 2018
    Last edited by a moderator: Sep 18, 2018
  14. You need to enable the project as a Maven project
     
  15. JanTuck

    Supporter

    Use IntelliJ far superior than Eclipse, also has great native support for git, gradle and lots of other things.
     
    • Optimistic Optimistic x 4
    • Funny Funny x 2
    • Agree Agree x 1
    • Informative Informative x 1
  16. That was not the question
     
    • Agree Agree x 3
  17. Choco

    Moderator

    • Optimistic Optimistic x 1
  18. JanTuck

    Supporter

    • Winner Winner x 1
Thread Status:
Not open for further replies.