Issue Crysknife and Maker tooth through JARVIS
Some checks failed
DuneRealms Plugin CI / plugins (push) Has been cancelled
Some checks failed
DuneRealms Plugin CI / plugins (push) Has been cancelled
This commit is contained in:
parent
bc8b2b2a00
commit
2cb4778774
1 changed files with 253 additions and 9 deletions
|
|
@ -74,9 +74,11 @@ final class StructureCaches implements Listener {
|
|||
switch (e.source()) {
|
||||
case "ei": { ItemStack i = ArrakisEcology.item(e.id()); i.setAmount(Math.min(i.getMaxStackSize(), p.amount())); return i; }
|
||||
case "tooth": {
|
||||
var core = Bukkit.getPluginManager().getPlugin("DuneCore");
|
||||
if (core == null || !core.isEnabled()) return null;
|
||||
ItemStack i = (ItemStack) core.getClass().getMethod("createMakerTooth").invoke(core); i.setAmount(p.amount()); return i;
|
||||
var jarvis = Bukkit.getPluginManager().getPlugin("JarvisTranslator");
|
||||
if (jarvis == null || !jarvis.isEnabled()) return null;
|
||||
ItemStack i = (ItemStack) jarvis.getClass().getMethod("issueMakerTooth").invoke(jarvis);
|
||||
if (i != null) i.setAmount(Math.min(i.getMaxStackSize(), p.amount()));
|
||||
return i;
|
||||
}
|
||||
case "kit-shovel": for (ItemStack i : coreKit("Harkonnen")) if (i.getType() == Material.NETHERITE_SHOVEL) return i; return null;
|
||||
default: { Material m = Material.matchMaterial(e.id()); return m == null ? null : new ItemStack(m, Math.min(m.getMaxStackSize(), p.amount())); }
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff