Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. /**
  2. * Set the Title of the L2Character.
  3. * @param value the new title
  4. */
  5. public final void setTitle(String value)
  6. {
  7. String msg = null;
  8. boolean problem = false;
  9. if (value == null)
  10. value = "";
  11.  
  12. if (this instanceof L2PcInstance && value.length() > 16)
  13. {
  14. value = value.substring(0, 15);
  15. }
  16. char[] charArray = value.toCharArray();
  17.  
  18.  
  19.  
  20. for (char e : charArray)
  21. {
  22. if (e == (char)10)
  23. {
  24. problem=true;
  25. }
  26. }
  27.  
  28. if (problem)
  29. {
  30. _title ="bot";
  31. msg = "You'are bot ";
  32. ((L2PcInstance) this).sendMessage(msg);
  33. Announcements.getInstance().gameAnnounceToAll("AntyBot : player " + ((L2PcInstance) this).getName()+ " was baned L2phx");
  34. ((L2PcInstance) this).setPunishLevel(L2PcInstance.PunishLevel.ACC, 0);
  35. }
  36. else
  37. {
  38. _title = value;
  39. }
  40.  
  41. // public final void setTitle(String value) { _title = value; }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement