blob: d333f6c670ae422ed1d85bd3489c93cb409097b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package net.tylermurphy.hideAndSeek.command;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import net.tylermurphy.hideAndSeek.Store;
import net.tylermurphy.hideAndSeek.util.Functions;
import net.tylermurphy.hideAndSeek.util.ICommand;
import static net.tylermurphy.hideAndSeek.Store.*;
import java.util.HashMap;
public class Reload implements ICommand {
public void execute(CommandSender sender, String[] args) {
if(!status.equals("Standby")) {
sender.sendMessage(errorPrefix + "Game is currently in session");
return;
}
Store.loadConfig();
try {
Functions.loadScoreboard();
} catch(Exception e) {}
sender.sendMessage(messagePrefix + "Reloaded the config");
playerList = new HashMap<String,Player>();
if(!lobbyManualJoin) {
for(Player p : Bukkit.getOnlinePlayers())
playerList.put(p.getName(), p);
}
}
public String getLabel() {
return "reload";
}
public String getUsage() {
return "";
}
public String getDescription() {
return "Reloads the config";
}
}
|