Skip to content

Commit f8806c9

Browse files
committed
add missing javadocs
1 parent 70c3eb0 commit f8806c9

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

betterperspective/src/main/java/net/labymod/serverapi/integration/betterperspective/BetterPerspectivePlayer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@ protected BetterPerspectivePlayer(AbstractLabyModProtocolService protocolService
4040
this.uniqueId = uniqueId;
4141
}
4242

43+
/**
44+
* Allows the player to use the unlock camera feature.
45+
*/
4346
public void allowUnlockCamera() {
4447
this.protocolService.labyModProtocol().sendPacket(
4548
this.uniqueId,
4649
new PermissionPacket(BetterPerspectiveIntegration.UNLOCK_CAMERA_PERMISSION.allow())
4750
);
4851
}
4952

53+
/**
54+
* Denies the player to use the unlock camera feature.
55+
*/
5056
public void denyUnlockCamera() {
5157
this.protocolService.labyModProtocol().sendPacket(
5258
this.uniqueId,

voicechat/src/main/java/net/labymod/serverapi/integration/voicechat/VoiceChatIntegration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ public LabyModIntegrationPlayer createIntegrationPlayer(AbstractLabyModPlayer<?>
7979
);
8080
}
8181

82+
/**
83+
* @return the voice chat protocol
84+
*/
8285
public @NotNull AddonProtocol voiceChatProtocol() {
8386
if (this.addonProtocol == null) {
8487
throw new IllegalStateException("VoiceChatIntegration is not initialized");

voicechat/src/main/java/net/labymod/serverapi/integration/voicechat/VoiceChatPlayer.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ protected VoiceChatPlayer(
5555
this.uniqueId = uniqueId;
5656
}
5757

58+
/**
59+
* Mutes the current player with the provided mute, also sends to mute packet to all other
60+
* LabyMod players on the server. As long as not unmuted via {@link #unmute} this mute will also
61+
* be sent to new LabyMod players joining the server
62+
*
63+
* @param mute the mute to apply
64+
*/
5865
public void mute(@NotNull VoiceChatMute mute) {
5966
Objects.requireNonNull(mute, "Mute can not be null. Use VoiceChatPlayer#unmute to unmute");
6067
this.mute = mute;
@@ -63,21 +70,34 @@ public void mute(@NotNull VoiceChatMute mute) {
6370
}
6471
}
6572

73+
/**
74+
* Unmutes the current player, also sends the unmute packet to all other LabyMod players on the
75+
* server
76+
*/
6677
public void unmute() {
6778
this.mute = null;
6879
for (AbstractLabyModPlayer<?> player : this.protocolService.getPlayers()) {
6980
player.sendPacket(new VoiceChatUnmutePacket(this.uniqueId));
7081
}
7182
}
7283

84+
/**
85+
* Opens the voice chat channels screen for the current player
86+
*/
7387
public void openVoiceChatChannels() {
7488
this.addonProtocol.sendPacket(this.uniqueId, new VoiceChatOpenChannelsPacket());
7589
}
7690

91+
/**
92+
* @return the mute of the player, null if the player is not muted (server-side)
93+
*/
7794
public @Nullable VoiceChatMute getMute() {
7895
return this.mute;
7996
}
8097

98+
/**
99+
* @return whether the player is muted or not
100+
*/
81101
public boolean isMuted() {
82102
return this.mute != null;
83103
}

0 commit comments

Comments
 (0)