#Minecraft plugin Build fails with "'void' type not allowed here"

5 messages · Page 1 of 1 (latest)

dusk apex
#

Hello, trying to update Minecraft plugin when I build it fails with "'void' type not allowed here" on a few lines of code
This is the code

    @Override
    public void preview(ShowcaseData data, Runnable finish) {
        if (this.playerSet.contains(data.player())) {
            Debug.send(data.player().getName() + " trying to preview a skin while previewing a skin");
            return;
        }
        EntityArmorStand stand = this.createArmorStand(data);

        // Spawn the armor stand
        this.sendPacket(new PacketPlayOutSpawnEntity(stand), data.player());
        this.sendPacket(new PacketPlayOutEntityMetadata(stand.ae(), stand.ai(), false), data.player());  //errors on this 
        this.sendPacket(new PacketPlayOutEntityEquipment(stand.ae(), this.getEquipment(data)), data.player());  // on this also

        // Teleport armor stand to follow player's cursor movement
        // And rotate the armor stand at the same time
        BukkitTask teleportTask = this.startTeleportTask(data, stand);

        // Stop the preview
        Executor.syncLater(20L * data.duration(), () -> {
            finish.run();
            teleportTask.cancel();

            // Destroy the armor stand on preview complete
            this.sendPacket(new PacketPlayOutEntityDestroy(stand.ae()), data.player());  //and this
            // Remove player from the set
            this.playerSet.remove(data.player());
        });

        // Add player into the set
        this.playerSet.add(data.player());
    }

if anyone has any ideas ??

dim oceanBOT
#

This post has been reserved for your question.

Hey @dusk apex! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

pseudo viper
dusk apex
#

Okay?? it also gives me this
The constructor PacketPlayOutEntityMetadata(void, Set<String>, boolean) is undefined
The constructor PacketPlayOutEntityEquipment(void, List<Pair<EnumItemSlot,ItemStack>>) is undefined
The constructor PacketPlayOutEntityDestroy(void) is undefined