Initial commit

This commit is contained in:
DelilahEve 2022-08-20 21:14:21 -04:00
commit e53f9cc88c
14 changed files with 939 additions and 0 deletions

View file

@ -0,0 +1,40 @@
package io.delilaheve
import io.delilaheve.util.ConfigOptions
import org.bukkit.plugin.java.JavaPlugin
/**
* Bukkit/Spigot/Paper plugin to alter enchantment max
* levels and allow unsafe enchantment combinations
*/
class UnsafeEnchants : JavaPlugin() {
companion object {
// Permission string required to use the plugin's features
const val unsafePermission = "ue.unsafe"
// Current plugin instance
lateinit var instance: UnsafeEnchants
/**
* Logging handler
*/
fun log(message: String) {
if (ConfigOptions.debugLog) {
instance.logger.info(message)
}
}
}
/**
* Setup plugin for use
*/
override fun onEnable() {
instance = this
saveDefaultConfig()
server.pluginManager.registerEvents(
AnvilEventListener(),
this
)
}
}