I can tell you many reasons why this code will not work:
- L2PcInstance player = null; (and its always null so will never work)
- if (item.getId() == ITEM_NAME) (looks wrong if "ITEM_NAME" its not int or Integer)
- if (item.getId() == -1) (i think lineage client do not support negative item ID)
- player.teleToLocation(DIMENSIONAL_CRACK) (player can not been found "its null" also "DIMENSIONAL_CRACK" have to been "Location DIMENSIONAL_CRACK = new Location(x,y,z);"
You have double check on Item ID and and if "ITEM_NAME" isn't "-1" then the check will always return to "false", but its not the only problem as you can read above.
Better tell us how you will use this Item and there will be better way for that.