Tell if redstone is interacted with.

Discussion in 'Plugin Development' started by xtreameprogram, Jun 20, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    xtreameprogram

    Say i have the code
    Code:java
    1. @EventHandler
    2. public void interact(PlayerInteractEvent e){
    3. if (e.getAction() == Action.RIGHT_CLICK)
    4. if (e.getClickedBlock() == Material.DIRT){
    5. Bukkit.getServer().broadcastMessage("HORAYYYYYY");
    6. }
    7. }


    how can i replace the dirt with redstone?. Whenerver i change it it doesnt seem to work. Ive alos tried using e.getMaterial().
     
  2. Offline

    michael566

    Are you sure you type in Material.REDSTONE ?
     
Thread Status:
Not open for further replies.

Share This Page