Developer API
Developer API
Event API
- EntityRemoveEvent This event will be fired every time clearlag attempts to remove a group of entities from a world. Each event contains entities from a SINGLE world, rather then one big entity list. It's not cancelable but you can easily modify the entitylist and remove any entities that shouldn't be removed.
- TPSUpdateEvent This event is fired every time Clearlag updates it's TPS meter. It contains both the old TPS and new TPS. Once again, not a cancelable event but good for getting TPS quick.
Registering commands as clearlag sub-commands
If for whatever reason you want to include some commands under /lagg.
Extend the CommandModule abstract module class and override "public void run(CommandSender sender, String[] args)' (Ran every time clearlag executes the command). It's also necessary to override the fields located in CommandModule in your constructor. Like below:
public class MyClearlagCmd extends CommandModule { public MyClearlagCmd() { cmdName = "nameOfcommand"; argLength = 0; usage = "(Desc of command)"; } @Override public void run(CommandSender sender, String[] args) { } }
Loading your command module:
new MyClearlagCmd(this).setEnabled();
Maven repository:
<repository> <id>minebuilders-repo</id> <url>http://minebuilders.me:8080/plugin/repository/everything/</url> </repository> <dependency> <groupId>me.minebuilders</groupId> <artifactId>clearlag-core</artifactId> <version>2.9.0-SNAPSHOT</version> </dependency>
Comments