Skip to content

Commit a635bfb

Browse files
committed
Update Player#performCommand javadoc and signature
1 parent 2a1871b commit a635bfb

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

paper-api/src/main/java/org/bukkit/entity/Player.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
import org.bukkit.block.TileState;
4444
import org.bukkit.block.data.BlockData;
4545
import org.bukkit.block.sign.Side;
46+
import org.bukkit.command.CommandException;
47+
import org.bukkit.command.CommandSender;
4648
import org.bukkit.conversations.Conversable;
4749
import org.bukkit.event.block.BlockBreakEvent;
4850
import org.bukkit.event.block.BlockDropItemEvent;
@@ -469,10 +471,12 @@ default void kick(final net.kyori.adventure.text.@Nullable Component message) {
469471
/**
470472
* Makes the player perform the given command
471473
*
472-
* @param command Command to perform
473-
* @return true if the command was successful, otherwise false
474+
* @param command the command to perform. Example: <code>test abc 123</code>
475+
* @return {@code true} if the command was successful, otherwise {@code false}
476+
* @throws CommandException thrown when the executor for the given command fails with an unhandled exception
477+
* @see Server#dispatchCommand(CommandSender, String)
474478
*/
475-
public boolean performCommand(String command);
479+
boolean performCommand(String command) throws CommandException;
476480

477481
/**
478482
* Returns true if the entity is supported by a block.

0 commit comments

Comments
 (0)