Skip to content

Commit

Permalink
Adds default commands in settings config.yml
Browse files Browse the repository at this point in the history
Fixes #47
  • Loading branch information
tastybento committed Mar 6, 2021
1 parent a5b3611 commit dec7d91
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 47 deletions.
42 changes: 42 additions & 0 deletions src/main/java/world/bentobox/skygrid/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "skygrid.command.admin")
private String adminCommandAliases = "sgadmin sga";

@ConfigComment("The default action for new player command call.")
@ConfigComment("Sub-command of main player command that will be run on first player command call.")
@ConfigComment("By default it is sub-command 'create'.")
@ConfigEntry(path = "skygrid.command.new-player-action", since = "1.16.0")
private String defaultNewPlayerAction = "create";

@ConfigComment("The default action for player command.")
@ConfigComment("Sub-command of main player command that will be run on each player command call.")
@ConfigComment("By default it is sub-command 'go'.")
@ConfigEntry(path = "skygrid.command.default-action", since = "1.16.0")
private String defaultPlayerAction = "go";

/* Chests */
@ConfigComment("Number of unique items per chest")
@ConfigEntry(path = "world.chest-fill.overworld")
Expand Down Expand Up @@ -1450,4 +1462,34 @@ public int getMaxTrustSize() {
public void setMaxTrustSize(int maxTrustSize) {
this.maxTrustSize = maxTrustSize;
}

/**
* @return the defaultNewPlayerAction
*/
@Override
public String getDefaultNewPlayerAction() {
return defaultNewPlayerAction;
}

/**
* @param defaultNewPlayerAction the defaultNewPlayerAction to set
*/
public void setDefaultNewPlayerAction(String defaultNewPlayerAction) {
this.defaultNewPlayerAction = defaultNewPlayerAction;
}

/**
* @return the defaultPlayerAction
*/
@Override
public String getDefaultPlayerAction() {
return defaultPlayerAction;
}

/**
* @param defaultPlayerAction the defaultPlayerAction to set
*/
public void setDefaultPlayerAction(String defaultPlayerAction) {
this.defaultPlayerAction = defaultPlayerAction;
}
}

0 comments on commit dec7d91

Please sign in to comment.