Skip to content

Instantly share code, notes, and snippets.

@JustBru00
Last active May 9, 2016 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JustBru00/a53331c2ba8f6ace0ca889a75a13322e to your computer and use it in GitHub Desktop.
Save JustBru00/a53331c2ba8f6ace0ca889a75a13322e to your computer and use it in GitHub Desktop.
@Override
public void run() {
List<Player> list = new ArrayList<Player>();
for (Player p2 : Bukkit.getOnlinePlayers()) {
list.add(p2);
}
// Check all players
int i = 0;
while(i<list.size()) {
if (list.get(i) == null) {
PATH_TO_MAIN_CLASS.econ.withdrawPlayer(list.get(i), PATH_TO_MAIN_CLASS.econ.getBalance(list.get(i)));
PATH_TO_MAIN_CLASS.econ.depositPlayer(list.get(i), list.get(i).getExp * getConfig().getString("expworth"));
}
i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment