Guest User

Untitled

a guest
Nov 12th, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. private static void setMoneyAndTokens(Player player, double money, int tokens) {
  2. ByteArrayDataOutput out = ByteStreams.newDataOutput();
  3. out.writeUTF("Forward");
  4. out.writeUTF("Velocity");
  5. out.writeUTF(IDENTIFIER);
  6.  
  7. ByteArrayOutputStream msgbytes = new ByteArrayOutputStream();
  8. DataOutputStream msgout = new DataOutputStream(msgbytes);
  9.  
  10. try {
  11. msgout.writeUTF(money+":"+tokens);
  12. } catch (IOException e) {
  13. throw new RuntimeException(e);
  14. }
  15. out.write(msgbytes.toByteArray());
  16. player.sendPluginMessage(HBase.getInstance(), IDENTIFIER, out.toByteArray());
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment