solved

Discussion in 'Plugin Development' started by emikodo, Oct 26, 2011.

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

    emikodo

    Hello,

    I am currently trying to write my very first plugin, and I'm having some trouble. Let me start off by saying I know very little about writing plugins.. I'm not sure if I'm doing something wrong with the plugin.yml (which I have no idea what it's for..) or if I'm using .registerEvent incorrectly.. I just tried to follow the tutorial on the Bukkit wiki as best I could.

    Basically what I am trying to do is make it so that players cannot jump and place a block directly beneath them. Any help would be greatly appreciated!

    --Edit--
    Thanks nickrak!
     
  2. Offline

    nickrak

    BlockListener.onBlockPlace(BlockPlaceEvent e); that function does not take a PlayerMoveEvent.

    You can get the Player object using e.getPlayer();
     
  3. Offline

    emikodo

    I tried using the e.getPlayer(), but I couldn't figure out how to get the player location from that. I'm trying to get the y-coordinate of the player so I can see if I'm trying to place the block beneath me.
     
  4. Offline

    nickrak

    e.getPlayer().getLocation().getY();
     
  5. Offline

    emikodo

    Thank you!
     
Thread Status:
Not open for further replies.

Share This Page