1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-11 19:58:39 +01:00
Jobs/com/gamingmesh/jobs/commands/list/reload.java
Zrips 7c8bfda568 Eliminating jobsPLugin class
Preload all players data for faster use on players login.
Basic code cleanup
2016-08-08 17:36:56 +03:00

29 lines
1009 B
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.commands.Cmd;
import com.gamingmesh.jobs.commands.JobCommand;
import com.gamingmesh.jobs.stuff.ChatColor;
public class reload implements Cmd {
@Override
@JobCommand(2900)
public boolean perform(Jobs 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;
}
}