-
Notifications
You must be signed in to change notification settings - Fork 29
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
5 changed files
with
43 additions
and
2 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
Binary file not shown.
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
21 changes: 21 additions & 0 deletions
21
src/main/kotlin/me/arasple/mc/trhologram/module/display/texture/TrMenuTexture.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,21 @@ | ||
package me.arasple.mc.trhologram.module.display.texture | ||
|
||
import me.arasple.mc.trhologram.api.base.ItemTexture | ||
import me.arasple.mc.trmenu.module.display.MenuSession | ||
import org.bukkit.entity.Player | ||
import org.bukkit.inventory.ItemStack | ||
|
||
/** | ||
* @author Arasple | ||
* @date 2021/2/12 21:11 | ||
*/ | ||
class TrMenuTexture(texture: String) : ItemTexture { | ||
|
||
private val texture = me.arasple.mc.trmenu.module.display.texture.Texture.createTexture(texture) | ||
|
||
override fun generate(player: Player): ItemStack { | ||
return texture.generate(MenuSession.getSession(player)) | ||
} | ||
|
||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/main/kotlin/me/arasple/mc/trhologram/module/hook/HookPlugin.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,17 @@ | ||
package me.arasple.mc.trhologram.module.hook | ||
|
||
import org.bukkit.Bukkit | ||
|
||
/** | ||
* @author Arasple | ||
* @date 2021/2/12 21:12 | ||
*/ | ||
object HookPlugin { | ||
|
||
val TRMENU by lazy { | ||
|
||
Bukkit.getPluginManager().getPlugin("TrMenu")?.isEnabled ?: false | ||
|
||
} | ||
|
||
} |