Snipping Player's Usernames

Discussion in 'Plugin Development' started by puyttre, Oct 29, 2012.

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

    puyttre

    Hi,

    I am trying to strip off the last 2 characters of my players' usernames to make room for 2 color codes. Is there a simple way to do this?

    Thanks :)
     
  2. Offline

    Timr

    Code:java
    1. String a = "Hey, my name is Timr!";
    2. a = a.substring(0, a.length() - 2);
    3. System.out.println(a);


    The above will print "Hey, my name is Tim"
     
  3. Offline

    puyttre

    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page