mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
Update documentation and status of command completion related events
By: md_5 <git@md-5.net>
This commit is contained in:
parent
2a3a839854
commit
30068a6e08
3 changed files with 12 additions and 5 deletions
|
@ -3,12 +3,17 @@ package org.bukkit.event.player;
|
|||
import java.util.Collection;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Warning;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a player attempts to tab-complete a chat message.
|
||||
*
|
||||
* @deprecated This event is no longer fired due to client changes
|
||||
*/
|
||||
@Deprecated
|
||||
@Warning(reason = "This event is no longer fired due to client changes")
|
||||
public class PlayerChatTabCompleteEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final String message;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.bukkit.event.player;
|
||||
|
||||
import java.util.Collection;
|
||||
import org.bukkit.Warning;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
|
@ -13,11 +12,7 @@ import org.bukkit.event.HandlerList;
|
|||
* are not required to securely remove all traces of the command. If secure
|
||||
* removal of commands is required, then the command should be assigned a
|
||||
* permission which is not granted to the player.
|
||||
*
|
||||
* @deprecated draft API
|
||||
*/
|
||||
@Deprecated
|
||||
@Warning(false)
|
||||
public class PlayerCommandSendEvent extends PlayerEvent {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
|
|
@ -6,10 +6,17 @@ import org.bukkit.command.CommandSender;
|
|||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.PlayerCommandSendEvent;
|
||||
|
||||
/**
|
||||
* Called when a {@link CommandSender} of any description (ie: player or
|
||||
* console) attempts to tab complete.
|
||||
* <br>
|
||||
* Note that due to client changes, if the sender is a Player, this event will
|
||||
* only begin to fire once command arguments are specified, not commands
|
||||
* themselves. Plugins wishing to remove commands from tab completion are
|
||||
* advised to ensure the client does not have permission for the relevant
|
||||
* commands, or use {@link PlayerCommandSendEvent}.
|
||||
*/
|
||||
public class TabCompleteEvent extends Event implements Cancellable {
|
||||
|
||||
|
|
Loading…
Reference in a new issue