Solved Detect a display name with BlockPlaceEvent

Discussion in 'Spigot Plugin Development' started by NiekGC, Jun 3, 2017.

  1. Hi,

    You are checking what the item is in their hands on a block place event. The event is only triggered when the block is placed. Try check the item meta on the placed block.
     
  2. I has already try that but it didn't work
    i has already googled for 2 hourd and nothing works :(
     
  3. Choco

    Moderator

  4. I dont get what u are trying to do?
     
  5. It didn't work :(
     
  6. Choco

    Moderator

    Did you re-read the line I mentioned? I'll bold what you should be paying attention to:
    .getDisplayName().toString().toLowerCase().contains("FullyCrate");

    Strikeout being an unnecessary method call by the way
     
  7. Ty it works :D

    For guys that see this later use
    getDisplayName().toString().contains("FullyCrate");