Removed use of Guava class.

This commit is contained in:
StevenLawson 2013-09-04 09:48:16 -04:00
parent 562e354f37
commit eb01c0db86

View File

@ -1,10 +1,10 @@
package me.StevenLawson.TotalFreedomMod; package me.StevenLawson.TotalFreedomMod;
import com.google.common.collect.Lists;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.ListIterator;
import java.util.Map; import java.util.Map;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
@ -121,18 +121,19 @@ public class TFM_RollbackManager
public static int undoRollback(String playerName) public static int undoRollback(String playerName)
{ {
List<RollbackEntry> entries = getEntriesByPlayer(playerName); final List<RollbackEntry> entries = getEntriesByPlayer(playerName);
if (entries == null) if (entries == null)
{ {
return 0; return 0;
} }
entries = Lists.reverse(entries); final int count = entries.size();
int count = entries.size(); final ListIterator<RollbackEntry> it = entries.listIterator(count);
for (RollbackEntry entry : entries) while (it.hasPrevious())
{ {
RollbackEntry entry = it.previous();
if (entry != null) if (entry != null)
{ {
entry.redo(); entry.redo();