mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-25 07:33:44 +02:00 
			
		
		
		
	Compare commits
	
		
			46 Commits
		
	
	
		
			feature/v6
			...
			refactor/v
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 512ccd4bbf | ||
|   | c0bfa297bb | ||
|   | 75fd9b2631 | ||
|   | 6b680fb2c0 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | dda52ebc2e | ||
|   | 9ac8d38bab | ||
|   | 6a54328f7d | ||
|   | 7279862def | ||
|   | 08ce4c872c | ||
|   | 27ffe4fcdc | ||
|   | 8afcaccb8a | ||
|   | c83b13e374 | ||
|   | 2b0c5b1e21 | ||
|   | 3d5c694daa | ||
|   | 23360057b9 | ||
|   | d153232969 | ||
|   | bb0aa8d5cc | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | d69f3b0893 | ||
|   | 565838ad43 | ||
|   | 8b52461271 | ||
|   | d08381dfed | ||
|   | b6c45f2df3 | ||
|   | b9479405e1 | ||
|   | a238ff19bf | ||
|   | c93b08d0c7 | ||
|   | 1470b7117a | ||
|   | 7cbc67f4fc | ||
|   | 0a76bbb2b0 | ||
|   | 09cc59a1c1 | ||
|   | 60f7113105 | ||
|   | 26c0c1b7cd | ||
|   | bf646be482 | ||
|   | cc7e17960b | ||
|   | 3c75b170f0 | ||
|   | 764c94c9cc | ||
|   | 3d87ee41b3 | ||
|   | fd8832ac98 | ||
|   | 228acc196c | ||
|   | 62197f3deb | ||
|   | daa9348993 | ||
|   | 7e4499e092 | ||
|   | 396a1575d2 | ||
|   | 953d57d1b5 | ||
|   | b53d2d03a4 | ||
|   | c1431c0971 | ||
|   | 62ee60a76c | 
							
								
								
									
										4
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							| @@ -27,14 +27,12 @@ body: | ||||
|       description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first. | ||||
|       multiple: false | ||||
|       options: | ||||
|         - '1.19' | ||||
|         - '1.18.2' | ||||
|         - '1.18.1' | ||||
|         - '1.18' | ||||
|         - '1.17.1' | ||||
|         - '1.16.5' | ||||
|         - '1.15.2' | ||||
|         - '1.14.4' | ||||
|         - '1.13.2' | ||||
|     validations: | ||||
|       required: true | ||||
|  | ||||
|   | ||||
							
								
								
									
										24
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							| @@ -40,3 +40,27 @@ jobs: | ||||
|         env: | ||||
|           ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | ||||
|           ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | ||||
|       - name: Publish core javadoc | ||||
|         if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}} | ||||
|         uses: cpina/github-action-push-to-another-repository@main | ||||
|         env: | ||||
|           SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | ||||
|         with: | ||||
|           source-directory: 'Core/build/docs/javadoc' | ||||
|           destination-github-username: 'IntellectualSites' | ||||
|           destination-repository-name: 'plotsquared-javadocs' | ||||
|           user-email: ${{ secrets.USER_EMAIL }} | ||||
|           target-branch: main | ||||
|           target-directory: core | ||||
|       - name: Publish bukkit javadoc | ||||
|         if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}} | ||||
|         uses: cpina/github-action-push-to-another-repository@main | ||||
|         env: | ||||
|           SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | ||||
|         with: | ||||
|           source-directory: 'Bukkit/build/docs/javadoc' | ||||
|           destination-github-username: 'IntellectualSites' | ||||
|           destination-repository-name: 'plotsquared-javadocs' | ||||
|           user-email: ${{ secrets.USER_EMAIL }} | ||||
|           target-branch: main | ||||
|           target-directory: bukkit | ||||
|   | ||||
| @@ -18,7 +18,7 @@ repositories { | ||||
| } | ||||
|  | ||||
| dependencies { | ||||
|     api(projects.plotSquaredCore) | ||||
|     api(projects.plotsquaredCore) | ||||
|  | ||||
|     // Metrics | ||||
|     implementation("org.bstats:bstats-bukkit") | ||||
| @@ -99,8 +99,8 @@ tasks { | ||||
|         val opt = options as StandardJavadocDocletOptions | ||||
|         opt.links("https://jd.papermc.io/paper/1.18/") | ||||
|         opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString()) | ||||
|         opt.links("https://javadoc.io/doc/com.plotsquared/PlotSquared-Core/latest/") | ||||
|         opt.links("https://jd.adventure.kyori.net/api/" + libs.adventure.get().versionConstraint.toString()) | ||||
|         opt.links("https://intellectualsites.github.io/plotsquared-javadocs/core/") | ||||
|         opt.links("https://jd.adventure.kyori.net/api/4.9.3/") | ||||
|         opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/") | ||||
|         opt.links("https://checkerframework.org/api/") | ||||
|     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit; | ||||
|  | ||||
| @@ -270,7 +263,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | ||||
|  | ||||
|         final PlotSquared plotSquared = new PlotSquared(this, "Bukkit"); | ||||
|  | ||||
|         // FAWE | ||||
|         // FastAsyncWorldEdit | ||||
|         if (Settings.FAWE_Components.FAWE_HOOK) { | ||||
|             Plugin fawe = getServer().getPluginManager().getPlugin("FastAsyncWorldEdit"); | ||||
|             if (fawe != null) { | ||||
| @@ -278,7 +271,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | ||||
|                     Class.forName("com.fastasyncworldedit.bukkit.regions.plotsquared.FaweQueueCoordinator"); | ||||
|                     faweHook = true; | ||||
|                 } catch (Exception ignored) { | ||||
|                     LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" + | ||||
|                     LOGGER.error("Incompatible version of FastAsyncWorldEdit to enable hook, please upgrade: https://ci.athion" + | ||||
|                             ".net/job/FastAsyncWorldEdit/"); | ||||
|                 } | ||||
|             } | ||||
| @@ -432,7 +425,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | ||||
|  | ||||
|         plotSquared.startExpiryTasks(); | ||||
|  | ||||
|         // Once the server has loaded force updating all generators known to P2 | ||||
|         // Once the server has loaded force updating all generators known to PlotSquared | ||||
|         TaskManager.runTaskLater(() -> PlotSquared.platform().setupUtils().updateGenerators(true), TaskTime.ticks(1L)); | ||||
|  | ||||
|         // Services are accessed in order | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.entity; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.generator; | ||||
|  | ||||
| @@ -33,7 +26,7 @@ import com.plotsquared.core.location.UncheckedWorldLocation; | ||||
| import com.plotsquared.core.plot.PlotArea; | ||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | ||||
| import com.plotsquared.core.plot.world.SinglePlotArea; | ||||
| import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | ||||
| import org.bukkit.generator.BlockPopulator; | ||||
| import org.bukkit.generator.LimitedRegion; | ||||
| import org.bukkit.generator.WorldInfo; | ||||
| @@ -46,7 +39,7 @@ final class BlockStatePopulator extends BlockPopulator { | ||||
|     private final IndependentPlotGenerator plotGenerator; | ||||
|  | ||||
|     /** | ||||
|      * @since TODO | ||||
|      * @since 6.9.0 | ||||
|      */ | ||||
|     public BlockStatePopulator( | ||||
|             final @NonNull IndependentPlotGenerator plotGenerator | ||||
| @@ -57,7 +50,7 @@ final class BlockStatePopulator extends BlockPopulator { | ||||
|     /** | ||||
|      * @deprecated Use {@link BlockStatePopulator#BlockStatePopulator(IndependentPlotGenerator)} as plotAreManager is unused | ||||
|      */ | ||||
|     @Deprecated(forRemoval = true, since = "TODO") | ||||
|     @Deprecated(forRemoval = true, since = "6.9.0") | ||||
|     public BlockStatePopulator( | ||||
|             final @NonNull IndependentPlotGenerator plotGenerator, | ||||
|             final @NonNull PlotAreaManager plotAreaManager | ||||
| @@ -87,7 +80,7 @@ final class BlockStatePopulator extends BlockPopulator { | ||||
|                 worldInfo.getMaxHeight(), | ||||
|                 (chunkZ << 4) + 15 | ||||
|         ); | ||||
|         ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(wrapped, min, max); | ||||
|         ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(wrapped, min, max); | ||||
|         this.plotGenerator.populateChunk(offsetChunkQueue, area); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.generator; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.generator; | ||||
|  | ||||
| @@ -29,20 +22,30 @@ import com.plotsquared.bukkit.queue.GenChunk; | ||||
| import com.plotsquared.bukkit.util.BukkitUtil; | ||||
| import com.plotsquared.bukkit.util.BukkitWorld; | ||||
| import com.plotsquared.core.PlotSquared; | ||||
| import com.plotsquared.core.generator.ClassicPlotWorld; | ||||
| import com.plotsquared.core.generator.GeneratorWrapper; | ||||
| import com.plotsquared.core.generator.IndependentPlotGenerator; | ||||
| import com.plotsquared.core.generator.SingleWorldGenerator; | ||||
| import com.plotsquared.core.location.ChunkWrapper; | ||||
| import com.plotsquared.core.location.UncheckedWorldLocation; | ||||
| import com.plotsquared.core.plot.PlotArea; | ||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | ||||
| import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | ||||
| import com.plotsquared.core.util.ChunkManager; | ||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||
| import com.sk89q.worldedit.math.BlockVector2; | ||||
| import org.apache.logging.log4j.LogManager; | ||||
| import org.apache.logging.log4j.Logger; | ||||
| import org.bukkit.HeightMap; | ||||
| import org.bukkit.World; | ||||
| import org.bukkit.block.Biome; | ||||
| import org.bukkit.generator.BiomeProvider; | ||||
| import org.bukkit.generator.BlockPopulator; | ||||
| import org.bukkit.generator.ChunkGenerator; | ||||
| import org.bukkit.generator.WorldInfo; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
| import org.jetbrains.annotations.NotNull; | ||||
| import org.jetbrains.annotations.Nullable; | ||||
|  | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| @@ -51,6 +54,8 @@ import java.util.Set; | ||||
|  | ||||
| public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> { | ||||
|  | ||||
|     private static final Logger LOGGER =  LogManager.getLogger("PlotSquared/" + BukkitPlotGenerator.class.getSimpleName()); | ||||
|  | ||||
|     @SuppressWarnings("unused") | ||||
|     public final boolean PAPER_ASYNC_SAFE = true; | ||||
|  | ||||
| @@ -59,9 +64,15 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | ||||
|     private final ChunkGenerator platformGenerator; | ||||
|     private final boolean full; | ||||
|     private final String levelName; | ||||
|     private final boolean useNewGenerationMethods; | ||||
|     private final BiomeProvider biomeProvider; | ||||
|     private List<BlockPopulator> populators; | ||||
|     private boolean loaded = false; | ||||
|  | ||||
|     private PlotArea lastPlotArea; | ||||
|     private int lastChunkX = Integer.MIN_VALUE; | ||||
|     private int lastChunkZ = Integer.MIN_VALUE; | ||||
|  | ||||
|     public BukkitPlotGenerator( | ||||
|             final @NonNull String name, | ||||
|             final @NonNull IndependentPlotGenerator generator, | ||||
| @@ -79,18 +90,23 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | ||||
|             this.populators.add(new LegacyBlockStatePopulator(this.plotGenerator)); | ||||
|         } | ||||
|         this.full = true; | ||||
|         this.useNewGenerationMethods = PlotSquared.platform().serverVersion()[1] >= 19; | ||||
|         this.biomeProvider = new BukkitPlotBiomeProvider(); | ||||
|     } | ||||
|  | ||||
|     public BukkitPlotGenerator(final String world, final ChunkGenerator cg, final @NonNull PlotAreaManager plotAreaManager) { | ||||
|         if (cg instanceof BukkitPlotGenerator) { | ||||
|             throw new IllegalArgumentException("ChunkGenerator: " + cg.getClass().getName() | ||||
|                     + " is already a BukkitPlotGenerator!"); | ||||
|             throw new IllegalArgumentException("ChunkGenerator: " + cg | ||||
|                     .getClass() | ||||
|                     .getName() + " is already a BukkitPlotGenerator!"); | ||||
|         } | ||||
|         this.plotAreaManager = plotAreaManager; | ||||
|         this.levelName = world; | ||||
|         this.full = false; | ||||
|         this.platformGenerator = cg; | ||||
|         this.plotGenerator = new DelegatePlotGenerator(cg, world); | ||||
|         this.useNewGenerationMethods = PlotSquared.platform().serverVersion()[1] >= 19; | ||||
|         this.biomeProvider = null; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
| @@ -116,32 +132,9 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | ||||
|     @Override | ||||
|     public @NonNull List<BlockPopulator> getDefaultPopulators(@NonNull World world) { | ||||
|         try { | ||||
|             if (!this.loaded) { | ||||
|                 String name = world.getName(); | ||||
|                 PlotSquared.get().loadWorld(name, this); | ||||
|                 final Set<PlotArea> areas = this.plotAreaManager.getPlotAreasSet(name); | ||||
|                 if (!areas.isEmpty()) { | ||||
|                     PlotArea area = areas.iterator().next(); | ||||
|                     if (!area.isMobSpawning()) { | ||||
|                         if (!area.isSpawnEggs()) { | ||||
|                             world.setSpawnFlags(false, false); | ||||
|                         } | ||||
|                         world.setAmbientSpawnLimit(0); | ||||
|                         world.setAnimalSpawnLimit(0); | ||||
|                         world.setMonsterSpawnLimit(0); | ||||
|                         world.setWaterAnimalSpawnLimit(0); | ||||
|                     } else { | ||||
|                         world.setSpawnFlags(true, true); | ||||
|                         world.setAmbientSpawnLimit(-1); | ||||
|                         world.setAnimalSpawnLimit(-1); | ||||
|                         world.setMonsterSpawnLimit(-1); | ||||
|                         world.setWaterAnimalSpawnLimit(-1); | ||||
|                     } | ||||
|                 } | ||||
|                 this.loaded = true; | ||||
|             } | ||||
|             checkLoaded(world); | ||||
|         } catch (Exception e) { | ||||
|             e.printStackTrace(); | ||||
|             LOGGER.error("Error attempting to load world into PlotSquared.", e); | ||||
|         } | ||||
|         ArrayList<BlockPopulator> toAdd = new ArrayList<>(); | ||||
|         List<BlockPopulator> existing = world.getPopulators(); | ||||
| @@ -158,11 +151,147 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | ||||
|         return toAdd; | ||||
|     } | ||||
|  | ||||
|     // Extracted to synchronized method for thread-safety, preventing multiple internal world load calls | ||||
|     private synchronized void checkLoaded(@NonNull World world) { | ||||
|         // Do not attempt to load configurations until WorldEdit has a platform ready. | ||||
|         if (!PlotSquared.get().isWeInitialised()) { | ||||
|             return; | ||||
|         } | ||||
|         if (!this.loaded) { | ||||
|             String name = world.getName(); | ||||
|             PlotSquared.get().loadWorld(name, this); | ||||
|             final Set<PlotArea> areas = this.plotAreaManager.getPlotAreasSet(name); | ||||
|             if (!areas.isEmpty()) { | ||||
|                 PlotArea area = areas.iterator().next(); | ||||
|                 if (!area.isMobSpawning()) { | ||||
|                     if (!area.isSpawnEggs()) { | ||||
|                         world.setSpawnFlags(false, false); | ||||
|                     } | ||||
|                     setSpawnLimits(world, 0); | ||||
|                 } else { | ||||
|                     world.setSpawnFlags(true, true); | ||||
|                     setSpawnLimits(world, -1); | ||||
|                 } | ||||
|             } | ||||
|             this.loaded = true; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @SuppressWarnings("deprecation") // Kept for compatibility with <=1.17.1 | ||||
|     private void setSpawnLimits(@NonNull World world, int limit) { | ||||
|         world.setAmbientSpawnLimit(limit); | ||||
|         world.setAnimalSpawnLimit(limit); | ||||
|         world.setMonsterSpawnLimit(limit); | ||||
|         world.setWaterAnimalSpawnLimit(limit); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public @NonNull ChunkData generateChunkData( | ||||
|             @NonNull World world, @NonNull Random random, int x, int z, | ||||
|             @NonNull BiomeGrid biome | ||||
|     public void generateNoise( | ||||
|             @NotNull final WorldInfo worldInfo, | ||||
|             @NotNull final Random random, | ||||
|             final int chunkX, | ||||
|             final int chunkZ, | ||||
|             @NotNull final ChunkData chunkData | ||||
|     ) { | ||||
|         if (this.platformGenerator != this) { | ||||
|             this.platformGenerator.generateNoise(worldInfo, random, chunkX, chunkZ, chunkData); | ||||
|             return; | ||||
|         } | ||||
|         int minY = chunkData.getMinHeight(); | ||||
|         int maxY = chunkData.getMaxHeight(); | ||||
|         GenChunk result = new GenChunk(minY, maxY); | ||||
|         // Set the chunk location | ||||
|         result.setChunk(new ChunkWrapper(worldInfo.getName(), chunkX, chunkZ)); | ||||
|         // Set the result data | ||||
|         result.setChunkData(chunkData); | ||||
|         result.result = null; | ||||
|  | ||||
|         // Catch any exceptions (as exceptions usually thrown) | ||||
|         try { | ||||
|             generate(BlockVector2.at(chunkX, chunkZ), worldInfo.getName(), result, false); | ||||
|         } catch (Throwable e) { | ||||
|             LOGGER.error("Error attempting to generate chunk.", e); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void generateSurface( | ||||
|             @NotNull final WorldInfo worldInfo, | ||||
|             @NotNull final Random random, | ||||
|             final int chunkX, | ||||
|             final int chunkZ, | ||||
|             @NotNull final ChunkData chunkData | ||||
|     ) { | ||||
|         if (platformGenerator != this) { | ||||
|             platformGenerator.generateSurface(worldInfo, random, chunkX, chunkZ, chunkData); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void generateBedrock( | ||||
|             @NotNull final WorldInfo worldInfo, | ||||
|             @NotNull final Random random, | ||||
|             final int chunkX, | ||||
|             final int chunkZ, | ||||
|             @NotNull final ChunkData chunkData | ||||
|     ) { | ||||
|         if (platformGenerator != this) { | ||||
|             platformGenerator.generateBedrock(worldInfo, random, chunkX, chunkZ, chunkData); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void generateCaves( | ||||
|             @NotNull final WorldInfo worldInfo, | ||||
|             @NotNull final Random random, | ||||
|             final int chunkX, | ||||
|             final int chunkZ, | ||||
|             @NotNull final ChunkData chunkData | ||||
|     ) { | ||||
|         if (platformGenerator != this) { | ||||
|             platformGenerator.generateCaves(worldInfo, random, chunkX, chunkZ, chunkData); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public @Nullable BiomeProvider getDefaultBiomeProvider(@NotNull final WorldInfo worldInfo) { | ||||
|         if (platformGenerator != this) { | ||||
|             return platformGenerator.getDefaultBiomeProvider(worldInfo); | ||||
|         } | ||||
|         return biomeProvider; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int getBaseHeight( | ||||
|             @NotNull final WorldInfo worldInfo, | ||||
|             @NotNull final Random random, | ||||
|             final int x, | ||||
|             final int z, | ||||
|             @NotNull final HeightMap heightMap | ||||
|     ) { | ||||
|         PlotArea area = getPlotArea(worldInfo.getName(), x, z); | ||||
|         if (area instanceof ClassicPlotWorld cpw) { | ||||
|             // Default to plot height being the heighest point before decoration (i.e. roads, walls etc.) | ||||
|             return cpw.PLOT_HEIGHT; | ||||
|         } | ||||
|         return super.getBaseHeight(worldInfo, random, x, z, heightMap); | ||||
|     } | ||||
|  | ||||
|     @SuppressWarnings("deprecation") // The entire method is deprecated, but kept for compatibility with <=1.16.2 | ||||
|     @Override | ||||
|     @Deprecated(since = "TODO") | ||||
|     public @NonNull ChunkData generateChunkData( | ||||
|             @NonNull World world, @NonNull Random random, int x, int z, @NonNull BiomeGrid biome | ||||
|     ) { | ||||
|         if (useNewGenerationMethods) { | ||||
|             if (this.platformGenerator != this) { | ||||
|                 return this.platformGenerator.generateChunkData(world, random, x, z, biome); | ||||
|             } else { | ||||
|                 // Return super as it will throw an exception caught by the server that will mean this method is no longer used. | ||||
|                 return super.generateChunkData(world, random, x, z, biome); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         int minY = BukkitWorld.getMinWorldHeight(world); | ||||
|         int maxY = BukkitWorld.getMaxWorldHeight(world); | ||||
|         GenChunk result = new GenChunk(minY, maxY); | ||||
| @@ -172,7 +301,6 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | ||||
|                     for (int chunkZ = 0; chunkZ < 16; chunkZ++) { | ||||
|                         for (int y = minY; y < maxY; y++) { | ||||
|                             biome.setBiome(chunkX, y, chunkZ, Biome.PLAINS); | ||||
|  | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
| @@ -192,37 +320,32 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | ||||
|             if (this.platformGenerator != this) { | ||||
|                 return this.platformGenerator.generateChunkData(world, random, x, z, biome); | ||||
|             } else { | ||||
|                 generate(BlockVector2.at(x, z), world, result); | ||||
|                 generate(BlockVector2.at(x, z), world.getName(), result, true); | ||||
|             } | ||||
|         } catch (Throwable e) { | ||||
|             e.printStackTrace(); | ||||
|             LOGGER.error("Error attempting to load world into PlotSquared.", e); | ||||
|         } | ||||
|         // Return the result data | ||||
|         return result.getChunkData(); | ||||
|     } | ||||
|  | ||||
|     private void generate(BlockVector2 loc, World world, ScopedQueueCoordinator result) { | ||||
|     private void generate(BlockVector2 loc, String world, ZeroedDelegateScopedQueueCoordinator result, boolean biomes) { | ||||
|         // Load if improperly loaded | ||||
|         if (!this.loaded) { | ||||
|             String name = world.getName(); | ||||
|             PlotSquared.get().loadWorld(name, this); | ||||
|             this.loaded = true; | ||||
|             synchronized (this) { | ||||
|                 PlotSquared.get().loadWorld(world, this); | ||||
|             } | ||||
|         } | ||||
|         // Process the chunk | ||||
|         if (ChunkManager.preProcessChunk(loc, result)) { | ||||
|             return; | ||||
|         } | ||||
|         PlotArea area = this.plotAreaManager.getPlotArea(world.getName(), null); | ||||
|         if (area == null && (area = this.plotAreaManager.getPlotArea(this.levelName, null)) == null) { | ||||
|             throw new IllegalStateException( | ||||
|                     "Cannot regenerate chunk that does not belong to a plot area." + " Location: " + loc | ||||
|                             + ", world: " + world); | ||||
|         } | ||||
|         PlotArea area = getPlotArea(world, loc.getX(), loc.getZ()); | ||||
|         try { | ||||
|             this.plotGenerator.generateChunk(result, area); | ||||
|             this.plotGenerator.generateChunk(result, area, biomes); | ||||
|         } catch (Throwable e) { | ||||
|             // Recover from generator error | ||||
|             e.printStackTrace(); | ||||
|             LOGGER.error("Error attempting to generate chunk.", e); | ||||
|         } | ||||
|         ChunkManager.postProcessChunk(loc, result); | ||||
|     } | ||||
| @@ -276,4 +399,51 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | ||||
|         return this.levelName; | ||||
|     } | ||||
|  | ||||
|     private synchronized PlotArea getPlotArea(String name, int chunkX, int chunkZ) { | ||||
|         // Load if improperly loaded | ||||
|         if (!this.loaded) { | ||||
|             PlotSquared.get().loadWorld(name, this); | ||||
|             // Do not set loaded to true as we want to ensure spawn limits are set when "loading" is actually able to be | ||||
|             // completed properly. | ||||
|         } | ||||
|         if (lastPlotArea != null && name.equals(this.levelName) && chunkX == lastChunkX && chunkZ == lastChunkZ) { | ||||
|             return lastPlotArea; | ||||
|         } | ||||
|         PlotArea area = UncheckedWorldLocation.at(name, chunkX << 4, 0, chunkZ << 4).getPlotArea(); | ||||
|         if (area == null) { | ||||
|             throw new IllegalStateException(String.format("Cannot generate chunk that does not belong to a plot area. World: %s", | ||||
|                     name | ||||
|             )); | ||||
|         } | ||||
|         this.lastChunkX = chunkX; | ||||
|         this.lastChunkZ = chunkZ; | ||||
|         return this.lastPlotArea = area; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Biome provider should never need to be accessed outside of this class. | ||||
|      */ | ||||
|     private final class BukkitPlotBiomeProvider extends BiomeProvider { | ||||
|  | ||||
|         private static final List<Biome> BIOMES; | ||||
|  | ||||
|         static { | ||||
|             ArrayList<Biome> biomes = new ArrayList<>(List.of(Biome.values())); | ||||
|             biomes.remove(Biome.CUSTOM); | ||||
|             BIOMES = List.copyOf(biomes); | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|         public @NotNull Biome getBiome(@NotNull final WorldInfo worldInfo, final int x, final int y, final int z) { | ||||
|             PlotArea area = getPlotArea(worldInfo.getName(), x >> 4, z >> 4); | ||||
|             return BukkitAdapter.adapt(plotGenerator.getBiome(area, x, y, z)); | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|         public @NotNull List<Biome> getBiomes(@NotNull final WorldInfo worldInfo) { | ||||
|             return BIOMES; // Allow all biomes | ||||
|         } | ||||
|  | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.generator; | ||||
|  | ||||
| @@ -31,9 +24,10 @@ import com.plotsquared.core.generator.IndependentPlotGenerator; | ||||
| import com.plotsquared.core.location.Location; | ||||
| import com.plotsquared.core.plot.PlotArea; | ||||
| import com.plotsquared.core.plot.PlotId; | ||||
| import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | ||||
| import com.plotsquared.core.util.MathMan; | ||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||
| import com.sk89q.worldedit.world.biome.BiomeType; | ||||
| import org.bukkit.World; | ||||
| import org.bukkit.block.Biome; | ||||
| import org.bukkit.generator.BlockPopulator; | ||||
| @@ -56,6 +50,11 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator { | ||||
|     public void initialize(PlotArea area) { | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public BiomeType getBiome(final PlotArea settings, final int x, final int y, final int z) { | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String getName() { | ||||
|         return this.chunkGenerator.getClass().getName(); | ||||
| @@ -67,7 +66,7 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator { | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void generateChunk(final ScopedQueueCoordinator result, PlotArea settings) { | ||||
|     public void generateChunk(final ZeroedDelegateScopedQueueCoordinator result, PlotArea settings, boolean biomes) { | ||||
|         World world = BukkitUtil.getWorld(this.world); | ||||
|         Location min = result.getMin(); | ||||
|         int chunkX = min.getX() >> 4; | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.generator; | ||||
|  | ||||
| @@ -33,7 +26,7 @@ import com.plotsquared.core.location.UncheckedWorldLocation; | ||||
| import com.plotsquared.core.plot.PlotArea; | ||||
| import com.plotsquared.core.plot.world.SinglePlotArea; | ||||
| import com.plotsquared.core.queue.QueueCoordinator; | ||||
| import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | ||||
| import com.sk89q.worldedit.bukkit.BukkitWorld; | ||||
| import com.sk89q.worldedit.util.SideEffectSet; | ||||
| import org.bukkit.Chunk; | ||||
| @@ -49,7 +42,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator { | ||||
|     private final IndependentPlotGenerator plotGenerator; | ||||
|  | ||||
|     /** | ||||
|      * @since TODO | ||||
|      * @since 6.9.0 | ||||
|      */ | ||||
|     public LegacyBlockStatePopulator( | ||||
|             final @NonNull IndependentPlotGenerator plotGenerator | ||||
| @@ -73,7 +66,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator { | ||||
|         queue.setChunkObject(source); | ||||
|         Location min = UncheckedWorldLocation.at(world.getName(), chunkMinX, world.getMinHeight(), chunkMinZ); | ||||
|         Location max = UncheckedWorldLocation.at(world.getName(), chunkMinX + 15, world.getMaxHeight(), chunkMinZ + 15); | ||||
|         ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(queue, min, max); | ||||
|         ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(queue, min, max); | ||||
|         this.plotGenerator.populateChunk(offsetChunkQueue, area); | ||||
|         queue.enqueue(); | ||||
|     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.inject; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.inject; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.inject; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.inject; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -68,7 +61,9 @@ import com.plotsquared.core.util.task.TaskTime; | ||||
| import com.sk89q.worldedit.WorldEdit; | ||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||
| import com.sk89q.worldedit.world.block.BlockType; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.bukkit.Bukkit; | ||||
| import org.bukkit.GameMode; | ||||
| import org.bukkit.Material; | ||||
| @@ -113,11 +108,20 @@ import org.checkerframework.checker.nullness.qual.NonNull; | ||||
| import java.util.Iterator; | ||||
| import java.util.List; | ||||
| import java.util.Objects; | ||||
| import java.util.Set; | ||||
| import java.util.UUID; | ||||
|  | ||||
| @SuppressWarnings("unused") | ||||
| public class BlockEventListener implements Listener { | ||||
|  | ||||
|     private static final Set<Material> PISTONS = Set.of( | ||||
|             Material.PISTON, | ||||
|             Material.STICKY_PISTON | ||||
|     ); | ||||
|     private static final Set<Material> PHYSICS_BLOCKS = Set.of( | ||||
|             Material.TURTLE_EGG, | ||||
|             Material.TURTLE_SPAWN_EGG | ||||
|     ); | ||||
|     private final PlotAreaManager plotAreaManager; | ||||
|     private final WorldEdit worldEdit; | ||||
|  | ||||
| @@ -223,48 +227,31 @@ public class BlockEventListener implements Listener { | ||||
|             plot.debug("Prevented block physics and resent block change because disable-physics = true"); | ||||
|             return; | ||||
|         } | ||||
|         switch (event.getChangedType()) { | ||||
|             case COMPARATOR: { | ||||
|                 if (!plot.getFlag(RedstoneFlag.class)) { | ||||
|                     event.setCancelled(true); | ||||
|                     plot.debug("Prevented comparator update because redstone = false"); | ||||
|                 } | ||||
|                 return; | ||||
|         if (event.getChangedType() == Material.COMPARATOR) { | ||||
|             if (!plot.getFlag(RedstoneFlag.class)) { | ||||
|                 event.setCancelled(true); | ||||
|                 plot.debug("Prevented comparator update because redstone = false"); | ||||
|             } | ||||
|             case ANVIL: | ||||
|             case DRAGON_EGG: | ||||
|             case GRAVEL: | ||||
|             case SAND: | ||||
|             case TURTLE_EGG: | ||||
|             case TURTLE_HELMET: | ||||
|             case TURTLE_SPAWN_EGG: { | ||||
|                 if (plot.getFlag(DisablePhysicsFlag.class)) { | ||||
|                     event.setCancelled(true); | ||||
|                     plot.debug("Prevented block physics because disable-physics = true"); | ||||
|                 } | ||||
|                 return; | ||||
|             return; | ||||
|         } | ||||
|         if (PHYSICS_BLOCKS.contains(event.getChangedType())) { | ||||
|             if (plot.getFlag(DisablePhysicsFlag.class)) { | ||||
|                 event.setCancelled(true); | ||||
|                 plot.debug("Prevented block physics because disable-physics = true"); | ||||
|             } | ||||
|             default: | ||||
|                 if (Settings.Redstone.DETECT_INVALID_EDGE_PISTONS) { | ||||
|                     switch (block.getType()) { | ||||
|                         case PISTON, STICKY_PISTON -> { | ||||
|                             org.bukkit.block.data.Directional piston = (org.bukkit.block.data.Directional) block.getBlockData(); | ||||
|                             switch (piston.getFacing()) { | ||||
|                                 case EAST -> location = location.add(1, 0, 0); | ||||
|                                 case SOUTH -> location = location.add(-1, 0, 0); | ||||
|                                 case WEST -> location = location.add(0, 0, 1); | ||||
|                                 case NORTH -> location = location.add(0, 0, -1); | ||||
|                             } | ||||
|                             Plot newPlot = area.getOwnedPlotAbs(location); | ||||
|                             if (!plot.equals(newPlot)) { | ||||
|                                 event.setCancelled(true); | ||||
|                                 plot.debug("Prevented piston update because of invalid edge piston detection"); | ||||
|                                 return; | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|             return; | ||||
|         } | ||||
|         if (Settings.Redstone.DETECT_INVALID_EDGE_PISTONS) { | ||||
|             if (PISTONS.contains(block.getType())) { | ||||
|                 org.bukkit.block.data.Directional piston = (org.bukkit.block.data.Directional) block.getBlockData(); | ||||
|                 final BlockFace facing = piston.getFacing(); | ||||
|                 location = location.add(facing.getModX(), facing.getModY(), facing.getModZ()); | ||||
|                 Plot newPlot = area.getOwnedPlotAbs(location); | ||||
|                 if (!plot.equals(newPlot)) { | ||||
|                     event.setCancelled(true); | ||||
|                     plot.debug("Prevented piston update because of invalid edge piston detection"); | ||||
|                 } | ||||
|                 break; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -285,15 +272,20 @@ public class BlockEventListener implements Listener { | ||||
|                 event.setCancelled(true); | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("height.height_limit"), | ||||
|                         Template.of("minHeight", String.valueOf(area.getMinBuildHeight())), | ||||
|                         Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight())) | ||||
|                         TagResolver.builder() | ||||
|                                 .tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight()))) | ||||
|                                 .tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight()))) | ||||
|                                 .build() | ||||
|                 ); | ||||
|             } | ||||
|             if (!plot.hasOwner()) { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                     return; | ||||
| @@ -310,7 +302,10 @@ public class BlockEventListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                     plot.debug(player.getName() + " could not place " + event.getBlock().getType() | ||||
| @@ -337,7 +332,10 @@ public class BlockEventListener implements Listener { | ||||
|         } else if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { | ||||
|             pp.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|                     TagResolver.resolver( | ||||
|                             "node", | ||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD) | ||||
|                     ) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|         } | ||||
| @@ -360,7 +358,10 @@ public class BlockEventListener implements Listener { | ||||
|                         .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                     return; | ||||
| @@ -371,8 +372,10 @@ public class BlockEventListener implements Listener { | ||||
|                 event.setCancelled(true); | ||||
|                 plotPlayer.sendMessage( | ||||
|                         TranslatableCaption.of("height.height_limit"), | ||||
|                         Template.of("minHeight", String.valueOf(area.getMinBuildHeight())), | ||||
|                         Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight())) | ||||
|                         TagResolver.builder() | ||||
|                                 .tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight()))) | ||||
|                                 .tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight()))) | ||||
|                                 .build() | ||||
|                 ); | ||||
|             } | ||||
|             if (!plot.hasOwner()) { | ||||
| @@ -397,7 +400,10 @@ public class BlockEventListener implements Listener { | ||||
|                 } | ||||
|                 plotPlayer.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_OTHER) | ||||
|                         ) | ||||
|                 ); | ||||
|                 event.setCancelled(true); | ||||
|             } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||
| @@ -423,7 +429,10 @@ public class BlockEventListener implements Listener { | ||||
|         } | ||||
|         pp.sendMessage( | ||||
|                 TranslatableCaption.of("permission.no_permission_event"), | ||||
|                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_ROAD)) | ||||
|                 TagResolver.resolver( | ||||
|                         "node", | ||||
|                         Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_ROAD) | ||||
|                 ) | ||||
|         ); | ||||
|         event.setCancelled(true); | ||||
|     } | ||||
| @@ -555,21 +564,18 @@ public class BlockEventListener implements Listener { | ||||
|             event.setCancelled(true); | ||||
|             return; | ||||
|         } | ||||
|         switch (event.getNewState().getType()) { | ||||
|             case SNOW: | ||||
|             case SNOW_BLOCK: | ||||
|                 if (!plot.getFlag(SnowFormFlag.class)) { | ||||
|                     plot.debug("Snow could not form because snow-form = false"); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|                 return; | ||||
|             case ICE: | ||||
|             case FROSTED_ICE: | ||||
|             case PACKED_ICE: | ||||
|                 if (!plot.getFlag(IceFormFlag.class)) { | ||||
|                     plot.debug("Ice could not form because ice-form = false"); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|         if (org.bukkit.Tag.SNOW.isTagged(event.getNewState().getType())) { | ||||
|             if (!plot.getFlag(SnowFormFlag.class)) { | ||||
|                 plot.debug("Snow could not form because snow-form = false"); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|             return; | ||||
|         } | ||||
|         if (org.bukkit.Tag.ICE.isTagged(event.getNewState().getType())) { | ||||
|             if (!plot.getFlag(IceFormFlag.class)) { | ||||
|                 plot.debug("Ice could not form because ice-form = false"); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -590,18 +596,12 @@ public class BlockEventListener implements Listener { | ||||
|             return; | ||||
|         } | ||||
|         Class<? extends BooleanFlag<?>> flag; | ||||
|         switch (event.getNewState().getType()) { | ||||
|             case SNOW: | ||||
|             case SNOW_BLOCK: | ||||
|                 flag = SnowFormFlag.class; | ||||
|                 break; | ||||
|             case ICE: | ||||
|             case FROSTED_ICE: | ||||
|             case PACKED_ICE: | ||||
|                 flag = IceFormFlag.class; | ||||
|                 break; | ||||
|             default: | ||||
|                 return; // other blocks are ignored by this event | ||||
|         if (org.bukkit.Tag.SNOW.isTagged(event.getNewState().getType())) { | ||||
|             flag = SnowFormFlag.class; | ||||
|         } else if (org.bukkit.Tag.ICE.isTagged(event.getNewState().getType())) { | ||||
|             flag = IceFormFlag.class; | ||||
|         } else { | ||||
|             return; | ||||
|         } | ||||
|         boolean allowed = plot.getFlag(flag); | ||||
|         Entity entity = event.getEntity(); | ||||
| @@ -705,50 +705,33 @@ public class BlockEventListener implements Listener { | ||||
|             event.setCancelled(true); | ||||
|             return; | ||||
|         } | ||||
|         switch (block.getType()) { | ||||
|             case ICE: | ||||
|                 if (!plot.getFlag(IceMeltFlag.class)) { | ||||
|                     plot.debug("Ice could not melt because ice-melt = false"); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|                 break; | ||||
|             case SNOW: | ||||
|                 if (!plot.getFlag(SnowMeltFlag.class)) { | ||||
|                     plot.debug("Snow could not melt because snow-melt = false"); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|                 break; | ||||
|             case FARMLAND: | ||||
|                 if (!plot.getFlag(SoilDryFlag.class)) { | ||||
|                     plot.debug("Soil could not dry because soil-dry = false"); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|                 break; | ||||
|             case TUBE_CORAL_BLOCK: | ||||
|             case BRAIN_CORAL_BLOCK: | ||||
|             case BUBBLE_CORAL_BLOCK: | ||||
|             case FIRE_CORAL_BLOCK: | ||||
|             case HORN_CORAL_BLOCK: | ||||
|             case TUBE_CORAL: | ||||
|             case BRAIN_CORAL: | ||||
|             case BUBBLE_CORAL: | ||||
|             case FIRE_CORAL: | ||||
|             case HORN_CORAL: | ||||
|             case TUBE_CORAL_FAN: | ||||
|             case BRAIN_CORAL_FAN: | ||||
|             case BUBBLE_CORAL_FAN: | ||||
|             case FIRE_CORAL_FAN: | ||||
|             case HORN_CORAL_FAN: | ||||
|             case BRAIN_CORAL_WALL_FAN: | ||||
|             case BUBBLE_CORAL_WALL_FAN: | ||||
|             case FIRE_CORAL_WALL_FAN: | ||||
|             case HORN_CORAL_WALL_FAN: | ||||
|             case TUBE_CORAL_WALL_FAN: | ||||
|                 if (!plot.getFlag(CoralDryFlag.class)) { | ||||
|                     plot.debug("Coral could not dry because coral-dry = false"); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|                 break; | ||||
|         Material blockType = block.getType(); | ||||
|         if (org.bukkit.Tag.ICE.isTagged(blockType)) { | ||||
|             if (!plot.getFlag(IceMeltFlag.class)) { | ||||
|                 plot.debug("Ice could not melt because ice-melt = false"); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|             return; | ||||
|         } | ||||
|         if (org.bukkit.Tag.SNOW.isTagged(blockType)) { | ||||
|             if (!plot.getFlag(SnowMeltFlag.class)) { | ||||
|                 plot.debug("Snow could not melt because snow-melt = false"); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|             return; | ||||
|         } | ||||
|         if (blockType == Material.FARMLAND) { | ||||
|             if (!plot.getFlag(SoilDryFlag.class)) { | ||||
|                 plot.debug("Soil could not dry because soil-dry = false"); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|             return; | ||||
|         } | ||||
|         if (org.bukkit.Tag.CORAL_BLOCKS.isTagged(blockType) || org.bukkit.Tag.CORALS.isTagged(blockType)) { | ||||
|             if (!plot.getFlag(CoralDryFlag.class)) { | ||||
|                 plot.debug("Coral could not dry because coral-dry = false"); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -965,7 +948,12 @@ public class BlockEventListener implements Listener { | ||||
|     public void onBlockDispense(BlockDispenseEvent event) { | ||||
|         Material type = event.getItem().getType(); | ||||
|         switch (type.toString()) { | ||||
|             case "SHULKER_BOX", "WHITE_SHULKER_BOX", "ORANGE_SHULKER_BOX", "MAGENTA_SHULKER_BOX", "LIGHT_BLUE_SHULKER_BOX", "YELLOW_SHULKER_BOX", "LIME_SHULKER_BOX", "PINK_SHULKER_BOX", "GRAY_SHULKER_BOX", "LIGHT_GRAY_SHULKER_BOX", "CYAN_SHULKER_BOX", "PURPLE_SHULKER_BOX", "BLUE_SHULKER_BOX", "BROWN_SHULKER_BOX", "GREEN_SHULKER_BOX", "RED_SHULKER_BOX", "BLACK_SHULKER_BOX", "CARVED_PUMPKIN", "WITHER_SKELETON_SKULL", "FLINT_AND_STEEL", "BONE_MEAL", "SHEARS", "GLASS_BOTTLE", "GLOWSTONE", "COD_BUCKET", "PUFFERFISH_BUCKET", "SALMON_BUCKET", "TROPICAL_FISH_BUCKET", "AXOLOTL_BUCKET", "BUCKET", "WATER_BUCKET", "LAVA_BUCKET" -> { | ||||
|             case "SHULKER_BOX", "WHITE_SHULKER_BOX", "ORANGE_SHULKER_BOX", "MAGENTA_SHULKER_BOX", "LIGHT_BLUE_SHULKER_BOX", | ||||
|                     "YELLOW_SHULKER_BOX", "LIME_SHULKER_BOX", "PINK_SHULKER_BOX", "GRAY_SHULKER_BOX", "LIGHT_GRAY_SHULKER_BOX", | ||||
|                     "CYAN_SHULKER_BOX", "PURPLE_SHULKER_BOX", "BLUE_SHULKER_BOX", "BROWN_SHULKER_BOX", "GREEN_SHULKER_BOX", | ||||
|                     "RED_SHULKER_BOX", "BLACK_SHULKER_BOX", "CARVED_PUMPKIN", "WITHER_SKELETON_SKULL", "FLINT_AND_STEEL", | ||||
|                     "BONE_MEAL", "SHEARS", "GLASS_BOTTLE", "GLOWSTONE", "COD_BUCKET", "PUFFERFISH_BUCKET", "SALMON_BUCKET", | ||||
|                     "TROPICAL_FISH_BUCKET", "AXOLOTL_BUCKET", "BUCKET", "WATER_BUCKET", "LAVA_BUCKET", "TADPOLE_BUCKET" -> { | ||||
|                 if (event.getBlock().getType() == Material.DROPPER) { | ||||
|                     return; | ||||
|                 } | ||||
| @@ -1107,7 +1095,10 @@ public class BlockEventListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
| @@ -1115,7 +1106,10 @@ public class BlockEventListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
| @@ -1123,7 +1117,10 @@ public class BlockEventListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
| @@ -1247,7 +1244,7 @@ public class BlockEventListener implements Listener { | ||||
|             ) && !(Objects.equals(currentLocation.getPlot(), plot))) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|                         TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|                 ); | ||||
|                 event.setCancelled(true); | ||||
|                 break; | ||||
| @@ -1258,8 +1255,10 @@ public class BlockEventListener implements Listener { | ||||
|             if (currentLocation.getY() >= area.getMaxBuildHeight() || currentLocation.getY() < area.getMinBuildHeight()) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("height.height_limit"), | ||||
|                         Template.of("minHeight", String.valueOf(area.getMinBuildHeight())), | ||||
|                         Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight())) | ||||
|                         TagResolver.builder() | ||||
|                                 .tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight()))) | ||||
|                                 .tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight()))) | ||||
|                                 .build() | ||||
|                 ); | ||||
|                 event.setCancelled(true); | ||||
|                 break; | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -33,6 +26,7 @@ import com.plotsquared.core.plot.Plot; | ||||
| import com.plotsquared.core.plot.PlotArea; | ||||
| import com.plotsquared.core.plot.flag.implementations.CopperOxideFlag; | ||||
| import com.plotsquared.core.plot.flag.implementations.MiscInteractFlag; | ||||
| import org.bukkit.Material; | ||||
| import org.bukkit.block.Block; | ||||
| import org.bukkit.entity.Entity; | ||||
| import org.bukkit.entity.Item; | ||||
| @@ -46,11 +40,31 @@ import org.bukkit.event.block.BlockReceiveGameEvent; | ||||
|  | ||||
| import java.util.List; | ||||
| import java.util.Objects; | ||||
| import java.util.Set; | ||||
| import java.util.UUID; | ||||
|  | ||||
| @SuppressWarnings("unused") | ||||
| public class BlockEventListener117 implements Listener { | ||||
|  | ||||
|     private static final Set<Material> COPPER_OXIDIZING = Set.of( | ||||
|             Material.COPPER_BLOCK, | ||||
|             Material.EXPOSED_COPPER, | ||||
|             Material.WEATHERED_COPPER, | ||||
|             Material.OXIDIZED_COPPER, | ||||
|             Material.CUT_COPPER, | ||||
|             Material.EXPOSED_CUT_COPPER, | ||||
|             Material.WEATHERED_CUT_COPPER, | ||||
|             Material.OXIDIZED_CUT_COPPER, | ||||
|             Material.CUT_COPPER_STAIRS, | ||||
|             Material.EXPOSED_CUT_COPPER_STAIRS, | ||||
|             Material.WEATHERED_CUT_COPPER_STAIRS, | ||||
|             Material.OXIDIZED_CUT_COPPER_STAIRS, | ||||
|             Material.CUT_COPPER_SLAB, | ||||
|             Material.EXPOSED_CUT_COPPER_SLAB, | ||||
|             Material.WEATHERED_CUT_COPPER_SLAB, | ||||
|             Material.OXIDIZED_CUT_COPPER_SLAB | ||||
|     ); | ||||
|  | ||||
|     @Inject | ||||
|     public BlockEventListener117() { | ||||
|     } | ||||
| @@ -155,27 +169,11 @@ public class BlockEventListener117 implements Listener { | ||||
|         if (plot == null) { | ||||
|             return; | ||||
|         } | ||||
|         switch (event.getNewState().getType()) { | ||||
|             case COPPER_BLOCK: | ||||
|             case EXPOSED_COPPER: | ||||
|             case WEATHERED_COPPER: | ||||
|             case OXIDIZED_COPPER: | ||||
|             case CUT_COPPER: | ||||
|             case EXPOSED_CUT_COPPER: | ||||
|             case WEATHERED_CUT_COPPER: | ||||
|             case OXIDIZED_CUT_COPPER: | ||||
|             case CUT_COPPER_STAIRS: | ||||
|             case EXPOSED_CUT_COPPER_STAIRS: | ||||
|             case WEATHERED_CUT_COPPER_STAIRS: | ||||
|             case OXIDIZED_CUT_COPPER_STAIRS: | ||||
|             case CUT_COPPER_SLAB: | ||||
|             case EXPOSED_CUT_COPPER_SLAB: | ||||
|             case WEATHERED_CUT_COPPER_SLAB: | ||||
|             case OXIDIZED_CUT_COPPER_SLAB: | ||||
|                 if (!plot.getFlag(CopperOxideFlag.class)) { | ||||
|                     plot.debug("Copper could not oxide because copper-oxide = false"); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|         if (COPPER_OXIDIZING.contains(event.getNewState().getType())) { | ||||
|             if (!plot.getFlag(CopperOxideFlag.class)) { | ||||
|                 plot.debug("Copper could not oxide because copper-oxide = false"); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -208,7 +201,7 @@ public class EntityEventListener implements Listener { | ||||
|             } | ||||
|             return; | ||||
|         } | ||||
|         if (BukkitEntityUtil.checkEntity(entity, plot)) { | ||||
|         if (BukkitEntityUtil.checkEntity(entity, plot.getBasePlot(false))) { | ||||
|             event.setCancelled(true); | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -131,17 +124,17 @@ public class EntitySpawnListener implements Listener { | ||||
|             return; | ||||
|         } | ||||
|         Plot plot = location.getOwnedPlotAbs(); | ||||
|         EntityType type = entity.getType(); | ||||
|         if (plot == null) { | ||||
|             EntityType type = entity.getType(); | ||||
|             if (!area.isMobSpawning()) { | ||||
|                 switch (type) { | ||||
|                     case DROPPED_ITEM: | ||||
|                         if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { | ||||
|                             event.setCancelled(true); | ||||
|                             return; | ||||
|                         } | ||||
|                     case PLAYER: | ||||
|                         return; | ||||
|                 if (type == EntityType.PLAYER) { | ||||
|                     return; | ||||
|                 } | ||||
|                 if (type == EntityType.DROPPED_ITEM) { | ||||
|                     if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { | ||||
|                         event.setCancelled(true); | ||||
|                     } | ||||
|                     return; | ||||
|                 } | ||||
|                 if (type.isAlive()) { | ||||
|                     event.setCancelled(true); | ||||
| @@ -155,15 +148,16 @@ public class EntitySpawnListener implements Listener { | ||||
|         if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||
|             event.setCancelled(true); | ||||
|         } | ||||
|         switch (entity.getType()) { | ||||
|             case ENDER_CRYSTAL: | ||||
|                 if (BukkitEntityUtil.checkEntity(entity, plot)) { | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
|             case SHULKER: | ||||
|                 if (!entity.hasMetadata("shulkerPlot")) { | ||||
|                     entity.setMetadata("shulkerPlot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot.getId())); | ||||
|                 } | ||||
|         if (type == EntityType.ENDER_CRYSTAL) { | ||||
|             if (BukkitEntityUtil.checkEntity(entity, plot)) { | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
|             return; | ||||
|         } | ||||
|         if (type == EntityType.SHULKER) { | ||||
|             if (!entity.hasMetadata("shulkerPlot")) { | ||||
|                 entity.setMetadata("shulkerPlot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot.getId())); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -47,7 +40,9 @@ import com.plotsquared.core.plot.flag.implementations.DoneFlag; | ||||
| import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag; | ||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | ||||
| import com.plotsquared.core.util.Permissions; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.bukkit.Chunk; | ||||
| import org.bukkit.block.Block; | ||||
| import org.bukkit.block.TileState; | ||||
| @@ -237,15 +232,15 @@ public class PaperListener implements Listener { | ||||
|         if (plot == null) { | ||||
|             EntityType type = event.getType(); | ||||
|             if (!area.isMobSpawning()) { | ||||
|                 switch (type) { | ||||
|                     case DROPPED_ITEM: | ||||
|                         if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { | ||||
|                             event.setShouldAbortSpawn(true); | ||||
|                             event.setCancelled(true); | ||||
|                             return; | ||||
|                         } | ||||
|                     case PLAYER: | ||||
|                         return; | ||||
|                 if (type == EntityType.PLAYER) { | ||||
|                     return; | ||||
|                 } | ||||
|                 if (type == EntityType.DROPPED_ITEM) { | ||||
|                     if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { | ||||
|                         event.setShouldAbortSpawn(true); | ||||
|                         event.setCancelled(true); | ||||
|                     } | ||||
|                     return; | ||||
|                 } | ||||
|                 if (type.isAlive()) { | ||||
|                     event.setShouldAbortSpawn(true); | ||||
| @@ -305,7 +300,7 @@ public class PaperListener implements Listener { | ||||
|             final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer()); | ||||
|             plotPlayer.sendMessage( | ||||
|                     TranslatableCaption.of("errors.tile_entity_cap_reached"), | ||||
|                     Template.of("amount", String.valueOf(Settings.Chunk_Processor.MAX_TILES)) | ||||
|                     TagResolver.resolver("amount", Tag.inserting(Component.text(Settings.Chunk_Processor.MAX_TILES))) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|             event.setBuild(false); | ||||
| @@ -339,7 +334,10 @@ public class PaperListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD) | ||||
|                         ) | ||||
|                 ); | ||||
|                 entity.remove(); | ||||
|                 event.setCancelled(true); | ||||
| @@ -348,7 +346,10 @@ public class PaperListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED) | ||||
|                         ) | ||||
|                 ); | ||||
|                 entity.remove(); | ||||
|                 event.setCancelled(true); | ||||
| @@ -358,7 +359,10 @@ public class PaperListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER) | ||||
|                             ) | ||||
|                     ); | ||||
|                     entity.remove(); | ||||
|                     event.setCancelled(true); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -33,7 +26,9 @@ import com.plotsquared.core.location.Location; | ||||
| import com.plotsquared.core.player.PlotPlayer; | ||||
| import com.plotsquared.core.plot.PlotArea; | ||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.bukkit.block.Banner; | ||||
| import org.bukkit.block.Beacon; | ||||
| import org.bukkit.block.BlockState; | ||||
| @@ -84,7 +79,7 @@ public class PaperListener113 extends PaperListener { | ||||
|             final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer()); | ||||
|             plotPlayer.sendMessage( | ||||
|                     TranslatableCaption.of("errors.tile_entity_cap_reached"), | ||||
|                     Template.of("amount", String.valueOf(Settings.Chunk_Processor.MAX_TILES)) | ||||
|                     TagResolver.resolver("amount", Tag.inserting(Component.text(Settings.Chunk_Processor.MAX_TILES))) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|             event.setBuild(false); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -84,9 +77,11 @@ import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||
| import com.sk89q.worldedit.world.block.BlockType; | ||||
| import io.papermc.lib.PaperLib; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.minimessage.MiniMessage; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import net.kyori.adventure.text.minimessage.tag.standard.StandardTags; | ||||
| import org.bukkit.Bukkit; | ||||
| import org.bukkit.ChatColor; | ||||
| import org.bukkit.FluidCollisionMode; | ||||
| import org.bukkit.Material; | ||||
| import org.bukkit.block.Block; | ||||
| @@ -152,13 +147,11 @@ import org.bukkit.util.Vector; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
|  | ||||
| import java.lang.reflect.Field; | ||||
| import java.util.ArrayList; | ||||
| import java.util.HashSet; | ||||
| import java.util.List; | ||||
| import java.util.Locale; | ||||
| import java.util.Set; | ||||
| import java.util.UUID; | ||||
| import java.util.regex.Pattern; | ||||
|  | ||||
| /** | ||||
|  * Player Events involving plots. | ||||
| @@ -166,6 +159,20 @@ import java.util.regex.Pattern; | ||||
| @SuppressWarnings("unused") | ||||
| public class PlayerEventListener extends PlotListener implements Listener { | ||||
|  | ||||
|     private static final Set<Material> MINECARTS = Set.of( | ||||
|             Material.MINECART, | ||||
|             Material.TNT_MINECART, | ||||
|             Material.CHEST_MINECART, | ||||
|             Material.COMMAND_BLOCK_MINECART, | ||||
|             Material.FURNACE_MINECART, | ||||
|             Material.HOPPER_MINECART | ||||
|     ); | ||||
|     private static final Set<Material> BOOKS = Set.of( | ||||
|             Material.BOOK, | ||||
|             Material.KNOWLEDGE_BOOK, | ||||
|             Material.WRITABLE_BOOK, | ||||
|             Material.WRITTEN_BOOK | ||||
|     ); | ||||
|     private final EventDispatcher eventDispatcher; | ||||
|     private final WorldEdit worldEdit; | ||||
|     private final PlotAreaManager plotAreaManager; | ||||
| @@ -363,11 +370,15 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 && PremiumVerification.isPremium() && UpdateUtility.hasUpdate) { | ||||
|             Caption boundary = TranslatableCaption.of("update.update_boundary"); | ||||
|             Caption updateNotification = TranslatableCaption.of("update.update_notification"); | ||||
|             Template internalVersion = Template.of("p2version", UpdateUtility.internalVersion.versionString()); | ||||
|             Template spigotVersion = Template.of("spigotversion", UpdateUtility.spigotVersion); | ||||
|             Template downloadUrl = Template.of("downloadurl", "https://www.spigotmc.org/resources/77506/updates"); | ||||
|             pp.sendMessage(boundary); | ||||
|             pp.sendMessage(updateNotification, internalVersion, spigotVersion, downloadUrl); | ||||
|             pp.sendMessage( | ||||
|                     updateNotification, | ||||
|                     TagResolver.builder() | ||||
|                             .tag("p2version", Tag.inserting(Component.text(UpdateUtility.internalVersion.versionString()))) | ||||
|                             .tag("spigotversion", Tag.inserting(Component.text(UpdateUtility.spigotVersion))) | ||||
|                             .tag("downloadurl", Tag.preProcessParsed("https://www.spigotmc.org/resources/77506/updates")) | ||||
|                             .build() | ||||
|             ); | ||||
|             pp.sendMessage(boundary); | ||||
|         } | ||||
|     } | ||||
| @@ -419,7 +430,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                             .equals(BukkitUtil.adaptComplete(to)))) { | ||||
|                         pp.sendMessage( | ||||
|                                 TranslatableCaption.of("deny.no_enter"), | ||||
|                                 Template.of("plot", plot.toString()) | ||||
|                                 TagResolver.resolver("plot", Tag.inserting(Component.text(plot.toString()))) | ||||
|                         ); | ||||
|                         event.setCancelled(true); | ||||
|                     } | ||||
| @@ -535,7 +546,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                     if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) { | ||||
|                         pp.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_EXIT_DENIED)) | ||||
|                                 TagResolver.resolver( | ||||
|                                         "node", | ||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_EXIT_DENIED) | ||||
|                                 ) | ||||
|                         ); | ||||
|                         this.tmpTeleport = false; | ||||
|                         if (lastPlot.equals(BukkitUtil.adapt(from).getPlot())) { | ||||
| @@ -553,7 +567,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } else if (!plotEntry(pp, now) && this.tmpTeleport) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("deny.no_enter"), | ||||
|                         Template.of("plot", now.toString()) | ||||
|                         TagResolver.resolver("plot", Tag.inserting(Component.text(now.toString()))) | ||||
|                 ); | ||||
|                 this.tmpTeleport = false; | ||||
|                 to.setX(from.getBlockX()); | ||||
| @@ -625,7 +639,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                     if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) { | ||||
|                         pp.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_EXIT_DENIED)) | ||||
|                                 TagResolver.resolver( | ||||
|                                         "node", | ||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_EXIT_DENIED) | ||||
|                                 ) | ||||
|                         ); | ||||
|                         this.tmpTeleport = false; | ||||
|                         if (lastPlot.equals(BukkitUtil.adapt(from).getPlot())) { | ||||
| @@ -643,7 +660,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } else if (!plotEntry(pp, plot) && this.tmpTeleport) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("deny.no_enter"), | ||||
|                         Template.of("plot", plot.toString()) | ||||
|                         TagResolver.resolver("plot", Tag.inserting(Component.text(plot.toString()))) | ||||
|                 ); | ||||
|                 this.tmpTeleport = false; | ||||
|                 player.teleport(from); | ||||
| @@ -728,46 +745,34 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|         PlotId id = plot.getId(); | ||||
|         String worldName = plot.getWorldName(); | ||||
|         Caption msg = TranslatableCaption.of("chat.plot_chat_format"); | ||||
|         Template msgTemplate; | ||||
|         Template worldNameTemplate = Template.of("world", worldName); | ||||
|         Template plotTemplate = Template.of("plot_id", id.toString()); | ||||
|         Template senderTemplate = Template.of("sender", sender); | ||||
|         // If we do/don't want colour, we need to be careful about how to go about it, as players could attempt either <gold></gold> or &6 etc. | ||||
|         // In both cases, we want to use a Component Template to ensure that the player cannot use any placeholders in their message on purpose | ||||
|         //  or accidentally, as component templates are done at the end. We also need to deserialize from legacy color codes to a Component if | ||||
|         //  allowing colour. | ||||
|         TagResolver.Builder builder = TagResolver.builder(); | ||||
|         builder.tag("world", Tag.inserting(Component.text(worldName))); | ||||
|         builder.tag("plot_id", Tag.inserting(Component.text(id.toString()))); | ||||
|         builder.tag("sender", Tag.inserting(Component.text(sender))); | ||||
|         if (plotPlayer.hasPermission("plots.chat.color")) { | ||||
|             msgTemplate = Template | ||||
|                     .of( | ||||
|                             "msg", | ||||
|                             BukkitUtil.LEGACY_COMPONENT_SERIALIZER.deserialize(ChatColor.translateAlternateColorCodes( | ||||
|                                     '&', | ||||
|                                     message | ||||
|                             )) | ||||
|                     ); | ||||
|             builder.tag("msg", Tag.inserting(MiniMessage.miniMessage().deserialize( | ||||
|                     message, | ||||
|                     TagResolver.resolver(StandardTags.color(), StandardTags.gradient(), | ||||
|                             StandardTags.rainbow(), StandardTags.decorations() | ||||
|                     ) | ||||
|             ))); | ||||
|         } else { | ||||
|             msgTemplate = Template.of("msg", BukkitUtil.MINI_MESSAGE.deserialize( | ||||
|                     ChatColor.stripColor(BukkitUtil.LEGACY_COMPONENT_SERIALIZER.serialize(Component.text(message))))); | ||||
|             builder.tag("msg", Tag.inserting(Component.text(message))); | ||||
|         } | ||||
|         for (PlotPlayer<?> receiver : plotRecipients) { | ||||
|             receiver.sendMessage(msg, worldNameTemplate, msgTemplate, plotTemplate, senderTemplate); | ||||
|             receiver.sendMessage(msg, builder.build()); | ||||
|         } | ||||
|         if (!spies.isEmpty()) { | ||||
|             Caption spymsg = TranslatableCaption.of("chat.plot_chat_spy_format"); | ||||
|             Template plotidTemplate = Template.of("plot_id", id.getX() + ";" + id.getY()); | ||||
|             Template spysenderTemplate = Template.of("sender", sender); | ||||
|             Template spymessageTemplate = Template.of("msg", Component.text(message)); | ||||
|             for (PlotPlayer<?> player : spies) { | ||||
|                 player.sendMessage(spymsg, worldNameTemplate, plotidTemplate, spysenderTemplate, spymessageTemplate); | ||||
|                 player.sendMessage(spymsg, builder.tag("message", Tag.inserting(Component.text(message))).build()); | ||||
|             } | ||||
|         } | ||||
|         if (Settings.Chat.LOG_PLOTCHAT_TO_CONSOLE) { | ||||
|             Caption spymsg = TranslatableCaption.of("chat.plot_chat_spy_format"); | ||||
|             Template plotidTemplate = Template.of("plot_id", id.getX() + ";" + id.getY()); | ||||
|             Template spysenderTemplate = Template.of("sender", sender); | ||||
|             Template spymessageTemplate = Template.of("msg", Component.text(message)); | ||||
|             ConsolePlayer.getConsole().sendMessage(spymsg, worldNameTemplate, plotidTemplate, spysenderTemplate, | ||||
|                     spymessageTemplate | ||||
|             ConsolePlayer.getConsole().sendMessage( | ||||
|                     spymsg, | ||||
|                     builder.tag("message", Tag.inserting(Component.text(message))).build() | ||||
|             ); | ||||
|         } | ||||
|     } | ||||
| @@ -837,10 +842,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|         if ((slot > 8) || !event.getEventName().equals("InventoryCreativeEvent")) { | ||||
|             return; | ||||
|         } | ||||
|         ItemStack current = inv.getItemInHand(); | ||||
|         ItemStack oldItem = inv.getItemInHand(); | ||||
|         ItemMeta oldMeta = oldItem.getItemMeta(); | ||||
|         ItemStack newItem = event.getCursor(); | ||||
|         ItemMeta newMeta = newItem.getItemMeta(); | ||||
|         ItemMeta oldMeta = newItem.getItemMeta(); | ||||
|  | ||||
|         if (event.getClick() == ClickType.CREATIVE) { | ||||
|             final Plot plot = pp.getCurrentPlot(); | ||||
| @@ -880,34 +885,26 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 oldLore = lore.toString(); | ||||
|             } | ||||
|         } | ||||
|         if (!"[(+NBT)]".equals(newLore) || (current.equals(newItem) && newLore.equals(oldLore))) { | ||||
|             switch (newItem.getType()) { | ||||
|                 case LEGACY_BANNER: | ||||
|                 case PLAYER_HEAD: | ||||
|                     if (newMeta != null) { | ||||
|                         break; | ||||
|                     } | ||||
|                 default: | ||||
|                     return; | ||||
|         Material itemType = newItem.getType(); | ||||
|         if (!"[(+NBT)]".equals(newLore) || (oldItem.equals(newItem) && newLore.equals(oldLore))) { | ||||
|             if (newMeta == null || (itemType != Material.LEGACY_BANNER && itemType != Material.PLAYER_HEAD)) { | ||||
|                 return; | ||||
|             } | ||||
|         } | ||||
|         Block block = player.getTargetBlock(null, 7); | ||||
|         org.bukkit.block.BlockState state = block.getState(); | ||||
|         Material stateType = state.getType(); | ||||
|         Material itemType = newItem.getType(); | ||||
|         if (stateType != itemType) { | ||||
|             switch (stateType) { | ||||
|                 case LEGACY_STANDING_BANNER: | ||||
|                 case LEGACY_WALL_BANNER: | ||||
|                     if (itemType == Material.LEGACY_BANNER) { | ||||
|                         break; | ||||
|                     } | ||||
|                 case LEGACY_SKULL: | ||||
|                     if (itemType == Material.LEGACY_SKULL_ITEM) { | ||||
|                         break; | ||||
|                     } | ||||
|                 default: | ||||
|             if (stateType == Material.LEGACY_WALL_BANNER || stateType == Material.LEGACY_STANDING_BANNER) { | ||||
|                 if (itemType != Material.LEGACY_BANNER) { | ||||
|                     return; | ||||
|                 } | ||||
|             } else if (stateType == Material.LEGACY_SKULL) { | ||||
|                 if (itemType != Material.LEGACY_SKULL_ITEM) { | ||||
|                     return; | ||||
|                 } | ||||
|             } else { | ||||
|                 return; | ||||
|             } | ||||
|         } | ||||
|         Location location = BukkitUtil.adapt(state.getLocation()); | ||||
| @@ -921,7 +918,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_ROAD)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_ROAD) | ||||
|                         ) | ||||
|                 ); | ||||
|                 cancelled = true; | ||||
|             } | ||||
| @@ -929,7 +929,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED) | ||||
|                         ) | ||||
|                 ); | ||||
|                 cancelled = true; | ||||
|             } | ||||
| @@ -939,14 +942,17 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_OTHER)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_OTHER) | ||||
|                             ) | ||||
|                     ); | ||||
|                     cancelled = true; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         if (cancelled) { | ||||
|             if ((current.getType() == newItem.getType()) && (current.getDurability() == newItem | ||||
|             if ((oldItem.getType() == newItem.getType()) && (oldItem.getDurability() == newItem | ||||
|                     .getDurability())) { | ||||
|                 event.setCursor( | ||||
|                         new ItemStack(newItem.getType(), newItem.getAmount(), newItem.getDurability())); | ||||
| @@ -977,7 +983,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                     .hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_ROAD)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_ROAD) | ||||
|                         ) | ||||
|                 ); | ||||
|                 e.setCancelled(true); | ||||
|             } | ||||
| @@ -995,7 +1004,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED) | ||||
|                             ) | ||||
|                     ); | ||||
|                     e.setCancelled(true); | ||||
|                 } | ||||
| @@ -1010,7 +1022,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_OTHER)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_OTHER) | ||||
|                             ) | ||||
|                     ); | ||||
|                     e.setCancelled(true); | ||||
|                     plot.debug(pp.getName() + " could not interact with " + entity.getType() | ||||
| @@ -1133,14 +1148,21 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                     //Allow all players to eat while also allowing the block place event ot be fired | ||||
|                     return; | ||||
|                 } | ||||
|                 switch (type) { | ||||
|                     case ACACIA_BOAT, BIRCH_BOAT, CHEST_MINECART, COMMAND_BLOCK_MINECART, DARK_OAK_BOAT, FURNACE_MINECART, HOPPER_MINECART, JUNGLE_BOAT, MINECART, OAK_BOAT, SPRUCE_BOAT, TNT_MINECART -> eventType = PlayerBlockEventType.PLACE_VEHICLE; | ||||
|                     case FIREWORK_ROCKET, FIREWORK_STAR -> eventType = PlayerBlockEventType.SPAWN_MOB; | ||||
|                     case BOOK, KNOWLEDGE_BOOK, WRITABLE_BOOK, WRITTEN_BOOK -> eventType = PlayerBlockEventType.READ; | ||||
|                     case ARMOR_STAND -> { | ||||
|                         location = BukkitUtil.adapt(block.getRelative(event.getBlockFace()).getLocation()); | ||||
|                         eventType = PlayerBlockEventType.PLACE_MISC; | ||||
|                     } | ||||
|                 if (type == Material.ARMOR_STAND) { | ||||
|                     location = BukkitUtil.adapt(block.getRelative(event.getBlockFace()).getLocation()); | ||||
|                     eventType = PlayerBlockEventType.PLACE_MISC; | ||||
|                 } | ||||
|                 if (org.bukkit.Tag.ITEMS_BOATS.isTagged(type) || MINECARTS.contains(type)) { | ||||
|                     eventType = PlayerBlockEventType.PLACE_VEHICLE; | ||||
|                     break; | ||||
|                 } | ||||
|                 if (type == Material.FIREWORK_ROCKET || type == Material.FIREWORK_STAR) { | ||||
|                     eventType = PlayerBlockEventType.SPAWN_MOB; | ||||
|                     break; | ||||
|                 } | ||||
|                 if (BOOKS.contains(type)) { | ||||
|                     eventType = PlayerBlockEventType.READ; | ||||
|                     break; | ||||
|                 } | ||||
|                 break; | ||||
|             } | ||||
| @@ -1230,7 +1252,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } | ||||
|             pp.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|                     TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|         } else if (!plot.hasOwner()) { | ||||
| @@ -1239,7 +1261,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } | ||||
|             pp.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||
|                     TagResolver.resolver( | ||||
|                             "node", | ||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) | ||||
|                     ) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|         } else if (!plot.isAdded(pp.getUUID())) { | ||||
| @@ -1248,7 +1273,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } | ||||
|             pp.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||
|                     TagResolver.resolver( | ||||
|                             "node", | ||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) | ||||
|                     ) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|         } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||
| @@ -1295,7 +1323,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } | ||||
|             plotPlayer.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|                     TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|         } else if (!plot.hasOwner()) { | ||||
| @@ -1304,7 +1332,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } | ||||
|             plotPlayer.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||
|                     TagResolver.resolver( | ||||
|                             "node", | ||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) | ||||
|                     ) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|         } else if (!plot.isAdded(plotPlayer.getUUID())) { | ||||
| @@ -1313,7 +1344,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             } | ||||
|             plotPlayer.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||
|                     TagResolver.resolver( | ||||
|                             "node", | ||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) | ||||
|                     ) | ||||
|             ); | ||||
|             event.setCancelled(true); | ||||
|         } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||
| @@ -1345,7 +1379,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD) | ||||
|                         ) | ||||
|                 ); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
| @@ -1354,7 +1391,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
| @@ -1365,7 +1405,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { | ||||
|                         pp.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||
|                                 TagResolver.resolver( | ||||
|                                         "node", | ||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) | ||||
|                                 ) | ||||
|                         ); | ||||
|                         event.setCancelled(true); | ||||
|                     } | ||||
| @@ -1394,7 +1437,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_ROAD)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_ROAD)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_ROAD) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
| @@ -1402,7 +1448,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
| @@ -1413,7 +1462,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_OTHER) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                     plot.debug(p.getName() | ||||
| @@ -1435,7 +1487,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                                 .hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) { | ||||
|                             player.sendMessage( | ||||
|                                     TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) | ||||
|                                     TagResolver.resolver( | ||||
|                                             "node", | ||||
|                                             Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED) | ||||
|                                     ) | ||||
|                             ); | ||||
|                             event.setCancelled(true); | ||||
|                         } | ||||
| @@ -1445,7 +1500,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                                     .hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) { | ||||
|                                 player.sendMessage( | ||||
|                                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER)) | ||||
|                                         TagResolver.resolver( | ||||
|                                                 "node", | ||||
|                                                 Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_OTHER) | ||||
|                                         ) | ||||
|                                 ); | ||||
|                                 event.setCancelled(true); | ||||
|                                 plot.debug(player.getName() | ||||
| @@ -1477,7 +1535,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_ROAD)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_ROAD) | ||||
|                         ) | ||||
|                 ); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
| @@ -1485,7 +1546,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED) | ||||
|                         ) | ||||
|                 ); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
| @@ -1543,7 +1607,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_OTHER)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_OTHER) | ||||
|                         ) | ||||
|                 ); | ||||
|                 event.setCancelled(true); | ||||
|             } | ||||
| @@ -1565,7 +1632,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_ROAD)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_ROAD)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_ROAD) | ||||
|                             ) | ||||
|                     ); | ||||
|                     event.setCancelled(true); | ||||
|                 } | ||||
| @@ -1574,7 +1644,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_UNOWNED)) { | ||||
|                         pp.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_UNOWNED)) | ||||
|                                 TagResolver.resolver( | ||||
|                                         "node", | ||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_UNOWNED) | ||||
|                                 ) | ||||
|                         ); | ||||
|                         event.setCancelled(true); | ||||
|                         return; | ||||
| @@ -1588,7 +1661,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | ||||
|                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_OTHER)) { | ||||
|                         pp.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_OTHER)) | ||||
|                                 TagResolver.resolver( | ||||
|                                         "node", | ||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_OTHER) | ||||
|                                 ) | ||||
|                         ); | ||||
|                         event.setCancelled(true); | ||||
|                         plot.debug(pp.getName() | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
| @@ -38,7 +31,9 @@ import com.plotsquared.core.plot.PlotHandler; | ||||
| import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag; | ||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | ||||
| import com.plotsquared.core.util.Permissions; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.bukkit.entity.Entity; | ||||
| import org.bukkit.entity.LivingEntity; | ||||
| import org.bukkit.entity.Player; | ||||
| @@ -114,7 +109,10 @@ public class ProjectileEventListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD) | ||||
|                         ) | ||||
|                 ); | ||||
|                 entity.remove(); | ||||
|                 event.setCancelled(true); | ||||
| @@ -123,7 +121,10 @@ public class ProjectileEventListener implements Listener { | ||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) { | ||||
|                 pp.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission_event"), | ||||
|                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) | ||||
|                         TagResolver.resolver( | ||||
|                                 "node", | ||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED) | ||||
|                         ) | ||||
|                 ); | ||||
|                 entity.remove(); | ||||
|                 event.setCancelled(true); | ||||
| @@ -133,7 +134,10 @@ public class ProjectileEventListener implements Listener { | ||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) { | ||||
|                     pp.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER) | ||||
|                             ) | ||||
|                     ); | ||||
|                     entity.remove(); | ||||
|                     event.setCancelled(true); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.listener; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.managers; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.managers; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.managers; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.permissions; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.permissions; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.placeholder; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.placeholder; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.placeholder; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.player; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.player; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.player; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.queue; | ||||
|  | ||||
| @@ -92,9 +85,9 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator { | ||||
|             @Assisted final @NonNull Collection<BlockVector2> requestedChunks, | ||||
|             @Assisted final @NonNull Runnable whenDone, | ||||
|             @Assisted final @NonNull Consumer<Throwable> throwableConsumer, | ||||
|             @Assisted final boolean unloadAfter, | ||||
|             @Assisted("unloadAfter") final boolean unloadAfter, | ||||
|             @Assisted final @NonNull Collection<ProgressSubscriber> progressSubscribers, | ||||
|             @Assisted final boolean forceSync | ||||
|             @Assisted("forceSync") final boolean forceSync | ||||
|     ) { | ||||
|         this.requestedChunks = new LinkedBlockingQueue<>(requestedChunks); | ||||
|         this.availableChunks = new LinkedBlockingQueue<>(); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.queue; | ||||
|  | ||||
| @@ -235,6 +228,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator { | ||||
|                         .withConsumer(consumer) | ||||
|                         .unloadAfter(isUnloadAfter()) | ||||
|                         .withProgressSubscribers(getProgressSubscribers()) | ||||
|                         .forceSync(isForceSync()) | ||||
|                         .build(); | ||||
|         return super.enqueue(); | ||||
|     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.queue; | ||||
|  | ||||
| @@ -30,7 +23,7 @@ import com.plotsquared.bukkit.util.BukkitBlockUtil; | ||||
| import com.plotsquared.bukkit.util.BukkitUtil; | ||||
| import com.plotsquared.core.location.ChunkWrapper; | ||||
| import com.plotsquared.core.location.Location; | ||||
| import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | ||||
| import com.plotsquared.core.util.AnnotationHelper; | ||||
| import com.plotsquared.core.util.ChunkUtil; | ||||
| import com.plotsquared.core.util.PatternUtil; | ||||
| @@ -52,7 +45,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; | ||||
| import java.util.Arrays; | ||||
|  | ||||
| @AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.") | ||||
| public class GenChunk extends ScopedQueueCoordinator { | ||||
| public class GenChunk extends ZeroedDelegateScopedQueueCoordinator { | ||||
|  | ||||
|     public final Biome[] biomes; | ||||
|     public BlockState[][] result; | ||||
| @@ -110,7 +103,7 @@ public class GenChunk extends ScopedQueueCoordinator { | ||||
|     /** | ||||
|      * Set the world and XZ of the chunk being represented via {@link ChunkWrapper} | ||||
|      * | ||||
|      * @param wrap P2 ChunkWrapper | ||||
|      * @param wrap PlotSquared ChunkWrapper | ||||
|      */ | ||||
|     public void setChunk(@NonNull ChunkWrapper wrap) { | ||||
|         chunk = null; | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.queue; | ||||
|  | ||||
| @@ -44,7 +37,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; | ||||
| /** | ||||
|  * Wraps a {@link LimitedRegion} inside a {@link com.plotsquared.core.queue.QueueCoordinator} so it can be written to. | ||||
|  * | ||||
|  * @since TODO | ||||
|  * @since 6.9.0 | ||||
|  */ | ||||
| public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator { | ||||
|  | ||||
| @@ -53,7 +46,7 @@ public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator { | ||||
|     private final LimitedRegion limitedRegion; | ||||
|  | ||||
|     /** | ||||
|      * @since TODO | ||||
|      * @since 6.9.0 | ||||
|      */ | ||||
|     public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) { | ||||
|         super(null); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.schematic; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.schematic; | ||||
|  | ||||
| @@ -63,7 +56,7 @@ public class StateWrapper { | ||||
|      * @deprecated in favour of using WE methods for obtaining NBT, specifically by obtaining a | ||||
|      *         {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()} | ||||
|      */ | ||||
|     @Deprecated(forRemoval = true, since = "TODO") | ||||
|     @Deprecated(forRemoval = true, since = "6.9.0") | ||||
|     public StateWrapper(org.bukkit.block.BlockState state) { | ||||
|         this.state = state; | ||||
|     } | ||||
| @@ -267,7 +260,7 @@ public class StateWrapper { | ||||
|      * @deprecated in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining a | ||||
|      *         {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()} | ||||
|      */ | ||||
|     @Deprecated(forRemoval = true, since = "TODO") | ||||
|     @Deprecated(forRemoval = true, since = "6.9.0") | ||||
|     public CompoundTag getTag() { | ||||
|         if (this.tag != null) { | ||||
|             return this.tag; | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
| @@ -50,7 +43,9 @@ import com.plotsquared.core.util.EntityUtil; | ||||
| import com.plotsquared.core.util.Permissions; | ||||
| import com.plotsquared.core.util.entity.EntityCategories; | ||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.bukkit.entity.Arrow; | ||||
| import org.bukkit.entity.Creature; | ||||
| import org.bukkit.entity.Entity; | ||||
| @@ -188,7 +183,10 @@ public class BukkitEntityUtil { | ||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", Permission.PERMISSION_ADMIN_DESTROY + "." + stub) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) | ||||
|                             ) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -200,7 +198,10 @@ public class BukkitEntityUtil { | ||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", Permission.PERMISSION_ADMIN_DESTROY + "." + stub) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) | ||||
|                             ) | ||||
|                     ); | ||||
|                     if (plot != null) { | ||||
|                         plot.debug(player.getName() | ||||
| @@ -221,7 +222,10 @@ public class BukkitEntityUtil { | ||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) | ||||
|                             ) | ||||
|                     ); | ||||
|                     if (plot != null) { | ||||
|                         plot.debug(player.getName() + " could not attack " + entityType | ||||
| @@ -242,7 +246,10 @@ public class BukkitEntityUtil { | ||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) | ||||
|                             ) | ||||
|                     ); | ||||
|                     if (plot != null) { | ||||
|                         plot.debug(player.getName() + " could not attack " + entityType | ||||
| @@ -256,7 +263,10 @@ public class BukkitEntityUtil { | ||||
|                             .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVP + "." + stub)) { | ||||
|                         plotPlayer.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.no_permission_event"), | ||||
|                                 Template.of("node", Permission.PERMISSION_ADMIN_PVP + "." + stub) | ||||
|                                 TagResolver.resolver( | ||||
|                                         "node", | ||||
|                                         Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVP + "." + stub)) | ||||
|                                 ) | ||||
|                         ); | ||||
|                         plot.debug(player.getName() + " could not attack " + entityType | ||||
|                                 + " because pve = false"); | ||||
| @@ -270,7 +280,10 @@ public class BukkitEntityUtil { | ||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVP + "." + stub)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", Permission.PERMISSION_ADMIN_PVP + "." + stub) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVP + "." + stub)) | ||||
|                             ) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -287,7 +300,10 @@ public class BukkitEntityUtil { | ||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) | ||||
|                             ) | ||||
|                     ); | ||||
|                     if (plot != null) { | ||||
|                         plot.debug(player.getName() + " could not attack " + entityType | ||||
| @@ -309,7 +325,10 @@ public class BukkitEntityUtil { | ||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||
|                     plotPlayer.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission_event"), | ||||
|                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) | ||||
|                             ) | ||||
|                     ); | ||||
|                     if (plot != null) { | ||||
|                         plot.debug(player.getName() + " could not attack " + entityType | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
| @@ -63,7 +56,7 @@ public class BukkitInventoryUtil extends InventoryUtil { | ||||
|         ItemMeta meta = null; | ||||
|         if (item.getName() != null) { | ||||
|             meta = stack.getItemMeta(); | ||||
|             Component nameComponent = BukkitUtil.MINI_MESSAGE.parse(item.getName()); | ||||
|             Component nameComponent = BukkitUtil.MINI_MESSAGE.deserialize(item.getName()); | ||||
|             meta.setDisplayName(BukkitUtil.LEGACY_COMPONENT_SERIALIZER.serialize(nameComponent)); | ||||
|         } | ||||
|         if (item.getLore() != null) { | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
| @@ -37,7 +30,7 @@ import com.plotsquared.core.plot.PlotArea; | ||||
| import com.plotsquared.core.plot.PlotManager; | ||||
| import com.plotsquared.core.queue.GlobalBlockQueue; | ||||
| import com.plotsquared.core.queue.QueueCoordinator; | ||||
| import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | ||||
| import com.plotsquared.core.util.ChunkManager; | ||||
| import com.plotsquared.core.util.RegionManager; | ||||
| import com.plotsquared.core.util.WorldUtil; | ||||
| @@ -264,9 +257,9 @@ public class BukkitRegionManager extends RegionManager { | ||||
|             map.saveEntitiesOut(Bukkit.getWorld(world.getName()).getChunkAt(x, z), currentPlotClear); | ||||
|             AugmentedUtils.bypass( | ||||
|                     ignoreAugment, | ||||
|                     () -> ChunkManager.setChunkInPlotArea(null, new RunnableVal<ScopedQueueCoordinator>() { | ||||
|                     () -> ChunkManager.setChunkInPlotArea(null, new RunnableVal<ZeroedDelegateScopedQueueCoordinator>() { | ||||
|                         @Override | ||||
|                         public void run(ScopedQueueCoordinator value) { | ||||
|                         public void run(ZeroedDelegateScopedQueueCoordinator value) { | ||||
|                             Location min = value.getMin(); | ||||
|                             int bx = min.getX(); | ||||
|                             int bz = min.getZ(); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
| @@ -52,7 +45,7 @@ import com.sk89q.worldedit.world.block.BlockTypes; | ||||
| import io.papermc.lib.PaperLib; | ||||
| import net.kyori.adventure.platform.bukkit.BukkitAudiences; | ||||
| import net.kyori.adventure.text.minimessage.MiniMessage; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; | ||||
| import org.apache.logging.log4j.LogManager; | ||||
| import org.apache.logging.log4j.Logger; | ||||
| @@ -339,7 +332,7 @@ public class BukkitUtil extends WorldUtil { | ||||
|     @SuppressWarnings("deprecation") | ||||
|     public void setSign( | ||||
|             final @NonNull Location location, final @NonNull Caption[] lines, | ||||
|             final @NonNull Template... replacements | ||||
|             final @NonNull TagResolver... replacements | ||||
|     ) { | ||||
|         ensureLoaded(location.getWorldName(), location.getX(), location.getZ(), chunk -> { | ||||
|             PlotArea area = location.getPlotArea(); | ||||
| @@ -372,8 +365,9 @@ public class BukkitUtil extends WorldUtil { | ||||
|             final org.bukkit.block.BlockState blockstate = block.getState(); | ||||
|             if (blockstate instanceof final Sign sign) { | ||||
|                 for (int i = 0; i < lines.length; i++) { | ||||
|                     sign.setLine(i, LEGACY_COMPONENT_SERIALIZER | ||||
|                             .serialize(MINI_MESSAGE.parse(lines[i].getComponent(LocaleHolder.console()), replacements))); | ||||
|                     sign.setLine(i, LEGACY_COMPONENT_SERIALIZER.serialize( | ||||
|                             MINI_MESSAGE.deserialize(lines[i].getComponent(LocaleHolder.console()), replacements) | ||||
|                     )); | ||||
|                 } | ||||
|                 sign.update(true, false); | ||||
|             } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
| @@ -31,7 +24,6 @@ import org.bukkit.Bukkit; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
|  | ||||
| import java.util.Map; | ||||
| import java.util.Objects; | ||||
|  | ||||
| public class BukkitWorld implements World<org.bukkit.World> { | ||||
|  | ||||
| @@ -140,14 +132,6 @@ public class BukkitWorld implements World<org.bukkit.World> { | ||||
|         return world.hashCode(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @deprecated This method is not meant to be invoked or overridden, with no replacement. | ||||
|      */ | ||||
|     @Deprecated(forRemoval = true, since = "6.6.0") | ||||
|     protected boolean canEqual(final Object other) { | ||||
|         return other instanceof BukkitWorld; | ||||
|     } | ||||
|  | ||||
|     public String toString() { | ||||
|         return "BukkitWorld(world=" + this.world + ")"; | ||||
|     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util.fawe; | ||||
|  | ||||
| @@ -105,11 +98,6 @@ public class FaweRegionManager extends BukkitRegionManager { | ||||
|         delegate.swap(pos1, pos2, swapPos, whenDone); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void setBiome(CuboidRegion region, int extendBiome, BiomeType biome, String world, Runnable whenDone) { | ||||
|         delegate.setBiome(region, extendBiome, biome, world, whenDone); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void setBiome(CuboidRegion region, int extendBiome, BiomeType biome, PlotArea area, Runnable whenDone) { | ||||
|         delegate.setBiome(region, extendBiome, biome, area.getWorldName(), whenDone); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util.fawe; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util.task; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util.task; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util.task; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.util.task; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.uuid; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.uuid; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.uuid; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.uuid; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.uuid; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.bukkit.uuid; | ||||
|  | ||||
|   | ||||
| @@ -59,7 +59,7 @@ tasks { | ||||
|     withType<Javadoc> { | ||||
|         val opt = options as StandardJavadocDocletOptions | ||||
|         opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString()) | ||||
|         opt.links("https://jd.adventure.kyori.net/api/" + libs.adventure.get().versionConstraint.toString()) | ||||
|         opt.links("https://jd.adventure.kyori.net/api/4.9.3/") | ||||
|         opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/") | ||||
|         opt.links("https://checkerframework.org/api/") | ||||
|     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core; | ||||
|  | ||||
| @@ -37,7 +30,7 @@ import com.plotsquared.core.util.ChunkManager; | ||||
| import com.plotsquared.core.util.EventDispatcher; | ||||
| import com.plotsquared.core.util.SchematicHandler; | ||||
| import com.plotsquared.core.util.query.PlotQuery; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
| import org.checkerframework.checker.nullness.qual.Nullable; | ||||
|  | ||||
| @@ -152,7 +145,7 @@ public class PlotAPI { | ||||
|      */ | ||||
|     public void sendConsoleMessage( | ||||
|             final @NonNull String message, | ||||
|             final @NonNull Template @NonNull ... replacements | ||||
|             final @NonNull TagResolver @NonNull ... replacements | ||||
|     ) { | ||||
|         ConsolePlayer.getConsole().sendMessage(StaticCaption.of(message), replacements); | ||||
|     } | ||||
| @@ -165,7 +158,7 @@ public class PlotAPI { | ||||
|      */ | ||||
|     public void sendConsoleMessage( | ||||
|             final @NonNull Caption caption, | ||||
|             final @NonNull Template @NonNull ... replacements | ||||
|             final @NonNull TagResolver @NonNull ... replacements | ||||
|     ) { | ||||
|         ConsolePlayer.getConsole().sendMessage(caption, replacements); | ||||
|     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core; | ||||
|  | ||||
| @@ -359,9 +352,9 @@ public interface PlotPlatform<P> extends LocaleHolder { | ||||
|     @NonNull String toLegacyPlatformString(@NonNull Component component); | ||||
|  | ||||
|     /** | ||||
|      * Returns if the FAWE-P2 hook is active/enabled | ||||
|      * Returns if the FastAsyncWorldEdit-PlotSquared hook is active/enabled | ||||
|      * | ||||
|      * @return status of FAWE-P2 hook | ||||
|      * @return status of FastAsyncWorldEdit-PlotSquared hook | ||||
|      */ | ||||
|     default boolean isFaweHooking() { | ||||
|         return false; | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core; | ||||
|  | ||||
| @@ -72,7 +65,10 @@ import com.plotsquared.core.util.ReflectionUtils; | ||||
| import com.plotsquared.core.util.task.TaskManager; | ||||
| import com.plotsquared.core.uuid.UUIDPipeline; | ||||
| import com.sk89q.worldedit.WorldEdit; | ||||
| import com.sk89q.worldedit.event.platform.PlatformReadyEvent; | ||||
| import com.sk89q.worldedit.math.BlockVector2; | ||||
| import com.sk89q.worldedit.util.eventbus.EventHandler; | ||||
| import com.sk89q.worldedit.util.eventbus.Subscribe; | ||||
| import org.apache.logging.log4j.LogManager; | ||||
| import org.apache.logging.log4j.Logger; | ||||
| import org.checkerframework.checker.nullness.qual.MonotonicNonNull; | ||||
| @@ -153,6 +149,8 @@ public class PlotSquared { | ||||
|     private EventDispatcher eventDispatcher; | ||||
|     private PlotListener plotListener; | ||||
|  | ||||
|     private boolean weInitialised; | ||||
|  | ||||
|     /** | ||||
|      * Initialize PlotSquared with the desired Implementation class. | ||||
|      * | ||||
| @@ -223,6 +221,7 @@ public class PlotSquared { | ||||
|             } | ||||
|  | ||||
|             this.worldedit = WorldEdit.getInstance(); | ||||
|             WorldEdit.getInstance().getEventBus().register(new WEPlatformReadyListener()); | ||||
|  | ||||
|             // Create Event utility class | ||||
|             this.eventDispatcher = new EventDispatcher(this.worldedit); | ||||
| @@ -787,7 +786,9 @@ public class PlotSquared { | ||||
|         if (world.equals("CheckingPlotSquaredGenerator")) { | ||||
|             return; | ||||
|         } | ||||
|         this.getPlotAreaManager().addWorld(world); | ||||
|         if (!this.getPlotAreaManager().addWorld(world)) { | ||||
|             return; | ||||
|         } | ||||
|         Set<String> worlds; | ||||
|         if (this.worldConfiguration.contains("worlds")) { | ||||
|             worlds = this.worldConfiguration.getConfigurationSection("worlds").getKeys(false); | ||||
| @@ -1574,6 +1575,13 @@ public class PlotSquared { | ||||
|         return this.plotListener; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Get if the {@link PlatformReadyEvent} has been sent by WorldEdit. There is no way to query this within WorldEdit itself. | ||||
|      */ | ||||
|     public boolean isWeInitialised() { | ||||
|         return weInitialised; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Different ways of sorting {@link Plot plots} | ||||
|      */ | ||||
| @@ -1596,4 +1604,15 @@ public class PlotSquared { | ||||
|         DISTANCE_FROM_ORIGIN | ||||
|     } | ||||
|  | ||||
|     private final class WEPlatformReadyListener { | ||||
|  | ||||
|         @SuppressWarnings("unused") | ||||
|         @Subscribe(priority = EventHandler.Priority.VERY_EARLY) | ||||
|         public void onPlatformReady(PlatformReadyEvent event) { | ||||
|             weInitialised = true; | ||||
|             WorldEdit.getInstance().getEventBus().unregister(WEPlatformReadyListener.this); | ||||
|         } | ||||
|  | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.backup; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.backup; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.backup; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.backup; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.backup; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.backup; | ||||
|  | ||||
| @@ -207,7 +200,7 @@ public class PlayerBackupProfile implements BackupProfile { | ||||
|                                     if (value) { | ||||
|                                         future.complete(null); | ||||
|                                     } else { | ||||
|                                         future.completeExceptionally(new RuntimeException(MINI_MESSAGE.stripTokens( | ||||
|                                         future.completeExceptionally(new RuntimeException(MINI_MESSAGE.escapeTags( | ||||
|                                                 TranslatableCaption | ||||
|                                                         .of("schematics.schematic_paste_failed") | ||||
|                                                         .getComponent(ConsolePlayer.getConsole())))); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.backup; | ||||
|  | ||||
| @@ -31,13 +24,14 @@ import com.google.inject.Inject; | ||||
| import com.google.inject.Singleton; | ||||
| import com.plotsquared.core.PlotSquared; | ||||
| import com.plotsquared.core.configuration.Settings; | ||||
| import com.plotsquared.core.configuration.caption.Templates; | ||||
| import com.plotsquared.core.configuration.caption.TranslatableCaption; | ||||
| import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory; | ||||
| import com.plotsquared.core.player.PlotPlayer; | ||||
| import com.plotsquared.core.plot.Plot; | ||||
| import com.plotsquared.core.util.task.TaskManager; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
| import org.checkerframework.checker.nullness.qual.Nullable; | ||||
|  | ||||
| @@ -107,7 +101,7 @@ public class SimpleBackupManager implements BackupManager { | ||||
|             if (player != null) { | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("backups.backup_automatic_started"), | ||||
|                         Template.of("plot", plot.getId().toString()) | ||||
|                         TagResolver.resolver("plot", Tag.inserting(Component.text(plot.getId().toString()))) | ||||
|                 ); | ||||
|             } | ||||
|             profile.createBackup().whenComplete((backup, throwable) -> { | ||||
| @@ -115,7 +109,7 @@ public class SimpleBackupManager implements BackupManager { | ||||
|                     if (player != null) { | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("backups.backup_automatic_failure"), | ||||
|                                 Templates.of("reason", throwable.getMessage()) | ||||
|                                 TagResolver.resolver("reason", Tag.inserting(Component.text(throwable.getMessage()))) | ||||
|                         ); | ||||
|                     } | ||||
|                     throwable.printStackTrace(); | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.collection; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.collection; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.collection; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.collection; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.collection; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.collection; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.command; | ||||
|  | ||||
| @@ -38,7 +31,9 @@ import com.plotsquared.core.util.PlayerManager; | ||||
| import com.plotsquared.core.util.TabCompletions; | ||||
| import com.plotsquared.core.util.task.RunnableVal2; | ||||
| import com.plotsquared.core.util.task.RunnableVal3; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
|  | ||||
| import java.util.Collection; | ||||
| @@ -77,7 +72,7 @@ public class Add extends Command { | ||||
|                 TranslatableCaption.of("permission.no_plot_perms") | ||||
|         ); | ||||
|         checkTrue(args.length == 1, TranslatableCaption.of("commandconfig.command_syntax"), | ||||
|                 Template.of("value", "/plot add <player | *>") | ||||
|                 TagResolver.resolver("value", Tag.inserting(Component.text("/plot add <player | *>"))) | ||||
|         ); | ||||
|         final CompletableFuture<Boolean> future = new CompletableFuture<>(); | ||||
|         PlayerManager.getUUIDsFromString(args[0], (uuids, throwable) -> { | ||||
| @@ -87,7 +82,7 @@ public class Add extends Command { | ||||
|                 } else { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("errors.invalid_player"), | ||||
|                             Template.of("value", args[0]) | ||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(args[0]))) | ||||
|                     ); | ||||
|                 } | ||||
|                 future.completeExceptionally(throwable); | ||||
| @@ -95,7 +90,7 @@ public class Add extends Command { | ||||
|             } else { | ||||
|                 try { | ||||
|                     checkTrue(!uuids.isEmpty(), TranslatableCaption.of("errors.invalid_player"), | ||||
|                             Template.of("value", args[0]) | ||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(args[0]))) | ||||
|                     ); | ||||
|                     Iterator<UUID> iterator = uuids.iterator(); | ||||
|                     int size = plot.getTrusted().size() + plot.getMembers().size(); | ||||
| @@ -106,7 +101,9 @@ public class Add extends Command { | ||||
|                                         .hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) { | ||||
|                             player.sendMessage( | ||||
|                                     TranslatableCaption.of("errors.invalid_player"), | ||||
|                                     Template.of("value", PlayerManager.resolveName(uuid).getComponent(player)) | ||||
|                                     TagResolver.resolver("value", Tag.inserting( | ||||
|                                             PlayerManager.resolveName(uuid).toComponent(player) | ||||
|                                     )) | ||||
|                             ); | ||||
|                             iterator.remove(); | ||||
|                             continue; | ||||
| @@ -114,7 +111,9 @@ public class Add extends Command { | ||||
|                         if (plot.isOwner(uuid)) { | ||||
|                             player.sendMessage( | ||||
|                                     TranslatableCaption.of("member.already_added"), | ||||
|                                     Template.of("player", PlayerManager.resolveName(uuid).getComponent(player)) | ||||
|                                     TagResolver.resolver("player", Tag.inserting( | ||||
|                                             PlayerManager.resolveName(uuid).toComponent(player) | ||||
|                                     )) | ||||
|                             ); | ||||
|                             iterator.remove(); | ||||
|                             continue; | ||||
| @@ -122,7 +121,9 @@ public class Add extends Command { | ||||
|                         if (plot.getMembers().contains(uuid)) { | ||||
|                             player.sendMessage( | ||||
|                                     TranslatableCaption.of("member.already_added"), | ||||
|                                     Template.of("player", PlayerManager.resolveName(uuid).getComponent(player)) | ||||
|                                     TagResolver.resolver("player", Tag.inserting( | ||||
|                                             PlayerManager.resolveName(uuid).toComponent(player) | ||||
|                                     )) | ||||
|                             ); | ||||
|                             iterator.remove(); | ||||
|                             continue; | ||||
| @@ -135,7 +136,7 @@ public class Add extends Command { | ||||
|                     if (localAddSize >= maxAddSize) { | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("members.plot_max_members_added"), | ||||
|                                 Template.of("amount", String.valueOf(localAddSize)) | ||||
|                                 TagResolver.resolver("amount", Tag.inserting(Component.text(localAddSize))) | ||||
|                         ); | ||||
|                         return; | ||||
|                     } | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.command; | ||||
|  | ||||
| @@ -35,7 +28,9 @@ import com.plotsquared.core.plot.Plot; | ||||
| import com.plotsquared.core.util.MathMan; | ||||
| import com.plotsquared.core.util.Permissions; | ||||
| import com.plotsquared.core.util.query.PlotQuery; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
|  | ||||
| import java.util.ArrayList; | ||||
| import java.util.Collection; | ||||
| @@ -99,7 +94,10 @@ public class Alias extends SubCommand { | ||||
|                 } else { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ALIAS_SET)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ALIAS_SET) | ||||
|                             ) | ||||
|                     ); | ||||
|                 } | ||||
|             } | ||||
| @@ -115,7 +113,10 @@ public class Alias extends SubCommand { | ||||
|                 } else { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_ALIAS_REMOVE)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_ALIAS_REMOVE) | ||||
|                             ) | ||||
|                     ); | ||||
|                 } | ||||
|             } | ||||
| @@ -156,13 +157,16 @@ public class Alias extends SubCommand { | ||||
|                     .anyMatch()) { | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("alias.alias_is_taken"), | ||||
|                         Template.of("alias", alias) | ||||
|                         TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) | ||||
|                 ); | ||||
|                 return; | ||||
|             } | ||||
|             if (Settings.UUID.OFFLINE) { | ||||
|                 plot.setAlias(alias); | ||||
|                 player.sendMessage(TranslatableCaption.of("alias.alias_set_to"), Template.of("alias", alias)); | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("alias.alias_set_to"), | ||||
|                         TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) | ||||
|                 ); | ||||
|                 return; | ||||
|             } | ||||
|             PlotSquared.get().getImpromptuUUIDPipeline().getSingle(alias, ((uuid, throwable) -> { | ||||
| @@ -171,13 +175,13 @@ public class Alias extends SubCommand { | ||||
|                 } else if (uuid != null) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("alias.alias_is_taken"), | ||||
|                             Template.of("alias", alias) | ||||
|                             TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) | ||||
|                     ); | ||||
|                 } else { | ||||
|                     plot.setAlias(alias); | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("alias.alias_set_to"), | ||||
|                             Template.of("alias", alias) | ||||
|                             TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) | ||||
|                     ); | ||||
|                 } | ||||
|             })); | ||||
| @@ -189,7 +193,7 @@ public class Alias extends SubCommand { | ||||
|         if (!plot.getAlias().isEmpty()) { | ||||
|             player.sendMessage( | ||||
|                     TranslatableCaption.of("alias.alias_removed"), | ||||
|                     Template.of("alias", alias) | ||||
|                     TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) | ||||
|             ); | ||||
|         } else { | ||||
|             player.sendMessage( | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.command; | ||||
|  | ||||
| @@ -31,7 +24,6 @@ import com.plotsquared.core.configuration.ConfigurationSection; | ||||
| import com.plotsquared.core.configuration.ConfigurationUtil; | ||||
| import com.plotsquared.core.configuration.Settings; | ||||
| import com.plotsquared.core.configuration.caption.CaptionHolder; | ||||
| import com.plotsquared.core.configuration.caption.Templates; | ||||
| import com.plotsquared.core.configuration.caption.TranslatableCaption; | ||||
| import com.plotsquared.core.configuration.file.YamlConfiguration; | ||||
| import com.plotsquared.core.events.TeleportCause; | ||||
| @@ -76,7 +68,9 @@ import com.sk89q.worldedit.math.BlockVector3; | ||||
| import com.sk89q.worldedit.regions.CuboidRegion; | ||||
| import com.sk89q.worldedit.regions.Region; | ||||
| import com.sk89q.worldedit.world.World; | ||||
| import net.kyori.adventure.text.minimessage.Template; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
|  | ||||
| import java.io.File; | ||||
| @@ -148,14 +142,17 @@ public class Area extends SubCommand { | ||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_CREATE)) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_CREATE)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_CREATE) | ||||
|                             ) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
|                 if (args.length < 2) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("single.single_area_needs_name"), | ||||
|                             Template.of("command", "/plot area single <name>") | ||||
|                             TagResolver.resolver("command", Tag.inserting(Component.text("/plot area single <name>"))) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -287,7 +284,7 @@ public class Area extends SubCommand { | ||||
|                     } else { | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("errors.error_create"), | ||||
|                                 Template.of("world", hybridPlotWorld.getWorldName()) | ||||
|                                 TagResolver.resolver("world", Tag.inserting(Component.text(hybridPlotWorld.getWorldName()))) | ||||
|                         ); | ||||
|                     } | ||||
|                 }; | ||||
| @@ -298,7 +295,10 @@ public class Area extends SubCommand { | ||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_CREATE)) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_CREATE)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_CREATE) | ||||
|                             ) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -306,7 +306,10 @@ public class Area extends SubCommand { | ||||
|                     case 1: | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("commandconfig.command_syntax"), | ||||
|                                 Templates.of("value", "/plot area create [world[:id]] [<modifier>=<value>]...") | ||||
|                                 TagResolver.resolver( | ||||
|                                         "value", | ||||
|                                         Tag.inserting(Component.text("/plot area create [world[:id]] [<modifier>=<value>]...")) | ||||
|                                 ) | ||||
|                         ); | ||||
|                         return false; | ||||
|                     case 2: | ||||
| @@ -320,7 +323,11 @@ public class Area extends SubCommand { | ||||
|                                 if (area == null) { | ||||
|                                     player.sendMessage( | ||||
|                                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||
|                                             Templates.of("value", "/plot area create [world[:id]] [<modifier>=<value>]...") | ||||
|                                             TagResolver.resolver( | ||||
|                                                     "value", | ||||
|                                                     Tag.inserting(Component.text( | ||||
|                                                             "/plot area create [world[:id]] [<modifier>=<value>]...")) | ||||
|                                             ) | ||||
|                                     ); | ||||
|                                     return false; | ||||
|                                 } | ||||
| @@ -331,12 +338,18 @@ public class Area extends SubCommand { | ||||
|                                 ); | ||||
|                                 player.sendMessage( | ||||
|                                         TranslatableCaption.of("set.set_attribute"), | ||||
|                                         Template.of("attribute", "area_pos1"), | ||||
|                                         Template.of("value", location.getX() + "," + location.getZ()) | ||||
|                                         TagResolver.builder() | ||||
|                                                 .tag("attribute", Tag.inserting(Component.text("area_pos1"))) | ||||
|                                                 .tag("value", Tag.inserting( | ||||
|                                                         Component.text(location.getX()) | ||||
|                                                                 .append(Component.text(",")) | ||||
|                                                                 .append(Component.text(location.getZ())) | ||||
|                                                 )) | ||||
|                                                 .build() | ||||
|                                 ); | ||||
|                                 player.sendMessage( | ||||
|                                         TranslatableCaption.of("area.set_pos2"), | ||||
|                                         Template.of("command", "/plot area create pos2") | ||||
|                                         TagResolver.resolver("command", Tag.inserting(Component.text("/plot area create pos2"))) | ||||
|                                 ); | ||||
|                                 return true; | ||||
|                             } | ||||
| @@ -350,7 +363,11 @@ public class Area extends SubCommand { | ||||
|                                 if (area == null) { | ||||
|                                     player.sendMessage( | ||||
|                                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||
|                                             Templates.of("value", "/plot area create [world[:id]] [<modifier>=<value>]...") | ||||
|                                             TagResolver.resolver( | ||||
|                                                     "value", | ||||
|                                                     Tag.inserting(Component.text( | ||||
|                                                             "/plot area create [world[:id]] [<modifier>=<value>]...")) | ||||
|                                             ) | ||||
|                                     ); | ||||
|                                     return false; | ||||
|                                 } | ||||
| @@ -377,7 +394,10 @@ public class Area extends SubCommand { | ||||
|                                 if (!areas.isEmpty()) { | ||||
|                                     player.sendMessage( | ||||
|                                             TranslatableCaption.of("cluster.cluster_intersection"), | ||||
|                                             Template.of("cluster", areas.iterator().next().toString()) | ||||
|                                             TagResolver.resolver( | ||||
|                                                     "cluster", | ||||
|                                                     Tag.inserting(areas.iterator().next()) | ||||
|                                             ) | ||||
|                                     ); | ||||
|                                     return false; | ||||
|                                 } | ||||
| @@ -403,8 +423,7 @@ public class Area extends SubCommand { | ||||
|                                         player.sendMessage(TranslatableCaption.of("setup.setup_finished")); | ||||
|                                         if (area.getTerrain() != PlotAreaTerrainType.ALL) { | ||||
|                                             QueueCoordinator queue = blockQueue.getNewQueue(worldUtil.getWeWorld(world)); | ||||
|                                             queue.setChunkConsumer(chunk -> AugmentedUtils.generate( | ||||
|                                                     null, | ||||
|                                             queue.setChunkConsumer(chunk -> AugmentedUtils.generateChunk( | ||||
|                                                     world, | ||||
|                                                     chunk.getX(), | ||||
|                                                     chunk.getZ(), | ||||
| @@ -416,7 +435,7 @@ public class Area extends SubCommand { | ||||
|                                     } else { | ||||
|                                         player.sendMessage( | ||||
|                                                 TranslatableCaption.of("errors.error_create"), | ||||
|                                                 Template.of("world", area.getWorldName()) | ||||
|                                                 TagResolver.resolver("world", Tag.inserting(Component.text(area.getWorldName()))) | ||||
|                                         ); | ||||
|                                     } | ||||
|                                 }; | ||||
| @@ -450,7 +469,7 @@ public class Area extends SubCommand { | ||||
|                         if (other != null && Objects.equals(pa.getId(), other.getId())) { | ||||
|                             player.sendMessage( | ||||
|                                     TranslatableCaption.of("setup.setup_world_taken"), | ||||
|                                     Template.of("value", pa.toString()) | ||||
|                                     TagResolver.resolver("value", Tag.inserting(Component.text(pa.getId()))) | ||||
|                             ); | ||||
|                             return false; | ||||
|                         } | ||||
| @@ -465,8 +484,13 @@ public class Area extends SubCommand { | ||||
|                             if (pair.length != 2) { | ||||
|                                 player.sendMessage( | ||||
|                                         TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||
|                                         Template.of("value1,", getCommandString()), | ||||
|                                         Template.of("value2", " create [world[:id]] [<modifier>=<value>]...") | ||||
|                                         TagResolver.builder() | ||||
|                                                 .tag("value1", Tag.inserting(Component.text(getCommandString()))) | ||||
|                                                 .tag( | ||||
|                                                         "value2", | ||||
|                                                         Tag.inserting(Component.text("create [world[:id]] [<modifier>=<value>]...")) | ||||
|                                                 ) | ||||
|                                                 .build() | ||||
|                                 ); | ||||
|                                 return false; | ||||
|                             } | ||||
| @@ -502,8 +526,14 @@ public class Area extends SubCommand { | ||||
|                                 default -> { | ||||
|                                     player.sendMessage( | ||||
|                                             TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||
|                                             Template.of("value1", getCommandString()), | ||||
|                                             Template.of("value2", " create [world[:id]] [<modifier>=<value>]...") | ||||
|                                             TagResolver.builder() | ||||
|                                                     .tag("value1", Tag.inserting(Component.text(getCommandString()))) | ||||
|                                                     .tag( | ||||
|                                                             "value2", | ||||
|                                                             Tag.inserting(Component.text( | ||||
|                                                                     " create [world[:id]] [<modifier>=<value>]...")) | ||||
|                                                     ) | ||||
|                                                     .build() | ||||
|                                     ); | ||||
|                                     return false; | ||||
|                                 } | ||||
| @@ -513,7 +543,7 @@ public class Area extends SubCommand { | ||||
|                             if (this.worldUtil.isWorld(pa.getWorldName())) { | ||||
|                                 player.sendMessage( | ||||
|                                         TranslatableCaption.of("setup.setup_world_taken"), | ||||
|                                         Template.of("value", pa.getWorldName()) | ||||
|                                         TagResolver.resolver("value", Tag.inserting(Component.text(pa.getWorldName()))) | ||||
|                                 ); | ||||
|                                 return false; | ||||
|                             } | ||||
| @@ -534,7 +564,7 @@ public class Area extends SubCommand { | ||||
|                                 } else { | ||||
|                                     player.sendMessage( | ||||
|                                             TranslatableCaption.of("errors.error_create"), | ||||
|                                             Template.of("world", pa.getWorldName()) | ||||
|                                             TagResolver.resolver("world", Tag.inserting(Component.text(pa.getWorldName()))) | ||||
|                                     ); | ||||
|                                 } | ||||
|                                 try { | ||||
| @@ -553,12 +583,18 @@ public class Area extends SubCommand { | ||||
|                         if (pa.getId() == null) { | ||||
|                             player.sendMessage( | ||||
|                                     TranslatableCaption.of("commandconfig.command_syntax"), | ||||
|                                     Template.of("value", getUsage()) | ||||
|                                     TagResolver.resolver("value", Tag.inserting(Component.text(getUsage()))) | ||||
|                             ); | ||||
|                             player.sendMessage( | ||||
|                                     TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||
|                                     Template.of("value1", getCommandString()), | ||||
|                                     Template.of("value2", " create [world[:id]] [<modifier>=<value>]...") | ||||
|                                     TagResolver.builder() | ||||
|                                             .tag("value1", Tag.inserting(Component.text(getCommandString()))) | ||||
|                                             .tag( | ||||
|                                                     "value2", | ||||
|                                                     Tag.inserting(Component.text( | ||||
|                                                             " create [world[:id]] [<modifier>=<value>]...")) | ||||
|                                             ) | ||||
|                                             .build() | ||||
|                             ); | ||||
|                             return false; | ||||
|                         } | ||||
| @@ -575,7 +611,7 @@ public class Area extends SubCommand { | ||||
|                         metaData.computeIfAbsent(player.getUUID(), missingUUID -> new HashMap<>()).put("area_create_area", pa); | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("single.get_position"), | ||||
|                                 Template.of("command", getCommandString()) | ||||
|                                 TagResolver.resolver("command", Tag.inserting(Component.text(getCommandString()))) | ||||
|                         ); | ||||
|                         break; | ||||
|                 } | ||||
| @@ -585,7 +621,10 @@ public class Area extends SubCommand { | ||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_INFO)) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_INFO)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_INFO) | ||||
|                             ) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -596,15 +635,20 @@ public class Area extends SubCommand { | ||||
|                     default -> { | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||
|                                 Template.of("value1", getCommandString()), | ||||
|                                 Template.of("value2", " info [area]") | ||||
|                                 TagResolver.builder() | ||||
|                                         .tag("value1", Tag.inserting(Component.text(getCommandString()))) | ||||
|                                         .tag("value2", Tag.inserting(Component.text(" info [area]"))) | ||||
|                                         .build() | ||||
|                         ); | ||||
|                         return false; | ||||
|                     } | ||||
|                 } | ||||
|                 if (area == null) { | ||||
|                     if (args.length == 2) { | ||||
|                         player.sendMessage(TranslatableCaption.of("errors.not_valid_plot_world"), Template.of("value", args[1])); | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("errors.not_valid_plot_world"), | ||||
|                                 TagResolver.resolver("value", Tag.inserting(Component.text(args[1]))) | ||||
|                         ); | ||||
|                     } else { | ||||
|                         player.sendMessage(TranslatableCaption.of("errors.not_in_plot_world")); | ||||
|                     } | ||||
| @@ -628,42 +672,35 @@ public class Area extends SubCommand { | ||||
|                     percent = claimed == 0 ? 0 : 100d * claimed / Integer.MAX_VALUE; | ||||
|                     region = "N/A"; | ||||
|                 } | ||||
|                 Template headerTemplate = Template.of( | ||||
|                         "header", | ||||
|                         TranslatableCaption.of("info.plot_info_header").getComponent(player) | ||||
|                 ); | ||||
|                 Template nameTemplate = Template.of("name", name); | ||||
|                 Template typeTemplate = Template.of("type", area.getType().name()); | ||||
|                 Template terrainTemplate = Template.of("terrain", area.getTerrain().name()); | ||||
|                 Template usageTemplate = Template.of("usage", String.format("%.2f", percent)); | ||||
|                 Template claimedTemplate = Template.of("claimed", String.valueOf(claimed)); | ||||
|                 Template clustersTemplate = Template.of("clusters", String.valueOf(clusters)); | ||||
|                 Template regionTemplate = Template.of("region", region); | ||||
|                 Template generatorTemplate = Template.of("generator", generator); | ||||
|                 Template footerTemplate = Template.of( | ||||
|                         "footer", | ||||
|                         TranslatableCaption.of("info.plot_info_footer").getComponent(player) | ||||
|                 ); | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("info.area_info_format"), | ||||
|                         headerTemplate, | ||||
|                         nameTemplate, | ||||
|                         typeTemplate, | ||||
|                         terrainTemplate, | ||||
|                         usageTemplate, | ||||
|                         claimedTemplate, | ||||
|                         clustersTemplate, | ||||
|                         regionTemplate, | ||||
|                         generatorTemplate, | ||||
|                         footerTemplate | ||||
|                 ); | ||||
|                 TagResolver resolver = TagResolver.builder() | ||||
|                         .tag( | ||||
|                                 "header", | ||||
|                                 Tag.inserting(TranslatableCaption.of("info.plot_info_header").toComponent(player)) | ||||
|                         ) | ||||
|                         .tag("name", Tag.inserting(Component.text(name))) | ||||
|                         .tag("type", Tag.inserting(Component.text(area.getType().name()))) | ||||
|                         .tag("terrain", Tag.inserting(Component.text(area.getTerrain().name()))) | ||||
|                         .tag("usage", Tag.inserting(Component.text(String.format("%.2f", percent)))) | ||||
|                         .tag("claimed", Tag.inserting(Component.text(claimed))) | ||||
|                         .tag("clusters", Tag.inserting(Component.text(clusters))) | ||||
|                         .tag("region", Tag.inserting(Component.text(region))) | ||||
|                         .tag("generator", Tag.inserting(Component.text(generator))) | ||||
|                         .tag( | ||||
|                                 "footer", | ||||
|                                 Tag.inserting(TranslatableCaption.of("info.plot_info_footer").toComponent(player)) | ||||
|                         ) | ||||
|                         .build(); | ||||
|                 player.sendMessage(TranslatableCaption.of("info.area_info_format"), resolver); | ||||
|                 return true; | ||||
|             } | ||||
|             case "l", "list" -> { | ||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_LIST)) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_LIST)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_LIST) | ||||
|                             ) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -680,8 +717,10 @@ public class Area extends SubCommand { | ||||
|                     default: | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||
|                                 Template.of("value1", getCommandString()), | ||||
|                                 Template.of("value2", " list [#]") | ||||
|                                 TagResolver.builder() | ||||
|                                         .tag("value1", Tag.inserting(Component.text(getCommandString()))) | ||||
|                                         .tag("value2", Tag.inserting(Component.text(" list [#]"))) | ||||
|                                         .build() | ||||
|                         ); | ||||
|                         return false; | ||||
|                 } | ||||
| @@ -707,37 +746,27 @@ public class Area extends SubCommand { | ||||
|                             percent = claimed == 0 ? 0 : (double) claimed / Short.MAX_VALUE * Short.MAX_VALUE; | ||||
|                             region = "N/A"; | ||||
|                         } | ||||
|                         Template claimedTemplate = Template.of("claimed", String.valueOf(claimed)); | ||||
|                         Template usageTemplate = Template.of("usage", String.format("%.2f", percent) + "%"); | ||||
|                         Template clustersTemplate = Template.of("clusters", String.valueOf(clusters)); | ||||
|                         Template regionTemplate = Template.of("region", region); | ||||
|                         Template generatorTemplate = Template.of("generator", generator); | ||||
|                         String tooltip = MINI_MESSAGE.serialize(MINI_MESSAGE | ||||
|                                 .parse( | ||||
|                                         TranslatableCaption.of("info.area_list_tooltip").getComponent(player), | ||||
|                                         claimedTemplate, | ||||
|                                         usageTemplate, | ||||
|                                         clustersTemplate, | ||||
|                                         regionTemplate, | ||||
|                                         generatorTemplate | ||||
|                                 )); | ||||
|                         Template tooltipTemplate = Template.of("hover_info", tooltip); | ||||
|                         Template visitcmdTemplate = Template.of("command_tp", "/plot area tp " + area); | ||||
|                         Template infocmdTemplate = Template.of("command_info", "/plot area info " + area); | ||||
|                         Template numberTemplate = Template.of("number", String.valueOf(i)); | ||||
|                         Template nameTemplate = Template.of("area_name", name); | ||||
|                         Template typeTemplate = Template.of("area_type", area.getType().name()); | ||||
|                         Template terrainTemplate = Template.of("area_terrain", area.getTerrain().name()); | ||||
|                         caption.set(TranslatableCaption.of("info.area_list_item")); | ||||
|                         caption.setTemplates( | ||||
|                                 tooltipTemplate, | ||||
|                                 visitcmdTemplate, | ||||
|                                 numberTemplate, | ||||
|                                 nameTemplate, | ||||
|                                 typeTemplate, | ||||
|                                 terrainTemplate, | ||||
|                                 infocmdTemplate | ||||
|                         Component tooltip = MINI_MESSAGE.deserialize( | ||||
|                                 TranslatableCaption.of("info.area_list_tooltip").getComponent(player), | ||||
|                                 TagResolver.builder() | ||||
|                                         .tag("claimed", Tag.inserting(Component.text(claimed))) | ||||
|                                         .tag("usage", Tag.inserting(Component.text(String.format("%.2f", percent) + "%"))) | ||||
|                                         .tag("clusters", Tag.inserting(Component.text(clusters))) | ||||
|                                         .tag("region", Tag.inserting(Component.text(region))) | ||||
|                                         .tag("generator", Tag.inserting(Component.text(generator))) | ||||
|                                         .build() | ||||
|                         ); | ||||
|                         TagResolver resolver = TagResolver.builder() | ||||
|                                 .tag("hover_info", Tag.inserting(tooltip)) | ||||
|                                 .tag("command_tp", Tag.preProcessParsed("/plot area tp " + name)) | ||||
|                                 .tag("command_info", Tag.preProcessParsed("/plot area info " + name)) | ||||
|                                 .tag("number", Tag.inserting(Component.text(i))) | ||||
|                                 .tag("area_name", Tag.inserting(Component.text(name))) | ||||
|                                 .tag("area_type", Tag.inserting(Component.text(area.getType().name()))) | ||||
|                                 .tag("area_terrain", Tag.inserting(Component.text(area.getTerrain().name()))) | ||||
|                                 .build(); | ||||
|                         caption.set(TranslatableCaption.of("info.area_list_item")); | ||||
|                         caption.setTagResolvers(resolver); | ||||
|                     } | ||||
|                 }, "/plot area list", TranslatableCaption.of("list.area_list_header_paged")); | ||||
|                 return true; | ||||
| @@ -746,7 +775,10 @@ public class Area extends SubCommand { | ||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_REGEN)) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_REGEN)) | ||||
|                             TagResolver.resolver( | ||||
|                                     "node", | ||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_REGEN) | ||||
|                             ) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -758,13 +790,12 @@ public class Area extends SubCommand { | ||||
|                 if (area.getType() != PlotAreaType.PARTIAL) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("single.delete_world_region"), | ||||
|                             Template.of("world", area.getWorldName()) | ||||
|                             TagResolver.resolver("world", Tag.inserting(Component.text(area.getWorldName()))) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
|                 QueueCoordinator queue = blockQueue.getNewQueue(worldUtil.getWeWorld(area.getWorldName())); | ||||
|                 queue.setChunkConsumer(chunk -> AugmentedUtils.generate( | ||||
|                         null, | ||||
|                 queue.setChunkConsumer(chunk -> AugmentedUtils.generateChunk( | ||||
|                         area.getWorldName(), | ||||
|                         chunk.getX(), | ||||
|                         chunk.getZ(), | ||||
| @@ -779,20 +810,23 @@ public class Area extends SubCommand { | ||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_TP)) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.no_permission"), | ||||
|                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_TP)) | ||||
|                             TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_AREA_TP)) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
|                 if (args.length != 2) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||
|                             Template.of("value", "/plot area tp [area]") | ||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text("/plot area tp [area]"))) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
|                 PlotArea area = this.plotAreaManager.getPlotAreaByString(args[1]); | ||||
|                 if (area == null) { | ||||
|                     player.sendMessage(TranslatableCaption.of("errors.not_valid_plot_world"), Template.of("value", args[1])); | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("errors.not_valid_plot_world"), | ||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(args[1]))) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
|                 Location center; | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.command; | ||||
|  | ||||
|   | ||||
| @@ -1,27 +1,20 @@ | ||||
| /* | ||||
|  *       _____  _       _    _____                                _ | ||||
|  *      |  __ \| |     | |  / ____|                              | | | ||||
|  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||
|  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||
|  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||
|  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||
|  *                                    | | | ||||
|  *                                    |_| | ||||
|  *            PlotSquared plot management system for Minecraft | ||||
|  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||
|  * PlotSquared, a land and world management plugin for Minecraft. | ||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> | ||||
|  * Copyright (C) IntellectualSites team and contributors | ||||
|  * | ||||
|  *     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 | ||||
|  *     the Free Software Foundation, either version 3 of the License, or | ||||
|  *     (at your option) any later version. | ||||
|  * 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 | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  *     This program is distributed in the hope that it will be useful, | ||||
|  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  *     GNU General Public License for more details. | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  *     You should have received a copy of the GNU General Public License | ||||
|  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package com.plotsquared.core.command; | ||||
|  | ||||
| @@ -51,7 +44,9 @@ 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 net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.minimessage.tag.Tag; | ||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
| import org.checkerframework.checker.nullness.qual.Nullable; | ||||
|  | ||||
| @@ -117,13 +112,13 @@ public class Auto extends SubCommand { | ||||
|                     if (diff < 0 && grantedPlots < sizeX * sizeZ) { | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.cant_claim_more_plots"), | ||||
|                                 Template.of("amount", String.valueOf(diff + grantedPlots)) | ||||
|                                 TagResolver.resolver("amount", Tag.inserting(Component.text(diff + grantedPlots))) | ||||
|                         ); | ||||
|                         return false; | ||||
|                     } else if (diff >= 0 && grantedPlots + diff < sizeX * sizeZ) { | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("permission.cant_claim_more_plots"), | ||||
|                                 Template.of("amount", String.valueOf(diff + grantedPlots)) | ||||
|                                 TagResolver.resolver("amount", Tag.inserting(Component.text(diff + grantedPlots))) | ||||
|                         ); | ||||
|                         return false; | ||||
|                     } else { | ||||
| @@ -135,15 +130,16 @@ public class Auto extends SubCommand { | ||||
|                         } | ||||
|                         player.sendMessage( | ||||
|                                 TranslatableCaption.of("economy.removed_granted_plot"), | ||||
|                                 Template.of("usedGrants", String.valueOf(grantedPlots - left)), | ||||
|                                 Template.of("remainingGrants", String.valueOf(left)) | ||||
|                                 TagResolver.builder() | ||||
|                                         .tag("usedGrants", Tag.inserting(Component.text(grantedPlots - left))) | ||||
|                                         .tag("remainingGrants", Tag.inserting(Component.text(left))) | ||||
|                                         .build() | ||||
|                         ); | ||||
|                     } | ||||
|                 } else { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("permission.cant_claim_more_plots"), | ||||
|                             Template.of("amount", String.valueOf(player.getAllowedPlots()) | ||||
|                             ) | ||||
|                             TagResolver.resolver("amount", Tag.inserting(Component.text(player.getAllowedPlots()))) | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
| @@ -222,7 +218,7 @@ public class Auto extends SubCommand { | ||||
|                 } else { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||
|                             Template.of("value", getUsage()) | ||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(getUsage()))) | ||||
|                     ); | ||||
|                     return true; | ||||
|                 } | ||||
| @@ -245,7 +241,7 @@ public class Auto extends SubCommand { | ||||
|         if (event.getEventResult() == Result.DENY) { | ||||
|             player.sendMessage( | ||||
|                     TranslatableCaption.of("events.event_denied"), | ||||
|                     Template.of("value", "Auto claim") | ||||
|                     TagResolver.resolver("value", Tag.inserting(Component.text("Auto claim"))) | ||||
|             ); | ||||
|             return true; | ||||
|         } | ||||
| @@ -256,13 +252,13 @@ public class Auto extends SubCommand { | ||||
|         if (!force && mega && !Permissions.hasPermission(player, Permission.PERMISSION_AUTO_MEGA)) { | ||||
|             player.sendMessage( | ||||
|                     TranslatableCaption.of("permission.no_permission"), | ||||
|                     Template.of("node", String.valueOf(Permission.PERMISSION_AUTO_MEGA)) | ||||
|                     TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_AUTO_MEGA)) | ||||
|             ); | ||||
|         } | ||||
|         if (!force && sizeX * sizeZ > Settings.Claim.MAX_AUTO_AREA) { | ||||
|             player.sendMessage( | ||||
|                     TranslatableCaption.of("permission.cant_claim_more_plots_num"), | ||||
|                     Template.of("amount", String.valueOf(Settings.Claim.MAX_AUTO_AREA)) | ||||
|                     TagResolver.resolver("amount", Tag.inserting(Component.text(Settings.Claim.MAX_AUTO_AREA))) | ||||
|             ); | ||||
|             return false; | ||||
|         } | ||||
| @@ -280,8 +276,10 @@ public class Auto extends SubCommand { | ||||
|             if (!plotarea.hasSchematic(schematic)) { | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("schematics.schematic_invalid_named"), | ||||
|                         Template.of("schemname", schematic), | ||||
|                         Template.of("reason", "non-existent") | ||||
|                         TagResolver.builder() | ||||
|                                 .tag("schemname", Tag.inserting(Component.text(schematic))) | ||||
|                                 .tag("reason", Tag.inserting(Component.text("non-existent"))) | ||||
|                                 .build() | ||||
|                 ); | ||||
|                 return true; | ||||
|             } | ||||
| @@ -292,7 +290,7 @@ public class Auto extends SubCommand { | ||||
|                     .hasPermission(player, "plots.admin.command.schematic")) { | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("permission.no_permission"), | ||||
|                         Template.of("node", "plots.claim.%s0") | ||||
|                         TagResolver.resolver("node", Tag.inserting(Component.text("plots.claim.%s0"))) | ||||
|                 ); | ||||
|                 return true; | ||||
|             } | ||||
| @@ -311,15 +309,20 @@ public class Auto extends SubCommand { | ||||
|                 if (!force && this.econHandler.getMoney(player) < cost) { | ||||
|                     player.sendMessage( | ||||
|                             TranslatableCaption.of("economy.cannot_afford_plot"), | ||||
|                             Template.of("money", this.econHandler.format(cost)), | ||||
|                             Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player))) | ||||
|                             TagResolver.builder() | ||||
|                                     .tag("money", Tag.inserting(Component.text(this.econHandler.format(cost)))) | ||||
|                                     .tag( | ||||
|                                             "balance", | ||||
|                                             Tag.inserting(Component.text(this.econHandler.format(this.econHandler.getMoney(player)))) | ||||
|                                     ) | ||||
|                                     .build() | ||||
|                     ); | ||||
|                     return false; | ||||
|                 } | ||||
|                 this.econHandler.withdrawMoney(player, cost); | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("economy.removed_balance"), | ||||
|                         Template.of("money", this.econHandler.format(cost)) | ||||
|                         TagResolver.resolver("money", Tag.inserting(Component.text(this.econHandler.format(cost)))) | ||||
|                 ); | ||||
|             } | ||||
|         } | ||||
| @@ -353,7 +356,7 @@ public class Auto extends SubCommand { | ||||
|             if (!force && mergeEvent.getEventResult() == Result.DENY) { | ||||
|                 player.sendMessage( | ||||
|                         TranslatableCaption.of("events.event_denied"), | ||||
|                         Template.of("value", "Auto merge") | ||||
|                         TagResolver.resolver("value", Tag.inserting(Component.text("Auto merge"))) | ||||
|                 ); | ||||
|                 return false; | ||||
|             } | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user