Removing old deprecation and noting what to delete asap.

This commit is contained in:
Olof Larsson 2012-09-21 01:00:55 +02:00
parent 1527dc5aa7
commit d27473a8ad
2 changed files with 7 additions and 13 deletions

View File

@ -44,10 +44,10 @@ public abstract class MPlugin extends JavaPlugin implements Listener
this.gson = this.getGsonBuilder().create(); this.gson = this.getGsonBuilder().create();
// Create tools // Create tools
this.cmd = new Cmd(); this.cmd = new Cmd(); // TODO: Stop creating this asap :)
this.persist = new Persist(); this.persist = new Persist(); // TODO: Stop creating this asap :)
this.one = new One(this); this.one = new One(this); // TODO: Stop creating this asap :)
this.lib = new LibLoader(this); this.lib = new LibLoader(this); // TODO: Stop creating this asap :)
return true; return true;
} }

View File

@ -34,21 +34,15 @@ import com.massivecraft.mcore4.usys.Multiverse;
public class Cmd public class Cmd
{ {
// TODO: The cmd will no longer need to be instantiated.
// TODO: Perhaps I should remove the cmd system soon.
protected Map<Class<?>, IArgHandler<?>> argHandlers = new HashMap<Class<?>, IArgHandler<?>>(); protected Map<Class<?>, IArgHandler<?>> argHandlers = new HashMap<Class<?>, IArgHandler<?>>();
public Map<Class<?>, IArgHandler<?>> getArgHandlers() { return this.argHandlers; } public Map<Class<?>, IArgHandler<?>> getArgHandlers() { return this.argHandlers; }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <T> IArgHandler<T> getArgHandler(Class<T> clazz) { return (IArgHandler<T>) this.argHandlers.get(clazz); } public <T> IArgHandler<T> getArgHandler(Class<T> clazz) { return (IArgHandler<T>) this.argHandlers.get(clazz); }
public <T> void setArgHandler(Class<T> clazz, IArgHandler<T> handler) { this.argHandlers.put(clazz, handler); } public <T> void setArgHandler(Class<T> clazz, IArgHandler<T> handler) { this.argHandlers.put(clazz, handler); }
/**
* @deprecated As of MCore 3, replaced by by {@link MCommand#register()}
*/
@Deprecated
public void addCommand(MCommand mcommand)
{
mcommand.register();
}
public Cmd() public Cmd()
{ {
this.setArgHandler(Aspect.class, new AHAspect()); this.setArgHandler(Aspect.class, new AHAspect());