ru.cwcode.commands.paperplatform.features.ItemFromBase64Command Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of PaperCommands Show documentation
Show all versions of PaperCommands Show documentation
Commands library for Paper (Minecraft)
package ru.cwcode.commands.paperplatform.features;
import org.bukkit.inventory.ItemStack;
import ru.cwcode.commands.paperplatform.executor.Executor;
import ru.cwcode.cwutils.messages.MessageReturn;
import ru.cwcode.cwutils.messages.TargetableMessageReturn;
import java.util.Base64;
public class ItemFromBase64Command extends Executor {
@Override
public void executeForPlayer() throws MessageReturn, TargetableMessageReturn {
String base64 = argS(1);
ItemStack itemStack = ItemStack.deserializeBytes(Base64.getDecoder().decode(base64));
player().getInventory().addItem(itemStack);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy