-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
76 additions
and
32 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
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,51 @@ | ||
package com.mcstarrysky.land.flag | ||
|
||
import com.mcstarrysky.land.data.Land | ||
import com.mcstarrysky.land.util.display | ||
import com.mcstarrysky.land.util.registerPermission | ||
import org.bukkit.inventory.ItemStack | ||
import taboolib.common.LifeCycle | ||
import taboolib.common.platform.Awake | ||
import taboolib.library.xseries.XMaterial | ||
import taboolib.platform.util.buildItem | ||
|
||
/** | ||
* Land | ||
* com.mcstarrysky.land.flag.PermAdmin | ||
* | ||
* @author mical | ||
* @since 2024/8/14 11:58 | ||
*/ | ||
object PermAdmin : Permission { | ||
|
||
@Awake(LifeCycle.ENABLE) | ||
private fun init() { | ||
registerPermission() | ||
} | ||
|
||
override val id: String | ||
get() = "admin" | ||
|
||
override val default: Boolean | ||
get() = false | ||
|
||
override val worldSide: Boolean | ||
get() = true | ||
|
||
override val playerSide: Boolean | ||
get() = true | ||
|
||
override fun generateMenuItem(land: Land): ItemStack { | ||
return buildItem(XMaterial.COMMAND_BLOCK) { | ||
name = "&f管理权力 ${land.getFlagOrNull(id).display}" | ||
lore += listOf( | ||
"&7允许行为:", | ||
"&8除管理领地与扩展领地外的所有权力", | ||
"", | ||
"&e左键修改值, 右键取消设置" | ||
) | ||
if (land.getFlagOrNull(id) == true) shiny() | ||
colored() | ||
} | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
src/main/kotlin/com/mcstarrysky/land/listener/LandEnterLeaveListener.kt
This file was deleted.
Oops, something went wrong.