Makes sure tab completed paid sign names are quoted
This commit is contained in:
parent
36678fd2d0
commit
0f958f0908
@ -4,6 +4,7 @@ import net.knarcraft.paidsigns.PaidSigns;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* A helper class for providing common tab complete options
|
||||
@ -43,7 +44,12 @@ public final class TabCompleteHelper {
|
||||
* @return <p>The names of all registered paid signs</p>
|
||||
*/
|
||||
public static List<String> getPaidSignNames() {
|
||||
return new ArrayList<>(PaidSigns.getInstance().getSignManager().getAllPaidSigns().keySet());
|
||||
Set<String> paidSignNames = PaidSigns.getInstance().getSignManager().getAllPaidSigns().keySet();
|
||||
List<String> quotedNames = new ArrayList<>(paidSignNames.size());
|
||||
for (String paidSignName : paidSignNames) {
|
||||
quotedNames.add("\"" + paidSignName + "\"");
|
||||
}
|
||||
return new ArrayList<>(quotedNames);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user