Updated API
API Version 2.0.0 Modules no longer have to keep track of their enabled status, the ModuleLoader is now responsible for this. This allows for easier module development and finer control over modules through the loader and the debugger. More features to follow in a future update.
This commit is contained in:
@@ -16,10 +16,9 @@ import com.redstoner.annotations.Version;
|
||||
import com.redstoner.misc.Utils;
|
||||
import com.redstoner.modules.Module;
|
||||
|
||||
@Version(major = 1, minor = 0, revision = 0, compatible = 1)
|
||||
@Version(major = 2, minor = 0, revision = 0, compatible = 2)
|
||||
public class LagChunks implements Module
|
||||
{
|
||||
private boolean enabled = false;
|
||||
private List<LaggyChunk> laggyChunks = new ArrayList<LaggyChunk>();
|
||||
|
||||
private void scan(int amount)
|
||||
@@ -79,22 +78,14 @@ public class LagChunks implements Module
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enabled()
|
||||
public boolean onEnable()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
enabled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable()
|
||||
{
|
||||
enabled = false;
|
||||
}
|
||||
{}
|
||||
|
||||
// @noformat
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user