Add /f warp GUI (#1069)

* Add /f warp GUI

* Fix typo
This commit is contained in:
Dariasc
2018-03-04 17:53:20 -03:00
committed by Trent Hensler
parent a8ce60b457
commit d6b147ef7b
9 changed files with 352 additions and 41 deletions

View File

@@ -6,6 +6,7 @@ import com.massivecraft.factions.P;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.util.LazyLocation;
import com.massivecraft.factions.util.WarmUpUtil;
import com.massivecraft.factions.util.WarpGUI;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL;
@@ -44,12 +45,10 @@ public class CmdFWarp extends FCommand {
}
if (args.size() == 0) {
FancyMessage msg = new FancyMessage(TL.COMMAND_FWARP_WARPS.toString()).color(ChatColor.GOLD);
Map<String, LazyLocation> warps = myFaction.getWarps();
for (String s : warps.keySet()) {
msg.then(s + " ").tooltip(TL.COMMAND_FWARP_CLICKTOWARP.toString()).command("/" + Conf.baseCommandAliases.get(0) + " warp " + s).color(ChatColor.WHITE);
}
sendFancyMessage(msg);
WarpGUI warpGUI = new WarpGUI(fme);
warpGUI.build();
me.openInventory(warpGUI.getInventory());
} else if (args.size() > 2) {
fme.msg(TL.COMMAND_FWARP_COMMANDFORMAT);
} else {