Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Deprecation cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
grum authored and EvilSeph committed Feb 18, 2012
1 parent 5282272 commit 7a06777
Show file tree
Hide file tree
Showing 165 changed files with 409 additions and 4,280 deletions.
14 changes: 0 additions & 14 deletions src/main/java/org/bukkit/Achievement.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,6 @@ public int getId() {
return id;
}

/**
* Gets the achievement associated with the given ID.
* <p />
* Note that the ID must already be offset using {@link #STATISTIC_OFFSET}
*
* @param id ID of the achievement to return
* @return Achievement with the given ID
* @deprecated use {@link Achievement#getById(int)}
*/
@Deprecated
public static Achievement getAchievement(int id) {
return BY_ID.get(id);
}

/**
* Gets the achievement associated with the given ID.
* <p />
Expand Down
26 changes: 3 additions & 23 deletions src/main/java/org/bukkit/Bukkit.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package org.bukkit;

import com.avaje.ebean.config.ServerConfig;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.logging.Logger;
import org.bukkit.World.Environment;

import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.inventory.Recipe;
import org.bukkit.map.MapView;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.ServicesManager;
import org.bukkit.plugin.messaging.Messenger;
import org.bukkit.scheduler.BukkitScheduler;

import com.avaje.ebean.config.ServerConfig;

/**
* Represents the Bukkit core, for version and Server singleton handling
*/
Expand Down Expand Up @@ -136,26 +136,6 @@ public static List<World> getWorlds() {
return server.getWorlds();
}

@Deprecated
public static World createWorld(String name, Environment environment) {
return server.createWorld(name, environment);
}

@Deprecated
public static World createWorld(String name, Environment environment, long seed) {
return server.createWorld(name, environment, seed);
}

@Deprecated
public static World createWorld(String name, Environment environment, ChunkGenerator generator) {
return server.createWorld(name, environment, generator);
}

@Deprecated
public static World createWorld(String name, Environment environment, long seed, ChunkGenerator generator) {
return server.createWorld(name, environment, seed, generator);
}

public static World createWorld(WorldCreator options) {
return server.createWorld(options);
}
Expand Down
21 changes: 0 additions & 21 deletions src/main/java/org/bukkit/ChatColor.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,6 @@ private ChatColor(char code, int intCode) {
this.toString = new String(new char[] {COLOR_CHAR, code});
}

/**
* Gets the data value associated with this color
*
* @return An integer value of this color code
* @deprecated Use {@link #getChar()}
*/
public int getCode() {
return intCode;
}

/**
* Gets the char value associated with this color
*
Expand All @@ -119,17 +109,6 @@ public String toString() {
return toString;
}

/**
* Gets the color represented by the specified color code
*
* @param code Code to check
* @return Associative {@link org.bukkit.ChatColor} with the given code, or null if it doesn't exist
* @deprecated Use {@link #getByChar(char)}
*/
public static ChatColor getByCode(final int code) {
return BY_ID.get(code);
}

/**
* Gets the color represented by the specified color code
*
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/org/bukkit/Note.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,6 @@ public boolean isSharped(byte id) {
}
}

/**
* Returns the tone to id. Also returning the semitones.
*
* @param id the id of the tone.
* @return the tone to id.
* @deprecated use {@link #getById(byte)}
*/
@Deprecated
public static Tone getToneById(byte id) {
return BY_DATA.get(id);
}

/**
* Returns the tone to id. Also returning the semitones.
*
Expand Down
70 changes: 6 additions & 64 deletions src/main/java/org/bukkit/Server.java
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
package org.bukkit;

import org.bukkit.generator.ChunkGenerator;
import com.avaje.ebean.config.ServerConfig;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Recipe;

import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.logging.Logger;
import java.io.File;

import org.bukkit.command.CommandException;
import org.bukkit.command.PluginCommand;

import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Recipe;
import org.bukkit.map.MapView;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.ServicesManager;
import org.bukkit.plugin.messaging.Messenger;
import org.bukkit.plugin.messaging.PluginMessageRecipient;
import org.bukkit.scheduler.BukkitScheduler;

import com.avaje.ebean.config.ServerConfig;

/**
* Represents a server implementation
*/
Expand Down Expand Up @@ -277,62 +275,6 @@ public interface Server extends PluginMessageRecipient {
*/
public List<World> getWorlds();

/**
* Creates or loads a world with the given name.
* If the world is already loaded, it will just return the equivalent of
* getWorld(name)
*
* @param name Name of the world to load
* @param environment Environment type of the world
* @return Newly created or loaded World
* @deprecated Use {@link #createWorld(org.bukkit.WorldCreator)}
*/
@Deprecated
public World createWorld(String name, World.Environment environment);

/**
* Creates or loads a world with the given name.
* If the world is already loaded, it will just return the equivalent of
* getWorld(name)
*
* @param name Name of the world to load
* @param environment Environment type of the world
* @param seed Seed value to create the world with
* @return Newly created or loaded World
* @deprecated Use {@link #createWorld(org.bukkit.WorldCreator)}
*/
@Deprecated
public World createWorld(String name, World.Environment environment, long seed);

/**
* Creates or loads a world with the given name.
* If the world is already loaded, it will just return the equivalent of
* getWorld(name)
*
* @param name Name of the world to load
* @param environment Environment type of the world
* @param generator ChunkGenerator to use in the construction of the new world
* @return Newly created or loaded World
* @deprecated Use {@link #createWorld(org.bukkit.WorldCreator)}
*/
@Deprecated
public World createWorld(String name, World.Environment environment, ChunkGenerator generator);

/**
* Creates or loads a world with the given name.
* If the world is already loaded, it will just return the equivalent of
* getWorld(name)
*
* @param name Name of the world to load
* @param environment Environment type of the world
* @param seed Seed value to create the world with
* @param generator ChunkGenerator to use in the construction of the new world
* @return Newly created or loaded World
* @deprecated Use {@link #createWorld(org.bukkit.WorldCreator)}
*/
@Deprecated
public World createWorld(String name, World.Environment environment, long seed, ChunkGenerator generator);

/**
* Creates or loads a world with the given name using the specified options.
* <p>
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/org/bukkit/Statistic.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,6 @@ public boolean isBlock() {
return isSubstat && isBlock;
}

/**
* Gets the statistic associated with the given ID.
*
* @param id ID of the statistic to return
* @return statistic with the given ID
* @deprecated See {@link #getById(int)}
*/
@Deprecated
public static Statistic getStatistic(int id) {
return BY_ID.get(id);
}

/**
* Gets the statistic associated with the given ID.
*
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/org/bukkit/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,18 +370,6 @@ public interface World extends PluginMessageRecipient {
*/
public UUID getUID();

/**
* Gets a semi-unique identifier for this world.
* <p />
* While it is highly unlikely that this may be shared with another World,
* it is not guaranteed to be unique
*
* @deprecated Replaced with {@link #getUID()}
* @return Id of this world
*/
@Deprecated
public long getId();

/**
* Gets the default spawn {@link Location} of this world
*
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/org/bukkit/block/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ public interface Block {
*/
byte getData();

/**
* @deprecated use {@link #getRelative(BlockFace face)}
*/
@Deprecated
Block getFace(BlockFace face);

/**
* @deprecated use {@link #getRelative(BlockFace face, int distance)}
*/
@Deprecated
Block getFace(BlockFace face, int distance);

/**
* Gets the block at the given offsets
*
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/bukkit/command/defaults/TimingsCommand.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.bukkit.command.defaults;

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
Expand All @@ -10,10 +14,6 @@
import org.bukkit.plugin.RegisteredListener;
import org.bukkit.plugin.TimedRegisteredListener;

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;

public class TimingsCommand extends Command {
public TimingsCommand(String name) {
super(name);
Expand Down
22 changes: 0 additions & 22 deletions src/main/java/org/bukkit/entity/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,28 +364,6 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer, Plugi
*/
public void setExp(float exp);

/**
* Gets the players current experience points towards the next level.
* <p>
* This is a percentage value. 0 is "no progress" and 1 is "next level".
*
* @return Current experience points
* @deprecated use {@link #getExp()} - this method is unsafe to use!
*/
@Deprecated
public int getExperience();

/**
* Sets the players current experience points towards the next level
* <p>
* This is a percentage value. 0 is "no progress" and 1 is "next level".
*
* @param exp New experience points
* @deprecated use {@link #setExp(float)} - this method is unsafe to use!
*/
@Deprecated
public void setExperience(int exp);

/**
* Gets the players current experience level
*
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/org/bukkit/event/CustomEventListener.java

This file was deleted.

Loading

0 comments on commit 7a06777

Please sign in to comment.