![]()
The RepositoryKit provides a ServiceManager and a HookManager for BungeeCord as well as Bukkit in one single API. The API of the ServiceManager is the good old known one form the Bukkit API. This Kit brings it also to BungeeCord. That means you are now able to create one API that can be used on Bukkit as well as on BungeeCord! The goal of this idea is to give developers a uniform possibility to create APIs for Bukkit and BungeeCord and unify the registration.
![]()
The API for Services
Registering a service:
The third argument can be null. In later updates it will get some sense.Code (Text):RepositoryKit.getServicesManager().register(SomeAPI.class, new SomeAPIImplementation(), null, ServicePriority.NORMAL);
Getting a registration:
Code (Text):SomeAPI api = RepositoryKit.getServicesManager().getRegistration(SomeAPI.class);
The API for Hooks:
Registering a hook:
Implementing the Hook interface:Code (Text):RepositoryKit.getHookManager().registerHook("SomePlugin", new MyHook(), ImportanceLevel.OPTIONAL);
(All the code above works on Bukkit as well as on BungeeCord.)Code (Text):public class MyHook implements Hook {
@Override
public void onHook(String pluginName, ImportanceLevel importanceLevel, boolean successfullyHooked) {
if (successfullyHooked) {
// DO SOMETHING
} else {
// TO SOMETHING ELSE
}
}
}
![]()
Will be available with the next update.

RepositoryKit 1.0
Unifies a ServiceManager and a HookManager for BungeeCord and Bukkit.