Format code

This commit is contained in:
AppleDash 2019-11-04 12:08:24 -05:00
parent c269fc1065
commit fe4fc5018d
20 changed files with 91 additions and 80 deletions

View File

@ -36,13 +36,15 @@ public class SaneEconomy extends SanePlugin implements ISaneEconomy {
private TransactionLogger transactionLogger;
private GithubVersionChecker versionChecker;
private final Map<String, SaneCommand> COMMANDS = new HashMap<String, SaneCommand>() {{
private final Map<String, SaneCommand> COMMANDS = new HashMap<String, SaneCommand>() {
{
put("balance", new BalanceCommand(SaneEconomy.this));
put("ecoadmin", new EconomyAdminCommand(SaneEconomy.this));
put("pay", new PayCommand(SaneEconomy.this));
put("saneeconomy", new SaneEcoCommand(SaneEconomy.this));
put("balancetop", new BalanceTopCommand(SaneEconomy.this));
}};
}
};
public SaneEconomy() {
instance = this;
@ -190,7 +192,7 @@ public class SaneEconomy extends SanePlugin implements ISaneEconomy {
getLogger().info("Initialized listeners.");
}
private void shutdown(){
private void shutdown() {
getServer().getPluginManager().disablePlugin(this);
}
@ -229,7 +231,7 @@ public class SaneEconomy extends SanePlugin implements ISaneEconomy {
* Get the logger for the plugin.
* @return Plugin logger.
*/
public static Logger logger(){
public static Logger logger() {
return instance.getLogger();
}

View File

@ -62,7 +62,7 @@ public class SaneEconomyOnlineTime extends SanePlugin implements Listener {
}
}
},0, 20);
}, 0, 20);
this.getServer().getPluginManager().registerEvents(this, this);
}

View File

@ -34,7 +34,7 @@ public class SignShopStorageJSON implements SignShopStorage {
}
try {
List<SignShop> tempShops = gson.fromJson(new FileReader(storageFile), new TypeToken<List<SignShop>>(){}.getType());
List<SignShop> tempShops = gson.fromJson(new FileReader(storageFile), new TypeToken<List<SignShop>>() {} .getType());
tempShops.forEach((shop) -> cachedSignShops.put(shop.getLocation(), shop));
} catch (FileNotFoundException e) {
throw new IllegalStateException("This shouldn't happen - the file " + storageFile.getAbsolutePath() + " disappeared while we were trying to read it!", e);

9
astyle.conf Normal file
View File

@ -0,0 +1,9 @@
--mode=java
--style=java # Bracket formatting
--indent=spaces=4
--indent-switches
--pad-oper
--pad-header
--add-brackets
--suffix=none # Do not backup original file
--lineend=linux