0

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:
Pepich
2017-03-02 20:07:44 +01:00
parent b0358d6235
commit ca849074aa
32 changed files with 196 additions and 474 deletions

View File

@@ -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