Deprecate Achievements as they are not present in future versions of Minecraft

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2017-03-31 19:38:29 +11:00
parent 91a739ea71
commit d2ab7b2156
3 changed files with 10 additions and 0 deletions

View File

@@ -2,7 +2,9 @@ package org.bukkit;
/** /**
* Represents an achievement, which may be given to players. * Represents an achievement, which may be given to players.
* @deprecated future versions of Minecraft do not have achievements
*/ */
@Deprecated
public enum Achievement { public enum Achievement {
OPEN_INVENTORY, OPEN_INVENTORY,
MINE_WOOD (OPEN_INVENTORY), MINE_WOOD (OPEN_INVENTORY),

View File

@@ -406,7 +406,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* *
* @param achievement Achievement to award * @param achievement Achievement to award
* @throws IllegalArgumentException if achievement is null * @throws IllegalArgumentException if achievement is null
* @deprecated future versions of Minecraft do not have achievements
*/ */
@Deprecated
public void awardAchievement(Achievement achievement); public void awardAchievement(Achievement achievement);
/** /**
@@ -415,7 +417,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* *
* @param achievement Achievement to remove * @param achievement Achievement to remove
* @throws IllegalArgumentException if achievement is null * @throws IllegalArgumentException if achievement is null
* @deprecated future versions of Minecraft do not have achievements
*/ */
@Deprecated
public void removeAchievement(Achievement achievement); public void removeAchievement(Achievement achievement);
/** /**
@@ -424,7 +428,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* @param achievement the achievement to check * @param achievement the achievement to check
* @return whether the player has the achievement * @return whether the player has the achievement
* @throws IllegalArgumentException if achievement is null * @throws IllegalArgumentException if achievement is null
* @deprecated future versions of Minecraft do not have achievements
*/ */
@Deprecated
public boolean hasAchievement(Achievement achievement); public boolean hasAchievement(Achievement achievement);
/** /**

View File

@@ -7,7 +7,9 @@ import org.bukkit.event.HandlerList;
/** /**
* Called when a player earns an achievement. * Called when a player earns an achievement.
* @deprecated future versions of Minecraft do not have achievements
*/ */
@Deprecated
public class PlayerAchievementAwardedEvent extends PlayerEvent implements Cancellable { public class PlayerAchievementAwardedEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
private final Achievement achievement; private final Achievement achievement;