@@ -49,7 +49,6 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel = false;
|
||||
private String message;
|
||||
private String format = "<%1$s> %2$s";
|
||||
private final Set<Player> recipients;
|
||||
|
||||
public PlayerCommandPreprocessEvent(final Player player, final String message) {
|
||||
@@ -110,38 +109,6 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the format to use to display this chat message
|
||||
*
|
||||
* @deprecated This method is provided for backward compatibility with no
|
||||
* guarantee to the use of the format.
|
||||
* @return String.Format compatible format string
|
||||
*/
|
||||
@Deprecated
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the format to use to display this chat message
|
||||
*
|
||||
* @deprecated This method is provided for backward compatibility with no
|
||||
* guarantee to the effect of modifying the format.
|
||||
* @param format String.Format compatible format string
|
||||
*/
|
||||
@Deprecated
|
||||
public void setFormat(final String format) {
|
||||
// Oh for a better way to do this!
|
||||
try {
|
||||
String.format(format, player, message);
|
||||
} catch (RuntimeException ex) {
|
||||
ex.fillInStackTrace();
|
||||
throw ex;
|
||||
}
|
||||
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a set of recipients that this chat message will be displayed to.
|
||||
* <p>
|
||||
|
||||
@@ -17,18 +17,6 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
|
||||
private final State state;
|
||||
private final Fish hookEntity;
|
||||
|
||||
/**
|
||||
* @deprecated replaced by {@link #PlayerFishEvent(Player, Entity, Fish,
|
||||
* State)} to include the {@link Fish} hook entity.
|
||||
* @param player the player fishing
|
||||
* @param entity the caught entity
|
||||
* @param state the state of fishing
|
||||
*/
|
||||
@Deprecated
|
||||
public PlayerFishEvent(final Player player, final Entity entity, final State state) {
|
||||
this(player, entity, null, state);
|
||||
}
|
||||
|
||||
public PlayerFishEvent(final Player player, final Entity entity, final Fish hookEntity, final State state) {
|
||||
super(player);
|
||||
this.entity = entity;
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
/**
|
||||
* Represents a player related inventory event; note that this event never
|
||||
* actually did anything
|
||||
*
|
||||
* @deprecated Use {@link InventoryClickEvent} or {@link InventoryOpenEvent}
|
||||
* instead, or one of the other inventory events in {@link
|
||||
* org.bukkit.event.inventory}.
|
||||
*/
|
||||
@Deprecated
|
||||
public class PlayerInventoryEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected Inventory inventory;
|
||||
|
||||
public PlayerInventoryEvent(final Player player, final Inventory inventory) {
|
||||
super(player);
|
||||
this.inventory = inventory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Inventory involved in this event
|
||||
*
|
||||
* @return Inventory
|
||||
*/
|
||||
public Inventory getInventory() {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
@@ -15,25 +15,6 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
private Result result = Result.ALLOWED;
|
||||
private String message = "";
|
||||
|
||||
/**
|
||||
* @deprecated Address should be provided in other constructor
|
||||
* @param player The {@link Player} for this event
|
||||
*/
|
||||
@Deprecated
|
||||
public PlayerLoginEvent(final Player player) {
|
||||
this(player, "", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Address should be provided in other constructor
|
||||
* @param player The {@link Player} for this event
|
||||
* @param hostname The hostname that was used to connect to the server
|
||||
*/
|
||||
@Deprecated
|
||||
public PlayerLoginEvent(final Player player, final String hostname) {
|
||||
this(player, hostname, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor defaults message to an empty string, and result to
|
||||
* ALLOWED
|
||||
@@ -49,18 +30,6 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Address and hostname should be provided in other
|
||||
* constructor
|
||||
* @param player The {@link Player} for this event
|
||||
* @param result The result status for this event
|
||||
* @param message The message to be displayed if result denies login
|
||||
*/
|
||||
@Deprecated
|
||||
public PlayerLoginEvent(final Player player, final Result result, final String message) {
|
||||
this(player, "", null, result, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor pre-configures the event with a result and message
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user