-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
99b9d70
commit 419d711
Showing
5 changed files
with
72 additions
and
18 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
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
32 changes: 32 additions & 0 deletions
32
plugin/src/main/java/kor/toxicity/questadder/hooker/item/MythicMobsItemDatabase.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,32 @@ | ||
package kor.toxicity.questadder.hooker.item | ||
|
||
import io.lumine.mythic.bukkit.BukkitAdapter | ||
import io.lumine.mythic.bukkit.MythicBukkit | ||
import kor.toxicity.questadder.api.item.ItemDatabase | ||
import kor.toxicity.questadder.api.item.ItemPair | ||
import org.bukkit.inventory.ItemStack | ||
|
||
class MythicMobsItemDatabase: ItemDatabase { | ||
override fun getKeys(): Collection<String> { | ||
return MythicBukkit.inst().itemManager.itemGroupNames | ||
} | ||
|
||
override fun getItem(name: String): ItemStack? { | ||
return MythicBukkit.inst().itemManager.getItemStack(name) | ||
} | ||
|
||
override fun getItems(): Collection<ItemPair> { | ||
return MythicBukkit.inst().itemManager.items.map { | ||
ItemPair(it.internalName, BukkitAdapter.adapt(it.generateItemStack(1))) | ||
} | ||
} | ||
|
||
override fun reload() { | ||
MythicBukkit.inst().itemManager.reload() | ||
} | ||
|
||
override fun requiredPlugin(): String { | ||
return "MythicMobs" | ||
} | ||
|
||
} |
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