Skip to content
Viet Nguyen edited this page Jan 22, 2017 · 1 revision

#Redis key-value store database structure Redis key-value store is for use for queueing, bringing players to the right place at the right time, whether it's join, teleport, or other related events.

uuid (table)

  • For UUID caching
  • Because Mojang has an API limit of only 10 per minute.

| uuid | username | --- | --- | --- | | 0cc87f4b-6b4a-404f-b11d-db2e76a24243 | AsianGuy_Gamer | | c088272e-a8ca-496c-91a2-b7394ffe879c | ImRainbowActive | | cf1f1ea8-4bc9-4cba-886c-33997403eb80 | AruAkise_ | | ... | ... | ... |

world (table)

  • Showing which world is currently loaded by which server.
  • If a world is already/currently loaded on one server, subsequent player who joins via subdomain will go to correct server.
  • This will prevent world being loaded twice on many different spigot servers
  • IP and port columns will use Spigot's server.properties' server-ip and server-port values
world address
00ceaed3-3715-49e9-b45f-0e01cf94f798 10.240.0.1:25566
00f0ec76-03a1-4d68-b7de-2f30a054e864 10.240.0.2:25567
00f6795c-8409-4efb-a5e8-ef94f51e68dc 10.240.0.3:25568
... ...

server (table)

  • Showing which Spigot servers are currently running correctly
  • This acts as BungeeCord's dynamic config to list the available servers
  • It helps handling join event via BungeeCord after sessions login, not subsequent join from server to server.
  • IP and port columns will use Spigot's server.properties' server-ip and server-port values
  • "players" column shows number of players currently online inside that Spigot server.
  • BungeeCord server will base on this to bring players to the Spigot server with least number of players currently online.
  • This feature will be ignore if a player is joining a specific world with specific players currently online on that world, instead it will use "world" table to route players correctly instead.
address players
10.240.0.1:25566 43
10.240.0.2:25567 7
10.240.0.3:25568 56
... ...

player (table)

  • List all players online with their current server IP and port
  • For teleporting player to player correctly
  • IP and port columns will use Spigot's server.properties' server-ip and server-port values
uuid address
0cc87f4b-6b4a-404f-b11d-db2e76a24243 10.240.0.1:25566
bc68ca39-8f3a-4eb4-a764-8526de7fb90b 10.240.0.2:25567
bc384491-4cf7-4185-be07-9bdb5a8310d4 10.240.0.3:25568
... ...

#MySQL database structure

mute (table)

  • List all players who are muted on each world
uuid world
0cc87f4b-6b4a-404f-b11d-db2e76a24243 bc68ca39-8f3a-4eb4-a764-8526de7fb90b
bc68ca39-8f3a-4eb4-a764-8526de7fb90b bc384491-4cf7-4185-be07-9bdb5a8310d4
bc384491-4cf7-4185-be07-9bdb5a8310d4 0cc87f4b-6b4a-404f-b11d-db2e76a24243
... ...

ban (table)

  • List all players who are banned on each world
uuid world
0cc87f4b-6b4a-404f-b11d-db2e76a24243 bc68ca39-8f3a-4eb4-a764-8526de7fb90b
bc68ca39-8f3a-4eb4-a764-8526de7fb90b bc384491-4cf7-4185-be07-9bdb5a8310d4
bc384491-4cf7-4185-be07-9bdb5a8310d4 0cc87f4b-6b4a-404f-b11d-db2e76a24243
... ...

back (table)

  • Previous death location for a player in a specific world
  • Logs only when player is dead in a world
uuid world x y z yaw pitch
0cc87f4b-6b4a-404f-b11d-db2e76a24243 bc68ca39-8f3a-4eb4-a764-8526de7fb90b 128.0 67.0 4954.0 89.0 -74.4
bc68ca39-8f3a-4eb4-a764-8526de7fb90b bc384491-4cf7-4185-be07-9bdb5a8310d4 6573.0 78.0 231.0 56.0 75.9
bc384491-4cf7-4185-be07-9bdb5a8310d4 0cc87f4b-6b4a-404f-b11d-db2e76a24243 54654.0 54.0 6758.0 67.0 34.6
... ... ... ... ... ... ...

logout (table)

  • Previously logged out location for a player in a specific world
  • It helps when players log back into the same world, they will be in their previous location
  • Create entry only when player logs out in a world
uuid world x y z yaw pitch
0cc87f4b-6b4a-404f-b11d-db2e76a24243 bc68ca39-8f3a-4eb4-a764-8526de7fb90b 128.0 67.0 4954.0 89.0 -74.4
bc68ca39-8f3a-4eb4-a764-8526de7fb90b bc384491-4cf7-4185-be07-9bdb5a8310d4 6573.0 78.0 231.0 56.0 75.9
bc384491-4cf7-4185-be07-9bdb5a8310d4 0cc87f4b-6b4a-404f-b11d-db2e76a24243 54654.0 54.0 6758.0 67.0 34.6
... ... ... ... ... ... ...
Clone this wiki locally