some fixes

This commit is contained in:
boy0001 2014-11-10 21:54:36 +11:00
parent 7d304d3eb2
commit c9204b3590
8 changed files with 18 additions and 7 deletions

View File

@ -418,6 +418,11 @@ public enum C {
if (manager == null) {
manager = new TranslationManager();
}
// FIXME: generating a blank file
// FIXME: translations aren't customizable
// FIXME: Some messages still have the %arg stuff in them
if (defaultFile == null) {
defaultFile = new YamlTranslationFile(BukkitTranslation.getParent(PlotMain.getPlugin(PlotMain.class)), TranslationLanguage.englishAmerican, "PlotSquared", manager)
.read();

View File

@ -301,9 +301,13 @@ public class PlayerFunctions {
else {
String msg = c.s();
if ((args != null) && (args.length > 0)) {
for (final String str : args)
for (final String str : args) {
System.out.print(str);
if (msg.contains("%s")) {
msg = msg.replaceFirst("%s", str);
}
}
}
sendMessage(plr, msg);
}
}

View File

@ -37,6 +37,8 @@ public class StringComparsion {
public StringComparsion(final String input, final Object[] objects) {
double c = 0;
this.bestMatch = objects[0].toString();
this.bestMatchObject = objects[0];
for (final Object o : objects) {
if ((c = compare(input, o.toString())) > this.match) {
this.match = c;

View File

@ -126,7 +126,7 @@ public class UUIDHandler {
final Player player = Bukkit.getPlayer(name);
if (player != null) {
final UUID uuid = player.getUniqueId();
uuidMap.put(nameWrap, uuid);
add(nameWrap, uuid);
return uuid;
}
UUID uuid;

View File

@ -42,7 +42,7 @@ import java.util.UUID;
public class DebugClaimTest extends SubCommand {
public DebugClaimTest() {
super(Command.DEBUGCLAIMTEST, "If you accidentally delete your database, this command will attempt to restore all plots based on the data from the plot signs. Execution time may vary", "claim", CommandCategory.DEBUG, false);
super(Command.DEBUGCLAIMTEST, "If you accidentally delete your database, this command will attempt to restore all plots based on the data from the plot signs. Execution time may vary", "debugclaimtest", CommandCategory.DEBUG, false);
}
@Override

View File

@ -34,7 +34,7 @@ import java.lang.reflect.Field;
public class DebugLoadTest extends SubCommand {
public DebugLoadTest() {
super(Command.DEBUGCLAIMTEST, "This debug command will force the reload of all plots in the DB", "claim", CommandCategory.DEBUG, false);
super(Command.DEBUGCLAIMTEST, "This debug command will force the reload of all plots in the DB", "debugloadtest", CommandCategory.DEBUG, false);
}
@Override

View File

@ -35,7 +35,7 @@ import java.util.ArrayList;
public class DebugSaveTest extends SubCommand {
public DebugSaveTest() {
super(Command.DEBUGCLAIMTEST, "This debug command will force the recreation of all plots in the DB", "claim", CommandCategory.DEBUG, false);
super(Command.DEBUGCLAIMTEST, "This debug command will force the recreation of all plots in the DB", "debugsavetest", CommandCategory.DEBUG, false);
}
@Override

View File

@ -243,7 +243,7 @@ public class DefaultPlotManager extends PlotManager {
final PlotBlock[] filling = dpw.MAIN_BLOCK;
// PlotBlock wall = dpw.WALL_BLOCK;
final PlotBlock wall = plot.hasOwner() ? dpw.CLAIMED_WALL_BLOCK : dpw.WALL_BLOCK;
final PlotBlock wall = dpw.WALL_BLOCK;
final PlotBlock wall_filling = dpw.WALL_FILLING;