JumpPlate/src/main/java/cn/citycraft/JumpPlate/JumpPlate.java

37 lines
1.1 KiB
Java

package cn.citycraft.JumpPlate;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import cn.citycraft.PluginHelper.commands.HandlerCommands;
import cn.citycraft.PluginHelper.commands.InvokeSubCommand;
import cn.citycraft.PluginHelper.config.FileConfig;
import cn.citycraft.PluginHelper.utils.VersionChecker;
public class JumpPlate extends JavaPlugin implements Listener, HandlerCommands {
static JumpPlate instence;
String pluginname;
FileConfig config;
boolean removedamage;
@Override
public FileConfig getConfig() {
return config;
}
@Override
public void onEnable() {
instence = this;
new InvokeSubCommand(this, "jp").registerCommands(new JumpPlateCommand());
this.getServer().getPluginManager().registerEvents(new JumpPlateListener(), this);
new VersionChecker(this);
}
@Override
public void onLoad() {
config = new FileConfig(this);
pluginname = config.getMessage("pluginname");
removedamage = config.getBoolean("removedamage");
}
}