feat: Add getPronouns method for mod integration (#9)

This commit is contained in:
Sisby 2022-08-20 20:48:08 +10:00 committed by GitHub
parent 0ada3f4419
commit a1668f3d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -5,8 +5,8 @@ plugins {
`maven-publish`
}
version = "1.5.0+1.19"
group = "dev.ashhhleyyy"
version = "1.6.0+1.19"
group = "io.github.ashhhleyyy"
repositories {
// needed for placeholder-api

View file

@ -32,6 +32,7 @@ import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
public class PlayerPronouns implements ModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger(PlayerPronouns.class);
@ -191,4 +192,13 @@ public class PlayerPronouns implements ModInitializer {
return true;
}
public static @Nullable Pronouns getPronouns(ServerPlayerEntity player) {
return getPronouns(player.getUuid());
}
public static @Nullable Pronouns getPronouns(UUID playerId) {
if (pronounDatabase == null) return null;
return pronounDatabase.get(playerId);
}
}