Files
src
build.gradle
settings.gradle
Code
9 372
src/main/java/com/moshali/bemir/MoshaliBemirPlugin.java
package com.moshali.bemir;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
public final class MoshaliBemirPlugin extends JavaPlugin {
private NamespacedKey swordKey;
private StormSwordFactory swordFactory;
@Override
public void onEnable() {
saveDefaultConfig();
swordKey = new NamespacedKey(this, "moshali_bemir_sword");
swordFactory = new StormSwordFactory(swordKey);
StormVisuals visuals = new StormVisuals(this);
getServer().getPluginManager().registerEvents(
new StormSwordListener(this, swordFactory, visuals), this);
MoshaliCommand command = new MoshaliCommand(swordFactory);
if (getCommand("moshalibemir") != null) {
getCommand("moshalibemir").setExecutor(command);
getCommand("moshalibemir").setTabCompleter(command);
}
}
public double getStrikeRadius() {
return getConfig().getDouble("radius", 8.0);
}
public double getVerticalStrikeRadius() {
return getConfig().getDouble("vertical-radius", 4.5);
}
}