mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-06-26 14:45:04 +02:00
Remove ArrayListInput
Formatting
This commit is contained in:
parent
79bdd8a212
commit
006f996283
|
@ -107,11 +107,11 @@ public class Kit
|
||||||
{
|
{
|
||||||
IText input = new SimpleTextInput(items);
|
IText input = new SimpleTextInput(items);
|
||||||
IText output = new KeywordReplacer(input, user, ess);
|
IText output = new KeywordReplacer(input, user, ess);
|
||||||
|
|
||||||
boolean spew = false;
|
boolean spew = false;
|
||||||
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
|
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
|
||||||
for (String kitItem : output.getLines())
|
for (String kitItem : output.getLines())
|
||||||
{
|
{
|
||||||
if (kitItem.startsWith(ess.getSettings().getCurrencySymbol()))
|
if (kitItem.startsWith(ess.getSettings().getCurrencySymbol()))
|
||||||
{
|
{
|
||||||
Double value = Double.parseDouble(kitItem.substring(ess.getSettings().getCurrencySymbol().length()).trim());
|
Double value = Double.parseDouble(kitItem.substring(ess.getSettings().getCurrencySymbol().length()).trim());
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.earth2me.essentials.commands;
|
||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
import com.earth2me.essentials.textreader.ArrayListInput;
|
import com.earth2me.essentials.textreader.SimpleTextInput;
|
||||||
import com.earth2me.essentials.textreader.TextPager;
|
import com.earth2me.essentials.textreader.TextPager;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -21,7 +21,7 @@ public class Commandbalancetop extends EssentialsCommand
|
||||||
}
|
}
|
||||||
private static final int CACHETIME = 2 * 60 * 1000;
|
private static final int CACHETIME = 2 * 60 * 1000;
|
||||||
public static final int MINUSERS = 50;
|
public static final int MINUSERS = 50;
|
||||||
private static ArrayListInput cache = new ArrayListInput();
|
private static SimpleTextInput cache = new SimpleTextInput();
|
||||||
private static long cacheage = 0;
|
private static long cacheage = 0;
|
||||||
private static ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
private static ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
package com.earth2me.essentials.textreader;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
public class ArrayListInput implements IText
|
|
||||||
{
|
|
||||||
private final transient List<String> lines = new ArrayList<String>();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getLines()
|
|
||||||
{
|
|
||||||
return lines;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getChapters()
|
|
||||||
{
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Integer> getBookmarks()
|
|
||||||
{
|
|
||||||
return Collections.emptyMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -6,17 +6,21 @@ import java.util.*;
|
||||||
public class SimpleTextInput implements IText
|
public class SimpleTextInput implements IText
|
||||||
{
|
{
|
||||||
private final transient List<String> lines = new ArrayList<String>();
|
private final transient List<String> lines = new ArrayList<String>();
|
||||||
|
|
||||||
public SimpleTextInput (final String input)
|
public SimpleTextInput(final String input)
|
||||||
{
|
{
|
||||||
lines.addAll(Arrays.asList(input.split("\\n")));
|
lines.addAll(Arrays.asList(input.split("\\n")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleTextInput (final List<String> input)
|
public SimpleTextInput(final List<String> input)
|
||||||
{
|
{
|
||||||
lines.addAll(input);
|
lines.addAll(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SimpleTextInput()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getLines()
|
public List<String> getLines()
|
||||||
{
|
{
|
||||||
|
@ -34,5 +38,4 @@ public class SimpleTextInput implements IText
|
||||||
{
|
{
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user