This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
What is the enhancement in mind? How should it look and feel?A command to simply reload the chunk the player is standing on. It is common for some clients just based on the blocks where they are tp'ing to or /home, /spawn, etc etc to have a world hole. This would be an ultra helpful command if it could be implemented in a more stand alone plugin like this.
Please provide any additional information below.I believe the following code would be at least a portion of what would be needed. I got this from someone who didn't feel like making a plugin but was willing to offer this much help lol.
public FixChunk(Command plugin) { this.plugin = plugin; }
@Override public boolean onCommand(CommandSender cs, Command cmd, String label, String[] args) { if (cmd.getName().equalsIgnoreCase("fixchunk")) { if (!plugin.isAuthorized(cs, "commands.fixchunk")) { Utils.dispNoPerms(cs); return true; } if (!(cs instanceof Player)) { cs.sendMessage(ChatColor.RED + "This command is only available to players!"); return true; } Player p = (Player) cs; Chunk c = p.getLocation().getChunk(); boolean worked = p.getWorld().refreshChunk(c.getX(), c.getZ()); if (worked) { cs.sendMessage(ChatColor.BLUE + "The chunk you're standing in has been reloaded!"); } if (!worked) { cs.sendMessage(ChatColor.RED + "The chunk could not be reloaded."); } return true; } return false; }
To post a comment, please login or register a new account.