Skip to content

Commit 65866e5

Browse files
committed
Created some documentation for the functions.
1 parent cab5a46 commit 65866e5

File tree

1 file changed

+15
-0
lines changed
  • src/main/java/pro/cloudnode/smp/cloudnodemsg/message

1 file changed

+15
-0
lines changed

src/main/java/pro/cloudnode/smp/cloudnodemsg/message/Message.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,29 @@ public static void unignore(final @NotNull Player player, final @NotNull Offline
136136

137137
public static final @NotNull NamespacedKey INCOMING_ENABLED = new NamespacedKey(CloudnodeMSG.getInstance(), "incoming_enabled");
138138

139+
/**
140+
* Allows player to receive private messages
141+
*
142+
* @param player The player
143+
*/
139144
public static void incomeEnable(final @NotNull Player player) {
140145
player.getPersistentDataContainer().set(INCOMING_ENABLED, PersistentDataType.BOOLEAN, true);
141146
}
142147

148+
/**
149+
* Denies player to receive private messages
150+
*
151+
* @param player The player
152+
*/
143153
public static void incomeDisable(final @NotNull Player player) {
144154
player.getPersistentDataContainer().set(INCOMING_ENABLED, PersistentDataType.BOOLEAN, false);
145155
}
146156

157+
/**
158+
* Check if a player allows private messages
159+
*
160+
* @param player The player
161+
*/
147162
public static boolean isIncomeEnabled(final @NotNull Player player) {
148163
return player.getPersistentDataContainer().getOrDefault(INCOMING_ENABLED, PersistentDataType.BOOLEAN, true);
149164
}

0 commit comments

Comments
 (0)