Osiris is a simple API to easily create commands and other features of a PaperMC plugin. The API is inspired by the PolygonMC Minestom fork.
<repositories>
<!-- ... -->
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- ... -->
<dependency>
<groupId>com.github.aredblock</groupId>
<artifactId>Osiris</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>
repositories {
// ...
mavenCentral()
maven(url = "https://jitpack.io")
}
dependencies {
//...
implementation("com.github.aredblock:Osiris:VERSION")
}
Note
You can get the latest version here.
import de.aredblock.osiris.OsirisBuilder;
import de.aredblock.osiris.OsirisPlugin;
import de.aredblock.osiris.feature.Feature;
import de.aredblock.osiris.test.commands.DemoCommands;
public final class DemoPlugin extends OsirisPlugin {
public DemoPlugin() {
super(OsirisBuilder.builder()
.disable(Feature.FALL_DAMAGE, Feature.BLOCK_PLACING, Feature.BLOCK_BREAKING, Feature.HUNGER));
}
@Override
public void onInitialize() {
registerCommandRegistry(new DemoCommands());
getLogger().info("OsirisPlugin loaded!");
}
@Override
public void onShutdown() {
}
}
import de.aredblock.osiris.command.CommandInput;
import de.aredblock.osiris.command.CommandRegistry;
import de.aredblock.osiris.command.RegisterCommand;
public final class DemoCommands implements CommandRegistry {
@RegisterCommand(name = "demo")
public void demoCommand(CommandInput input){
if(input.isFromPlayer()){
var player = input.getPlayer();
player.sendMessage("Hello World! From Osiris!");
}
}
}