Exemplo n.º 1
0
 public static void setCoins(Player p, int amount, String reason) {
   Vars.coins.remove(p.getName());
   Vars.coins.put(p.getName(), amount);
   p.playSound(p.getLocation(), Sound.LEVEL_UP, 100, 1);
   ScoreboardUtils.updateScoreboard(p, false);
   ChatUtils.sendMsg(p, "&6=" + amount + " coins! (" + reason + ")");
   WorldUtils.updateSpawnSigns(p);
   TitleUtils.updateTab(p, false);
 }
Exemplo n.º 2
0
 public static void addCoins(Player p, int coinsGained, String reason) {
   int curCoins = getCoins(p);
   Vars.coins.remove(p.getName());
   Vars.coins.put(p.getName(), coinsGained + curCoins);
   ChatUtils.sendMsg(p, "&6+" + coinsGained + " coins! (" + reason + ")");
   p.playSound(p.getLocation(), Sound.LEVEL_UP, 100, 1);
   ScoreboardUtils.updateScoreboard(p, false);
   TitleUtils.updateTab(p, false);
 }