Skip to content

Commit 6d40579

Browse files
committed
Fix some differences between TS3Api and TS3ApiAsync
1 parent 667dd6e commit 6d40579

2 files changed

Lines changed: 31 additions & 30 deletions

File tree

src/main/java/com/github/theholywaffle/teamspeak3/TS3Api.java

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,15 @@ public int copyChannelGroup(int sourceGroupId, String targetName, PermissionGrou
620620
* @param type
621621
* the desired type of server group
622622
*
623+
* @return the ID of the newly created server group
624+
*
623625
* @throws TS3CommandFailedException
624626
* if the execution of a command fails
625627
* @querycommands 1
626628
* @see ServerGroup#getId()
627629
*/
628-
public void copyServerGroup(int sourceGroupId, int targetGroupId, PermissionGroupDatabaseType type) {
629-
asyncApi.copyServerGroup(sourceGroupId, targetGroupId, type).getUninterruptibly();
630+
public int copyServerGroup(int sourceGroupId, int targetGroupId, PermissionGroupDatabaseType type) {
631+
return asyncApi.copyServerGroup(sourceGroupId, targetGroupId, type).getUninterruptibly();
630632
}
631633

632634
/**
@@ -2978,7 +2980,7 @@ public void logout() {
29782980
* To move a channel to root level, set {@code channelTargetId} to {@code 0}.
29792981
* <p>
29802982
* This will move the channel right below the specified parent channel, above all other child channels.
2981-
* The command will fail if the channel already has the specified target channel as the parent channel.
2983+
* This command will fail if the channel already has the specified target channel as the parent channel.
29822984
* </p>
29832985
*
29842986
* @param channelId
@@ -3003,8 +3005,8 @@ public void moveChannel(int channelId, int channelTargetId) {
30033005
* The channel will be ordered below the channel with the ID specified by {@code order}.
30043006
* To move the channel right below the parent channel, set {@code order} to {@code 0}.
30053007
* </p><p>
3006-
* Note that re-ordering a channel without also changing its parent channel cannot be done with this method.
3007-
* Use {@link #editChannel(int, Map)} to change {@link ChannelProperty#CHANNEL_ORDER} instead.
3008+
* Note that you can't re-order a channel without also changing its parent channel with this method.
3009+
* Use {@link #editChannel(int, ChannelProperty, String)} to change {@link ChannelProperty#CHANNEL_ORDER} instead.
30083010
* </p>
30093011
*
30103012
* @param channelId
@@ -3025,10 +3027,9 @@ public void moveChannel(int channelId, int channelTargetId, int order) {
30253027
}
30263028

30273029
/**
3028-
* Moves a client into a channel.
3030+
* Moves a single client into a channel.
30293031
* <p>
3030-
* Consider using {@link #moveClients(int[], int)}
3031-
* for moving multiple clients.
3032+
* Consider using {@link #moveClients(int[], int)} to move multiple clients.
30323033
* </p>
30333034
*
30343035
* @param clientId
@@ -3072,10 +3073,9 @@ public void moveClients(int[] clientIds, int channelId) {
30723073
}
30733074

30743075
/**
3075-
* Moves a client into a channel.
3076+
* Moves a single client into a channel.
30763077
* <p>
3077-
* Consider using {@link #moveClients(Client[], ChannelBase)}
3078-
* for moving multiple clients.
3078+
* Consider using {@link #moveClients(Client[], ChannelBase)} to move multiple clients.
30793079
* </p>
30803080
*
30813081
* @param client
@@ -3117,10 +3117,9 @@ public void moveClients(Client[] clients, ChannelBase channel) {
31173117
}
31183118

31193119
/**
3120-
* Moves a client into a channel using the specified password.
3120+
* Moves a single client into a channel using the specified password.
31213121
* <p>
3122-
* Consider using {@link #moveClients(int[], int, String)}
3123-
* for moving multiple clients.
3122+
* Consider using {@link #moveClients(int[], int, String)} to move multiple clients.
31243123
* </p>
31253124
*
31263125
* @param clientId
@@ -3170,8 +3169,7 @@ public void moveClients(int[] clientIds, int channelId, String channelPassword)
31703169
/**
31713170
* Moves a single client into a channel using the specified password.
31723171
* <p>
3173-
* Consider using {@link #moveClients(Client[], ChannelBase, String)}
3174-
* for moving multiple clients.
3172+
* Consider using {@link #moveClients(Client[], ChannelBase, String)} to move multiple clients.
31753173
* </p>
31763174
*
31773175
* @param client

src/main/java/com/github/theholywaffle/teamspeak3/TS3ApiAsync.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ public CommandFuture<Integer> copyChannelGroup(int sourceGroupId, String targetN
673673
* @param type
674674
* the desired type of server group
675675
*
676-
* @return a future to track the progress of this command
676+
* @return the ID of the newly created server group
677677
*
678678
* @throws TS3CommandFailedException
679679
* if the execution of a command fails
@@ -3458,7 +3458,9 @@ public CommandFuture<Void> moveChannel(int channelId, int channelTargetId) {
34583458
* <p>
34593459
* The channel will be ordered below the channel with the ID specified by {@code order}.
34603460
* To move the channel right below the parent channel, set {@code order} to {@code 0}.
3461-
* Also note that a channel cannot be re-ordered without also changing its parent channel.
3461+
* </p><p>
3462+
* Note that you can't re-order a channel without also changing its parent channel with this method.
3463+
* Use {@link #editChannel(int, ChannelProperty, String)} to change {@link ChannelProperty#CHANNEL_ORDER} instead.
34623464
* </p>
34633465
*
34643466
* @param channelId
@@ -3482,10 +3484,9 @@ public CommandFuture<Void> moveChannel(int channelId, int channelTargetId, int o
34823484
}
34833485

34843486
/**
3485-
* Moves a client into a channel.
3487+
* Moves a single client into a channel.
34863488
* <p>
3487-
* Consider using {@link #moveClients(int[], int)}
3488-
* for moving multiple clients.
3489+
* Consider using {@link #moveClients(int[], int)} to move multiple clients.
34893490
* </p>
34903491
*
34913492
* @param clientId
@@ -3533,10 +3534,9 @@ public CommandFuture<Void> moveClients(int[] clientIds, int channelId) {
35333534
}
35343535

35353536
/**
3536-
* Moves a client into a channel.
3537+
* Moves a single client into a channel.
35373538
* <p>
3538-
* Consider using {@link #moveClients(Client[], ChannelBase)}
3539-
* for moving multiple clients.
3539+
* Consider using {@link #moveClients(Client[], ChannelBase)} to move multiple clients.
35403540
* </p>
35413541
*
35423542
* @param client
@@ -3582,7 +3582,10 @@ public CommandFuture<Void> moveClients(Client[] clients, ChannelBase channel) {
35823582
}
35833583

35843584
/**
3585-
* Moves a client into a channel using the specified password.
3585+
* Moves a single client into a channel using the specified password.
3586+
* <p>
3587+
* Consider using {@link #moveClients(int[], int, String)} to move multiple clients.
3588+
* </p>
35863589
*
35873590
* @param clientId
35883591
* the ID of the client to move
@@ -3638,10 +3641,9 @@ public CommandFuture<Void> moveClients(int[] clientIds, int channelId, String ch
36383641
}
36393642

36403643
/**
3641-
* Moves a client into a channel using the specified password.
3644+
* Moves a single client into a channel using the specified password.
36423645
* <p>
3643-
* Consider using {@link #moveClients(Client[], ChannelBase, String)}
3644-
* for moving multiple clients.
3646+
* Consider using {@link #moveClients(Client[], ChannelBase, String)} to move multiple clients.
36453647
* </p>
36463648
*
36473649
* @param client
@@ -4565,7 +4567,7 @@ public CommandFuture<Void> setCustomClientProperty(int clientDBId, String key, S
45654567
}
45664568

45674569
/**
4568-
* Sets the read flag to true for a given message. This will not delete the message.
4570+
* Sets the read flag to {@code true} for a given message. This will not delete the message.
45694571
*
45704572
* @param messageId
45714573
* the ID of the message for which the read flag should be set
@@ -4582,7 +4584,7 @@ public CommandFuture<Void> setMessageRead(int messageId) {
45824584
}
45834585

45844586
/**
4585-
* Sets the read flag to true for a given message. This will not delete the message.
4587+
* Sets the read flag to {@code true} for a given message. This will not delete the message.
45864588
*
45874589
* @param message
45884590
* the message for which the read flag should be set
@@ -4825,6 +4827,7 @@ public CommandFuture<Void> unregisterAllEvents() {
48254827
* @throws TS3CommandFailedException
48264828
* if the execution of a command fails
48274829
* @querycommands 1
4830+
* @see #updateClient(ClientProperty, String)
48284831
* @see #editClient(int, Map)
48294832
*/
48304833
public CommandFuture<Void> updateClient(Map<ClientProperty, String> options) {

0 commit comments

Comments
 (0)