@Command(
     aliases = {"/regen"},
     usage = "",
     desc = "Regenerates the contents of the selection",
     help =
         "Regenerates the contents of the current selection.\n"
             + "This command might affect things outside the selection,\n"
             + "if they are within the same chunk.",
     min = 0,
     max = 0)
 @CommandPermissions("worldedit.regen")
 @Logging(REGION)
 public void regenerateChunk(
     Player player, LocalSession session, EditSession editSession, @Selection Region region)
     throws WorldEditException {
   Mask mask = session.getMask();
   Mask sourceMask = session.getSourceMask();
   try {
     session.setMask((Mask) null);
     session.setSourceMask((Mask) null);
     player.getWorld().regenerate(region, editSession);
   } finally {
     session.setMask(mask);
     session.setSourceMask(mask);
   }
   BBC.COMMAND_REGEN.send(player);
 }
示例#2
0
  @Command(
      aliases = {"/regen"},
      usage = "",
      desc = "Regenerates the contents of the selection",
      min = 0,
      max = 0)
  @CommandPermissions("worldedit.regen")
  @Logging(REGION)
  public static void regenerateChunk(
      CommandContext args,
      WorldEdit we,
      LocalSession session,
      LocalPlayer player,
      EditSession editSession)
      throws WorldEditException {

    Region region = session.getSelection(player.getWorld());
    Mask mask = session.getMask();
    session.setMask(null);
    player.getWorld().regenerate(region, editSession);
    session.setMask(mask);
    player.print("Region regenerated.");
  }