
Writing SQL in Plugins Is a Nightmare
Offloading persistence to a Spring Boot service using gRPC made my life so much easier.
When I recently joined a company as a developer, I was thrown into the deep end with Spring Boot. At first, I wasn’t sure what to expect—but after just a few days of working with it, I was hooked. The way it handles data is so clean, efficient, and intuitive that I honestly can’t imagine going back to the old way of doing things—especially not writing SQL directly in Minecraft plugins.
Spring Boot, paired with gRPC might be overkill, you say. And sure, if all you're doing is saving a player's last known location or storing a few config values, maybe it is. But once your plugin starts growing—tracking player stats, syncing across servers, integrating with external systems—that “simple” persistence layer quickly turns into a tangled mess of SQL queries and brittle logic.
Defining Entities is all we need
to be continued.
service PlayerService {
rpc GetOfflinePlayerByUniqueId(PlayerIdRequest) returns (GetOfflinePlayerResponse);
rpc GetOnlinePlayerByUniqueId(PlayerIdRequest) returns (GetOnlinePlayerResponse);
rpc GetOfflinePlayerByName(PlayerNameRequest) returns (GetOfflinePlayerResponse);
rpc GetOnlinePlayerByName(PlayerNameRequest) returns (GetOnlinePlayerResponse);
rpc UpdateConnection(UpdateConnectionRequest) returns (UpdateConnectionResponse);
rpc Login(LoginRequest) returns (LoginResponse);
rpc Logout(LogoutRequest) returns (LogoutResponse);
rpc GetUniqueIdByName(PlayerNameRequest) returns (UniqueIdLookupResponse);
}