This commit is contained in:
Jesse Boyd 2016-04-06 03:02:15 +10:00
parent fb4ed9362d
commit ab4af2741f
7 changed files with 11 additions and 6 deletions

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.command;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.object.FaweCommand;
import com.boydti.fawe.object.FawePlayer;
import com.boydti.fawe.util.MainUtil;
@ -14,7 +15,7 @@ public class Reload extends FaweCommand {
@Override
public boolean execute(final FawePlayer player, final String... args) {
Fawe.get().setupConfigs();
MainUtil.sendMessage(player, "&d[FAWE] Reloaded configuration");
MainUtil.sendMessage(player, "&d" + BBC.PREFIX.s() + " Reloaded configuration");
return true;
}
}

View File

@ -16,6 +16,7 @@ public enum BBC {
* Things to note about this class:
* Can use multiple arguments %s, %s1, %s2, %s3 etc
*/
PREFIX("[FAWE]", "Info"),
COMMAND_SYNTAX("&cUsage: &7%s0", "Error"),
NO_PERM("&cYou are lacking the permission node: %s0", "Error"),
SCHEMATIC_NOT_FOUND("&cSchematic not found: &7%s0", "Error"),

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.object;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.changeset.DiskStorageHistory;
import com.boydti.fawe.util.WEManager;
@ -53,7 +54,7 @@ public abstract class FawePlayer<T> {
}
}
if (editIds.size() > 0) {
Fawe.debug("[FAWE] Indexing " + editIds.size() + " history objects for " + getName());
Fawe.debug(BBC.PREFIX.s() + " Indexing " + editIds.size() + " history objects for " + getName());
for (int index : editIds) {
DiskStorageHistory set = new DiskStorageHistory(world, uuid, index);
EditSession edit = set.toEditSession(getPlayer());

View File

@ -2,6 +2,7 @@ package com.boydti.fawe.object.changeset;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.ReflectionUtils;
@ -141,7 +142,7 @@ public class DiskStorageHistory implements ChangeSet, FaweChangeSet {
if ((change instanceof BlockChange)) {
add((BlockChange) change);
} else {
Fawe.debug("[FAWE] Does not support " + change + " yet! (Please bug Empire92)");
Fawe.debug(BBC.PREFIX.s() + "Does not support " + change + " yet! (Please bug Empire92)");
}
}

View File

@ -2,6 +2,7 @@ package com.boydti.fawe.object.changeset;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.ReflectionUtils;
@ -290,7 +291,7 @@ public class MemoryOptimizedHistory implements ChangeSet, FaweChangeSet {
int saved = total - ids.length;
if (ratio > 3) {
// TODO remove this debug message
Fawe.debug("[FAWE] History compressed. Saved ~ " + saved + "b (" + ratio + "x smaller)");
Fawe.debug(BBC.PREFIX.s() + "History compressed. Saved ~ " + saved + "b (" + ratio + "x smaller)");
}
idsStream = null;
idsStreamZip = null;

View File

@ -292,7 +292,7 @@ public final class CommandManager {
SetQueue.IMP.addTask(new Runnable() {
@Override
public void run() {
actor.print("[FAWE] Action completed in " + (time / 1000d) + " seconds");
actor.print(BBC.PREFIX.s() + " Action completed in " + (time / 1000d) + " seconds");
}
});
}

View File

@ -94,7 +94,7 @@ public class FaweSponge implements IFawe {
@Override
public void setupVault() {
debug("[FAWE] Permission hook not implemented yet!");
debug(BBC.PREFIX.s() + "Permission hook not implemented yet!");
}
@Override