Removing old deprecation and noting what to delete asap.
This commit is contained in:
parent
1527dc5aa7
commit
d27473a8ad
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user