mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
29 lines
1.0 KiB
Java
29 lines
1.0 KiB
Java
package com.gamingmesh.jobs.commands.list;
|
|
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.command.ConsoleCommandSender;
|
|
|
|
import com.gamingmesh.jobs.Jobs;
|
|
import com.gamingmesh.jobs.JobsPlugin;
|
|
import com.gamingmesh.jobs.commands.Cmd;
|
|
import com.gamingmesh.jobs.commands.JobCommand;
|
|
import com.gamingmesh.jobs.stuff.ChatColor;
|
|
|
|
public class reload implements Cmd {
|
|
@JobCommand(2900)
|
|
public boolean perform(JobsPlugin plugin, final CommandSender sender, final String[] args) {
|
|
try {
|
|
Jobs.reload();
|
|
sender.sendMessage(Jobs.getLanguage().getMessage("general.admin.success"));
|
|
} catch (Exception e) {
|
|
sender.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("general.admin.error"));
|
|
String message = org.bukkit.ChatColor.translateAlternateColorCodes('&', "&4There was an error when performing a reload: ");
|
|
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
|
|
console.sendMessage(message);
|
|
e.printStackTrace();
|
|
}
|
|
return true;
|
|
}
|
|
}
|