It's possible to get the player state by auth plugin?

Discussion in 'Plugin Development' started by ft941, Jul 3, 2012.

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

    ft941

    I'm trying to developping my first plugin, and i need to know if the player is logged on... there is a plugin that allows to do this?

    I mean something like that:

    Code:
    if(MyPlayer.IsLoggedIn()) { ... }
    Code:
    public class MyPlayer extends Player  {
    public boolean IsLoggedIn() {
      ...
      AUTH PLUGIN API
      ...
    }
    }
    I thought to catch the data from auth plugin table... but how to connect to database via java?


    sorry for my english
     
  2. Offline

    ferrybig

    so you need to hook in another plugin that handles autorientation?
     
  3. Offline

    ft941

    Maybe you meant authorization?
    I want to make sure that a command in my plugin can be executed only if the player is logged in
     
  4. Offline

    ferrybig

    so you mean you writing a plugin that allows users to log in? mostly this kind of blockage is implemented by the aut plugin
     
  5. Offline

    ft941

    no, the users must login with the auth plugin's command.
    I want only to check if the player is logged in.
     
  6. Offline

    ferrybig

    so you want to hook into auth and see it? found anny javadoc and api you can use?
     
  7. Offline

    ft941

    exactly, but i didn't find any documentation, and i don't know where search
     
  8. Offline

    ferrybig

    mostly you can see at the name of the methode what it does, like getServer() would return a Server whitout to look to the docs
     
  9. Offline

    ft941

    you mean that there is a method that does this? But how can i see it? I must import the .jar of the plugin?
     
  10. Offline

    McLuke500

    I would like to know this aswell.
     
  11. Offline

    McLuke500

    Anyone?

    And again

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  12. Offline

    Pandemoneus

    There!

    And if you want to check whether a player is authed, put him into a HashSet when he enters the command and check whether he is in there.
     
  13. Offline

    McLuke500

    Wether he is in where? The whole of bukkit api docs...?

    I was thinking adding to hashset when they join then if they do a move event that isn't cancelled as most auth plugins stop movement then I could be sure they have authorised. But is there a better way?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  14. Offline

    McLuke500

    Bump I was using
    Adding to a hashset then using on move event listeners, but it caused alot of lag is it possible to hook into authme to get when a player has sucesfully authed.
     
Thread Status:
Not open for further replies.

Share This Page