示例#1
0
 /**
  * Sends a config toggle.
  *
  * @param id The config id.
  * @param state On or off.
  * @return The action sender instance, for chaining.
  */
 public ActionSender sendConfig(int id, int state) {
   player.getOutStream().createFrame(36);
   player.getOutStream().writeWordBigEndian(id);
   player.getOutStream().writeByte(state);
   player.flushOutStream();
   return this;
 }
示例#2
0
 /**
  * Sends a string.
  *
  * @param id The interface id.
  * @param string The string.
  * @return The action sender instance, for chaining.
  */
 public ActionSender sendString(int id, String string) {
   player.getOutStream().createFrameVarSizeWord(126);
   player.getOutStream().writeString(string);
   player.getOutStream().writeWordA(id);
   player.getOutStream().endFrameVarSizeWord();
   player.flushOutStream();
   return this;
 }