mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-03 18:53:43 +01:00 
			
		
		
		
	Compare commits
	
		
			34 Commits
		
	
	
		
			6.2.2
			...
			fix/v6/nul
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					4c166d057e | ||
| 
						 | 
					827f46566c | ||
| 
						 | 
					6f4d2f6d5a | ||
| 
						 | 
					6073b96317 | ||
| 
						 | 
					74a490f9f0 | ||
| 
						 | 
					3a752db698 | ||
| 
						 | 
					7cdde5a822 | ||
| 
						 | 
					8b6e7b2f2b | ||
| 
						 | 
					06f0b42a97 | ||
| 
						 | 
					9a85080bf6 | ||
| 
						 | 
					d14d2caa2d | ||
| 
						 | 
					bcfe7c58dd | ||
| 
						 | 
					289f0f3bfd | ||
| 
						 | 
					6fc4005c72 | ||
| 
						 | 
					8f7c2e4c02 | ||
| 
						 | 
					b43d08f4aa | ||
| 
						 | 
					2c55c6a92e | ||
| 
						 | 
					31f48cc7d1 | ||
| 
						 | 
					4b77f1ab28 | ||
| 
						 | 
					7cc38b5fa8 | ||
| 
						 | 
					0c76d08b10 | ||
| 
						 | 
					9c474570c8 | ||
| 
						 | 
					7e1d56c849 | ||
| 
						 | 
					07d0f124b4 | ||
| 
						 | 
					8d6c621763 | ||
| 
						 | 
					cef7098014 | ||
| 
						 | 
					e1efa7266e | ||
| 
						 | 
					f363941719 | ||
| 
						 | 
					25095f4546 | ||
| 
						 | 
					fd0c2050d8 | ||
| 
						 | 
					07fdc94dd8 | ||
| 
						 | 
					b501a81e21 | ||
| 
						 | 
					eb334b3aac | ||
| 
						 | 
					a77a51b6f2 | 
							
								
								
									
										20
									
								
								.github/workflows/rebase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/rebase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
name: Rebase Pull Request
 | 
			
		||||
on:
 | 
			
		||||
  issue_comment:
 | 
			
		||||
    types: [created]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  rebase:
 | 
			
		||||
    name: Rebase
 | 
			
		||||
    if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER'
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout Repository
 | 
			
		||||
        uses: actions/checkout@v2.4.0
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.REBASE_TOKEN }}
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
      - name: Automatic Rebase
 | 
			
		||||
        uses: cirrus-actions/rebase@1.5
 | 
			
		||||
        env:
 | 
			
		||||
          GITHUB_TOKEN: ${{ secrets.REBASE_TOKEN }}
 | 
			
		||||
							
								
								
									
										6
									
								
								.github/workflows/release-drafter.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/release-drafter.yml
									
									
									
									
										vendored
									
									
								
							@@ -4,11 +4,15 @@ on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - v6
 | 
			
		||||
  pull_request:
 | 
			
		||||
    types: [ opened, reopened, synchronize ]
 | 
			
		||||
  pull_request_target:
 | 
			
		||||
    types: [ opened, reopened, synchronize ]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  update_release_draft:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: release-drafter/release-drafter@v5.15.0
 | 
			
		||||
      - uses: release-drafter/release-drafter@v5.17.5
 | 
			
		||||
        env:
 | 
			
		||||
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								.lift.toml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.lift.toml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
jdkVersion = "17"
 | 
			
		||||
build = "gradle clean build -x test"
 | 
			
		||||
tools = ["findsecbugs", "ErrorProne", "Semgrep", "Detekt", "Infer"]
 | 
			
		||||
ignoreRules = ["CatchAndPrintStackTrace", "ReferenceEquality", "FallThrough", "FutureReturnValueIgnored", "MixedMutabilityReturnType", "EmptyCatch", "MissingCasesInEnumSwitch", "OperatorPrecedence", "StaticAssignmentInConstructor", "ReferenceEquality", "EqualsHashCode", "EqualsGetClass", "TypeParameterUnusedInFormals"]
 | 
			
		||||
@@ -40,7 +40,6 @@ dependencies {
 | 
			
		||||
    compileOnly(libs.placeholderapi)
 | 
			
		||||
    compileOnly(libs.luckperms)
 | 
			
		||||
    compileOnly(libs.essentialsx)
 | 
			
		||||
    compileOnly(libs.hyperverse) { isTransitive = false }
 | 
			
		||||
    compileOnly(libs.mvdwapi) { isTransitive = false }
 | 
			
		||||
 | 
			
		||||
    // Other libraries
 | 
			
		||||
@@ -75,7 +74,8 @@ tasks.named<ShadowJar>("shadowJar") {
 | 
			
		||||
    relocate("org.khelekore.prtree", "com.plotsquared.prtree")
 | 
			
		||||
    relocate("com.google.inject", "com.plotsquared.google")
 | 
			
		||||
    relocate("org.aopalliance", "com.plotsquared.core.aopalliance")
 | 
			
		||||
    relocate("com.intellectualsites.services", "com.plotsquared.core.services")
 | 
			
		||||
    relocate("cloud.commandframework.services", "com.plotsquared.core.services")
 | 
			
		||||
    relocate("io.leangen.geantyref", "com.plotsquared.core.geantyref")
 | 
			
		||||
    relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika")
 | 
			
		||||
    relocate("com.intellectualsites.http", "com.plotsquared.core.http")
 | 
			
		||||
    relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
 | 
			
		||||
@@ -83,6 +83,7 @@ tasks.named<ShadowJar>("shadowJar") {
 | 
			
		||||
    relocate("org.jetbrains", "com.plotsquared.core.annotations")
 | 
			
		||||
    relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations")
 | 
			
		||||
    relocate("javax.annotation", "com.plotsquared.core.annotation")
 | 
			
		||||
    relocate("com.google.code.findbugs", "com.plotsquared.core.findbugs")
 | 
			
		||||
    relocate("javax.inject", "com.plotsquared.core.annotation.inject")
 | 
			
		||||
 | 
			
		||||
    // Get rid of all the libs which are 100% unused.
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -147,6 +147,8 @@ import java.io.File;
 | 
			
		||||
import java.lang.reflect.Method;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.Comparator;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.HashSet;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
@@ -216,6 +218,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
    private PlatformWorldManager<World> worldManager;
 | 
			
		||||
    private Locale serverLocale;
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("StringSplitter")
 | 
			
		||||
    @Override
 | 
			
		||||
    public int @NonNull [] serverVersion() {
 | 
			
		||||
        if (this.version == null) {
 | 
			
		||||
@@ -266,7 +269,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
                    faweHook = true;
 | 
			
		||||
                } catch (Exception ignored) {
 | 
			
		||||
                    LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" +
 | 
			
		||||
                            ".net/job/FastAsyncWorldEdit-1.17/");
 | 
			
		||||
                            ".net/job/FastAsyncWorldEdit/");
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@@ -968,7 +971,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
                                                }
 | 
			
		||||
                                                iterator.remove();
 | 
			
		||||
                                                entity.remove();
 | 
			
		||||
                                                continue;
 | 
			
		||||
                                            }
 | 
			
		||||
                                        }
 | 
			
		||||
                                    } else {
 | 
			
		||||
@@ -980,7 +982,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
                                            }
 | 
			
		||||
                                            iterator.remove();
 | 
			
		||||
                                            entity.remove();
 | 
			
		||||
                                            continue;
 | 
			
		||||
                                        }
 | 
			
		||||
                                    }
 | 
			
		||||
                                }
 | 
			
		||||
@@ -1141,8 +1142,10 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
    @Override
 | 
			
		||||
    public @NonNull String pluginsFormatted() {
 | 
			
		||||
        StringBuilder msg = new StringBuilder();
 | 
			
		||||
        Plugin[] plugins = Bukkit.getServer().getPluginManager().getPlugins();
 | 
			
		||||
        msg.append("Plugins (").append(plugins.length).append("): \n");
 | 
			
		||||
        List<Plugin> plugins = new ArrayList<>();
 | 
			
		||||
        Collections.addAll(plugins, Bukkit.getServer().getPluginManager().getPlugins());
 | 
			
		||||
        plugins.sort(Comparator.comparing(Plugin::getName));
 | 
			
		||||
        msg.append("Plugins (").append(plugins.size()).append("): \n");
 | 
			
		||||
        for (Plugin p : plugins) {
 | 
			
		||||
            msg.append(" - ").append(p.getName()).append(":").append("\n")
 | 
			
		||||
                    .append("  • Version: ").append(p.getDescription().getVersion()).append("\n")
 | 
			
		||||
@@ -1156,6 +1159,21 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
        return msg.toString();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    @SuppressWarnings("ConstantConditions")
 | 
			
		||||
    public @NonNull String worldEditImplementations() {
 | 
			
		||||
        StringBuilder msg = new StringBuilder();
 | 
			
		||||
        if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
 | 
			
		||||
            msg.append("FastAsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit").getDescription().getVersion());
 | 
			
		||||
        } else if (Bukkit.getPluginManager().getPlugin("AsyncWorldEdit") != null) {
 | 
			
		||||
            msg.append("AsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("AsyncWorldEdit").getDescription().getVersion()).append("\n");
 | 
			
		||||
            msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
 | 
			
		||||
        } else {
 | 
			
		||||
            msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
 | 
			
		||||
        }
 | 
			
		||||
        return msg.toString();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public com.plotsquared.core.location.@NonNull World<?> getPlatformWorld(final @NonNull String worldName) {
 | 
			
		||||
        return BukkitWorld.of(worldName);
 | 
			
		||||
@@ -1204,7 +1222,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    @NonNull
 | 
			
		||||
    @SuppressWarnings("ALL")
 | 
			
		||||
    @SuppressWarnings("unchecked")
 | 
			
		||||
    public PlayerManager<? extends PlotPlayer<Player>, ? extends Player> playerManager() {
 | 
			
		||||
        return (PlayerManager<BukkitPlayer, Player>) injector().getInstance(PlayerManager.class);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -461,6 +461,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
 | 
			
		||||
        this.tamed.tamed = tamed.isTamed();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // Paper deprecation
 | 
			
		||||
    @Override
 | 
			
		||||
    public Entity spawn(World world, int xOffset, int zOffset) {
 | 
			
		||||
        Location location = new Location(world, this.getX() + xOffset, this.getY(), this.z + zOffset);
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -29,7 +29,6 @@ import com.google.inject.AbstractModule;
 | 
			
		||||
import com.google.inject.Provides;
 | 
			
		||||
import com.google.inject.Singleton;
 | 
			
		||||
import com.plotsquared.bukkit.managers.BukkitWorldManager;
 | 
			
		||||
import com.plotsquared.bukkit.managers.HyperverseWorldManager;
 | 
			
		||||
import com.plotsquared.bukkit.managers.MultiverseWorldManager;
 | 
			
		||||
import com.plotsquared.core.util.PlatformWorldManager;
 | 
			
		||||
import org.bukkit.Bukkit;
 | 
			
		||||
@@ -37,12 +36,11 @@ import org.bukkit.World;
 | 
			
		||||
 | 
			
		||||
public class WorldManagerModule extends AbstractModule {
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("removal") // Internal use only
 | 
			
		||||
    @Provides
 | 
			
		||||
    @Singleton
 | 
			
		||||
    PlatformWorldManager<World> provideWorldManager() {
 | 
			
		||||
        if (Bukkit.getPluginManager().getPlugin("Hyperverse") != null) {
 | 
			
		||||
            return new HyperverseWorldManager();
 | 
			
		||||
        } else if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) {
 | 
			
		||||
        if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) {
 | 
			
		||||
            return new MultiverseWorldManager();
 | 
			
		||||
        } else {
 | 
			
		||||
            return new BukkitWorldManager();
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -108,41 +108,11 @@ public class ChunkListener implements Listener {
 | 
			
		||||
                        this.isTrueForNotSave = false;
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.mustSave = classChunk.getField("mustNotSave");
 | 
			
		||||
                        /*
 | 
			
		||||
                        this.worldServer = classCraftWorld.getField("world");
 | 
			
		||||
                        this.methodGetChunkProvider = getRefClass("{nms}.WorldServer").getMethod("getChunkProvider");
 | 
			
		||||
                        this.playerChunkMap = getRefClass("{nms}.ChunkProviderServer").getField("playerChunkMap");
 | 
			
		||||
                        RefClass classPlayerChunkMap = getRefClass("{nms}.PlayerChunkMap");
 | 
			
		||||
                        if (PaperLib.isPaper() && version == 16) {
 | 
			
		||||
                            this.updatingChunks = classPlayerChunkMap.getField("updatingChunks");
 | 
			
		||||
                            this.methodGetVisibleMap = getRefClass("com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object").getMethod(
 | 
			
		||||
                                    "getVisibleMap");
 | 
			
		||||
                        } else {
 | 
			
		||||
                            this.visibleChunks = classPlayerChunkMap.getField("visibleChunks");
 | 
			
		||||
                        }
 | 
			
		||||
                        this.methodGetFullChunk = getRefClass("{nms}.PlayerChunk").getMethod("getFullChunk");
 | 
			
		||||
                        this.methodGetBukkitChunk = getRefClass("{nms}.Chunk").getMethod("getBukkitChunk");
 | 
			
		||||
                        */
 | 
			
		||||
                    }
 | 
			
		||||
                } else if (version == 17) {
 | 
			
		||||
                } else {
 | 
			
		||||
                    RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.Chunk");
 | 
			
		||||
                    this.mustSave = classChunk.getField("mustNotSave");
 | 
			
		||||
                    /*
 | 
			
		||||
                    this.worldServer = classCraftWorld.getField("world");
 | 
			
		||||
                    this.methodGetChunkProvider = getRefClass("net.minecraft.server.level.WorldServer").getMethod(
 | 
			
		||||
                            "getChunkProvider");
 | 
			
		||||
                    this.playerChunkMap = getRefClass("net.minecraft.server.level.ChunkProviderServer").getField("a");
 | 
			
		||||
                    RefClass classPlayerChunkMap = getRefClass("net.minecraft.server.level.PlayerChunkMap");
 | 
			
		||||
                    if (PaperLib.isPaper()) {
 | 
			
		||||
                        this.updatingChunks = classPlayerChunkMap.getField("updatingChunks");
 | 
			
		||||
                        this.methodGetVisibleMap = getRefClass("com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object").getMethod(
 | 
			
		||||
                                "getVisibleMap");
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.visibleChunks = classPlayerChunkMap.getField("l");
 | 
			
		||||
                    }
 | 
			
		||||
                    this.methodGetFullChunk = getRefClass("net.minecraft.server.level.PlayerChunk").getMethod("getFullChunk");
 | 
			
		||||
                    this.methodGetBukkitChunk = getRefClass("net.minecraft.world.level.chunk.Chunk").getMethod("getBukkitChunk");
 | 
			
		||||
                     */
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            } catch (NoSuchFieldException e) {
 | 
			
		||||
                e.printStackTrace();
 | 
			
		||||
@@ -182,32 +152,7 @@ public class ChunkListener implements Listener {
 | 
			
		||||
                            }
 | 
			
		||||
                            toUnload.add(chunk);
 | 
			
		||||
                        }
 | 
			
		||||
                    }/* else {
 | 
			
		||||
                        Object worldServer = this.worldServer.of(craftWorld).get();
 | 
			
		||||
                        Object chunkProviderServer = methodGetChunkProvider.of(worldServer).call();
 | 
			
		||||
                        Object playerChunkMap = this.playerChunkMap.of(chunkProviderServer).get();
 | 
			
		||||
                        Long2ObjectLinkedOpenHashMap<?> chunks;
 | 
			
		||||
                        if (PaperLib.isPaper() && version > 15) {
 | 
			
		||||
                            Object updatingChunks = this.updatingChunks.of(playerChunkMap).get();
 | 
			
		||||
                            chunks = (Long2ObjectLinkedOpenHashMap<?>) this.methodGetVisibleMap.of(updatingChunks).call();
 | 
			
		||||
                        } else {
 | 
			
		||||
                            chunks = (Long2ObjectLinkedOpenHashMap<?>) this.visibleChunks.of(playerChunkMap).get();
 | 
			
		||||
                        }
 | 
			
		||||
                        for (Object playerChunk : chunks.values()) {
 | 
			
		||||
                            Object nmsChunk = this.methodGetFullChunk.of(playerChunk).call();
 | 
			
		||||
                            if (nmsChunk == null) {
 | 
			
		||||
                                continue;
 | 
			
		||||
                            }
 | 
			
		||||
                            Chunk chunk = (Chunk) this.methodGetBukkitChunk.of(nmsChunk).call();
 | 
			
		||||
                            int x = chunk.getX();
 | 
			
		||||
                            int z = chunk.getZ();
 | 
			
		||||
                            if (!shouldSave(worldName, x, z)) {
 | 
			
		||||
                                unloadChunk(worldName, chunk, false);
 | 
			
		||||
                                continue;
 | 
			
		||||
                            }
 | 
			
		||||
                            toUnload.add(chunk);
 | 
			
		||||
                        }
 | 
			
		||||
                    }*/
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (toUnload.isEmpty()) {
 | 
			
		||||
                    return;
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -48,6 +48,7 @@ import com.plotsquared.core.util.Permissions;
 | 
			
		||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
 | 
			
		||||
import com.sk89q.worldedit.world.block.BlockType;
 | 
			
		||||
import org.bukkit.Material;
 | 
			
		||||
import org.bukkit.Particle;
 | 
			
		||||
import org.bukkit.World;
 | 
			
		||||
import org.bukkit.block.Block;
 | 
			
		||||
import org.bukkit.entity.Ageable;
 | 
			
		||||
@@ -323,6 +324,10 @@ public class EntityEventListener implements Listener {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        event.setCancelled(true);
 | 
			
		||||
        //Spawn Explosion Particles when enabled in settings
 | 
			
		||||
        if (Settings.General.ALWAYS_SHOW_EXPLOSIONS) {
 | 
			
		||||
            event.getLocation().getWorld().spawnParticle(Particle.EXPLOSION_HUGE, event.getLocation(), 0);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -36,7 +36,6 @@ import com.plotsquared.core.plot.world.PlotAreaManager;
 | 
			
		||||
import net.kyori.adventure.text.minimessage.Template;
 | 
			
		||||
import org.bukkit.block.Banner;
 | 
			
		||||
import org.bukkit.block.Beacon;
 | 
			
		||||
import org.bukkit.block.Bed;
 | 
			
		||||
import org.bukkit.block.BlockState;
 | 
			
		||||
import org.bukkit.block.CommandBlock;
 | 
			
		||||
import org.bukkit.block.Comparator;
 | 
			
		||||
@@ -51,6 +50,7 @@ import org.bukkit.block.Jukebox;
 | 
			
		||||
import org.bukkit.block.Sign;
 | 
			
		||||
import org.bukkit.block.Skull;
 | 
			
		||||
import org.bukkit.block.Structure;
 | 
			
		||||
import org.bukkit.block.data.type.Bed;
 | 
			
		||||
import org.bukkit.event.EventHandler;
 | 
			
		||||
import org.bukkit.event.block.BlockPlaceEvent;
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.NonNull;
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -68,11 +68,9 @@ import com.plotsquared.core.plot.flag.implementations.PlayerInteractFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.implementations.PreventCreativeCopyFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.implementations.TamedInteractFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.implementations.UseFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.implementations.VehicleBreakFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.implementations.VehicleUseFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.implementations.VillagerInteractFlag;
 | 
			
		||||
import com.plotsquared.core.plot.flag.types.BlockTypeWrapper;
 | 
			
		||||
import com.plotsquared.core.plot.world.PlotAreaManager;
 | 
			
		||||
import com.plotsquared.core.util.EventDispatcher;
 | 
			
		||||
import com.plotsquared.core.util.MathMan;
 | 
			
		||||
@@ -94,6 +92,7 @@ import org.bukkit.FluidCollisionMode;
 | 
			
		||||
import org.bukkit.Material;
 | 
			
		||||
import org.bukkit.block.Block;
 | 
			
		||||
import org.bukkit.block.BlockFace;
 | 
			
		||||
import org.bukkit.block.BlockState;
 | 
			
		||||
import org.bukkit.block.data.Waterlogged;
 | 
			
		||||
import org.bukkit.command.PluginCommand;
 | 
			
		||||
import org.bukkit.entity.ArmorStand;
 | 
			
		||||
@@ -224,6 +223,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("StringSplitter")
 | 
			
		||||
    @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
 | 
			
		||||
    public void playerCommand(PlayerCommandPreprocessEvent event) {
 | 
			
		||||
        String msg = event.getMessage().toLowerCase().replaceAll("/", "").trim();
 | 
			
		||||
@@ -379,6 +379,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
        this.eventDispatcher.doRespawnTask(pp);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // We explicitly want #getHomeSynchronous here
 | 
			
		||||
    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 | 
			
		||||
    public void onTeleport(PlayerTeleportEvent event) {
 | 
			
		||||
        Player player = event.getPlayer();
 | 
			
		||||
@@ -571,7 +572,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
                    player.teleport(event.getTo());
 | 
			
		||||
                    this.tmpTeleport = true;
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.denied"));
 | 
			
		||||
                } else {
 | 
			
		||||
                } else if (MathMan.roundInt(from.getX()) <= border) { // Only send if they just moved out of the border
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
 | 
			
		||||
                }
 | 
			
		||||
            } else if (x2 < -border && this.tmpTeleport) {
 | 
			
		||||
@@ -581,7 +582,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
                    player.teleport(event.getTo());
 | 
			
		||||
                    this.tmpTeleport = true;
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.denied"));
 | 
			
		||||
                } else {
 | 
			
		||||
                } else if (MathMan.roundInt(from.getX()) >= -border) { // Only send if they just moved out of the border
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
 | 
			
		||||
                }
 | 
			
		||||
            } else if (((x1 = MathMan.roundInt(from.getX())) >= border && x2 <= border) || (x1 <= -border && x2 >= -border)) {
 | 
			
		||||
@@ -662,7 +663,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
                    player.teleport(event.getTo());
 | 
			
		||||
                    this.tmpTeleport = true;
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.denied"));
 | 
			
		||||
                } else {
 | 
			
		||||
                } else if (MathMan.roundInt(from.getZ()) <= border) { // Only send if they just moved out of the border
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
 | 
			
		||||
                }
 | 
			
		||||
            } else if (z2 < -border && this.tmpTeleport) {
 | 
			
		||||
@@ -672,7 +673,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
                    player.teleport(event.getTo());
 | 
			
		||||
                    this.tmpTeleport = true;
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.denied"));
 | 
			
		||||
                } else {
 | 
			
		||||
                } else if (MathMan.roundInt(from.getZ()) >= -border) { // Only send if they just moved out of the border
 | 
			
		||||
                    pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
 | 
			
		||||
                }
 | 
			
		||||
            } else if (((z1 = MathMan.roundInt(from.getZ())) >= border && z2 <= border) || (z1 <= -border && z2 >= -border)) {
 | 
			
		||||
@@ -1063,9 +1064,13 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
        if (area == null) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        PlayerBlockEventType eventType = null;
 | 
			
		||||
        PlayerBlockEventType eventType;
 | 
			
		||||
        BlockType blocktype1;
 | 
			
		||||
        Block block = event.getClickedBlock();
 | 
			
		||||
        if (block == null) {
 | 
			
		||||
            // We do not care in this case, the player is likely interacting with air ("nothing").
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        Location location = BukkitUtil.adapt(block.getLocation());
 | 
			
		||||
        Action action = event.getAction();
 | 
			
		||||
        switch (action) {
 | 
			
		||||
@@ -1667,6 +1672,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // #getLocate is needed for Spigot compatibility
 | 
			
		||||
    @EventHandler
 | 
			
		||||
    public void onLocaleChange(final PlayerLocaleChangeEvent event) {
 | 
			
		||||
        // The event is fired before the player is deemed online upon login
 | 
			
		||||
@@ -1702,22 +1708,49 @@ public class PlayerEventListener extends PlotListener implements Listener {
 | 
			
		||||
 | 
			
		||||
    @EventHandler
 | 
			
		||||
    public void onPortalCreation(PortalCreateEvent event) {
 | 
			
		||||
        Location location = BukkitUtil.adapt(event.getEntity().getLocation());
 | 
			
		||||
        PlotArea area = location.getPlotArea();
 | 
			
		||||
        if (area == null) {
 | 
			
		||||
        String world = event.getWorld().getName();
 | 
			
		||||
        if (PlotSquared.get().getPlotAreaManager().getPlotAreasSet(world).size() == 0) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        Plot plot = location.getOwnedPlot();
 | 
			
		||||
        if (plot == null) {
 | 
			
		||||
            if (area.isRoadFlags() && area.getRoadFlag(DenyPortalsFlag.class)) {
 | 
			
		||||
                event.setCancelled(true);
 | 
			
		||||
        int minX = Integer.MAX_VALUE;
 | 
			
		||||
        int maxX = Integer.MIN_VALUE;
 | 
			
		||||
        int minZ = Integer.MAX_VALUE;
 | 
			
		||||
        int maxZ = Integer.MIN_VALUE;
 | 
			
		||||
        for (BlockState state : event.getBlocks()) {
 | 
			
		||||
            minX = Math.min(state.getX(), minX);
 | 
			
		||||
            maxX = Math.max(state.getX(), maxX);
 | 
			
		||||
            minZ = Math.min(state.getZ(), minZ);
 | 
			
		||||
            maxZ = Math.max(state.getZ(), maxZ);
 | 
			
		||||
        }
 | 
			
		||||
        int y = event.getBlocks().get(0).getY(); // Don't need to worry about this too much
 | 
			
		||||
        for (Location location : Set.of( // Use Set to lazily avoid duplicate locations
 | 
			
		||||
                Location.at(world, minX, y, maxX),
 | 
			
		||||
                Location.at(world, minZ, y, maxZ),
 | 
			
		||||
                Location.at(world, minX, y, maxZ),
 | 
			
		||||
                Location.at(world, minZ, y, maxX)
 | 
			
		||||
        )) {
 | 
			
		||||
            PlotArea area = location.getPlotArea();
 | 
			
		||||
            if (area == null) {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            Plot plot = location.getOwnedPlot();
 | 
			
		||||
            if (plot == null) {
 | 
			
		||||
                if (area.isRoadFlags() && area.getRoadFlag(DenyPortalsFlag.class)) {
 | 
			
		||||
                    event.setCancelled(true);
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        if (plot.getFlag(DenyPortalsFlag.class)) {
 | 
			
		||||
            if (plot.getFlag(DenyPortalsFlag.class)) {
 | 
			
		||||
                plot.debug(event.getEntity().getName() + " did not create a portal because of deny-portals = true");
 | 
			
		||||
                StringBuilder builder = new StringBuilder();
 | 
			
		||||
                if (event.getEntity() != null) {
 | 
			
		||||
                    builder.append(event.getEntity().getName()).append(" did not create a portal");
 | 
			
		||||
                } else {
 | 
			
		||||
                    builder.append("Portal creation cancelled");
 | 
			
		||||
                }
 | 
			
		||||
                plot.debug(builder.append(" because of deny-portals = true").toString());
 | 
			
		||||
                event.setCancelled(true);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -43,7 +43,6 @@ import java.lang.reflect.Method;
 | 
			
		||||
 | 
			
		||||
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
 | 
			
		||||
 | 
			
		||||
@SuppressWarnings("unused")
 | 
			
		||||
public class SingleWorldListener implements Listener {
 | 
			
		||||
 | 
			
		||||
    private final Method methodGetHandleChunk;
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -25,6 +25,7 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.plotsquared.bukkit.managers;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
import com.google.inject.Singleton;
 | 
			
		||||
import org.bukkit.World;
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.NonNull;
 | 
			
		||||
@@ -35,10 +36,9 @@ import se.hyperver.hyperverse.world.WorldConfigurationBuilder;
 | 
			
		||||
import se.hyperver.hyperverse.world.WorldFeatures;
 | 
			
		||||
import se.hyperver.hyperverse.world.WorldType;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Hyperverse specific manager that creates worlds
 | 
			
		||||
 * using Hyperverse's API
 | 
			
		||||
 */
 | 
			
		||||
Hyperverse implementation is currently put on ice until Hyperverse is released on a stable line and deployed to the central
 | 
			
		||||
repository.
 | 
			
		||||
 | 
			
		||||
@Singleton
 | 
			
		||||
public class HyperverseWorldManager extends BukkitWorldManager {
 | 
			
		||||
 | 
			
		||||
@@ -67,3 +67,4 @@ public class HyperverseWorldManager extends BukkitWorldManager {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -162,6 +162,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("StringSplitter")
 | 
			
		||||
    @Override
 | 
			
		||||
    @NonNegative
 | 
			
		||||
    public int hasPermissionRange(
 | 
			
		||||
@@ -319,7 +320,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
 | 
			
		||||
        if (id == ItemTypes.AIR) {
 | 
			
		||||
            // Let's just stop all the discs because why not?
 | 
			
		||||
            for (final Sound sound : Arrays.stream(Sound.values())
 | 
			
		||||
                    .filter(sound -> sound.name().contains("DISC")).collect(Collectors.toList())) {
 | 
			
		||||
                    .filter(sound -> sound.name().contains("DISC")).toList()) {
 | 
			
		||||
                player.stopSound(sound);
 | 
			
		||||
            }
 | 
			
		||||
            // this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, Material.AIR);
 | 
			
		||||
@@ -331,6 +332,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // Needed for Spigot compatibility
 | 
			
		||||
    @Override
 | 
			
		||||
    public void kick(final String message) {
 | 
			
		||||
        this.player.kickPlayer(message);
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -199,7 +199,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (localChunk.getTiles().size() > 0) {
 | 
			
		||||
                    localChunk.getTiles().forEach(((blockVector3, tag) -> {
 | 
			
		||||
                    localChunk.getTiles().forEach((blockVector3, tag) -> {
 | 
			
		||||
                        try {
 | 
			
		||||
                            BaseBlock block = getWorld().getBlock(blockVector3).toBaseBlock(tag);
 | 
			
		||||
                            getWorld().setBlock(blockVector3, block, noSideEffectSet);
 | 
			
		||||
@@ -207,7 +207,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
 | 
			
		||||
                            StateWrapper sw = new StateWrapper(tag);
 | 
			
		||||
                            sw.restoreTag(getWorld().getName(), blockVector3.getX(), blockVector3.getY(), blockVector3.getZ());
 | 
			
		||||
                        }
 | 
			
		||||
                    }));
 | 
			
		||||
                    });
 | 
			
		||||
                }
 | 
			
		||||
                if (localChunk.getEntities().size() > 0) {
 | 
			
		||||
                    localChunk.getEntities().forEach((location, entity) -> getWorld().createEntity(location, entity));
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -166,6 +166,7 @@ public class StateWrapper {
 | 
			
		||||
        return str;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // #setLine is needed for Spigot compatibility
 | 
			
		||||
    public boolean restoreTag(String worldName, int x, int y, int z) {
 | 
			
		||||
        if (this.tag == null) {
 | 
			
		||||
            return false;
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -77,6 +77,7 @@ public class BukkitInventoryUtil extends InventoryUtil {
 | 
			
		||||
        return stack;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // Paper deprecation
 | 
			
		||||
    @Override
 | 
			
		||||
    public void open(PlotInventory inv) {
 | 
			
		||||
        BukkitPlayer bp = (BukkitPlayer) inv.getPlayer();
 | 
			
		||||
@@ -113,6 +114,7 @@ public class BukkitInventoryUtil extends InventoryUtil {
 | 
			
		||||
        bp.player.updateInventory();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // Paper deprecation
 | 
			
		||||
    public PlotItemStack getItem(ItemStack item) {
 | 
			
		||||
        if (item == null) {
 | 
			
		||||
            return null;
 | 
			
		||||
@@ -145,6 +147,7 @@ public class BukkitInventoryUtil extends InventoryUtil {
 | 
			
		||||
                .toArray(PlotItemStack[]::new);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") // #getTitle is needed for Spigot compatibility
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean isOpen(PlotInventory plotInventory) {
 | 
			
		||||
        if (!plotInventory.isOpen()) {
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -61,6 +61,7 @@ public class UpdateUtility implements Listener {
 | 
			
		||||
        internalVersion = PlotSquared.get().getVersion();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings({"deprecation", "DefaultCharset"}) // Suppress Json deprecation, we can't use features from gson 2.8.1 and newer yet
 | 
			
		||||
    public void updateChecker() {
 | 
			
		||||
        task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
 | 
			
		||||
            try {
 | 
			
		||||
@@ -68,7 +69,7 @@ public class UpdateUtility implements Listener {
 | 
			
		||||
                        "https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=77506")
 | 
			
		||||
                        .openConnection();
 | 
			
		||||
                connection.setRequestMethod("GET");
 | 
			
		||||
                JsonObject result = (new JsonParser())
 | 
			
		||||
                JsonObject result = new JsonParser()
 | 
			
		||||
                        .parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
 | 
			
		||||
                        .getAsJsonObject();
 | 
			
		||||
                spigotVersion = result.get("current_version").getAsString();
 | 
			
		||||
@@ -91,7 +92,7 @@ public class UpdateUtility implements Listener {
 | 
			
		||||
                notify = false;
 | 
			
		||||
                LOGGER.info("Congratulations! You are running the latest PlotSquared version");
 | 
			
		||||
            }
 | 
			
		||||
        }, 0L, Settings.UpdateChecker.POLL_RATE * 60 * 20);
 | 
			
		||||
        }, 0L, (long) Settings.UpdateChecker.POLL_RATE * 60 * 20);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void cancelTask() {
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -75,6 +75,7 @@ public class FaweSchematicHandler extends SchematicHandler {
 | 
			
		||||
        return delegate.save(tag, path);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("removal") // Just the override
 | 
			
		||||
    @Override
 | 
			
		||||
    public void upload(final CompoundTag tag, final UUID uuid, final String file, final RunnableVal<URL> whenDone) {
 | 
			
		||||
        delegate.upload(tag, uuid, file, whenDone);
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ dependencies {
 | 
			
		||||
    api(libs.guiceassistedinject) {
 | 
			
		||||
        exclude("com.google.inject", "guice")
 | 
			
		||||
    }
 | 
			
		||||
    compileOnlyApi(libs.findbugs)
 | 
			
		||||
    api(libs.findbugs)
 | 
			
		||||
 | 
			
		||||
    // Plugins
 | 
			
		||||
    compileOnly(libs.worldeditCore) {
 | 
			
		||||
@@ -40,9 +40,7 @@ dependencies {
 | 
			
		||||
    // Other libraries
 | 
			
		||||
    api(libs.prtree)
 | 
			
		||||
    api(libs.aopalliance)
 | 
			
		||||
    api(libs.rorledning) {
 | 
			
		||||
        exclude(group = "com.google.guava")
 | 
			
		||||
    }
 | 
			
		||||
    api(libs.cloudServices)
 | 
			
		||||
    api(libs.arkitektonika)
 | 
			
		||||
    api(libs.paster)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -25,10 +25,10 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.plotsquared.core;
 | 
			
		||||
 | 
			
		||||
import cloud.commandframework.services.ServicePipeline;
 | 
			
		||||
import com.google.inject.Injector;
 | 
			
		||||
import com.google.inject.Key;
 | 
			
		||||
import com.google.inject.TypeLiteral;
 | 
			
		||||
import com.intellectualsites.services.ServicePipeline;
 | 
			
		||||
import com.plotsquared.core.backup.BackupManager;
 | 
			
		||||
import com.plotsquared.core.configuration.caption.LocaleHolder;
 | 
			
		||||
import com.plotsquared.core.generator.GeneratorWrapper;
 | 
			
		||||
@@ -40,6 +40,7 @@ import com.plotsquared.core.permissions.PermissionHandler;
 | 
			
		||||
import com.plotsquared.core.player.PlotPlayer;
 | 
			
		||||
import com.plotsquared.core.plot.world.PlotAreaManager;
 | 
			
		||||
import com.plotsquared.core.queue.GlobalBlockQueue;
 | 
			
		||||
import com.plotsquared.core.util.AnnotationHelper;
 | 
			
		||||
import com.plotsquared.core.util.ChunkManager;
 | 
			
		||||
import com.plotsquared.core.util.EconHandler;
 | 
			
		||||
import com.plotsquared.core.util.PlatformWorldManager;
 | 
			
		||||
@@ -291,6 +292,15 @@ public interface PlotPlatform<P> extends LocaleHolder {
 | 
			
		||||
     */
 | 
			
		||||
    @NonNull String pluginsFormatted();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the kind of WorldEdit implementation
 | 
			
		||||
     *
 | 
			
		||||
     * @return worldedit implementations
 | 
			
		||||
     * @since 6.3.0
 | 
			
		||||
     */
 | 
			
		||||
    @AnnotationHelper.ApiDescription(info = "Internal use only")
 | 
			
		||||
    @NonNull String worldEditImplementations();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Load the caption maps
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -106,7 +106,7 @@ public class Add extends Command {
 | 
			
		||||
                                        .hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) {
 | 
			
		||||
                            player.sendMessage(
 | 
			
		||||
                                    TranslatableCaption.of("errors.invalid_player"),
 | 
			
		||||
                                    Template.of("value", PlayerManager.getName(uuid))
 | 
			
		||||
                                    Template.of("value", PlayerManager.resolveName(uuid).getComponent(player))
 | 
			
		||||
                            );
 | 
			
		||||
                            iterator.remove();
 | 
			
		||||
                            continue;
 | 
			
		||||
@@ -114,7 +114,7 @@ public class Add extends Command {
 | 
			
		||||
                        if (plot.isOwner(uuid)) {
 | 
			
		||||
                            player.sendMessage(
 | 
			
		||||
                                    TranslatableCaption.of("member.already_added"),
 | 
			
		||||
                                    Template.of("player", PlayerManager.getName(uuid))
 | 
			
		||||
                                    Template.of("player", PlayerManager.resolveName(uuid).getComponent(player))
 | 
			
		||||
                            );
 | 
			
		||||
                            iterator.remove();
 | 
			
		||||
                            continue;
 | 
			
		||||
@@ -122,7 +122,7 @@ public class Add extends Command {
 | 
			
		||||
                        if (plot.getMembers().contains(uuid)) {
 | 
			
		||||
                            player.sendMessage(
 | 
			
		||||
                                    TranslatableCaption.of("member.already_added"),
 | 
			
		||||
                                    Template.of("player", PlayerManager.getName(uuid))
 | 
			
		||||
                                    Template.of("player", PlayerManager.resolveName(uuid).getComponent(player))
 | 
			
		||||
                            );
 | 
			
		||||
                            iterator.remove();
 | 
			
		||||
                            continue;
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
@@ -25,9 +25,8 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.plotsquared.core.command;
 | 
			
		||||
 | 
			
		||||
import com.google.common.reflect.TypeToken;
 | 
			
		||||
import cloud.commandframework.services.ServicePipeline;
 | 
			
		||||
import com.google.inject.Inject;
 | 
			
		||||
import com.intellectualsites.services.ServicePipeline;
 | 
			
		||||
import com.plotsquared.core.PlotSquared;
 | 
			
		||||
import com.plotsquared.core.configuration.Settings;
 | 
			
		||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
 | 
			
		||||
@@ -51,6 +50,7 @@ import com.plotsquared.core.util.PlotExpression;
 | 
			
		||||
import com.plotsquared.core.util.task.AutoClaimFinishTask;
 | 
			
		||||
import com.plotsquared.core.util.task.RunnableVal;
 | 
			
		||||
import com.plotsquared.core.util.task.TaskManager;
 | 
			
		||||
import io.leangen.geantyref.TypeToken;
 | 
			
		||||
import net.kyori.adventure.text.minimessage.Template;
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.NonNull;
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		||||
@@ -84,7 +84,7 @@ public class Auto extends SubCommand {
 | 
			
		||||
        this.eventDispatcher = eventDispatcher;
 | 
			
		||||
        this.econHandler = econHandler;
 | 
			
		||||
        this.servicePipeline = servicePipeline;
 | 
			
		||||
        this.servicePipeline.registerServiceType(TypeToken.of(AutoService.class), new AutoService.DefaultAutoService());
 | 
			
		||||
        this.servicePipeline.registerServiceType(TypeToken.get(AutoService.class), new AutoService.DefaultAutoService());
 | 
			
		||||
        final AutoService.MultiPlotService multiPlotService = new AutoService.MultiPlotService();
 | 
			
		||||
        this.servicePipeline.registerServiceImplementation(AutoService.class, multiPlotService,
 | 
			
		||||
                Collections.singletonList(multiPlotService)
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 *                                    | |
 | 
			
		||||
 *                                    |_|
 | 
			
		||||
 *            PlotSquared plot management system for Minecraft
 | 
			
		||||
 *                  Copyright (C) 2021 IntellectualSites
 | 
			
		||||
 *               Copyright (C) 2014 - 2022 IntellectualSites
 | 
			
		||||
 *
 | 
			
		||||
 *     This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 *     it under the terms of the GNU General Public License as published by
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user