NMS Response to "Friendly item names" - Locale bound strings

Discussion in 'Resources' started by RawCode, Feb 6, 2015.

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

    RawCode

    I wont try to explain why ugly bloat from http://bukkit.org/threads/friendly-item-names.339467/ is bad.

    I will simply post how this done correctly:

    Code:
        	int i = Material.DIAMOND_BOOTS.getId();
        	String s = Item.getById(i).getName();
        	System.out.println(LocaleI18n.get(s+".name"));
    
     
  2. Offline

    GriffinPvP

    What about data values?
     
  3. This looks a lot better, but again, I'd want to use reflection, and you claim you can't be bothered, but I bet you just don't know how (this is meant to provoke you if you haven't realised, which you probably haven't), to explain why not to use reflection for these things.
     
    Skionz likes this.
  4. Offline

    xTrollxDudex

    *gulp*
     
    Cirno and KingFaris11 like this.
  5. Offline

    RawCode

    Data values not supported here.
     
  6. Offline

    Hawktasard

  7. Offline

    GriffinPvP

    So why not just use
    Code:
     CraftItemStack.asNMSCopy(stack).getName() 
    ?
     
  8. Offline

    timtower Administrator Administrator Moderator

    Removed offtopic conversation
     
Thread Status:
Not open for further replies.

Share This Page