Refactored: Config, SettingsCommand
This commit is contained in:
@ -12,8 +12,8 @@ public class SaveCommand {
|
||||
*/
|
||||
public static boolean Run(){
|
||||
STPlugin plugin = STPlugin.getInstance();
|
||||
String p = plugin.config.getString("Saving.broadcastMsgProgress").replace("{PREFIX}",plugin.getPrefix());
|
||||
String d = plugin.config.getString("Saving.broadcastMsgDone").replace("{PREFIX}",plugin.getPrefix());
|
||||
String p = plugin.getConfig().getString("Saving.broadcastMsgProgress").replace("{PREFIX}",plugin.getPrefix());
|
||||
String d = plugin.getConfig().getString("Saving.broadcastMsgDone").replace("{PREFIX}",plugin.getPrefix());
|
||||
Bukkit.broadcast(p,"st.st");
|
||||
for(World w : Bukkit.getServer().getWorlds()){
|
||||
w.save();
|
||||
|
23
src/main/java/hu/ditservices/commands/SettingsCommand.java
Normal file
23
src/main/java/hu/ditservices/commands/SettingsCommand.java
Normal file
@ -0,0 +1,23 @@
|
||||
package hu.ditservices.commands;
|
||||
|
||||
import hu.ditservices.STPlugin;
|
||||
import hu.ditservices.utils.Version;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
public class SettingsCommand {
|
||||
public static boolean Run(CommandSender sender) {
|
||||
STPlugin plugin = STPlugin.getInstance();
|
||||
|
||||
sender.sendMessage( ChatColor.GREEN+" === Plugin Information === " + "\n"
|
||||
+ ChatColor.GREEN+"Plugin Version: " + ChatColor.translateAlternateColorCodes('&',"&a[&fSimplify&7Tools&2] &4- &f") + plugin.getDescription().getVersion() + "\n"
|
||||
+ ChatColor.GREEN+"Server Version: " + Version.ServerVersion.getCurrent().toString() + "\n"
|
||||
+ ChatColor.GREEN+" -------- Features -------- " + "\n"
|
||||
+ ChatColor.GREEN+"Tab customization: "+(plugin.getConfig().getBoolean("Tab.enabled") ? ChatColor.GREEN + "Enabled" : ChatColor.RED+"Disabled") + "\n"
|
||||
+ ChatColor.GREEN+"Custom Advancement Msg: " + (plugin.getConfig().getBoolean("CustomAdvancement.enabled") ? ChatColor.GREEN+"Enabled" : ChatColor.RED+"Disabled") + "\n"
|
||||
+ ChatColor.GREEN+" ========================== "
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user