Added verbosity flag

This commit is contained in:
7u83 2018-12-19 18:18:11 +01:00
parent 2e269b42d8
commit 89bd269b5e
1 changed files with 14 additions and 1 deletions

View File

@ -53,8 +53,16 @@ public abstract class AbstractTrader implements Trader {
this.world = world;
}
private boolean verbose=false;
public boolean isVerbose() {
return verbose;
}
public void setVerbose(boolean verbose) {
this.verbose = verbose;
}
/**
* @return the status
@ -64,11 +72,16 @@ public abstract class AbstractTrader implements Trader {
return status;
}
/**
* @param status the status to set
*/
protected void setStatus(String status) {
this.status = status;
if (verbose){
System.out.printf("%s: %s\n",this.getName(),this.getStatus());
}
}
/**