From 8e248c9ea774bd93c78ec3e01a8b869801de0964 Mon Sep 17 00:00:00 2001 From: Ihaveaporpoise Date: Sun, 5 Oct 2014 00:28:00 -0500 Subject: [PATCH] Make reload command only call configuration file. Fixes issue #59 --- .../massivecraft/factions/cmd/CmdReload.java | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdReload.java b/src/main/java/com/massivecraft/factions/cmd/CmdReload.java index a6bca27e..dbb432c6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdReload.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdReload.java @@ -24,37 +24,10 @@ public class CmdReload extends FCommand { @Override public void perform() { long timeInitStart = System.currentTimeMillis(); - String file = this.argAsString(0, "all").toLowerCase(); - - String fileName; - - if (file.startsWith("c")) { - Conf.load(); - fileName = "conf.json"; - } else if (file.startsWith("b")) { - Board.load(); - fileName = "board.json"; - } else if (file.startsWith("f")) { - Factions.i.loadFromDisc(); - fileName = "factions.json"; - } else if (file.startsWith("p")) { - FPlayers.i.loadFromDisc(); - fileName = "players.json"; - } else if (file.startsWith("a")) { - fileName = "all"; - Conf.load(); - FPlayers.i.loadFromDisc(); - Factions.i.loadFromDisc(); - Board.load(); - } else { - P.p.log("RELOAD CANCELLED - SPECIFIED FILE INVALID"); - msg("Invalid file specified. Valid files: all, conf, board, factions, players"); - return; - } + Conf.load(); long timeReload = (System.currentTimeMillis() - timeInitStart); - msg("Reloaded %s from disk, took %dms.", fileName, timeReload); + msg("Reloaded conf.json from disk, took %dms.", timeReload); } - }