Source:
<code>public void run(final Server server, final User user, final String commandLabel, String[] args) throws Exception { User usersHome = user; String name = "home"; final Location location = user.getLocation(); if (args.length > 0) { final String[] nameParts = args[0].split(":"); if (nameParts[0].length() != args[0].length()) { args = nameParts; } if (args.length < 2) { name = args[0].toLowerCase(Locale.ENGLISH); } else { name = args[1].toLowerCase(Locale.ENGLISH); if (user.isAuthorized("essentials.sethome.others")) { usersHome = getPlayer(server, args[0], true, true); if (usersHome == null) { throw new PlayerNotFoundException(); } } } } if (checkHomeLimit(user, usersHome, name)) { name = "home"; } if ("bed".equals(name) || NumberUtil.isInt(name)) { throw new NoSuchFieldException(tl("invalidHomeName")); } if (ess.getSettings().isSetSameHomeByConfirm()) { String uuid = user.getBase().getUniqueId().toString(); for (String h : usersHome.getHomes()) { if (h.equalsIgnoreCase(name)) { if (!confirmSetHome.contains(uuid)) { confirmSetHome.add(uuid); int time = (20 * 10); <START> ess.getServer().getScheduler().runTaskLater(ess, () -> confirmSetHome.remove(uuid), time); <END> user.sendMessage(tl("confirmForSameHomeSetting", time)); return; } confirmSetHome.remove(uuid); break; } } } if (!ess.getSettings().isTeleportSafetyEnabled() && LocationUtil.isBlockUnsafeForUser(usersHome, location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ())) { throw new Exception(tl("unsafeTeleportDestination", location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ())); } usersHome.setHome(name, location); user.sendMessage(tl("homeSet", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ(), name)); }</code><technical_language>This implement cooldowns</technical_language>

Target:
public void run(final Server server, final User user, final String commandLabel, String[] args) throws Exception { User usersHome = user; String name = "home"; final Location location = user.getLocation(); if (args.length > 0) { final String[] nameParts = args[0].split(":"); if (nameParts[0].length() != args[0].length()) { args = nameParts; } if (args.length < 2) { name = args[0].toLowerCase(Locale.ENGLISH); } else { name = args[1].toLowerCase(Locale.ENGLISH); if (user.isAuthorized("essentials.sethome.others")) { usersHome = getPlayer(server, args[0], true, true); if (usersHome == null) { throw new PlayerNotFoundException(); } } } } if (checkHomeLimit(user, usersHome, name)) { name = "home"; } if ("bed".equals(name) || NumberUtil.isInt(name)) { throw new NoSuchFieldException(tl("invalidHomeName")); } boolean found = false; if (ess.getSettings().isSetSameHomeByConfirm()) { String previousSetHomeCommand = user.getConfirmingSetHomeCommand(); user.setConfirmingSetHomeCommand(null); for (String h : usersHome.getHomes()) { if (h.equals(name)) { String formattedCommand = formatCommand(commandLabel, args); if (!formattedCommand.equals(previousSetHomeCommand)) { user.setConfirmingSetHomeCommand(formattedCommand); user.sendMessage(tl("confirmForSameHomeSetting", h)); return; } found = true; break; } } if (!found) { throw new NoSuchFieldException(tl("invalidHomeName")); } } if (!ess.getSettings().isTeleportSafetyEnabled() && LocationUtil.isBlockUnsafeForUser(usersHome, location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ())) { throw new Exception(tl("unsafeTeleportDestination", location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ())); } usersHome.setHome(name, location); user.sendMessage(tl("homeSet", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ(), name)); }