Zrips / CMI

111 stars 98 forks source link

Is there option to return online & offline variant of %cmi_user_uuid%? #8839

Closed bobhenl closed 4 days ago

bobhenl commented 2 weeks ago

Hi, I'd like to distinguish the players who are offline & online (premium) ones. I thought that I could do it using %cmi_user_uuid%, as in /cmi info it shows ONLINE & OFFLINE UUID, but the placeholder %cmi_user_uuid% returns only one value. So I'd like to ask if there isn't some variant that will return online & offline separately, as I'd like to compare the values & return if the player is the premium one or not (I'll create own placeholder in javascript extension), as I guess there's no placeholder to determine if the player is premium one in CMI

mrfloris commented 2 weeks ago

If you stop supporting Minecraft piracy, you can run the server in online-mode true via server.properties and you no longer will have this issue as every uuid is valid.

CloudeLecaw commented 2 weeks ago

Hi, I'd like to distinguish the players who are offline & online (premium) ones. I thought that I could do it using %cmi_user_uuid%, as in /cmi info it shows ONLINE & OFFLINE UUID, but the placeholder %cmi_user_uuid% returns only one value. So I'd like to ask if there isn't some variant that will return online & offline separately, as I'd like to compare the values & return if the player is the premium one or not (I'll create own placeholder in javascript extension), as I guess there's no placeholder to determine if the player is premium one in CMI

use %cmi_user_uuid_PlayerName% in a customalias where using playerName for $1 it could be %cmi_user_uuid_$1%

bobhenl commented 2 weeks ago

use %cmi_user_uuid_PlayerName% in a customalias where using playerName for $1 it could be %cmi_user_uuid_$1%

Wait, and a bit confused; how does this help me distinguish between online & offline UUID? I mean like if the user is premium or not, not if he's currently online or offline

mrfloris commented 2 weeks ago

It's not CMI's job to see who pirated Minecraft or check every UUID against usernames with the end point API.

You probably use a register/login method to make sure that someone claiming who they are is hopefully who they say they are so there's no duplicate accounts. Maybe they offer a way to distinguish

Zrips commented 4 days ago

@bobhenl Due to how online UUID check works we can't really have it as a real placeholder. It needs to be done in Async as it takes some time to get information back from Mojang database, while majority if not all placeholders gets processed in sync. So at the moment we can't really have this type of placeholder