Advertisement
Guest User

Untitled

a guest
Aug 4th, 2021
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. public float getMoney(Player player){
  2.         Float[] money = new Float[1];
  3.  
  4.         try {
  5.             //SOME CODE FOR DB
  6.             asyncMySQL.getMoneyAsnyc(statement, new Callback<Float>() {
  7.                
  8.                 @Override
  9.                 public Float onSucces(Float money) {
  10.                     //This value should be returned!!!
  11.                     money[0] = money;
  12.                 }
  13.  
  14.                 @Override
  15.                 public void onFailure(Throwable cause) {
  16.  
  17.                 }
  18.             });
  19.  
  20.         } catch (SQLException e) {
  21.             e.printStackTrace();
  22.         }
  23.         return money[0];
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement