Skip to content

Commit

Permalink
Merge pull request #95 from mfnalex/enderchest-module
Browse files Browse the repository at this point in the history
added enderchest module
  • Loading branch information
mfnalex authored Feb 10, 2024
2 parents 405215d + 03b6d1c commit c555260
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/basics-enderchest/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("basics.module")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.github.spigotbasics.modules.basicsenderchest

import com.github.spigotbasics.core.module.AbstractBasicsModule
import com.github.spigotbasics.core.module.loader.ModuleInstantiationContext

class BasicsEnderchestModule(context: ModuleInstantiationContext) : AbstractBasicsModule(context) {
val permission =
permissionManager.createSimplePermission("basics.enderchest", "Allows opening your enderchest with /enderchest")

val permissionOthers =
permissionManager.createSimplePermission(
"basics.enderchest.others",
"Allows opening other players enderchests with /enderchest <player>",
)

val inventoryTitle get() = messages.getMessage("inventory-title")

override fun onEnable() {
createCommand("enderchest", permission)
.description("Opens your enderchest")
.usage("[player]")
.executor(EnderchestCommand(this))
.register()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
main-class: com.github.spigotbasics.modules.basicsenderchest.BasicsEnderchestModule
name: basics-enderchest
version: ${moduleVersion}

0 comments on commit c555260

Please sign in to comment.