SkyeDarkhawk

ONetServerHandler.java

Apr 27th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. /*
  2.  * Modified by SkyeDarkhawk
  3.  * This modification fixes the output to the chat window, and does it cleanly.
  4.  * This should fix the output of commands like /who, /playerlist, and some plugins.
  5.  * This method should replace the existing method in ONetServerHandler.java
  6.  */
  7.  
  8. public void msg(String msg) {
  9.         if (msg.length() >= 119){
  10.             String cutMsg = msg.substring(0,118);
  11.             int finalCut = cutMsg.lastIndexOf(" ");
  12.             String subCut = cutMsg.substring(0, finalCut);
  13.             String newMsg = msg.substring(finalCut + 1);
  14.             b(new OPacket3Chat(subCut));
  15.             msg(newMsg);
  16.         }
  17.         else
  18.             b(new OPacket3Chat(msg));
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment