untitled paste

unlisted ⁨1⁩ ⁨file⁩ 2022-03-02 23:21:37 UTC

java

Raw
        if (copyWGRegions && main.worldGuard() != null) {
            if (worldGuard == null) worldGuard = new WorldGuard(main, this);
            worldGuard.copy();
        }

        if (copyRSRegions && main.isResidence()) {
            if (residence == null) residence = new Residence(main, this);
            residence.copy();
        }

        if (copyGPRegions && main.isGriefPrevention()) {
            if (griefPrevention == null) griefPrevention = new GriefPrevention(main, this);
            griefPrevention.copy();
        }

        (new BukkitRunnable() {

            @Override
            public void run() {

                if (Objects.equals(main.worldUtils().defaultWorld(), worldName)) return;

                worldData.updateSeed();

                // save before reset
                if (main.config().isSaveWorldBeforeReset()) {
                    backupWorld(null, false, true);
                } else regen2(sender);

            }

        }).runTaskLater(main, 100L);