/f lock command can now be used through console; fix for /f reload command causing NPE if run from console
This commit is contained in:
parent
f9de4171d4
commit
2e1d7da50f
@ -236,9 +236,9 @@ public class FBaseCommand {
|
||||
|
||||
public void setLock(boolean newLock) {
|
||||
if( newLock ) {
|
||||
me.sendMessage("Factions is now locked");
|
||||
sendMessage("Factions is now locked");
|
||||
} else {
|
||||
me.sendMessage("Factions in now unlocked");
|
||||
sendMessage("Factions in now unlocked");
|
||||
}
|
||||
|
||||
lock = newLock;
|
||||
|
@ -8,6 +8,8 @@ public class FCommandLock extends FBaseCommand {
|
||||
public FCommandLock() {
|
||||
aliases.add("lock");
|
||||
|
||||
senderMustBePlayer = false;
|
||||
|
||||
optionalParameters.add("on|off");
|
||||
|
||||
helpDescription = "lock all write stuff";
|
||||
@ -23,9 +25,9 @@ public class FCommandLock extends FBaseCommand {
|
||||
setLock( parseBool( parameters.get(0) ));
|
||||
} else {
|
||||
if( isLocked() ) {
|
||||
me.sendMessage("Factions is locked");
|
||||
sendMessage("Factions is locked");
|
||||
} else {
|
||||
me.sendMessage("Factions is not locked");
|
||||
sendMessage("Factions is not locked");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class FCommandReload extends FBaseCommand {
|
||||
}
|
||||
else {
|
||||
Factions.log("RELOAD CANCELLED - SPECIFIED FILE INVALID");
|
||||
me.sendMessage("Invalid file specified. Valid files: conf, board, factions, players.");
|
||||
sendMessage("Invalid file specified. Valid files: conf, board, factions, players.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,7 @@ public class FCommandReload extends FBaseCommand {
|
||||
long timeReload = (System.currentTimeMillis()-timeInitStart);
|
||||
Factions.log("=== RELOAD DONE (Took "+timeReload+"ms) ===");
|
||||
|
||||
me.sendMessage("Factions file" + fileName + " reloaded from disk, took " + timeReload + "ms");
|
||||
sendMessage("Factions file" + fileName + " reloaded from disk, took " + timeReload + "ms");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user