mirror of
https://github.com/ashhhleyyy/player-pronouns.git
synced 2024-11-01 07:07:38 +00:00
feat: Add getPronouns
method for mod integration (#9)
This commit is contained in:
parent
0ada3f4419
commit
a1668f3d34
2 changed files with 12 additions and 2 deletions
|
@ -5,8 +5,8 @@ plugins {
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "1.5.0+1.19"
|
version = "1.6.0+1.19"
|
||||||
group = "dev.ashhhleyyy"
|
group = "io.github.ashhhleyyy"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// needed for placeholder-api
|
// needed for placeholder-api
|
||||||
|
|
|
@ -32,6 +32,7 @@ import java.time.Duration;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class PlayerPronouns implements ModInitializer {
|
public class PlayerPronouns implements ModInitializer {
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger(PlayerPronouns.class);
|
public static final Logger LOGGER = LoggerFactory.getLogger(PlayerPronouns.class);
|
||||||
|
@ -191,4 +192,13 @@ public class PlayerPronouns implements ModInitializer {
|
||||||
|
|
||||||
return true;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue