-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from mfnalex/enderchest-module
added enderchest module
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id("basics.module") | ||
} |
25 changes: 25 additions & 0 deletions
25
...rc/main/kotlin/com/github/spigotbasics/modules/basicsenderchest/BasicsEnderchestModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
modules/basics-enderchest/src/main/resources/basics-module.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |