Guest User

Untitled

a guest
Nov 12th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. package ru.utils;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.entity.Player;
  5.  
  6. import ru.main;
  7. import ru.MySQL.SQLClass;
  8.  
  9. public class TagSQL {
  10. private main plugin;
  11.  
  12. public TagSQL() {
  13. this.plugin = plugin;
  14. }
  15.  
  16. @SuppressWarnings("unused")
  17. public static String getBuyG(Player player, String tag) {
  18. String SQLGet = SQLClass.GetSQL(player);
  19. boolean SQLGeta = SQLGet.contains(tag);
  20. if(!SQLGeta) {
  21. String outout = ChatColor.RED + "Данный товар не куплен! Нажмите, что - бы купить";
  22. return outout;
  23. } else {
  24. String outouts = ChatColor.GREEN + "Данный товар куплен! Нажмите, что - бы активировать";
  25. return outouts;
  26. }
  27. }
  28. public static String BuyActiv(Player player, String tag, String suffix, double prise) {//Tag = SystemTag, suffix = VaultSuffix
  29. String SQLGet = SQLClass.GetSQL(player);
  30. boolean SQLGeta = SQLGet.contains(tag);
  31. if(!SQLGeta) {
  32. if(EconomyManager.getBalance(player) >= prise) return ChatColor.RED + "Недостаточно средств";
  33. SQLClass.SaveData(player, tag);
  34. main.getVaultHook().getVaultEconomy().withdrawPlayer(player, prise);
  35. String outout = ChatColor.RED + "Данный товар успешно куплен! Нажмите, что - бы активировать";
  36. return outout;
  37. }else{
  38. main.getVaultHook().getVaultChat().setPlayerSuffix(null, player, suffix);
  39. String outouts = ChatColor.GREEN + "Данный товар успешно активирован!";
  40. return outouts;
  41.  
  42. }
  43.  
  44.  
  45. }
  46. }
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
Advertisement
Add Comment
Please, Sign In to add comment