-
Notifications
You must be signed in to change notification settings - Fork 0
4. Developer API
Ynfuien edited this page May 3, 2024
·
3 revisions
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.Ynfuien</groupId>
<artifactId>YChatManager</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.Ynfuien:YChatManager:1.0.0'
}
API provides a few things
-
YChatManagerAPI.getNickname(OfflinePlayer player);
- returns a Nickname object or null -
YChatManagerAPI.getNickname(UUID uuid);
- returns a Nickname object or null -
YChatManagerAPI.setNickname(OfflinePlayer player, Nickname nickname);
- sets nickname for a player -
YChatManagerAPI.setNickname(UUID uuid, Nickname nickname);
- sets nickname for a player
-
YChatManagerAPI.getSocialSpyState(Player player);
- returns true or false -
YChatManagerAPI.setSocialSpyState(Player player, boolean state);
- sets the new state
NicknameChangeEvent
PrivateMessageSendEvent
There is also getter (YChatManagerAPI.getModules()
), that will pretty much give you access to the internal code of the plugin. But it's not recommended to use since internals can change between versions.