Best way to save location MySQL

Discussion in 'Spigot Plugin Development' started by Realm, Jun 5, 2017.

  1. I have no idea how to go about trying to save a location using MySQL.
    I have teams, and these teams have names. So far my table looks something similar to this:

    team_name | team_password | friendly_fire

    I know I could just insert the X, Y, Z, Pitch, Yaw and World name, but the location isn't always guaranteed to be set. Also, preferably there will be 2 locations saved in the same row. Both of which may or may not be set at any given time.
  2. ScarabCoder

    ScarabCoder Retired Resource Staff

    You could try saving it as a string with ":" for a split. "world:x:y:z:pitch:yaw", then string.split(":").
    • Like Like x 1
    • Agree Agree x 1
  3. Good idea, thanks:)

    Sent from my iPhone using Tapatalk