How to check if its a certain block

Discussion in 'Spigot Plugin Development' started by Crafter145, Apr 30, 2017.

  1. So what im trying to figre out is how to check if the placed block is a certain block.

    public class Main extends JavaPlugin implements Listener, {


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




    public void onDisable() {


    }



    @EventHandler
    public void onBlockPlace(BlockPlaceEvent event) {




    So i want to next check if the placed block is a certain kind of block can someone help?
     
  2. No problem! If you have any other questions, feel free to shoot me a PM.
     
  3. Umm its not working...


    if(event.getBlock().getType() == micdoodle8.mods.galacticraft.core.blocks.GCCoreBlockAluminumWire;)
     
  4. And how do you add a code box for your code?
     
  5. You didn't mention you were using mods. I'm not sure if this is supported on this forum, but even if it is I doubt there will be many people who can help you.
     
  6. um. I don't think mods and spigot go hand and hand lol. Mods are for forge Im sure and Plugins are for spigot
     
  7. Can you send me to a mods server?
     
  8. Not server but a mod website for java?
     
  9. You won't be able to make a spigot plugin that interacts with your mods.
     
  10. I know that im trying to find a website that will help me ahahah can you direct me a website that could help me?