Skip to content

Commit

Permalink
Hide the original name of the recor
Browse files Browse the repository at this point in the history
  • Loading branch information
clienthax committed Mar 15, 2016
1 parent 4d407b8 commit 901383c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class GiveSongCommand implements CommandExecutor {
if(song.isPresent()) {
ItemStack record = ItemStack.builder().itemType(ItemTypes.RECORD_CAT).quantity(1).build();
Text name = Text.of(songName.get());
record.offer(Keys.DISPLAY_NAME, name);
record.offer(Keys.DISPLAY_NAME, name);//Set the item name to match the song name
record.offer(Keys.HIDE_MISCELLANEOUS, true);//Hide the original item name
player.getInventory().offer(record);
} else {
player.sendMessage(Text.of("No song by the name of "+songName.get()+" was found."));
Expand Down

0 comments on commit 901383c

Please sign in to comment.