skript-mirror icon indicating copy to clipboard operation
skript-mirror copied to clipboard

UUID expression should return a UUID when needed

Open Pikachu920 opened this issue 6 years ago • 3 comments

If I have a method

public void getByUUID(UUID uuid)

I should be able to call it from scripts like getByUUID(player's uuid), but it should only be replaced if necessary. That is, a method getByUUID(String uuid) would still work with the same call.

Pikachu920 avatar Feb 09 '19 18:02 Pikachu920

So, strings should be parsed into UUIDs when applicable?

btk5h avatar Feb 09 '19 19:02 btk5h

maybe. What I'm specifically suggesting is replacing uuid expressions with calls to thing.getUniqueId()

Pikachu920 avatar Feb 12 '19 16:02 Pikachu920

I'm not sure how I feel about treating specific expressions differently. It means introducing a local variable could potentially change the script's semantics and the behavior would be inconsistent with other expressions that also return stringified uuids.

btk5h avatar Feb 13 '19 00:02 btk5h