Sign dropper.

  • I see in the world database that the sign text has an player ID of who put the sign. Is there a way to recover this information without doing a specific Database query? Sort of like run protection or isAdmin type cross reference when accessing the sign?

  • yes the Sign object has a .getPlayerDbID() method for you to get the player but you cannot instance a player object if this player is not online.


    The only thing you can do is query the world database for the ID and then check again in the world database if that player is an admin or not.

  • yes unfortunately there is no easy way to check if a player is an admin or not if they are not currently online as the player object is only defined for online players :/


    To check if admin for offline players you can use: SQLQuery based on the DatabaseID you can get from .getPlayerDbID() of the Sign object to get the player's UID and then use getServer.isPlayerAdmin(PlayerUID)

  • yes unfortunately there is no easy way to check if a player is an admin or not if they are not currently online as the player object is only defined for online players :/


    To check if admin for offline players you can use: SQLQuery based on the DatabaseID you can get from .getPlayerDbID() of the Sign object to get the player's UID and then use getServer.isPlayerAdmin(PlayerUID)

    ya thanks.. I will fool around with it.. have not fooled much with databases.. but just had a world of fun with a bartering commercial transaction with success with inventory removals, adding,correcting transactions and providing change. So many checks and making sure that other signs don't interfere... going to build upon that for some really fun stuff .. at least in my mind... success feels great but sometimes I feel like I am back at work waking up at 3 am with a solution that I have to write down. 8|:S


    I am sure I will back in here asking questions... :|;)

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!