21
21
import java .io .BufferedReader ;
22
22
import java .io .InputStreamReader ;
23
23
import java .io .IOException ;
24
- import java .util .concurrent .locks .Lock ;
25
24
import java .util .logging .Level ;
26
25
27
26
import com .google .gson .JsonParser ;
@@ -38,13 +37,17 @@ public final class Main extends JavaPlugin {
38
37
"&e&9/--\\ &6\\ __| ||__/&e| &8running on bukkit - paper" ,
39
38
"" };
40
39
40
+ /**
41
+ * Print the logo of the plugin
42
+ */
41
43
private void printLogo () {
42
- for (String s : Logo )//print the logo
44
+ for (String s : Logo )
43
45
Bukkit .getConsoleSender ().sendMessage (ChatColor .translateAlternateColorCodes ('&' , s ));
44
46
}
45
47
46
- /*
47
- * modificationLock: This prevents the administrator to modify the plugin in the meantime, it could cause some issues/conflicts.
48
+ /**
49
+ * modificationLock: This prevents the administrator to modify the plugin in the meantime,
50
+ * it could cause some issues/conflicts.
48
51
*/
49
52
ModificationLock modificationLock = new ModificationLock (this );
50
53
@@ -92,13 +95,13 @@ public File getCommandsFile() {
92
95
return commandsFile ;
93
96
}
94
97
95
- public boolean saveCommandsFile () {
98
+ public void saveCommandsFile () {
96
99
try {
97
100
getCommandsConfig ().save (getCommandsFile ());
98
101
} catch (IOException ignored ) {
99
- return false ;
102
+ Bukkit .getConsoleSender ().sendMessage (
103
+ ChatColor .translateAlternateColorCodes ('&' , config .getString ("ConsolePrefix" ) + " &cError saving commands.yml" ));
100
104
}
101
- return true ;
102
105
}
103
106
104
107
0 commit comments