Title: Homebeds What I want: A plugin that will allow players to set their homes by righ-clicking on a bed without sleeping. Keep a log file with the location of each players house. Have a small delay like 5 sec till you set your house. Similar: I used the spawnbed plugin but with the resent update it stopped working so I really need a new one! No commands or permissions.
I'm pretty sure vanilla Minecraft does this already.. Unless what you want is more of setting a /home from clicking a bed?
If vanilla doesn't do this already, the Essentials has this feature. (It does also have lots of other things, but many of them are very useful)
Well I want it so that when the bed breaks the home will be reseted which is not included in any of these...
I know but I want a warm up or like "Click again in under 5 sec to set your home" so that people wont' accidentally place their home somewhere they don't want to. And also I want it to have a log file with the coords of each players home.
Code: public class Idgaf extends JavaPlugin { private final ArrayList<Player> defining; public void onEnable() { defining = new ArrayList<Player>(); getServer().getPluginManager().registerEvents(new Whatever(), this); } public void onDisable() { try { File f = new File("plugins/whatever/log.txt"); if(!f.exists()) f.createNewFile(); FileWriter fw = new FileWriter(new FileOutputStream(f)); for(Player p : getServer().getOnlinePlayers()) fw.write(p.getName() + " -- " + p.getBedRespawnLocation().toString()); for(Player p : getServer().getOfflinePlayers()) fw.write(p.getName() + " -- " + p.getBedRespawnLocation().toString()); fw.close(); } catch(IOException ex) { ex.printStackTrace(); } } public void onCommand(CommandSender sender, [other crap here]) { if(command.getName().equalsIgnoreCase("home")) { if(sender instanceof Player && ((Player)sender).getBedRespawnLocation() != null) { ((Player)sender).teleport(((Player)sender).getBedRespawnLocation()); return true; } } return false; } private class Whatever() implements Listener { @EventHandler public void onInteract(final PlayerInteractEvent event) { if(event.getClickedBlock() == null) return; if(event.getClickedBlock().getMaterial() == Material.BED) { if(!defining.contains(event.getPlayer()) { getServer().scheduleAsyncDelayedTask(new Runnable() { public void run() { if(defining.contains(event.getPlayer()) defining.remove(event.getPlayer()); } }, 100L); event.getPlayer().sendMessage("Click the bed again to confirm your home selection."); event.setCancelled(true); } else { defining.remove(event.getPlayer()); } } } } } Not sure if that'll even compile... I didn't feel like opening an IDE. Still, that's the basic idea of it, I guess.
Not sure what this is... Can somebody make a plugin that has these features? *Needs double click under 5 sec for the home to be set on that bed *Leave a msg ("Your bed has been set") *Keep a log file with everyones homes.
Sorry but I can't find one with those features... anybody able of making one please. I really need it.