About the Help/Discuss category

Hello , My project uses gradle 7.4.2 , and while doing a gradle build or rather any gradle activity like clean or publish etc… i see the following in console

Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'java' for object of type org.gradle.api.internal.artifacts.dsl.DefaultComponentMetadataHandler

And my gradlescript is erroring out at this part of build.gradle
publications {
mavenJava(MavenPublication) {
artifact bootJar
artifactId bootJar.baseName
from components.java -----------> precisely at this line
}
where as the same script works for other projects , I am not able to figure out what the issue is , can anyone help me here …Like where do i see what components are there and why is gradle not able to get it. What does publications do ??? . the build is successful when i remove that line

Hello Team,After upgrading my application to JAVA 11 and gradle 7.4 …am facing the followimg error even after changing the syntax of executionData

Cannot set the value read-only property ‘executionData’

Even if am removing entire jacoco am getting the above error during build

I really appreciate you help

I am trying to work on my react native project and I am having this error. I even tried changing the distribution URL for this one distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip. because I saw that it wolved it for some people, but it would still not work for some reason. Please I really need help with this.

I have a problem related to the release build apk in flutter, and I found the error ‘FAILURE: Build failed with an exception.’

  • What went wrong:
    Execution failed for task ‘:app:mergeReleaseNativeLibs’.

A build operation failed.
Cannot parse result path string:
Cannot parse result path string:
can anyone help me to solve this problem. thanks

I’m quite sure its a simple issue but I find this very confusing can anyone help me fix my code:

package net.mcreator.cloudboots.custom;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;

public class CloudBootsPlugin extends JavaPlugin implements Listener {

@Override
public void onEnable() {
    Bukkit.getPluginManager().registerEvents(this, this);
}

@EventHandler
public void onPlayerJump(PlayerInteractEvent event) {
    Player player = event.getPlayer();
    ItemStack boots = player.getInventory().getBoots();
    if (boots != null && isCloudBoots(boots)) {
        // Perform double jump
        player.setVelocity(player.getVelocity().add(new Vector(0, 0.5, 0)));
    }
}

@EventHandler
public void onPlayerMove(PlayerMoveEvent event) {
    Player player = event.getPlayer();
    ItemStack boots = player.getInventory().getBoots();
    if (player.isSneaking() && boots != null && isCloudBoots(boots)) {
        // Perform dash
        Vector direction = player.getLocation().getDirection().normalize();
        player.setVelocity(direction.multiply(2)); // Adjust the multiplier for dash speed
    }
}

@EventHandler
public void onPlayerFallDamage(EntityDamageEvent event) {
    if (event.getEntity() instanceof Player) {
        Player player = (Player) event.getEntity();
        ItemStack boots = player.getInventory().getBoots();
        if (event.getCause() == EntityDamageEvent.DamageCause.FALL && boots != null && isCloudBoots(boots)) {
            // Cancel fall damage when wearing cloud boots
            event.setCancelled(true);
        }
    }
}

// Method to check if the boots are named "Cloud Boots" in light blue text
private boolean isCloudBoots(ItemStack boots) {
    if (boots.getType() != Material.LEATHER_BOOTS) {
        return false;
    }
    ItemMeta meta = boots.getItemMeta();
    if (meta == null) {
        return false;
    }
    String displayName = meta.getDisplayName();
    if (displayName == null || !displayName.equals(ChatColor.AQUA + "Cloud Boots")) {
        return false;
    }
    return true;
}

}
it keeps erroring at listener (I’m trying to code a spigot plugin for anyone whose wondering