Skip to content

Instantly share code, notes, and snippets.

@Justin42
Created June 11, 2012 14:22
Show Gist options
  • Select an option

  • Save Justin42/2910303 to your computer and use it in GitHub Desktop.

Select an option

Save Justin42/2910303 to your computer and use it in GitHub Desktop.
public ArrayList<ItemStack> collect(Player player) {
ArrayList<ItemStack> stackList = new ArrayList<ItemStack>();
if(hasItems(player)) {
try {
stackList = (ArrayList<ItemStack>) config.get(player.getName());
config.set(player.getName(), null);
save();
}
catch (ClassCastException ex) {
corruptionWarning(player);
return null;
}
}
return stackList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment