mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-31 09:33:43 +01:00 
			
		
		
		
	Compare commits
	
		
			9 Commits
		
	
	
		
			refactor/v
			...
			feature/v6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 70baca7145 | ||
|   | 2a90015037 | ||
|   | f17aa377b7 | ||
|   | e159fa054d | ||
|   | 058c65e34c | ||
|   | 8608604306 | ||
|   | 8d0cc68721 | ||
|   | 2a79c0a419 | ||
|   | 90d42b8b9f | 
							
								
								
									
										4
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							| @@ -27,12 +27,14 @@ 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. |       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 |       multiple: false | ||||||
|       options: |       options: | ||||||
|         - '1.19' |  | ||||||
|         - '1.18.2' |         - '1.18.2' | ||||||
|         - '1.18.1' |         - '1.18.1' | ||||||
|         - '1.18' |         - '1.18' | ||||||
|         - '1.17.1' |         - '1.17.1' | ||||||
|         - '1.16.5' |         - '1.16.5' | ||||||
|  |         - '1.15.2' | ||||||
|  |         - '1.14.4' | ||||||
|  |         - '1.13.2' | ||||||
|     validations: |     validations: | ||||||
|       required: true |       required: true | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										24
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							| @@ -40,27 +40,3 @@ jobs: | |||||||
|         env: |         env: | ||||||
|           ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} |           ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | ||||||
|           ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} |           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 { | dependencies { | ||||||
|     api(projects.plotsquaredCore) |     api(projects.plotSquaredCore) | ||||||
|  |  | ||||||
|     // Metrics |     // Metrics | ||||||
|     implementation("org.bstats:bstats-bukkit") |     implementation("org.bstats:bstats-bukkit") | ||||||
| @@ -99,8 +99,8 @@ tasks { | |||||||
|         val opt = options as StandardJavadocDocletOptions |         val opt = options as StandardJavadocDocletOptions | ||||||
|         opt.links("https://jd.papermc.io/paper/1.18/") |         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://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString()) | ||||||
|         opt.links("https://intellectualsites.github.io/plotsquared-javadocs/core/") |         opt.links("https://javadoc.io/doc/com.plotsquared/PlotSquared-Core/latest/") | ||||||
|         opt.links("https://jd.adventure.kyori.net/api/4.9.3/") |         opt.links("https://jd.adventure.kyori.net/api/" + libs.adventure.get().versionConstraint.toString()) | ||||||
|         opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/") |         opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/") | ||||||
|         opt.links("https://checkerframework.org/api/") |         opt.links("https://checkerframework.org/api/") | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit; | package com.plotsquared.bukkit; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit; | package com.plotsquared.bukkit; | ||||||
|  |  | ||||||
| @@ -263,7 +270,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | |||||||
|  |  | ||||||
|         final PlotSquared plotSquared = new PlotSquared(this, "Bukkit"); |         final PlotSquared plotSquared = new PlotSquared(this, "Bukkit"); | ||||||
|  |  | ||||||
|         // FastAsyncWorldEdit |         // FAWE | ||||||
|         if (Settings.FAWE_Components.FAWE_HOOK) { |         if (Settings.FAWE_Components.FAWE_HOOK) { | ||||||
|             Plugin fawe = getServer().getPluginManager().getPlugin("FastAsyncWorldEdit"); |             Plugin fawe = getServer().getPluginManager().getPlugin("FastAsyncWorldEdit"); | ||||||
|             if (fawe != null) { |             if (fawe != null) { | ||||||
| @@ -271,7 +278,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | |||||||
|                     Class.forName("com.fastasyncworldedit.bukkit.regions.plotsquared.FaweQueueCoordinator"); |                     Class.forName("com.fastasyncworldedit.bukkit.regions.plotsquared.FaweQueueCoordinator"); | ||||||
|                     faweHook = true; |                     faweHook = true; | ||||||
|                 } catch (Exception ignored) { |                 } catch (Exception ignored) { | ||||||
|                     LOGGER.error("Incompatible version of FastAsyncWorldEdit to enable hook, please upgrade: https://ci.athion" + |                     LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" + | ||||||
|                             ".net/job/FastAsyncWorldEdit/"); |                             ".net/job/FastAsyncWorldEdit/"); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| @@ -425,7 +432,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | |||||||
|  |  | ||||||
|         plotSquared.startExpiryTasks(); |         plotSquared.startExpiryTasks(); | ||||||
|  |  | ||||||
|         // Once the server has loaded force updating all generators known to PlotSquared |         // Once the server has loaded force updating all generators known to P2 | ||||||
|         TaskManager.runTaskLater(() -> PlotSquared.platform().setupUtils().updateGenerators(true), TaskTime.ticks(1L)); |         TaskManager.runTaskLater(() -> PlotSquared.platform().setupUtils().updateGenerators(true), TaskTime.ticks(1L)); | ||||||
|  |  | ||||||
|         // Services are accessed in order |         // Services are accessed in order | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.entity; | package com.plotsquared.bukkit.entity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.generator; | package com.plotsquared.bukkit.generator; | ||||||
|  |  | ||||||
| @@ -26,7 +33,7 @@ import com.plotsquared.core.location.UncheckedWorldLocation; | |||||||
| import com.plotsquared.core.plot.PlotArea; | import com.plotsquared.core.plot.PlotArea; | ||||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | import com.plotsquared.core.plot.world.PlotAreaManager; | ||||||
| import com.plotsquared.core.plot.world.SinglePlotArea; | import com.plotsquared.core.plot.world.SinglePlotArea; | ||||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||||
| import org.bukkit.generator.BlockPopulator; | import org.bukkit.generator.BlockPopulator; | ||||||
| import org.bukkit.generator.LimitedRegion; | import org.bukkit.generator.LimitedRegion; | ||||||
| import org.bukkit.generator.WorldInfo; | import org.bukkit.generator.WorldInfo; | ||||||
| @@ -39,7 +46,7 @@ final class BlockStatePopulator extends BlockPopulator { | |||||||
|     private final IndependentPlotGenerator plotGenerator; |     private final IndependentPlotGenerator plotGenerator; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @since 6.9.0 |      * @since TODO | ||||||
|      */ |      */ | ||||||
|     public BlockStatePopulator( |     public BlockStatePopulator( | ||||||
|             final @NonNull IndependentPlotGenerator plotGenerator |             final @NonNull IndependentPlotGenerator plotGenerator | ||||||
| @@ -50,7 +57,7 @@ final class BlockStatePopulator extends BlockPopulator { | |||||||
|     /** |     /** | ||||||
|      * @deprecated Use {@link BlockStatePopulator#BlockStatePopulator(IndependentPlotGenerator)} as plotAreManager is unused |      * @deprecated Use {@link BlockStatePopulator#BlockStatePopulator(IndependentPlotGenerator)} as plotAreManager is unused | ||||||
|      */ |      */ | ||||||
|     @Deprecated(forRemoval = true, since = "6.9.0") |     @Deprecated(forRemoval = true, since = "TODO") | ||||||
|     public BlockStatePopulator( |     public BlockStatePopulator( | ||||||
|             final @NonNull IndependentPlotGenerator plotGenerator, |             final @NonNull IndependentPlotGenerator plotGenerator, | ||||||
|             final @NonNull PlotAreaManager plotAreaManager |             final @NonNull PlotAreaManager plotAreaManager | ||||||
| @@ -80,7 +87,7 @@ final class BlockStatePopulator extends BlockPopulator { | |||||||
|                 worldInfo.getMaxHeight(), |                 worldInfo.getMaxHeight(), | ||||||
|                 (chunkZ << 4) + 15 |                 (chunkZ << 4) + 15 | ||||||
|         ); |         ); | ||||||
|         ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(wrapped, min, max); |         ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(wrapped, min, max); | ||||||
|         this.plotGenerator.populateChunk(offsetChunkQueue, area); |         this.plotGenerator.populateChunk(offsetChunkQueue, area); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.generator; | package com.plotsquared.bukkit.generator; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.generator; | package com.plotsquared.bukkit.generator; | ||||||
|  |  | ||||||
| @@ -22,30 +29,20 @@ import com.plotsquared.bukkit.queue.GenChunk; | |||||||
| import com.plotsquared.bukkit.util.BukkitUtil; | import com.plotsquared.bukkit.util.BukkitUtil; | ||||||
| import com.plotsquared.bukkit.util.BukkitWorld; | import com.plotsquared.bukkit.util.BukkitWorld; | ||||||
| import com.plotsquared.core.PlotSquared; | import com.plotsquared.core.PlotSquared; | ||||||
| import com.plotsquared.core.generator.ClassicPlotWorld; |  | ||||||
| import com.plotsquared.core.generator.GeneratorWrapper; | import com.plotsquared.core.generator.GeneratorWrapper; | ||||||
| import com.plotsquared.core.generator.IndependentPlotGenerator; | import com.plotsquared.core.generator.IndependentPlotGenerator; | ||||||
| import com.plotsquared.core.generator.SingleWorldGenerator; | import com.plotsquared.core.generator.SingleWorldGenerator; | ||||||
| import com.plotsquared.core.location.ChunkWrapper; | import com.plotsquared.core.location.ChunkWrapper; | ||||||
| import com.plotsquared.core.location.UncheckedWorldLocation; |  | ||||||
| import com.plotsquared.core.plot.PlotArea; | import com.plotsquared.core.plot.PlotArea; | ||||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | import com.plotsquared.core.plot.world.PlotAreaManager; | ||||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||||
| import com.plotsquared.core.util.ChunkManager; | import com.plotsquared.core.util.ChunkManager; | ||||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; |  | ||||||
| import com.sk89q.worldedit.math.BlockVector2; | 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.World; | ||||||
| import org.bukkit.block.Biome; | import org.bukkit.block.Biome; | ||||||
| import org.bukkit.generator.BiomeProvider; |  | ||||||
| import org.bukkit.generator.BlockPopulator; | import org.bukkit.generator.BlockPopulator; | ||||||
| import org.bukkit.generator.ChunkGenerator; | import org.bukkit.generator.ChunkGenerator; | ||||||
| import org.bukkit.generator.WorldInfo; |  | ||||||
| import org.checkerframework.checker.nullness.qual.NonNull; | import org.checkerframework.checker.nullness.qual.NonNull; | ||||||
| import org.jetbrains.annotations.NotNull; |  | ||||||
| import org.jetbrains.annotations.Nullable; |  | ||||||
|  |  | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| @@ -54,8 +51,6 @@ import java.util.Set; | |||||||
|  |  | ||||||
| public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> { | public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> { | ||||||
|  |  | ||||||
|     private static final Logger LOGGER =  LogManager.getLogger("PlotSquared/" + BukkitPlotGenerator.class.getSimpleName()); |  | ||||||
|  |  | ||||||
|     @SuppressWarnings("unused") |     @SuppressWarnings("unused") | ||||||
|     public final boolean PAPER_ASYNC_SAFE = true; |     public final boolean PAPER_ASYNC_SAFE = true; | ||||||
|  |  | ||||||
| @@ -64,15 +59,9 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | |||||||
|     private final ChunkGenerator platformGenerator; |     private final ChunkGenerator platformGenerator; | ||||||
|     private final boolean full; |     private final boolean full; | ||||||
|     private final String levelName; |     private final String levelName; | ||||||
|     private final boolean useNewGenerationMethods; |  | ||||||
|     private final BiomeProvider biomeProvider; |  | ||||||
|     private List<BlockPopulator> populators; |     private List<BlockPopulator> populators; | ||||||
|     private boolean loaded = false; |     private boolean loaded = false; | ||||||
|  |  | ||||||
|     private PlotArea lastPlotArea; |  | ||||||
|     private int lastChunkX = Integer.MIN_VALUE; |  | ||||||
|     private int lastChunkZ = Integer.MIN_VALUE; |  | ||||||
|  |  | ||||||
|     public BukkitPlotGenerator( |     public BukkitPlotGenerator( | ||||||
|             final @NonNull String name, |             final @NonNull String name, | ||||||
|             final @NonNull IndependentPlotGenerator generator, |             final @NonNull IndependentPlotGenerator generator, | ||||||
| @@ -90,23 +79,18 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | |||||||
|             this.populators.add(new LegacyBlockStatePopulator(this.plotGenerator)); |             this.populators.add(new LegacyBlockStatePopulator(this.plotGenerator)); | ||||||
|         } |         } | ||||||
|         this.full = true; |         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) { |     public BukkitPlotGenerator(final String world, final ChunkGenerator cg, final @NonNull PlotAreaManager plotAreaManager) { | ||||||
|         if (cg instanceof BukkitPlotGenerator) { |         if (cg instanceof BukkitPlotGenerator) { | ||||||
|             throw new IllegalArgumentException("ChunkGenerator: " + cg |             throw new IllegalArgumentException("ChunkGenerator: " + cg.getClass().getName() | ||||||
|                     .getClass() |                     + " is already a BukkitPlotGenerator!"); | ||||||
|                     .getName() + " is already a BukkitPlotGenerator!"); |  | ||||||
|         } |         } | ||||||
|         this.plotAreaManager = plotAreaManager; |         this.plotAreaManager = plotAreaManager; | ||||||
|         this.levelName = world; |         this.levelName = world; | ||||||
|         this.full = false; |         this.full = false; | ||||||
|         this.platformGenerator = cg; |         this.platformGenerator = cg; | ||||||
|         this.plotGenerator = new DelegatePlotGenerator(cg, world); |         this.plotGenerator = new DelegatePlotGenerator(cg, world); | ||||||
|         this.useNewGenerationMethods = PlotSquared.platform().serverVersion()[1] >= 19; |  | ||||||
|         this.biomeProvider = null; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
| @@ -132,9 +116,32 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | |||||||
|     @Override |     @Override | ||||||
|     public @NonNull List<BlockPopulator> getDefaultPopulators(@NonNull World world) { |     public @NonNull List<BlockPopulator> getDefaultPopulators(@NonNull World world) { | ||||||
|         try { |         try { | ||||||
|             checkLoaded(world); |             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; | ||||||
|  |             } | ||||||
|         } catch (Exception e) { |         } catch (Exception e) { | ||||||
|             LOGGER.error("Error attempting to load world into PlotSquared.", e); |             e.printStackTrace(); | ||||||
|         } |         } | ||||||
|         ArrayList<BlockPopulator> toAdd = new ArrayList<>(); |         ArrayList<BlockPopulator> toAdd = new ArrayList<>(); | ||||||
|         List<BlockPopulator> existing = world.getPopulators(); |         List<BlockPopulator> existing = world.getPopulators(); | ||||||
| @@ -151,147 +158,11 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | |||||||
|         return toAdd; |         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 |     @Override | ||||||
|     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( |     public @NonNull ChunkData generateChunkData( | ||||||
|             @NonNull World world, @NonNull Random random, int x, int z, @NonNull BiomeGrid biome |             @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 minY = BukkitWorld.getMinWorldHeight(world); | ||||||
|         int maxY = BukkitWorld.getMaxWorldHeight(world); |         int maxY = BukkitWorld.getMaxWorldHeight(world); | ||||||
|         GenChunk result = new GenChunk(minY, maxY); |         GenChunk result = new GenChunk(minY, maxY); | ||||||
| @@ -301,6 +172,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | |||||||
|                     for (int chunkZ = 0; chunkZ < 16; chunkZ++) { |                     for (int chunkZ = 0; chunkZ < 16; chunkZ++) { | ||||||
|                         for (int y = minY; y < maxY; y++) { |                         for (int y = minY; y < maxY; y++) { | ||||||
|                             biome.setBiome(chunkX, y, chunkZ, Biome.PLAINS); |                             biome.setBiome(chunkX, y, chunkZ, Biome.PLAINS); | ||||||
|  |  | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
| @@ -320,32 +192,37 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | |||||||
|             if (this.platformGenerator != this) { |             if (this.platformGenerator != this) { | ||||||
|                 return this.platformGenerator.generateChunkData(world, random, x, z, biome); |                 return this.platformGenerator.generateChunkData(world, random, x, z, biome); | ||||||
|             } else { |             } else { | ||||||
|                 generate(BlockVector2.at(x, z), world.getName(), result, true); |                 generate(BlockVector2.at(x, z), world, result); | ||||||
|             } |             } | ||||||
|         } catch (Throwable e) { |         } catch (Throwable e) { | ||||||
|             LOGGER.error("Error attempting to load world into PlotSquared.", e); |             e.printStackTrace(); | ||||||
|         } |         } | ||||||
|         // Return the result data |         // Return the result data | ||||||
|         return result.getChunkData(); |         return result.getChunkData(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void generate(BlockVector2 loc, String world, ZeroedDelegateScopedQueueCoordinator result, boolean biomes) { |     private void generate(BlockVector2 loc, World world, ScopedQueueCoordinator result) { | ||||||
|         // Load if improperly loaded |         // Load if improperly loaded | ||||||
|         if (!this.loaded) { |         if (!this.loaded) { | ||||||
|             synchronized (this) { |             String name = world.getName(); | ||||||
|                 PlotSquared.get().loadWorld(world, this); |             PlotSquared.get().loadWorld(name, this); | ||||||
|             } |             this.loaded = true; | ||||||
|         } |         } | ||||||
|         // Process the chunk |         // Process the chunk | ||||||
|         if (ChunkManager.preProcessChunk(loc, result)) { |         if (ChunkManager.preProcessChunk(loc, result)) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         PlotArea area = getPlotArea(world, loc.getX(), loc.getZ()); |         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); | ||||||
|  |         } | ||||||
|         try { |         try { | ||||||
|             this.plotGenerator.generateChunk(result, area, biomes); |             this.plotGenerator.generateChunk(result, area); | ||||||
|         } catch (Throwable e) { |         } catch (Throwable e) { | ||||||
|             // Recover from generator error |             // Recover from generator error | ||||||
|             LOGGER.error("Error attempting to generate chunk.", e); |             e.printStackTrace(); | ||||||
|         } |         } | ||||||
|         ChunkManager.postProcessChunk(loc, result); |         ChunkManager.postProcessChunk(loc, result); | ||||||
|     } |     } | ||||||
| @@ -399,51 +276,4 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap | |||||||
|         return this.levelName; |         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,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.generator; | package com.plotsquared.bukkit.generator; | ||||||
|  |  | ||||||
| @@ -24,10 +31,9 @@ import com.plotsquared.core.generator.IndependentPlotGenerator; | |||||||
| import com.plotsquared.core.location.Location; | import com.plotsquared.core.location.Location; | ||||||
| import com.plotsquared.core.plot.PlotArea; | import com.plotsquared.core.plot.PlotArea; | ||||||
| import com.plotsquared.core.plot.PlotId; | import com.plotsquared.core.plot.PlotId; | ||||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||||
| import com.plotsquared.core.util.MathMan; | import com.plotsquared.core.util.MathMan; | ||||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; | import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||||
| import com.sk89q.worldedit.world.biome.BiomeType; |  | ||||||
| import org.bukkit.World; | import org.bukkit.World; | ||||||
| import org.bukkit.block.Biome; | import org.bukkit.block.Biome; | ||||||
| import org.bukkit.generator.BlockPopulator; | import org.bukkit.generator.BlockPopulator; | ||||||
| @@ -50,11 +56,6 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator { | |||||||
|     public void initialize(PlotArea area) { |     public void initialize(PlotArea area) { | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |  | ||||||
|     public BiomeType getBiome(final PlotArea settings, final int x, final int y, final int z) { |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public String getName() { |     public String getName() { | ||||||
|         return this.chunkGenerator.getClass().getName(); |         return this.chunkGenerator.getClass().getName(); | ||||||
| @@ -66,7 +67,7 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public void generateChunk(final ZeroedDelegateScopedQueueCoordinator result, PlotArea settings, boolean biomes) { |     public void generateChunk(final ScopedQueueCoordinator result, PlotArea settings) { | ||||||
|         World world = BukkitUtil.getWorld(this.world); |         World world = BukkitUtil.getWorld(this.world); | ||||||
|         Location min = result.getMin(); |         Location min = result.getMin(); | ||||||
|         int chunkX = min.getX() >> 4; |         int chunkX = min.getX() >> 4; | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.generator; | package com.plotsquared.bukkit.generator; | ||||||
|  |  | ||||||
| @@ -26,7 +33,7 @@ import com.plotsquared.core.location.UncheckedWorldLocation; | |||||||
| import com.plotsquared.core.plot.PlotArea; | import com.plotsquared.core.plot.PlotArea; | ||||||
| import com.plotsquared.core.plot.world.SinglePlotArea; | import com.plotsquared.core.plot.world.SinglePlotArea; | ||||||
| import com.plotsquared.core.queue.QueueCoordinator; | import com.plotsquared.core.queue.QueueCoordinator; | ||||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||||
| import com.sk89q.worldedit.bukkit.BukkitWorld; | import com.sk89q.worldedit.bukkit.BukkitWorld; | ||||||
| import com.sk89q.worldedit.util.SideEffectSet; | import com.sk89q.worldedit.util.SideEffectSet; | ||||||
| import org.bukkit.Chunk; | import org.bukkit.Chunk; | ||||||
| @@ -42,7 +49,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator { | |||||||
|     private final IndependentPlotGenerator plotGenerator; |     private final IndependentPlotGenerator plotGenerator; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @since 6.9.0 |      * @since TODO | ||||||
|      */ |      */ | ||||||
|     public LegacyBlockStatePopulator( |     public LegacyBlockStatePopulator( | ||||||
|             final @NonNull IndependentPlotGenerator plotGenerator |             final @NonNull IndependentPlotGenerator plotGenerator | ||||||
| @@ -66,7 +73,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator { | |||||||
|         queue.setChunkObject(source); |         queue.setChunkObject(source); | ||||||
|         Location min = UncheckedWorldLocation.at(world.getName(), chunkMinX, world.getMinHeight(), chunkMinZ); |         Location min = UncheckedWorldLocation.at(world.getName(), chunkMinX, world.getMinHeight(), chunkMinZ); | ||||||
|         Location max = UncheckedWorldLocation.at(world.getName(), chunkMinX + 15, world.getMaxHeight(), chunkMinZ + 15); |         Location max = UncheckedWorldLocation.at(world.getName(), chunkMinX + 15, world.getMaxHeight(), chunkMinZ + 15); | ||||||
|         ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(queue, min, max); |         ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(queue, min, max); | ||||||
|         this.plotGenerator.populateChunk(offsetChunkQueue, area); |         this.plotGenerator.populateChunk(offsetChunkQueue, area); | ||||||
|         queue.enqueue(); |         queue.enqueue(); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.inject; | package com.plotsquared.bukkit.inject; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.inject; | package com.plotsquared.bukkit.inject; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.inject; | package com.plotsquared.bukkit.inject; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.inject; | package com.plotsquared.bukkit.inject; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -61,9 +68,7 @@ import com.plotsquared.core.util.task.TaskTime; | |||||||
| import com.sk89q.worldedit.WorldEdit; | import com.sk89q.worldedit.WorldEdit; | ||||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; | import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||||
| import com.sk89q.worldedit.world.block.BlockType; | import com.sk89q.worldedit.world.block.BlockType; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| import net.kyori.adventure.text.minimessage.tag.Tag; |  | ||||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; |  | ||||||
| import org.bukkit.Bukkit; | import org.bukkit.Bukkit; | ||||||
| import org.bukkit.GameMode; | import org.bukkit.GameMode; | ||||||
| import org.bukkit.Material; | import org.bukkit.Material; | ||||||
| @@ -108,20 +113,11 @@ import org.checkerframework.checker.nullness.qual.NonNull; | |||||||
| import java.util.Iterator; | import java.util.Iterator; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Objects; | import java.util.Objects; | ||||||
| import java.util.Set; |  | ||||||
| import java.util.UUID; | import java.util.UUID; | ||||||
|  |  | ||||||
| @SuppressWarnings("unused") | @SuppressWarnings("unused") | ||||||
| public class BlockEventListener implements Listener { | 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 PlotAreaManager plotAreaManager; | ||||||
|     private final WorldEdit worldEdit; |     private final WorldEdit worldEdit; | ||||||
|  |  | ||||||
| @@ -227,31 +223,48 @@ public class BlockEventListener implements Listener { | |||||||
|             plot.debug("Prevented block physics and resent block change because disable-physics = true"); |             plot.debug("Prevented block physics and resent block change because disable-physics = true"); | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         if (event.getChangedType() == Material.COMPARATOR) { |         switch (event.getChangedType()) { | ||||||
|             if (!plot.getFlag(RedstoneFlag.class)) { |             case COMPARATOR: { | ||||||
|                 event.setCancelled(true); |                 if (!plot.getFlag(RedstoneFlag.class)) { | ||||||
|                 plot.debug("Prevented comparator update because redstone = false"); |  | ||||||
|             } |  | ||||||
|             return; |  | ||||||
|         } |  | ||||||
|         if (PHYSICS_BLOCKS.contains(event.getChangedType())) { |  | ||||||
|             if (plot.getFlag(DisablePhysicsFlag.class)) { |  | ||||||
|                 event.setCancelled(true); |  | ||||||
|                 plot.debug("Prevented block physics because disable-physics = true"); |  | ||||||
|             } |  | ||||||
|             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); |                     event.setCancelled(true); | ||||||
|                     plot.debug("Prevented piston update because of invalid edge piston detection"); |                     plot.debug("Prevented comparator update because redstone = false"); | ||||||
|                 } |                 } | ||||||
|  |                 return; | ||||||
|             } |             } | ||||||
|  |             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; | ||||||
|  |             } | ||||||
|  |             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; | ||||||
|  |                             } | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 break; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -272,20 +285,15 @@ public class BlockEventListener implements Listener { | |||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("height.height_limit"), |                         TranslatableCaption.of("height.height_limit"), | ||||||
|                         TagResolver.builder() |                         Template.of("minHeight", String.valueOf(area.getMinBuildHeight())), | ||||||
|                                 .tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight()))) |                         Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight())) | ||||||
|                                 .tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight()))) |  | ||||||
|                                 .build() |  | ||||||
|                 ); |                 ); | ||||||
|             } |             } | ||||||
|             if (!plot.hasOwner()) { |             if (!plot.hasOwner()) { | ||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                     return; |                     return; | ||||||
| @@ -302,10 +310,7 @@ public class BlockEventListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                     plot.debug(player.getName() + " could not place " + event.getBlock().getType() |                     plot.debug(player.getName() + " could not place " + event.getBlock().getType() | ||||||
| @@ -332,10 +337,7 @@ public class BlockEventListener implements Listener { | |||||||
|         } else if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { |         } else if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { | ||||||
|             pp.sendMessage( |             pp.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission_event"), |                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                     TagResolver.resolver( |                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||||
|                             "node", |  | ||||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD) |  | ||||||
|                     ) |  | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } |         } | ||||||
| @@ -358,10 +360,7 @@ public class BlockEventListener implements Listener { | |||||||
|                         .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) { |                         .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                     return; |                     return; | ||||||
| @@ -372,10 +371,8 @@ public class BlockEventListener implements Listener { | |||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|                 plotPlayer.sendMessage( |                 plotPlayer.sendMessage( | ||||||
|                         TranslatableCaption.of("height.height_limit"), |                         TranslatableCaption.of("height.height_limit"), | ||||||
|                         TagResolver.builder() |                         Template.of("minHeight", String.valueOf(area.getMinBuildHeight())), | ||||||
|                                 .tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight()))) |                         Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight())) | ||||||
|                                 .tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight()))) |  | ||||||
|                                 .build() |  | ||||||
|                 ); |                 ); | ||||||
|             } |             } | ||||||
|             if (!plot.hasOwner()) { |             if (!plot.hasOwner()) { | ||||||
| @@ -400,10 +397,7 @@ public class BlockEventListener implements Listener { | |||||||
|                 } |                 } | ||||||
|                 plotPlayer.sendMessage( |                 plotPlayer.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_OTHER) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|             } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { |             } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||||
| @@ -429,10 +423,7 @@ public class BlockEventListener implements Listener { | |||||||
|         } |         } | ||||||
|         pp.sendMessage( |         pp.sendMessage( | ||||||
|                 TranslatableCaption.of("permission.no_permission_event"), |                 TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                 TagResolver.resolver( |                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_ROAD)) | ||||||
|                         "node", |  | ||||||
|                         Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_ROAD) |  | ||||||
|                 ) |  | ||||||
|         ); |         ); | ||||||
|         event.setCancelled(true); |         event.setCancelled(true); | ||||||
|     } |     } | ||||||
| @@ -564,18 +555,21 @@ public class BlockEventListener implements Listener { | |||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         if (org.bukkit.Tag.SNOW.isTagged(event.getNewState().getType())) { |         switch (event.getNewState().getType()) { | ||||||
|             if (!plot.getFlag(SnowFormFlag.class)) { |             case SNOW: | ||||||
|                 plot.debug("Snow could not form because snow-form = false"); |             case SNOW_BLOCK: | ||||||
|                 event.setCancelled(true); |                 if (!plot.getFlag(SnowFormFlag.class)) { | ||||||
|             } |                     plot.debug("Snow could not form because snow-form = false"); | ||||||
|             return; |                     event.setCancelled(true); | ||||||
|         } |                 } | ||||||
|         if (org.bukkit.Tag.ICE.isTagged(event.getNewState().getType())) { |                 return; | ||||||
|             if (!plot.getFlag(IceFormFlag.class)) { |             case ICE: | ||||||
|                 plot.debug("Ice could not form because ice-form = false"); |             case FROSTED_ICE: | ||||||
|                 event.setCancelled(true); |             case PACKED_ICE: | ||||||
|             } |                 if (!plot.getFlag(IceFormFlag.class)) { | ||||||
|  |                     plot.debug("Ice could not form because ice-form = false"); | ||||||
|  |                     event.setCancelled(true); | ||||||
|  |                 } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -596,12 +590,18 @@ public class BlockEventListener implements Listener { | |||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         Class<? extends BooleanFlag<?>> flag; |         Class<? extends BooleanFlag<?>> flag; | ||||||
|         if (org.bukkit.Tag.SNOW.isTagged(event.getNewState().getType())) { |         switch (event.getNewState().getType()) { | ||||||
|             flag = SnowFormFlag.class; |             case SNOW: | ||||||
|         } else if (org.bukkit.Tag.ICE.isTagged(event.getNewState().getType())) { |             case SNOW_BLOCK: | ||||||
|             flag = IceFormFlag.class; |                 flag = SnowFormFlag.class; | ||||||
|         } else { |                 break; | ||||||
|             return; |             case ICE: | ||||||
|  |             case FROSTED_ICE: | ||||||
|  |             case PACKED_ICE: | ||||||
|  |                 flag = IceFormFlag.class; | ||||||
|  |                 break; | ||||||
|  |             default: | ||||||
|  |                 return; // other blocks are ignored by this event | ||||||
|         } |         } | ||||||
|         boolean allowed = plot.getFlag(flag); |         boolean allowed = plot.getFlag(flag); | ||||||
|         Entity entity = event.getEntity(); |         Entity entity = event.getEntity(); | ||||||
| @@ -705,33 +705,50 @@ public class BlockEventListener implements Listener { | |||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         Material blockType = block.getType(); |         switch (block.getType()) { | ||||||
|         if (org.bukkit.Tag.ICE.isTagged(blockType)) { |             case ICE: | ||||||
|             if (!plot.getFlag(IceMeltFlag.class)) { |                 if (!plot.getFlag(IceMeltFlag.class)) { | ||||||
|                 plot.debug("Ice could not melt because ice-melt = false"); |                     plot.debug("Ice could not melt because ice-melt = false"); | ||||||
|                 event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|             } |                 } | ||||||
|             return; |                 break; | ||||||
|         } |             case SNOW: | ||||||
|         if (org.bukkit.Tag.SNOW.isTagged(blockType)) { |                 if (!plot.getFlag(SnowMeltFlag.class)) { | ||||||
|             if (!plot.getFlag(SnowMeltFlag.class)) { |                     plot.debug("Snow could not melt because snow-melt = false"); | ||||||
|                 plot.debug("Snow could not melt because snow-melt = false"); |                     event.setCancelled(true); | ||||||
|                 event.setCancelled(true); |                 } | ||||||
|             } |                 break; | ||||||
|             return; |             case FARMLAND: | ||||||
|         } |                 if (!plot.getFlag(SoilDryFlag.class)) { | ||||||
|         if (blockType == Material.FARMLAND) { |                     plot.debug("Soil could not dry because soil-dry = false"); | ||||||
|             if (!plot.getFlag(SoilDryFlag.class)) { |                     event.setCancelled(true); | ||||||
|                 plot.debug("Soil could not dry because soil-dry = false"); |                 } | ||||||
|                 event.setCancelled(true); |                 break; | ||||||
|             } |             case TUBE_CORAL_BLOCK: | ||||||
|             return; |             case BRAIN_CORAL_BLOCK: | ||||||
|         } |             case BUBBLE_CORAL_BLOCK: | ||||||
|         if (org.bukkit.Tag.CORAL_BLOCKS.isTagged(blockType) || org.bukkit.Tag.CORALS.isTagged(blockType)) { |             case FIRE_CORAL_BLOCK: | ||||||
|             if (!plot.getFlag(CoralDryFlag.class)) { |             case HORN_CORAL_BLOCK: | ||||||
|                 plot.debug("Coral could not dry because coral-dry = false"); |             case TUBE_CORAL: | ||||||
|                 event.setCancelled(true); |             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; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -948,12 +965,7 @@ public class BlockEventListener implements Listener { | |||||||
|     public void onBlockDispense(BlockDispenseEvent event) { |     public void onBlockDispense(BlockDispenseEvent event) { | ||||||
|         Material type = event.getItem().getType(); |         Material type = event.getItem().getType(); | ||||||
|         switch (type.toString()) { |         switch (type.toString()) { | ||||||
|             case "SHULKER_BOX", "WHITE_SHULKER_BOX", "ORANGE_SHULKER_BOX", "MAGENTA_SHULKER_BOX", "LIGHT_BLUE_SHULKER_BOX", |             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" -> { | ||||||
|                     "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) { |                 if (event.getBlock().getType() == Material.DROPPER) { | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| @@ -1095,10 +1107,7 @@ public class BlockEventListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1106,10 +1115,7 @@ public class BlockEventListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1117,10 +1123,7 @@ public class BlockEventListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1244,7 +1247,7 @@ public class BlockEventListener implements Listener { | |||||||
|             ) && !(Objects.equals(currentLocation.getPlot(), plot))) { |             ) && !(Objects.equals(currentLocation.getPlot(), plot))) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD)) |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||||
|                 ); |                 ); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|                 break; |                 break; | ||||||
| @@ -1255,10 +1258,8 @@ public class BlockEventListener implements Listener { | |||||||
|             if (currentLocation.getY() >= area.getMaxBuildHeight() || currentLocation.getY() < area.getMinBuildHeight()) { |             if (currentLocation.getY() >= area.getMaxBuildHeight() || currentLocation.getY() < area.getMinBuildHeight()) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("height.height_limit"), |                         TranslatableCaption.of("height.height_limit"), | ||||||
|                         TagResolver.builder() |                         Template.of("minHeight", String.valueOf(area.getMinBuildHeight())), | ||||||
|                                 .tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight()))) |                         Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight())) | ||||||
|                                 .tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight()))) |  | ||||||
|                                 .build() |  | ||||||
|                 ); |                 ); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|                 break; |                 break; | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -26,7 +33,6 @@ import com.plotsquared.core.plot.Plot; | |||||||
| import com.plotsquared.core.plot.PlotArea; | import com.plotsquared.core.plot.PlotArea; | ||||||
| import com.plotsquared.core.plot.flag.implementations.CopperOxideFlag; | import com.plotsquared.core.plot.flag.implementations.CopperOxideFlag; | ||||||
| import com.plotsquared.core.plot.flag.implementations.MiscInteractFlag; | import com.plotsquared.core.plot.flag.implementations.MiscInteractFlag; | ||||||
| import org.bukkit.Material; |  | ||||||
| import org.bukkit.block.Block; | import org.bukkit.block.Block; | ||||||
| import org.bukkit.entity.Entity; | import org.bukkit.entity.Entity; | ||||||
| import org.bukkit.entity.Item; | import org.bukkit.entity.Item; | ||||||
| @@ -40,31 +46,11 @@ import org.bukkit.event.block.BlockReceiveGameEvent; | |||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Objects; | import java.util.Objects; | ||||||
| import java.util.Set; |  | ||||||
| import java.util.UUID; | import java.util.UUID; | ||||||
|  |  | ||||||
| @SuppressWarnings("unused") | @SuppressWarnings("unused") | ||||||
| public class BlockEventListener117 implements Listener { | 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 |     @Inject | ||||||
|     public BlockEventListener117() { |     public BlockEventListener117() { | ||||||
|     } |     } | ||||||
| @@ -169,11 +155,27 @@ public class BlockEventListener117 implements Listener { | |||||||
|         if (plot == null) { |         if (plot == null) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         if (COPPER_OXIDIZING.contains(event.getNewState().getType())) { |         switch (event.getNewState().getType()) { | ||||||
|             if (!plot.getFlag(CopperOxideFlag.class)) { |             case COPPER_BLOCK: | ||||||
|                 plot.debug("Copper could not oxide because copper-oxide = false"); |             case EXPOSED_COPPER: | ||||||
|                 event.setCancelled(true); |             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); | ||||||
|  |                 } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -201,7 +208,7 @@ public class EntityEventListener implements Listener { | |||||||
|             } |             } | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         if (BukkitEntityUtil.checkEntity(entity, plot.getBasePlot(false))) { |         if (BukkitEntityUtil.checkEntity(entity, plot)) { | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -124,17 +131,17 @@ public class EntitySpawnListener implements Listener { | |||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         Plot plot = location.getOwnedPlotAbs(); |         Plot plot = location.getOwnedPlotAbs(); | ||||||
|         EntityType type = entity.getType(); |  | ||||||
|         if (plot == null) { |         if (plot == null) { | ||||||
|  |             EntityType type = entity.getType(); | ||||||
|             if (!area.isMobSpawning()) { |             if (!area.isMobSpawning()) { | ||||||
|                 if (type == EntityType.PLAYER) { |                 switch (type) { | ||||||
|                     return; |                     case DROPPED_ITEM: | ||||||
|                 } |                         if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { | ||||||
|                 if (type == EntityType.DROPPED_ITEM) { |                             event.setCancelled(true); | ||||||
|                     if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { |                             return; | ||||||
|                         event.setCancelled(true); |                         } | ||||||
|                     } |                     case PLAYER: | ||||||
|                     return; |                         return; | ||||||
|                 } |                 } | ||||||
|                 if (type.isAlive()) { |                 if (type.isAlive()) { | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
| @@ -148,16 +155,15 @@ public class EntitySpawnListener implements Listener { | |||||||
|         if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { |         if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } |         } | ||||||
|         if (type == EntityType.ENDER_CRYSTAL) { |         switch (entity.getType()) { | ||||||
|             if (BukkitEntityUtil.checkEntity(entity, plot)) { |             case ENDER_CRYSTAL: | ||||||
|                 event.setCancelled(true); |                 if (BukkitEntityUtil.checkEntity(entity, plot)) { | ||||||
|             } |                     event.setCancelled(true); | ||||||
|             return; |                 } | ||||||
|         } |             case SHULKER: | ||||||
|         if (type == EntityType.SHULKER) { |                 if (!entity.hasMetadata("shulkerPlot")) { | ||||||
|             if (!entity.hasMetadata("shulkerPlot")) { |                     entity.setMetadata("shulkerPlot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot.getId())); | ||||||
|                 entity.setMetadata("shulkerPlot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot.getId())); |                 } | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -40,9 +47,7 @@ import com.plotsquared.core.plot.flag.implementations.DoneFlag; | |||||||
| import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag; | import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag; | ||||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | import com.plotsquared.core.plot.world.PlotAreaManager; | ||||||
| import com.plotsquared.core.util.Permissions; | import com.plotsquared.core.util.Permissions; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| import net.kyori.adventure.text.minimessage.tag.Tag; |  | ||||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; |  | ||||||
| import org.bukkit.Chunk; | import org.bukkit.Chunk; | ||||||
| import org.bukkit.block.Block; | import org.bukkit.block.Block; | ||||||
| import org.bukkit.block.TileState; | import org.bukkit.block.TileState; | ||||||
| @@ -232,15 +237,15 @@ public class PaperListener implements Listener { | |||||||
|         if (plot == null) { |         if (plot == null) { | ||||||
|             EntityType type = event.getType(); |             EntityType type = event.getType(); | ||||||
|             if (!area.isMobSpawning()) { |             if (!area.isMobSpawning()) { | ||||||
|                 if (type == EntityType.PLAYER) { |                 switch (type) { | ||||||
|                     return; |                     case DROPPED_ITEM: | ||||||
|                 } |                         if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { | ||||||
|                 if (type == EntityType.DROPPED_ITEM) { |                             event.setShouldAbortSpawn(true); | ||||||
|                     if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { |                             event.setCancelled(true); | ||||||
|                         event.setShouldAbortSpawn(true); |                             return; | ||||||
|                         event.setCancelled(true); |                         } | ||||||
|                     } |                     case PLAYER: | ||||||
|                     return; |                         return; | ||||||
|                 } |                 } | ||||||
|                 if (type.isAlive()) { |                 if (type.isAlive()) { | ||||||
|                     event.setShouldAbortSpawn(true); |                     event.setShouldAbortSpawn(true); | ||||||
| @@ -300,7 +305,7 @@ public class PaperListener implements Listener { | |||||||
|             final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer()); |             final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer()); | ||||||
|             plotPlayer.sendMessage( |             plotPlayer.sendMessage( | ||||||
|                     TranslatableCaption.of("errors.tile_entity_cap_reached"), |                     TranslatableCaption.of("errors.tile_entity_cap_reached"), | ||||||
|                     TagResolver.resolver("amount", Tag.inserting(Component.text(Settings.Chunk_Processor.MAX_TILES))) |                     Template.of("amount", String.valueOf(Settings.Chunk_Processor.MAX_TILES)) | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|             event.setBuild(false); |             event.setBuild(false); | ||||||
| @@ -334,10 +339,7 @@ public class PaperListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 entity.remove(); |                 entity.remove(); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
| @@ -346,10 +348,7 @@ public class PaperListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 entity.remove(); |                 entity.remove(); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
| @@ -359,10 +358,7 @@ public class PaperListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     entity.remove(); |                     entity.remove(); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -26,9 +33,7 @@ import com.plotsquared.core.location.Location; | |||||||
| import com.plotsquared.core.player.PlotPlayer; | import com.plotsquared.core.player.PlotPlayer; | ||||||
| import com.plotsquared.core.plot.PlotArea; | import com.plotsquared.core.plot.PlotArea; | ||||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | import com.plotsquared.core.plot.world.PlotAreaManager; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.Banner; | ||||||
| import org.bukkit.block.Beacon; | import org.bukkit.block.Beacon; | ||||||
| import org.bukkit.block.BlockState; | import org.bukkit.block.BlockState; | ||||||
| @@ -79,7 +84,7 @@ public class PaperListener113 extends PaperListener { | |||||||
|             final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer()); |             final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer()); | ||||||
|             plotPlayer.sendMessage( |             plotPlayer.sendMessage( | ||||||
|                     TranslatableCaption.of("errors.tile_entity_cap_reached"), |                     TranslatableCaption.of("errors.tile_entity_cap_reached"), | ||||||
|                     TagResolver.resolver("amount", Tag.inserting(Component.text(Settings.Chunk_Processor.MAX_TILES))) |                     Template.of("amount", String.valueOf(Settings.Chunk_Processor.MAX_TILES)) | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|             event.setBuild(false); |             event.setBuild(false); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -77,11 +84,9 @@ import com.sk89q.worldedit.bukkit.BukkitAdapter; | |||||||
| import com.sk89q.worldedit.world.block.BlockType; | import com.sk89q.worldedit.world.block.BlockType; | ||||||
| import io.papermc.lib.PaperLib; | import io.papermc.lib.PaperLib; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.Component; | ||||||
| import net.kyori.adventure.text.minimessage.MiniMessage; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.Bukkit; | ||||||
|  | import org.bukkit.ChatColor; | ||||||
| import org.bukkit.FluidCollisionMode; | import org.bukkit.FluidCollisionMode; | ||||||
| import org.bukkit.Material; | import org.bukkit.Material; | ||||||
| import org.bukkit.block.Block; | import org.bukkit.block.Block; | ||||||
| @@ -147,11 +152,13 @@ import org.bukkit.util.Vector; | |||||||
| import org.checkerframework.checker.nullness.qual.NonNull; | import org.checkerframework.checker.nullness.qual.NonNull; | ||||||
|  |  | ||||||
| import java.lang.reflect.Field; | import java.lang.reflect.Field; | ||||||
|  | import java.util.ArrayList; | ||||||
| import java.util.HashSet; | import java.util.HashSet; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Locale; | import java.util.Locale; | ||||||
| import java.util.Set; | import java.util.Set; | ||||||
| import java.util.UUID; | import java.util.UUID; | ||||||
|  | import java.util.regex.Pattern; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Player Events involving plots. |  * Player Events involving plots. | ||||||
| @@ -159,20 +166,6 @@ import java.util.UUID; | |||||||
| @SuppressWarnings("unused") | @SuppressWarnings("unused") | ||||||
| public class PlayerEventListener extends PlotListener implements Listener { | 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 EventDispatcher eventDispatcher; | ||||||
|     private final WorldEdit worldEdit; |     private final WorldEdit worldEdit; | ||||||
|     private final PlotAreaManager plotAreaManager; |     private final PlotAreaManager plotAreaManager; | ||||||
| @@ -370,15 +363,11 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 && PremiumVerification.isPremium() && UpdateUtility.hasUpdate) { |                 && PremiumVerification.isPremium() && UpdateUtility.hasUpdate) { | ||||||
|             Caption boundary = TranslatableCaption.of("update.update_boundary"); |             Caption boundary = TranslatableCaption.of("update.update_boundary"); | ||||||
|             Caption updateNotification = TranslatableCaption.of("update.update_notification"); |             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(boundary); | ||||||
|             pp.sendMessage( |             pp.sendMessage(updateNotification, internalVersion, spigotVersion, downloadUrl); | ||||||
|                     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); |             pp.sendMessage(boundary); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| @@ -430,7 +419,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                             .equals(BukkitUtil.adaptComplete(to)))) { |                             .equals(BukkitUtil.adaptComplete(to)))) { | ||||||
|                         pp.sendMessage( |                         pp.sendMessage( | ||||||
|                                 TranslatableCaption.of("deny.no_enter"), |                                 TranslatableCaption.of("deny.no_enter"), | ||||||
|                                 TagResolver.resolver("plot", Tag.inserting(Component.text(plot.toString()))) |                                 Template.of("plot", plot.toString()) | ||||||
|                         ); |                         ); | ||||||
|                         event.setCancelled(true); |                         event.setCancelled(true); | ||||||
|                     } |                     } | ||||||
| @@ -546,10 +535,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                     if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) { |                     if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) { | ||||||
|                         pp.sendMessage( |                         pp.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.no_permission_event"), |                                 TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                 TagResolver.resolver( |                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_EXIT_DENIED)) | ||||||
|                                         "node", |  | ||||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_EXIT_DENIED) |  | ||||||
|                                 ) |  | ||||||
|                         ); |                         ); | ||||||
|                         this.tmpTeleport = false; |                         this.tmpTeleport = false; | ||||||
|                         if (lastPlot.equals(BukkitUtil.adapt(from).getPlot())) { |                         if (lastPlot.equals(BukkitUtil.adapt(from).getPlot())) { | ||||||
| @@ -567,7 +553,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } else if (!plotEntry(pp, now) && this.tmpTeleport) { |             } else if (!plotEntry(pp, now) && this.tmpTeleport) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("deny.no_enter"), |                         TranslatableCaption.of("deny.no_enter"), | ||||||
|                         TagResolver.resolver("plot", Tag.inserting(Component.text(now.toString()))) |                         Template.of("plot", now.toString()) | ||||||
|                 ); |                 ); | ||||||
|                 this.tmpTeleport = false; |                 this.tmpTeleport = false; | ||||||
|                 to.setX(from.getBlockX()); |                 to.setX(from.getBlockX()); | ||||||
| @@ -639,10 +625,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                     if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) { |                     if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) { | ||||||
|                         pp.sendMessage( |                         pp.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.no_permission_event"), |                                 TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                 TagResolver.resolver( |                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_EXIT_DENIED)) | ||||||
|                                         "node", |  | ||||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_EXIT_DENIED) |  | ||||||
|                                 ) |  | ||||||
|                         ); |                         ); | ||||||
|                         this.tmpTeleport = false; |                         this.tmpTeleport = false; | ||||||
|                         if (lastPlot.equals(BukkitUtil.adapt(from).getPlot())) { |                         if (lastPlot.equals(BukkitUtil.adapt(from).getPlot())) { | ||||||
| @@ -660,7 +643,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } else if (!plotEntry(pp, plot) && this.tmpTeleport) { |             } else if (!plotEntry(pp, plot) && this.tmpTeleport) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("deny.no_enter"), |                         TranslatableCaption.of("deny.no_enter"), | ||||||
|                         TagResolver.resolver("plot", Tag.inserting(Component.text(plot.toString()))) |                         Template.of("plot", plot.toString()) | ||||||
|                 ); |                 ); | ||||||
|                 this.tmpTeleport = false; |                 this.tmpTeleport = false; | ||||||
|                 player.teleport(from); |                 player.teleport(from); | ||||||
| @@ -745,34 +728,46 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|         PlotId id = plot.getId(); |         PlotId id = plot.getId(); | ||||||
|         String worldName = plot.getWorldName(); |         String worldName = plot.getWorldName(); | ||||||
|         Caption msg = TranslatableCaption.of("chat.plot_chat_format"); |         Caption msg = TranslatableCaption.of("chat.plot_chat_format"); | ||||||
|         TagResolver.Builder builder = TagResolver.builder(); |         Template msgTemplate; | ||||||
|         builder.tag("world", Tag.inserting(Component.text(worldName))); |         Template worldNameTemplate = Template.of("world", worldName); | ||||||
|         builder.tag("plot_id", Tag.inserting(Component.text(id.toString()))); |         Template plotTemplate = Template.of("plot_id", id.toString()); | ||||||
|         builder.tag("sender", Tag.inserting(Component.text(sender))); |         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. | ||||||
|         if (plotPlayer.hasPermission("plots.chat.color")) { |         if (plotPlayer.hasPermission("plots.chat.color")) { | ||||||
|             builder.tag("msg", Tag.inserting(MiniMessage.miniMessage().deserialize( |             msgTemplate = Template | ||||||
|                     message, |                     .of( | ||||||
|                     TagResolver.resolver(StandardTags.color(), StandardTags.gradient(), |                             "msg", | ||||||
|                             StandardTags.rainbow(), StandardTags.decorations() |                             BukkitUtil.LEGACY_COMPONENT_SERIALIZER.deserialize(ChatColor.translateAlternateColorCodes( | ||||||
|                     ) |                                     '&', | ||||||
|             ))); |                                     message | ||||||
|  |                             )) | ||||||
|  |                     ); | ||||||
|         } else { |         } else { | ||||||
|             builder.tag("msg", Tag.inserting(Component.text(message))); |             msgTemplate = Template.of("msg", BukkitUtil.MINI_MESSAGE.deserialize( | ||||||
|  |                     ChatColor.stripColor(BukkitUtil.LEGACY_COMPONENT_SERIALIZER.serialize(Component.text(message))))); | ||||||
|         } |         } | ||||||
|         for (PlotPlayer<?> receiver : plotRecipients) { |         for (PlotPlayer<?> receiver : plotRecipients) { | ||||||
|             receiver.sendMessage(msg, builder.build()); |             receiver.sendMessage(msg, worldNameTemplate, msgTemplate, plotTemplate, senderTemplate); | ||||||
|         } |         } | ||||||
|         if (!spies.isEmpty()) { |         if (!spies.isEmpty()) { | ||||||
|             Caption spymsg = TranslatableCaption.of("chat.plot_chat_spy_format"); |             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) { |             for (PlotPlayer<?> player : spies) { | ||||||
|                 player.sendMessage(spymsg, builder.tag("message", Tag.inserting(Component.text(message))).build()); |                 player.sendMessage(spymsg, worldNameTemplate, plotidTemplate, spysenderTemplate, spymessageTemplate); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         if (Settings.Chat.LOG_PLOTCHAT_TO_CONSOLE) { |         if (Settings.Chat.LOG_PLOTCHAT_TO_CONSOLE) { | ||||||
|             Caption spymsg = TranslatableCaption.of("chat.plot_chat_spy_format"); |             Caption spymsg = TranslatableCaption.of("chat.plot_chat_spy_format"); | ||||||
|             ConsolePlayer.getConsole().sendMessage( |             Template plotidTemplate = Template.of("plot_id", id.getX() + ";" + id.getY()); | ||||||
|                     spymsg, |             Template spysenderTemplate = Template.of("sender", sender); | ||||||
|                     builder.tag("message", Tag.inserting(Component.text(message))).build() |             Template spymessageTemplate = Template.of("msg", Component.text(message)); | ||||||
|  |             ConsolePlayer.getConsole().sendMessage(spymsg, worldNameTemplate, plotidTemplate, spysenderTemplate, | ||||||
|  |                     spymessageTemplate | ||||||
|             ); |             ); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| @@ -842,10 +837,10 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|         if ((slot > 8) || !event.getEventName().equals("InventoryCreativeEvent")) { |         if ((slot > 8) || !event.getEventName().equals("InventoryCreativeEvent")) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         ItemStack oldItem = inv.getItemInHand(); |         ItemStack current = inv.getItemInHand(); | ||||||
|         ItemMeta oldMeta = oldItem.getItemMeta(); |  | ||||||
|         ItemStack newItem = event.getCursor(); |         ItemStack newItem = event.getCursor(); | ||||||
|         ItemMeta newMeta = newItem.getItemMeta(); |         ItemMeta newMeta = newItem.getItemMeta(); | ||||||
|  |         ItemMeta oldMeta = newItem.getItemMeta(); | ||||||
|  |  | ||||||
|         if (event.getClick() == ClickType.CREATIVE) { |         if (event.getClick() == ClickType.CREATIVE) { | ||||||
|             final Plot plot = pp.getCurrentPlot(); |             final Plot plot = pp.getCurrentPlot(); | ||||||
| @@ -885,26 +880,34 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 oldLore = lore.toString(); |                 oldLore = lore.toString(); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         Material itemType = newItem.getType(); |         if (!"[(+NBT)]".equals(newLore) || (current.equals(newItem) && newLore.equals(oldLore))) { | ||||||
|         if (!"[(+NBT)]".equals(newLore) || (oldItem.equals(newItem) && newLore.equals(oldLore))) { |             switch (newItem.getType()) { | ||||||
|             if (newMeta == null || (itemType != Material.LEGACY_BANNER && itemType != Material.PLAYER_HEAD)) { |                 case LEGACY_BANNER: | ||||||
|                 return; |                 case PLAYER_HEAD: | ||||||
|  |                     if (newMeta != null) { | ||||||
|  |                         break; | ||||||
|  |                     } | ||||||
|  |                 default: | ||||||
|  |                     return; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         Block block = player.getTargetBlock(null, 7); |         Block block = player.getTargetBlock(null, 7); | ||||||
|         org.bukkit.block.BlockState state = block.getState(); |         org.bukkit.block.BlockState state = block.getState(); | ||||||
|         Material stateType = state.getType(); |         Material stateType = state.getType(); | ||||||
|  |         Material itemType = newItem.getType(); | ||||||
|         if (stateType != itemType) { |         if (stateType != itemType) { | ||||||
|             if (stateType == Material.LEGACY_WALL_BANNER || stateType == Material.LEGACY_STANDING_BANNER) { |             switch (stateType) { | ||||||
|                 if (itemType != Material.LEGACY_BANNER) { |                 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: | ||||||
|                     return; |                     return; | ||||||
|                 } |  | ||||||
|             } else if (stateType == Material.LEGACY_SKULL) { |  | ||||||
|                 if (itemType != Material.LEGACY_SKULL_ITEM) { |  | ||||||
|                     return; |  | ||||||
|                 } |  | ||||||
|             } else { |  | ||||||
|                 return; |  | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         Location location = BukkitUtil.adapt(state.getLocation()); |         Location location = BukkitUtil.adapt(state.getLocation()); | ||||||
| @@ -918,10 +921,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_ROAD)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_ROAD) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 cancelled = true; |                 cancelled = true; | ||||||
|             } |             } | ||||||
| @@ -929,10 +929,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 cancelled = true; |                 cancelled = true; | ||||||
|             } |             } | ||||||
| @@ -942,17 +939,14 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_OTHER)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_OTHER) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     cancelled = true; |                     cancelled = true; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         if (cancelled) { |         if (cancelled) { | ||||||
|             if ((oldItem.getType() == newItem.getType()) && (oldItem.getDurability() == newItem |             if ((current.getType() == newItem.getType()) && (current.getDurability() == newItem | ||||||
|                     .getDurability())) { |                     .getDurability())) { | ||||||
|                 event.setCursor( |                 event.setCursor( | ||||||
|                         new ItemStack(newItem.getType(), newItem.getAmount(), newItem.getDurability())); |                         new ItemStack(newItem.getType(), newItem.getAmount(), newItem.getDurability())); | ||||||
| @@ -983,10 +977,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                     .hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { |                     .hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_ROAD)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_ROAD) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 e.setCancelled(true); |                 e.setCancelled(true); | ||||||
|             } |             } | ||||||
| @@ -1004,10 +995,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) { |                 if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     e.setCancelled(true); |                     e.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1022,10 +1010,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_OTHER)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_OTHER) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     e.setCancelled(true); |                     e.setCancelled(true); | ||||||
|                     plot.debug(pp.getName() + " could not interact with " + entity.getType() |                     plot.debug(pp.getName() + " could not interact with " + entity.getType() | ||||||
| @@ -1148,21 +1133,14 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                     //Allow all players to eat while also allowing the block place event ot be fired |                     //Allow all players to eat while also allowing the block place event ot be fired | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
|                 if (type == Material.ARMOR_STAND) { |                 switch (type) { | ||||||
|                     location = BukkitUtil.adapt(block.getRelative(event.getBlockFace()).getLocation()); |                     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; | ||||||
|                     eventType = PlayerBlockEventType.PLACE_MISC; |                     case FIREWORK_ROCKET, FIREWORK_STAR -> eventType = PlayerBlockEventType.SPAWN_MOB; | ||||||
|                 } |                     case BOOK, KNOWLEDGE_BOOK, WRITABLE_BOOK, WRITTEN_BOOK -> eventType = PlayerBlockEventType.READ; | ||||||
|                 if (org.bukkit.Tag.ITEMS_BOATS.isTagged(type) || MINECARTS.contains(type)) { |                     case ARMOR_STAND -> { | ||||||
|                     eventType = PlayerBlockEventType.PLACE_VEHICLE; |                         location = BukkitUtil.adapt(block.getRelative(event.getBlockFace()).getLocation()); | ||||||
|                     break; |                         eventType = PlayerBlockEventType.PLACE_MISC; | ||||||
|                 } |                     } | ||||||
|                 if (type == Material.FIREWORK_ROCKET || type == Material.FIREWORK_STAR) { |  | ||||||
|                     eventType = PlayerBlockEventType.SPAWN_MOB; |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                 if (BOOKS.contains(type)) { |  | ||||||
|                     eventType = PlayerBlockEventType.READ; |  | ||||||
|                     break; |  | ||||||
|                 } |                 } | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
| @@ -1252,7 +1230,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } |             } | ||||||
|             pp.sendMessage( |             pp.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission_event"), |                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                     TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD)) |                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } else if (!plot.hasOwner()) { |         } else if (!plot.hasOwner()) { | ||||||
| @@ -1261,10 +1239,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } |             } | ||||||
|             pp.sendMessage( |             pp.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission_event"), |                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                     TagResolver.resolver( |                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||||
|                             "node", |  | ||||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) |  | ||||||
|                     ) |  | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } else if (!plot.isAdded(pp.getUUID())) { |         } else if (!plot.isAdded(pp.getUUID())) { | ||||||
| @@ -1273,10 +1248,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } |             } | ||||||
|             pp.sendMessage( |             pp.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission_event"), |                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                     TagResolver.resolver( |                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||||
|                             "node", |  | ||||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) |  | ||||||
|                     ) |  | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { |         } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||||
| @@ -1323,7 +1295,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } |             } | ||||||
|             plotPlayer.sendMessage( |             plotPlayer.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission_event"), |                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                     TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD)) |                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } else if (!plot.hasOwner()) { |         } else if (!plot.hasOwner()) { | ||||||
| @@ -1332,10 +1304,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } |             } | ||||||
|             plotPlayer.sendMessage( |             plotPlayer.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission_event"), |                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                     TagResolver.resolver( |                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||||
|                             "node", |  | ||||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) |  | ||||||
|                     ) |  | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } else if (!plot.isAdded(plotPlayer.getUUID())) { |         } else if (!plot.isAdded(plotPlayer.getUUID())) { | ||||||
| @@ -1344,10 +1313,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             } |             } | ||||||
|             plotPlayer.sendMessage( |             plotPlayer.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission_event"), |                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                     TagResolver.resolver( |                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||||
|                             "node", |  | ||||||
|                             Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) |  | ||||||
|                     ) |  | ||||||
|             ); |             ); | ||||||
|             event.setCancelled(true); |             event.setCancelled(true); | ||||||
|         } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { |         } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { | ||||||
| @@ -1379,10 +1345,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_ROAD)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_ROAD) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|             } |             } | ||||||
| @@ -1391,10 +1354,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_UNOWNED) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1405,10 +1365,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { |                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { | ||||||
|                         pp.sendMessage( |                         pp.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.no_permission_event"), |                                 TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                 TagResolver.resolver( |                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER)) | ||||||
|                                         "node", |  | ||||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_BUILD_OTHER) |  | ||||||
|                                 ) |  | ||||||
|                         ); |                         ); | ||||||
|                         event.setCancelled(true); |                         event.setCancelled(true); | ||||||
|                     } |                     } | ||||||
| @@ -1437,10 +1394,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_ROAD)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_ROAD)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_ROAD)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_ROAD) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1448,10 +1402,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1462,10 +1413,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_OTHER) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                     plot.debug(p.getName() |                     plot.debug(p.getName() | ||||||
| @@ -1487,10 +1435,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                                 .hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) { |                                 .hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) { | ||||||
|                             player.sendMessage( |                             player.sendMessage( | ||||||
|                                     TranslatableCaption.of("permission.no_permission_event"), |                                     TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                     TagResolver.resolver( |                                     Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) | ||||||
|                                             "node", |  | ||||||
|                                             Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_UNOWNED) |  | ||||||
|                                     ) |  | ||||||
|                             ); |                             ); | ||||||
|                             event.setCancelled(true); |                             event.setCancelled(true); | ||||||
|                         } |                         } | ||||||
| @@ -1500,10 +1445,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                                     .hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) { |                                     .hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) { | ||||||
|                                 player.sendMessage( |                                 player.sendMessage( | ||||||
|                                         TranslatableCaption.of("permission.no_permission_event"), |                                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                         TagResolver.resolver( |                                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER)) | ||||||
|                                                 "node", |  | ||||||
|                                                 Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_OTHER) |  | ||||||
|                                         ) |  | ||||||
|                                 ); |                                 ); | ||||||
|                                 event.setCancelled(true); |                                 event.setCancelled(true); | ||||||
|                                 plot.debug(player.getName() |                                 plot.debug(player.getName() | ||||||
| @@ -1535,10 +1477,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_ROAD)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_ROAD) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|             } |             } | ||||||
| @@ -1546,10 +1485,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|             } |             } | ||||||
| @@ -1607,10 +1543,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_INTERACT_OTHER)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_INTERACT_OTHER) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
|             } |             } | ||||||
| @@ -1632,10 +1565,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_ROAD)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_ROAD)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_ROAD)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_ROAD) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|                 } |                 } | ||||||
| @@ -1644,10 +1574,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_UNOWNED)) { |                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_UNOWNED)) { | ||||||
|                         pp.sendMessage( |                         pp.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.no_permission_event"), |                                 TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                 TagResolver.resolver( |                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_UNOWNED)) | ||||||
|                                         "node", |  | ||||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_UNOWNED) |  | ||||||
|                                 ) |  | ||||||
|                         ); |                         ); | ||||||
|                         event.setCancelled(true); |                         event.setCancelled(true); | ||||||
|                         return; |                         return; | ||||||
| @@ -1661,10 +1588,7 @@ public class PlayerEventListener extends PlotListener implements Listener { | |||||||
|                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_OTHER)) { |                     if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_OTHER)) { | ||||||
|                         pp.sendMessage( |                         pp.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.no_permission_event"), |                                 TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                 TagResolver.resolver( |                                 Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_OTHER)) | ||||||
|                                         "node", |  | ||||||
|                                         Tag.inserting(Permission.PERMISSION_ADMIN_DESTROY_VEHICLE_OTHER) |  | ||||||
|                                 ) |  | ||||||
|                         ); |                         ); | ||||||
|                         event.setCancelled(true); |                         event.setCancelled(true); | ||||||
|                         plot.debug(pp.getName() |                         plot.debug(pp.getName() | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
| @@ -31,9 +38,7 @@ import com.plotsquared.core.plot.PlotHandler; | |||||||
| import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag; | import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag; | ||||||
| import com.plotsquared.core.plot.world.PlotAreaManager; | import com.plotsquared.core.plot.world.PlotAreaManager; | ||||||
| import com.plotsquared.core.util.Permissions; | import com.plotsquared.core.util.Permissions; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.Entity; | ||||||
| import org.bukkit.entity.LivingEntity; | import org.bukkit.entity.LivingEntity; | ||||||
| import org.bukkit.entity.Player; | import org.bukkit.entity.Player; | ||||||
| @@ -109,10 +114,7 @@ public class ProjectileEventListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 entity.remove(); |                 entity.remove(); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
| @@ -121,10 +123,7 @@ public class ProjectileEventListener implements Listener { | |||||||
|             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) { |             if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) { | ||||||
|                 pp.sendMessage( |                 pp.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission_event"), |                         TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                         TagResolver.resolver( |                         Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) | ||||||
|                                 "node", |  | ||||||
|                                 Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED) |  | ||||||
|                         ) |  | ||||||
|                 ); |                 ); | ||||||
|                 entity.remove(); |                 entity.remove(); | ||||||
|                 event.setCancelled(true); |                 event.setCancelled(true); | ||||||
| @@ -134,10 +133,7 @@ public class ProjectileEventListener implements Listener { | |||||||
|                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) { |                 if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) { | ||||||
|                     pp.sendMessage( |                     pp.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     entity.remove(); |                     entity.remove(); | ||||||
|                     event.setCancelled(true); |                     event.setCancelled(true); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.listener; | package com.plotsquared.bukkit.listener; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.managers; | package com.plotsquared.bukkit.managers; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.managers; | package com.plotsquared.bukkit.managers; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.managers; | package com.plotsquared.bukkit.managers; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.permissions; | package com.plotsquared.bukkit.permissions; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.permissions; | package com.plotsquared.bukkit.permissions; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.placeholder; | package com.plotsquared.bukkit.placeholder; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.placeholder; | package com.plotsquared.bukkit.placeholder; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.placeholder; | package com.plotsquared.bukkit.placeholder; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.player; | package com.plotsquared.bukkit.player; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.player; | package com.plotsquared.bukkit.player; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.player; | package com.plotsquared.bukkit.player; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.queue; | package com.plotsquared.bukkit.queue; | ||||||
|  |  | ||||||
| @@ -85,9 +92,9 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator { | |||||||
|             @Assisted final @NonNull Collection<BlockVector2> requestedChunks, |             @Assisted final @NonNull Collection<BlockVector2> requestedChunks, | ||||||
|             @Assisted final @NonNull Runnable whenDone, |             @Assisted final @NonNull Runnable whenDone, | ||||||
|             @Assisted final @NonNull Consumer<Throwable> throwableConsumer, |             @Assisted final @NonNull Consumer<Throwable> throwableConsumer, | ||||||
|             @Assisted("unloadAfter") final boolean unloadAfter, |             @Assisted final boolean unloadAfter, | ||||||
|             @Assisted final @NonNull Collection<ProgressSubscriber> progressSubscribers, |             @Assisted final @NonNull Collection<ProgressSubscriber> progressSubscribers, | ||||||
|             @Assisted("forceSync") final boolean forceSync |             @Assisted final boolean forceSync | ||||||
|     ) { |     ) { | ||||||
|         this.requestedChunks = new LinkedBlockingQueue<>(requestedChunks); |         this.requestedChunks = new LinkedBlockingQueue<>(requestedChunks); | ||||||
|         this.availableChunks = new LinkedBlockingQueue<>(); |         this.availableChunks = new LinkedBlockingQueue<>(); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.queue; | package com.plotsquared.bukkit.queue; | ||||||
|  |  | ||||||
| @@ -228,7 +235,6 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator { | |||||||
|                         .withConsumer(consumer) |                         .withConsumer(consumer) | ||||||
|                         .unloadAfter(isUnloadAfter()) |                         .unloadAfter(isUnloadAfter()) | ||||||
|                         .withProgressSubscribers(getProgressSubscribers()) |                         .withProgressSubscribers(getProgressSubscribers()) | ||||||
|                         .forceSync(isForceSync()) |  | ||||||
|                         .build(); |                         .build(); | ||||||
|         return super.enqueue(); |         return super.enqueue(); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.queue; | package com.plotsquared.bukkit.queue; | ||||||
|  |  | ||||||
| @@ -23,7 +30,7 @@ import com.plotsquared.bukkit.util.BukkitBlockUtil; | |||||||
| import com.plotsquared.bukkit.util.BukkitUtil; | import com.plotsquared.bukkit.util.BukkitUtil; | ||||||
| import com.plotsquared.core.location.ChunkWrapper; | import com.plotsquared.core.location.ChunkWrapper; | ||||||
| import com.plotsquared.core.location.Location; | import com.plotsquared.core.location.Location; | ||||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||||
| import com.plotsquared.core.util.AnnotationHelper; | import com.plotsquared.core.util.AnnotationHelper; | ||||||
| import com.plotsquared.core.util.ChunkUtil; | import com.plotsquared.core.util.ChunkUtil; | ||||||
| import com.plotsquared.core.util.PatternUtil; | import com.plotsquared.core.util.PatternUtil; | ||||||
| @@ -45,7 +52,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; | |||||||
| import java.util.Arrays; | import java.util.Arrays; | ||||||
|  |  | ||||||
| @AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.") | @AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.") | ||||||
| public class GenChunk extends ZeroedDelegateScopedQueueCoordinator { | public class GenChunk extends ScopedQueueCoordinator { | ||||||
|  |  | ||||||
|     public final Biome[] biomes; |     public final Biome[] biomes; | ||||||
|     public BlockState[][] result; |     public BlockState[][] result; | ||||||
| @@ -103,7 +110,7 @@ public class GenChunk extends ZeroedDelegateScopedQueueCoordinator { | |||||||
|     /** |     /** | ||||||
|      * Set the world and XZ of the chunk being represented via {@link ChunkWrapper} |      * Set the world and XZ of the chunk being represented via {@link ChunkWrapper} | ||||||
|      * |      * | ||||||
|      * @param wrap PlotSquared ChunkWrapper |      * @param wrap P2 ChunkWrapper | ||||||
|      */ |      */ | ||||||
|     public void setChunk(@NonNull ChunkWrapper wrap) { |     public void setChunk(@NonNull ChunkWrapper wrap) { | ||||||
|         chunk = null; |         chunk = null; | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.queue; | package com.plotsquared.bukkit.queue; | ||||||
|  |  | ||||||
| @@ -37,7 +44,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. |  * Wraps a {@link LimitedRegion} inside a {@link com.plotsquared.core.queue.QueueCoordinator} so it can be written to. | ||||||
|  * |  * | ||||||
|  * @since 6.9.0 |  * @since TODO | ||||||
|  */ |  */ | ||||||
| public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator { | public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator { | ||||||
|  |  | ||||||
| @@ -46,7 +53,7 @@ public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator { | |||||||
|     private final LimitedRegion limitedRegion; |     private final LimitedRegion limitedRegion; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @since 6.9.0 |      * @since TODO | ||||||
|      */ |      */ | ||||||
|     public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) { |     public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) { | ||||||
|         super(null); |         super(null); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.schematic; | package com.plotsquared.bukkit.schematic; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.schematic; | package com.plotsquared.bukkit.schematic; | ||||||
|  |  | ||||||
| @@ -56,7 +63,7 @@ public class StateWrapper { | |||||||
|      * @deprecated in favour of using WE methods for obtaining NBT, specifically by obtaining a |      * @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()} |      *         {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()} | ||||||
|      */ |      */ | ||||||
|     @Deprecated(forRemoval = true, since = "6.9.0") |     @Deprecated(forRemoval = true, since = "TODO") | ||||||
|     public StateWrapper(org.bukkit.block.BlockState state) { |     public StateWrapper(org.bukkit.block.BlockState state) { | ||||||
|         this.state = state; |         this.state = state; | ||||||
|     } |     } | ||||||
| @@ -260,7 +267,7 @@ public class StateWrapper { | |||||||
|      * @deprecated in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining a |      * @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()} |      *         {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()} | ||||||
|      */ |      */ | ||||||
|     @Deprecated(forRemoval = true, since = "6.9.0") |     @Deprecated(forRemoval = true, since = "TODO") | ||||||
|     public CompoundTag getTag() { |     public CompoundTag getTag() { | ||||||
|         if (this.tag != null) { |         if (this.tag != null) { | ||||||
|             return this.tag; |             return this.tag; | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
| @@ -43,9 +50,7 @@ import com.plotsquared.core.util.EntityUtil; | |||||||
| import com.plotsquared.core.util.Permissions; | import com.plotsquared.core.util.Permissions; | ||||||
| import com.plotsquared.core.util.entity.EntityCategories; | import com.plotsquared.core.util.entity.EntityCategories; | ||||||
| import com.sk89q.worldedit.bukkit.BukkitAdapter; | import com.sk89q.worldedit.bukkit.BukkitAdapter; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.Arrow; | ||||||
| import org.bukkit.entity.Creature; | import org.bukkit.entity.Creature; | ||||||
| import org.bukkit.entity.Entity; | import org.bukkit.entity.Entity; | ||||||
| @@ -183,10 +188,7 @@ public class BukkitEntityUtil { | |||||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) { |                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", Permission.PERMISSION_ADMIN_DESTROY + "." + stub) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -198,10 +200,7 @@ public class BukkitEntityUtil { | |||||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) { |                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", Permission.PERMISSION_ADMIN_DESTROY + "." + stub) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     if (plot != null) { |                     if (plot != null) { | ||||||
|                         plot.debug(player.getName() |                         plot.debug(player.getName() | ||||||
| @@ -222,10 +221,7 @@ public class BukkitEntityUtil { | |||||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { |                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     if (plot != null) { |                     if (plot != null) { | ||||||
|                         plot.debug(player.getName() + " could not attack " + entityType |                         plot.debug(player.getName() + " could not attack " + entityType | ||||||
| @@ -246,10 +242,7 @@ public class BukkitEntityUtil { | |||||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { |                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     if (plot != null) { |                     if (plot != null) { | ||||||
|                         plot.debug(player.getName() + " could not attack " + entityType |                         plot.debug(player.getName() + " could not attack " + entityType | ||||||
| @@ -263,10 +256,7 @@ public class BukkitEntityUtil { | |||||||
|                             .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVP + "." + stub)) { |                             .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVP + "." + stub)) { | ||||||
|                         plotPlayer.sendMessage( |                         plotPlayer.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.no_permission_event"), |                                 TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                                 TagResolver.resolver( |                                 Template.of("node", Permission.PERMISSION_ADMIN_PVP + "." + stub) | ||||||
|                                         "node", |  | ||||||
|                                         Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVP + "." + stub)) |  | ||||||
|                                 ) |  | ||||||
|                         ); |                         ); | ||||||
|                         plot.debug(player.getName() + " could not attack " + entityType |                         plot.debug(player.getName() + " could not attack " + entityType | ||||||
|                                 + " because pve = false"); |                                 + " because pve = false"); | ||||||
| @@ -280,10 +270,7 @@ public class BukkitEntityUtil { | |||||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVP + "." + stub)) { |                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVP + "." + stub)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", Permission.PERMISSION_ADMIN_PVP + "." + stub) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVP + "." + stub)) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -300,10 +287,7 @@ public class BukkitEntityUtil { | |||||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { |                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     if (plot != null) { |                     if (plot != null) { | ||||||
|                         plot.debug(player.getName() + " could not attack " + entityType |                         plot.debug(player.getName() + " could not attack " + entityType | ||||||
| @@ -325,10 +309,7 @@ public class BukkitEntityUtil { | |||||||
|                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { |                 if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PVE + "." + stub)) { | ||||||
|                     plotPlayer.sendMessage( |                     plotPlayer.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission_event"), |                             TranslatableCaption.of("permission.no_permission_event"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Component.text(Permission.PERMISSION_ADMIN_PVE + "." + stub)) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     if (plot != null) { |                     if (plot != null) { | ||||||
|                         plot.debug(player.getName() + " could not attack " + entityType |                         plot.debug(player.getName() + " could not attack " + entityType | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
| @@ -56,7 +63,7 @@ public class BukkitInventoryUtil extends InventoryUtil { | |||||||
|         ItemMeta meta = null; |         ItemMeta meta = null; | ||||||
|         if (item.getName() != null) { |         if (item.getName() != null) { | ||||||
|             meta = stack.getItemMeta(); |             meta = stack.getItemMeta(); | ||||||
|             Component nameComponent = BukkitUtil.MINI_MESSAGE.deserialize(item.getName()); |             Component nameComponent = BukkitUtil.MINI_MESSAGE.parse(item.getName()); | ||||||
|             meta.setDisplayName(BukkitUtil.LEGACY_COMPONENT_SERIALIZER.serialize(nameComponent)); |             meta.setDisplayName(BukkitUtil.LEGACY_COMPONENT_SERIALIZER.serialize(nameComponent)); | ||||||
|         } |         } | ||||||
|         if (item.getLore() != null) { |         if (item.getLore() != null) { | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
| @@ -30,7 +37,7 @@ import com.plotsquared.core.plot.PlotArea; | |||||||
| import com.plotsquared.core.plot.PlotManager; | import com.plotsquared.core.plot.PlotManager; | ||||||
| import com.plotsquared.core.queue.GlobalBlockQueue; | import com.plotsquared.core.queue.GlobalBlockQueue; | ||||||
| import com.plotsquared.core.queue.QueueCoordinator; | import com.plotsquared.core.queue.QueueCoordinator; | ||||||
| import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; | import com.plotsquared.core.queue.ScopedQueueCoordinator; | ||||||
| import com.plotsquared.core.util.ChunkManager; | import com.plotsquared.core.util.ChunkManager; | ||||||
| import com.plotsquared.core.util.RegionManager; | import com.plotsquared.core.util.RegionManager; | ||||||
| import com.plotsquared.core.util.WorldUtil; | import com.plotsquared.core.util.WorldUtil; | ||||||
| @@ -257,9 +264,9 @@ public class BukkitRegionManager extends RegionManager { | |||||||
|             map.saveEntitiesOut(Bukkit.getWorld(world.getName()).getChunkAt(x, z), currentPlotClear); |             map.saveEntitiesOut(Bukkit.getWorld(world.getName()).getChunkAt(x, z), currentPlotClear); | ||||||
|             AugmentedUtils.bypass( |             AugmentedUtils.bypass( | ||||||
|                     ignoreAugment, |                     ignoreAugment, | ||||||
|                     () -> ChunkManager.setChunkInPlotArea(null, new RunnableVal<ZeroedDelegateScopedQueueCoordinator>() { |                     () -> ChunkManager.setChunkInPlotArea(null, new RunnableVal<ScopedQueueCoordinator>() { | ||||||
|                         @Override |                         @Override | ||||||
|                         public void run(ZeroedDelegateScopedQueueCoordinator value) { |                         public void run(ScopedQueueCoordinator value) { | ||||||
|                             Location min = value.getMin(); |                             Location min = value.getMin(); | ||||||
|                             int bx = min.getX(); |                             int bx = min.getX(); | ||||||
|                             int bz = min.getZ(); |                             int bz = min.getZ(); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
| @@ -45,7 +52,7 @@ import com.sk89q.worldedit.world.block.BlockTypes; | |||||||
| import io.papermc.lib.PaperLib; | import io.papermc.lib.PaperLib; | ||||||
| import net.kyori.adventure.platform.bukkit.BukkitAudiences; | import net.kyori.adventure.platform.bukkit.BukkitAudiences; | ||||||
| import net.kyori.adventure.text.minimessage.MiniMessage; | import net.kyori.adventure.text.minimessage.MiniMessage; | ||||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; | import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; | ||||||
| import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
| @@ -332,7 +339,7 @@ public class BukkitUtil extends WorldUtil { | |||||||
|     @SuppressWarnings("deprecation") |     @SuppressWarnings("deprecation") | ||||||
|     public void setSign( |     public void setSign( | ||||||
|             final @NonNull Location location, final @NonNull Caption[] lines, |             final @NonNull Location location, final @NonNull Caption[] lines, | ||||||
|             final @NonNull TagResolver... replacements |             final @NonNull Template... replacements | ||||||
|     ) { |     ) { | ||||||
|         ensureLoaded(location.getWorldName(), location.getX(), location.getZ(), chunk -> { |         ensureLoaded(location.getWorldName(), location.getX(), location.getZ(), chunk -> { | ||||||
|             PlotArea area = location.getPlotArea(); |             PlotArea area = location.getPlotArea(); | ||||||
| @@ -365,9 +372,8 @@ public class BukkitUtil extends WorldUtil { | |||||||
|             final org.bukkit.block.BlockState blockstate = block.getState(); |             final org.bukkit.block.BlockState blockstate = block.getState(); | ||||||
|             if (blockstate instanceof final Sign sign) { |             if (blockstate instanceof final Sign sign) { | ||||||
|                 for (int i = 0; i < lines.length; i++) { |                 for (int i = 0; i < lines.length; i++) { | ||||||
|                     sign.setLine(i, LEGACY_COMPONENT_SERIALIZER.serialize( |                     sign.setLine(i, LEGACY_COMPONENT_SERIALIZER | ||||||
|                             MINI_MESSAGE.deserialize(lines[i].getComponent(LocaleHolder.console()), replacements) |                             .serialize(MINI_MESSAGE.parse(lines[i].getComponent(LocaleHolder.console()), replacements))); | ||||||
|                     )); |  | ||||||
|                 } |                 } | ||||||
|                 sign.update(true, false); |                 sign.update(true, false); | ||||||
|             } |             } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
| @@ -24,6 +31,7 @@ import org.bukkit.Bukkit; | |||||||
| import org.checkerframework.checker.nullness.qual.NonNull; | import org.checkerframework.checker.nullness.qual.NonNull; | ||||||
|  |  | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  | import java.util.Objects; | ||||||
|  |  | ||||||
| public class BukkitWorld implements World<org.bukkit.World> { | public class BukkitWorld implements World<org.bukkit.World> { | ||||||
|  |  | ||||||
| @@ -132,6 +140,14 @@ public class BukkitWorld implements World<org.bukkit.World> { | |||||||
|         return world.hashCode(); |         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() { |     public String toString() { | ||||||
|         return "BukkitWorld(world=" + this.world + ")"; |         return "BukkitWorld(world=" + this.world + ")"; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util; | package com.plotsquared.bukkit.util; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util.fawe; | package com.plotsquared.bukkit.util.fawe; | ||||||
|  |  | ||||||
| @@ -98,6 +105,11 @@ public class FaweRegionManager extends BukkitRegionManager { | |||||||
|         delegate.swap(pos1, pos2, swapPos, whenDone); |         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 |     @Override | ||||||
|     public void setBiome(CuboidRegion region, int extendBiome, BiomeType biome, PlotArea area, Runnable whenDone) { |     public void setBiome(CuboidRegion region, int extendBiome, BiomeType biome, PlotArea area, Runnable whenDone) { | ||||||
|         delegate.setBiome(region, extendBiome, biome, area.getWorldName(), whenDone); |         delegate.setBiome(region, extendBiome, biome, area.getWorldName(), whenDone); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util.fawe; | package com.plotsquared.bukkit.util.fawe; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util.task; | package com.plotsquared.bukkit.util.task; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util.task; | package com.plotsquared.bukkit.util.task; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util.task; | package com.plotsquared.bukkit.util.task; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.util.task; | package com.plotsquared.bukkit.util.task; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.uuid; | package com.plotsquared.bukkit.uuid; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.uuid; | package com.plotsquared.bukkit.uuid; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.uuid; | package com.plotsquared.bukkit.uuid; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.uuid; | package com.plotsquared.bukkit.uuid; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.uuid; | package com.plotsquared.bukkit.uuid; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.bukkit.uuid; | package com.plotsquared.bukkit.uuid; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -59,7 +59,7 @@ tasks { | |||||||
|     withType<Javadoc> { |     withType<Javadoc> { | ||||||
|         val opt = options as StandardJavadocDocletOptions |         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://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString()) | ||||||
|         opt.links("https://jd.adventure.kyori.net/api/4.9.3/") |         opt.links("https://jd.adventure.kyori.net/api/" + libs.adventure.get().versionConstraint.toString()) | ||||||
|         opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/") |         opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/") | ||||||
|         opt.links("https://checkerframework.org/api/") |         opt.links("https://checkerframework.org/api/") | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core; | package com.plotsquared.core; | ||||||
|  |  | ||||||
| @@ -30,7 +37,7 @@ import com.plotsquared.core.util.ChunkManager; | |||||||
| import com.plotsquared.core.util.EventDispatcher; | import com.plotsquared.core.util.EventDispatcher; | ||||||
| import com.plotsquared.core.util.SchematicHandler; | import com.plotsquared.core.util.SchematicHandler; | ||||||
| import com.plotsquared.core.util.query.PlotQuery; | import com.plotsquared.core.util.query.PlotQuery; | ||||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| import org.checkerframework.checker.nullness.qual.NonNull; | import org.checkerframework.checker.nullness.qual.NonNull; | ||||||
| import org.checkerframework.checker.nullness.qual.Nullable; | import org.checkerframework.checker.nullness.qual.Nullable; | ||||||
|  |  | ||||||
| @@ -145,7 +152,7 @@ public class PlotAPI { | |||||||
|      */ |      */ | ||||||
|     public void sendConsoleMessage( |     public void sendConsoleMessage( | ||||||
|             final @NonNull String message, |             final @NonNull String message, | ||||||
|             final @NonNull TagResolver @NonNull ... replacements |             final @NonNull Template @NonNull ... replacements | ||||||
|     ) { |     ) { | ||||||
|         ConsolePlayer.getConsole().sendMessage(StaticCaption.of(message), replacements); |         ConsolePlayer.getConsole().sendMessage(StaticCaption.of(message), replacements); | ||||||
|     } |     } | ||||||
| @@ -158,7 +165,7 @@ public class PlotAPI { | |||||||
|      */ |      */ | ||||||
|     public void sendConsoleMessage( |     public void sendConsoleMessage( | ||||||
|             final @NonNull Caption caption, |             final @NonNull Caption caption, | ||||||
|             final @NonNull TagResolver @NonNull ... replacements |             final @NonNull Template @NonNull ... replacements | ||||||
|     ) { |     ) { | ||||||
|         ConsolePlayer.getConsole().sendMessage(caption, replacements); |         ConsolePlayer.getConsole().sendMessage(caption, replacements); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core; | package com.plotsquared.core; | ||||||
|  |  | ||||||
| @@ -352,9 +359,9 @@ public interface PlotPlatform<P> extends LocaleHolder { | |||||||
|     @NonNull String toLegacyPlatformString(@NonNull Component component); |     @NonNull String toLegacyPlatformString(@NonNull Component component); | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Returns if the FastAsyncWorldEdit-PlotSquared hook is active/enabled |      * Returns if the FAWE-P2 hook is active/enabled | ||||||
|      * |      * | ||||||
|      * @return status of FastAsyncWorldEdit-PlotSquared hook |      * @return status of FAWE-P2 hook | ||||||
|      */ |      */ | ||||||
|     default boolean isFaweHooking() { |     default boolean isFaweHooking() { | ||||||
|         return false; |         return false; | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core; | package com.plotsquared.core; | ||||||
|  |  | ||||||
| @@ -65,10 +72,7 @@ import com.plotsquared.core.util.ReflectionUtils; | |||||||
| import com.plotsquared.core.util.task.TaskManager; | import com.plotsquared.core.util.task.TaskManager; | ||||||
| import com.plotsquared.core.uuid.UUIDPipeline; | import com.plotsquared.core.uuid.UUIDPipeline; | ||||||
| import com.sk89q.worldedit.WorldEdit; | import com.sk89q.worldedit.WorldEdit; | ||||||
| import com.sk89q.worldedit.event.platform.PlatformReadyEvent; |  | ||||||
| import com.sk89q.worldedit.math.BlockVector2; | 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.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
| import org.checkerframework.checker.nullness.qual.MonotonicNonNull; | import org.checkerframework.checker.nullness.qual.MonotonicNonNull; | ||||||
| @@ -149,8 +153,6 @@ public class PlotSquared { | |||||||
|     private EventDispatcher eventDispatcher; |     private EventDispatcher eventDispatcher; | ||||||
|     private PlotListener plotListener; |     private PlotListener plotListener; | ||||||
|  |  | ||||||
|     private boolean weInitialised; |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Initialize PlotSquared with the desired Implementation class. |      * Initialize PlotSquared with the desired Implementation class. | ||||||
|      * |      * | ||||||
| @@ -221,7 +223,6 @@ public class PlotSquared { | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             this.worldedit = WorldEdit.getInstance(); |             this.worldedit = WorldEdit.getInstance(); | ||||||
|             WorldEdit.getInstance().getEventBus().register(new WEPlatformReadyListener()); |  | ||||||
|  |  | ||||||
|             // Create Event utility class |             // Create Event utility class | ||||||
|             this.eventDispatcher = new EventDispatcher(this.worldedit); |             this.eventDispatcher = new EventDispatcher(this.worldedit); | ||||||
| @@ -786,9 +787,7 @@ public class PlotSquared { | |||||||
|         if (world.equals("CheckingPlotSquaredGenerator")) { |         if (world.equals("CheckingPlotSquaredGenerator")) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         if (!this.getPlotAreaManager().addWorld(world)) { |         this.getPlotAreaManager().addWorld(world); | ||||||
|             return; |  | ||||||
|         } |  | ||||||
|         Set<String> worlds; |         Set<String> worlds; | ||||||
|         if (this.worldConfiguration.contains("worlds")) { |         if (this.worldConfiguration.contains("worlds")) { | ||||||
|             worlds = this.worldConfiguration.getConfigurationSection("worlds").getKeys(false); |             worlds = this.worldConfiguration.getConfigurationSection("worlds").getKeys(false); | ||||||
| @@ -1575,13 +1574,6 @@ public class PlotSquared { | |||||||
|         return this.plotListener; |         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} |      * Different ways of sorting {@link Plot plots} | ||||||
|      */ |      */ | ||||||
| @@ -1604,15 +1596,4 @@ public class PlotSquared { | |||||||
|         DISTANCE_FROM_ORIGIN |         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,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core; | package com.plotsquared.core; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.backup; | package com.plotsquared.core.backup; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.backup; | package com.plotsquared.core.backup; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.backup; | package com.plotsquared.core.backup; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.backup; | package com.plotsquared.core.backup; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.backup; | package com.plotsquared.core.backup; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.backup; | package com.plotsquared.core.backup; | ||||||
|  |  | ||||||
| @@ -200,7 +207,7 @@ public class PlayerBackupProfile implements BackupProfile { | |||||||
|                                     if (value) { |                                     if (value) { | ||||||
|                                         future.complete(null); |                                         future.complete(null); | ||||||
|                                     } else { |                                     } else { | ||||||
|                                         future.completeExceptionally(new RuntimeException(MINI_MESSAGE.escapeTags( |                                         future.completeExceptionally(new RuntimeException(MINI_MESSAGE.stripTokens( | ||||||
|                                                 TranslatableCaption |                                                 TranslatableCaption | ||||||
|                                                         .of("schematics.schematic_paste_failed") |                                                         .of("schematics.schematic_paste_failed") | ||||||
|                                                         .getComponent(ConsolePlayer.getConsole())))); |                                                         .getComponent(ConsolePlayer.getConsole())))); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.backup; | package com.plotsquared.core.backup; | ||||||
|  |  | ||||||
| @@ -24,14 +31,13 @@ import com.google.inject.Inject; | |||||||
| import com.google.inject.Singleton; | import com.google.inject.Singleton; | ||||||
| import com.plotsquared.core.PlotSquared; | import com.plotsquared.core.PlotSquared; | ||||||
| import com.plotsquared.core.configuration.Settings; | import com.plotsquared.core.configuration.Settings; | ||||||
|  | import com.plotsquared.core.configuration.caption.Templates; | ||||||
| import com.plotsquared.core.configuration.caption.TranslatableCaption; | import com.plotsquared.core.configuration.caption.TranslatableCaption; | ||||||
| import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory; | import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory; | ||||||
| import com.plotsquared.core.player.PlotPlayer; | import com.plotsquared.core.player.PlotPlayer; | ||||||
| import com.plotsquared.core.plot.Plot; | import com.plotsquared.core.plot.Plot; | ||||||
| import com.plotsquared.core.util.task.TaskManager; | import com.plotsquared.core.util.task.TaskManager; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.NonNull; | ||||||
| import org.checkerframework.checker.nullness.qual.Nullable; | import org.checkerframework.checker.nullness.qual.Nullable; | ||||||
|  |  | ||||||
| @@ -101,7 +107,7 @@ public class SimpleBackupManager implements BackupManager { | |||||||
|             if (player != null) { |             if (player != null) { | ||||||
|                 player.sendMessage( |                 player.sendMessage( | ||||||
|                         TranslatableCaption.of("backups.backup_automatic_started"), |                         TranslatableCaption.of("backups.backup_automatic_started"), | ||||||
|                         TagResolver.resolver("plot", Tag.inserting(Component.text(plot.getId().toString()))) |                         Template.of("plot", plot.getId().toString()) | ||||||
|                 ); |                 ); | ||||||
|             } |             } | ||||||
|             profile.createBackup().whenComplete((backup, throwable) -> { |             profile.createBackup().whenComplete((backup, throwable) -> { | ||||||
| @@ -109,7 +115,7 @@ public class SimpleBackupManager implements BackupManager { | |||||||
|                     if (player != null) { |                     if (player != null) { | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("backups.backup_automatic_failure"), |                                 TranslatableCaption.of("backups.backup_automatic_failure"), | ||||||
|                                 TagResolver.resolver("reason", Tag.inserting(Component.text(throwable.getMessage()))) |                                 Templates.of("reason", throwable.getMessage()) | ||||||
|                         ); |                         ); | ||||||
|                     } |                     } | ||||||
|                     throwable.printStackTrace(); |                     throwable.printStackTrace(); | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.collection; | package com.plotsquared.core.collection; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.collection; | package com.plotsquared.core.collection; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.collection; | package com.plotsquared.core.collection; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.collection; | package com.plotsquared.core.collection; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.collection; | package com.plotsquared.core.collection; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.collection; | package com.plotsquared.core.collection; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.command; | package com.plotsquared.core.command; | ||||||
|  |  | ||||||
| @@ -31,9 +38,7 @@ import com.plotsquared.core.util.PlayerManager; | |||||||
| import com.plotsquared.core.util.TabCompletions; | import com.plotsquared.core.util.TabCompletions; | ||||||
| import com.plotsquared.core.util.task.RunnableVal2; | import com.plotsquared.core.util.task.RunnableVal2; | ||||||
| import com.plotsquared.core.util.task.RunnableVal3; | import com.plotsquared.core.util.task.RunnableVal3; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.NonNull; | ||||||
|  |  | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| @@ -72,7 +77,7 @@ public class Add extends Command { | |||||||
|                 TranslatableCaption.of("permission.no_plot_perms") |                 TranslatableCaption.of("permission.no_plot_perms") | ||||||
|         ); |         ); | ||||||
|         checkTrue(args.length == 1, TranslatableCaption.of("commandconfig.command_syntax"), |         checkTrue(args.length == 1, TranslatableCaption.of("commandconfig.command_syntax"), | ||||||
|                 TagResolver.resolver("value", Tag.inserting(Component.text("/plot add <player | *>"))) |                 Template.of("value", "/plot add <player | *>") | ||||||
|         ); |         ); | ||||||
|         final CompletableFuture<Boolean> future = new CompletableFuture<>(); |         final CompletableFuture<Boolean> future = new CompletableFuture<>(); | ||||||
|         PlayerManager.getUUIDsFromString(args[0], (uuids, throwable) -> { |         PlayerManager.getUUIDsFromString(args[0], (uuids, throwable) -> { | ||||||
| @@ -82,7 +87,7 @@ public class Add extends Command { | |||||||
|                 } else { |                 } else { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("errors.invalid_player"), |                             TranslatableCaption.of("errors.invalid_player"), | ||||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(args[0]))) |                             Template.of("value", args[0]) | ||||||
|                     ); |                     ); | ||||||
|                 } |                 } | ||||||
|                 future.completeExceptionally(throwable); |                 future.completeExceptionally(throwable); | ||||||
| @@ -90,7 +95,7 @@ public class Add extends Command { | |||||||
|             } else { |             } else { | ||||||
|                 try { |                 try { | ||||||
|                     checkTrue(!uuids.isEmpty(), TranslatableCaption.of("errors.invalid_player"), |                     checkTrue(!uuids.isEmpty(), TranslatableCaption.of("errors.invalid_player"), | ||||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(args[0]))) |                             Template.of("value", args[0]) | ||||||
|                     ); |                     ); | ||||||
|                     Iterator<UUID> iterator = uuids.iterator(); |                     Iterator<UUID> iterator = uuids.iterator(); | ||||||
|                     int size = plot.getTrusted().size() + plot.getMembers().size(); |                     int size = plot.getTrusted().size() + plot.getMembers().size(); | ||||||
| @@ -101,9 +106,7 @@ public class Add extends Command { | |||||||
|                                         .hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) { |                                         .hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) { | ||||||
|                             player.sendMessage( |                             player.sendMessage( | ||||||
|                                     TranslatableCaption.of("errors.invalid_player"), |                                     TranslatableCaption.of("errors.invalid_player"), | ||||||
|                                     TagResolver.resolver("value", Tag.inserting( |                                     Template.of("value", PlayerManager.resolveName(uuid).getComponent(player)) | ||||||
|                                             PlayerManager.resolveName(uuid).toComponent(player) |  | ||||||
|                                     )) |  | ||||||
|                             ); |                             ); | ||||||
|                             iterator.remove(); |                             iterator.remove(); | ||||||
|                             continue; |                             continue; | ||||||
| @@ -111,9 +114,7 @@ public class Add extends Command { | |||||||
|                         if (plot.isOwner(uuid)) { |                         if (plot.isOwner(uuid)) { | ||||||
|                             player.sendMessage( |                             player.sendMessage( | ||||||
|                                     TranslatableCaption.of("member.already_added"), |                                     TranslatableCaption.of("member.already_added"), | ||||||
|                                     TagResolver.resolver("player", Tag.inserting( |                                     Template.of("player", PlayerManager.resolveName(uuid).getComponent(player)) | ||||||
|                                             PlayerManager.resolveName(uuid).toComponent(player) |  | ||||||
|                                     )) |  | ||||||
|                             ); |                             ); | ||||||
|                             iterator.remove(); |                             iterator.remove(); | ||||||
|                             continue; |                             continue; | ||||||
| @@ -121,9 +122,7 @@ public class Add extends Command { | |||||||
|                         if (plot.getMembers().contains(uuid)) { |                         if (plot.getMembers().contains(uuid)) { | ||||||
|                             player.sendMessage( |                             player.sendMessage( | ||||||
|                                     TranslatableCaption.of("member.already_added"), |                                     TranslatableCaption.of("member.already_added"), | ||||||
|                                     TagResolver.resolver("player", Tag.inserting( |                                     Template.of("player", PlayerManager.resolveName(uuid).getComponent(player)) | ||||||
|                                             PlayerManager.resolveName(uuid).toComponent(player) |  | ||||||
|                                     )) |  | ||||||
|                             ); |                             ); | ||||||
|                             iterator.remove(); |                             iterator.remove(); | ||||||
|                             continue; |                             continue; | ||||||
| @@ -136,7 +135,7 @@ public class Add extends Command { | |||||||
|                     if (localAddSize >= maxAddSize) { |                     if (localAddSize >= maxAddSize) { | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("members.plot_max_members_added"), |                                 TranslatableCaption.of("members.plot_max_members_added"), | ||||||
|                                 TagResolver.resolver("amount", Tag.inserting(Component.text(localAddSize))) |                                 Template.of("amount", String.valueOf(localAddSize)) | ||||||
|                         ); |                         ); | ||||||
|                         return; |                         return; | ||||||
|                     } |                     } | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.command; | package com.plotsquared.core.command; | ||||||
|  |  | ||||||
| @@ -28,9 +35,7 @@ import com.plotsquared.core.plot.Plot; | |||||||
| import com.plotsquared.core.util.MathMan; | import com.plotsquared.core.util.MathMan; | ||||||
| import com.plotsquared.core.util.Permissions; | import com.plotsquared.core.util.Permissions; | ||||||
| import com.plotsquared.core.util.query.PlotQuery; | import com.plotsquared.core.util.query.PlotQuery; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| import net.kyori.adventure.text.minimessage.tag.Tag; |  | ||||||
| import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; |  | ||||||
|  |  | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| @@ -94,10 +99,7 @@ public class Alias extends SubCommand { | |||||||
|                 } else { |                 } else { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ALIAS_SET)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ALIAS_SET) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| @@ -113,10 +115,7 @@ public class Alias extends SubCommand { | |||||||
|                 } else { |                 } else { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_ALIAS_REMOVE)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_ALIAS_REMOVE) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| @@ -157,16 +156,13 @@ public class Alias extends SubCommand { | |||||||
|                     .anyMatch()) { |                     .anyMatch()) { | ||||||
|                 player.sendMessage( |                 player.sendMessage( | ||||||
|                         TranslatableCaption.of("alias.alias_is_taken"), |                         TranslatableCaption.of("alias.alias_is_taken"), | ||||||
|                         TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) |                         Template.of("alias", alias) | ||||||
|                 ); |                 ); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             if (Settings.UUID.OFFLINE) { |             if (Settings.UUID.OFFLINE) { | ||||||
|                 plot.setAlias(alias); |                 plot.setAlias(alias); | ||||||
|                 player.sendMessage( |                 player.sendMessage(TranslatableCaption.of("alias.alias_set_to"), Template.of("alias", alias)); | ||||||
|                         TranslatableCaption.of("alias.alias_set_to"), |  | ||||||
|                         TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) |  | ||||||
|                 ); |  | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             PlotSquared.get().getImpromptuUUIDPipeline().getSingle(alias, ((uuid, throwable) -> { |             PlotSquared.get().getImpromptuUUIDPipeline().getSingle(alias, ((uuid, throwable) -> { | ||||||
| @@ -175,13 +171,13 @@ public class Alias extends SubCommand { | |||||||
|                 } else if (uuid != null) { |                 } else if (uuid != null) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("alias.alias_is_taken"), |                             TranslatableCaption.of("alias.alias_is_taken"), | ||||||
|                             TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) |                             Template.of("alias", alias) | ||||||
|                     ); |                     ); | ||||||
|                 } else { |                 } else { | ||||||
|                     plot.setAlias(alias); |                     plot.setAlias(alias); | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("alias.alias_set_to"), |                             TranslatableCaption.of("alias.alias_set_to"), | ||||||
|                             TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) |                             Template.of("alias", alias) | ||||||
|                     ); |                     ); | ||||||
|                 } |                 } | ||||||
|             })); |             })); | ||||||
| @@ -193,7 +189,7 @@ public class Alias extends SubCommand { | |||||||
|         if (!plot.getAlias().isEmpty()) { |         if (!plot.getAlias().isEmpty()) { | ||||||
|             player.sendMessage( |             player.sendMessage( | ||||||
|                     TranslatableCaption.of("alias.alias_removed"), |                     TranslatableCaption.of("alias.alias_removed"), | ||||||
|                     TagResolver.resolver("alias", Tag.inserting(Component.text(alias))) |                     Template.of("alias", alias) | ||||||
|             ); |             ); | ||||||
|         } else { |         } else { | ||||||
|             player.sendMessage( |             player.sendMessage( | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.command; | package com.plotsquared.core.command; | ||||||
|  |  | ||||||
| @@ -24,6 +31,7 @@ import com.plotsquared.core.configuration.ConfigurationSection; | |||||||
| import com.plotsquared.core.configuration.ConfigurationUtil; | import com.plotsquared.core.configuration.ConfigurationUtil; | ||||||
| import com.plotsquared.core.configuration.Settings; | import com.plotsquared.core.configuration.Settings; | ||||||
| import com.plotsquared.core.configuration.caption.CaptionHolder; | 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.caption.TranslatableCaption; | ||||||
| import com.plotsquared.core.configuration.file.YamlConfiguration; | import com.plotsquared.core.configuration.file.YamlConfiguration; | ||||||
| import com.plotsquared.core.events.TeleportCause; | import com.plotsquared.core.events.TeleportCause; | ||||||
| @@ -68,9 +76,7 @@ import com.sk89q.worldedit.math.BlockVector3; | |||||||
| import com.sk89q.worldedit.regions.CuboidRegion; | import com.sk89q.worldedit.regions.CuboidRegion; | ||||||
| import com.sk89q.worldedit.regions.Region; | import com.sk89q.worldedit.regions.Region; | ||||||
| import com.sk89q.worldedit.world.World; | import com.sk89q.worldedit.world.World; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.NonNull; | ||||||
|  |  | ||||||
| import java.io.File; | import java.io.File; | ||||||
| @@ -142,17 +148,14 @@ public class Area extends SubCommand { | |||||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_CREATE)) { |                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_CREATE)) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_CREATE)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_CREATE) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
|                 if (args.length < 2) { |                 if (args.length < 2) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("single.single_area_needs_name"), |                             TranslatableCaption.of("single.single_area_needs_name"), | ||||||
|                             TagResolver.resolver("command", Tag.inserting(Component.text("/plot area single <name>"))) |                             Template.of("command", "/plot area single <name>") | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -284,7 +287,7 @@ public class Area extends SubCommand { | |||||||
|                     } else { |                     } else { | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("errors.error_create"), |                                 TranslatableCaption.of("errors.error_create"), | ||||||
|                                 TagResolver.resolver("world", Tag.inserting(Component.text(hybridPlotWorld.getWorldName()))) |                                 Template.of("world", hybridPlotWorld.getWorldName()) | ||||||
|                         ); |                         ); | ||||||
|                     } |                     } | ||||||
|                 }; |                 }; | ||||||
| @@ -295,10 +298,7 @@ public class Area extends SubCommand { | |||||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_CREATE)) { |                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_CREATE)) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_CREATE)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_CREATE) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -306,10 +306,7 @@ public class Area extends SubCommand { | |||||||
|                     case 1: |                     case 1: | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("commandconfig.command_syntax"), |                                 TranslatableCaption.of("commandconfig.command_syntax"), | ||||||
|                                 TagResolver.resolver( |                                 Templates.of("value", "/plot area create [world[:id]] [<modifier>=<value>]...") | ||||||
|                                         "value", |  | ||||||
|                                         Tag.inserting(Component.text("/plot area create [world[:id]] [<modifier>=<value>]...")) |  | ||||||
|                                 ) |  | ||||||
|                         ); |                         ); | ||||||
|                         return false; |                         return false; | ||||||
|                     case 2: |                     case 2: | ||||||
| @@ -323,11 +320,7 @@ public class Area extends SubCommand { | |||||||
|                                 if (area == null) { |                                 if (area == null) { | ||||||
|                                     player.sendMessage( |                                     player.sendMessage( | ||||||
|                                             TranslatableCaption.of("commandconfig.command_syntax"), |                                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||||
|                                             TagResolver.resolver( |                                             Templates.of("value", "/plot area create [world[:id]] [<modifier>=<value>]...") | ||||||
|                                                     "value", |  | ||||||
|                                                     Tag.inserting(Component.text( |  | ||||||
|                                                             "/plot area create [world[:id]] [<modifier>=<value>]...")) |  | ||||||
|                                             ) |  | ||||||
|                                     ); |                                     ); | ||||||
|                                     return false; |                                     return false; | ||||||
|                                 } |                                 } | ||||||
| @@ -338,18 +331,12 @@ public class Area extends SubCommand { | |||||||
|                                 ); |                                 ); | ||||||
|                                 player.sendMessage( |                                 player.sendMessage( | ||||||
|                                         TranslatableCaption.of("set.set_attribute"), |                                         TranslatableCaption.of("set.set_attribute"), | ||||||
|                                         TagResolver.builder() |                                         Template.of("attribute", "area_pos1"), | ||||||
|                                                 .tag("attribute", Tag.inserting(Component.text("area_pos1"))) |                                         Template.of("value", location.getX() + "," + location.getZ()) | ||||||
|                                                 .tag("value", Tag.inserting( |  | ||||||
|                                                         Component.text(location.getX()) |  | ||||||
|                                                                 .append(Component.text(",")) |  | ||||||
|                                                                 .append(Component.text(location.getZ())) |  | ||||||
|                                                 )) |  | ||||||
|                                                 .build() |  | ||||||
|                                 ); |                                 ); | ||||||
|                                 player.sendMessage( |                                 player.sendMessage( | ||||||
|                                         TranslatableCaption.of("area.set_pos2"), |                                         TranslatableCaption.of("area.set_pos2"), | ||||||
|                                         TagResolver.resolver("command", Tag.inserting(Component.text("/plot area create pos2"))) |                                         Template.of("command", "/plot area create pos2") | ||||||
|                                 ); |                                 ); | ||||||
|                                 return true; |                                 return true; | ||||||
|                             } |                             } | ||||||
| @@ -363,11 +350,7 @@ public class Area extends SubCommand { | |||||||
|                                 if (area == null) { |                                 if (area == null) { | ||||||
|                                     player.sendMessage( |                                     player.sendMessage( | ||||||
|                                             TranslatableCaption.of("commandconfig.command_syntax"), |                                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||||
|                                             TagResolver.resolver( |                                             Templates.of("value", "/plot area create [world[:id]] [<modifier>=<value>]...") | ||||||
|                                                     "value", |  | ||||||
|                                                     Tag.inserting(Component.text( |  | ||||||
|                                                             "/plot area create [world[:id]] [<modifier>=<value>]...")) |  | ||||||
|                                             ) |  | ||||||
|                                     ); |                                     ); | ||||||
|                                     return false; |                                     return false; | ||||||
|                                 } |                                 } | ||||||
| @@ -394,10 +377,7 @@ public class Area extends SubCommand { | |||||||
|                                 if (!areas.isEmpty()) { |                                 if (!areas.isEmpty()) { | ||||||
|                                     player.sendMessage( |                                     player.sendMessage( | ||||||
|                                             TranslatableCaption.of("cluster.cluster_intersection"), |                                             TranslatableCaption.of("cluster.cluster_intersection"), | ||||||
|                                             TagResolver.resolver( |                                             Template.of("cluster", areas.iterator().next().toString()) | ||||||
|                                                     "cluster", |  | ||||||
|                                                     Tag.inserting(areas.iterator().next()) |  | ||||||
|                                             ) |  | ||||||
|                                     ); |                                     ); | ||||||
|                                     return false; |                                     return false; | ||||||
|                                 } |                                 } | ||||||
| @@ -423,7 +403,8 @@ public class Area extends SubCommand { | |||||||
|                                         player.sendMessage(TranslatableCaption.of("setup.setup_finished")); |                                         player.sendMessage(TranslatableCaption.of("setup.setup_finished")); | ||||||
|                                         if (area.getTerrain() != PlotAreaTerrainType.ALL) { |                                         if (area.getTerrain() != PlotAreaTerrainType.ALL) { | ||||||
|                                             QueueCoordinator queue = blockQueue.getNewQueue(worldUtil.getWeWorld(world)); |                                             QueueCoordinator queue = blockQueue.getNewQueue(worldUtil.getWeWorld(world)); | ||||||
|                                             queue.setChunkConsumer(chunk -> AugmentedUtils.generateChunk( |                                             queue.setChunkConsumer(chunk -> AugmentedUtils.generate( | ||||||
|  |                                                     null, | ||||||
|                                                     world, |                                                     world, | ||||||
|                                                     chunk.getX(), |                                                     chunk.getX(), | ||||||
|                                                     chunk.getZ(), |                                                     chunk.getZ(), | ||||||
| @@ -435,7 +416,7 @@ public class Area extends SubCommand { | |||||||
|                                     } else { |                                     } else { | ||||||
|                                         player.sendMessage( |                                         player.sendMessage( | ||||||
|                                                 TranslatableCaption.of("errors.error_create"), |                                                 TranslatableCaption.of("errors.error_create"), | ||||||
|                                                 TagResolver.resolver("world", Tag.inserting(Component.text(area.getWorldName()))) |                                                 Template.of("world", area.getWorldName()) | ||||||
|                                         ); |                                         ); | ||||||
|                                     } |                                     } | ||||||
|                                 }; |                                 }; | ||||||
| @@ -469,7 +450,7 @@ public class Area extends SubCommand { | |||||||
|                         if (other != null && Objects.equals(pa.getId(), other.getId())) { |                         if (other != null && Objects.equals(pa.getId(), other.getId())) { | ||||||
|                             player.sendMessage( |                             player.sendMessage( | ||||||
|                                     TranslatableCaption.of("setup.setup_world_taken"), |                                     TranslatableCaption.of("setup.setup_world_taken"), | ||||||
|                                     TagResolver.resolver("value", Tag.inserting(Component.text(pa.getId()))) |                                     Template.of("value", pa.toString()) | ||||||
|                             ); |                             ); | ||||||
|                             return false; |                             return false; | ||||||
|                         } |                         } | ||||||
| @@ -484,13 +465,8 @@ public class Area extends SubCommand { | |||||||
|                             if (pair.length != 2) { |                             if (pair.length != 2) { | ||||||
|                                 player.sendMessage( |                                 player.sendMessage( | ||||||
|                                         TranslatableCaption.of("commandconfig.command_syntax_extended"), |                                         TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||||
|                                         TagResolver.builder() |                                         Template.of("value1,", getCommandString()), | ||||||
|                                                 .tag("value1", Tag.inserting(Component.text(getCommandString()))) |                                         Template.of("value2", " create [world[:id]] [<modifier>=<value>]...") | ||||||
|                                                 .tag( |  | ||||||
|                                                         "value2", |  | ||||||
|                                                         Tag.inserting(Component.text("create [world[:id]] [<modifier>=<value>]...")) |  | ||||||
|                                                 ) |  | ||||||
|                                                 .build() |  | ||||||
|                                 ); |                                 ); | ||||||
|                                 return false; |                                 return false; | ||||||
|                             } |                             } | ||||||
| @@ -526,14 +502,8 @@ public class Area extends SubCommand { | |||||||
|                                 default -> { |                                 default -> { | ||||||
|                                     player.sendMessage( |                                     player.sendMessage( | ||||||
|                                             TranslatableCaption.of("commandconfig.command_syntax_extended"), |                                             TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||||
|                                             TagResolver.builder() |                                             Template.of("value1", getCommandString()), | ||||||
|                                                     .tag("value1", Tag.inserting(Component.text(getCommandString()))) |                                             Template.of("value2", " create [world[:id]] [<modifier>=<value>]...") | ||||||
|                                                     .tag( |  | ||||||
|                                                             "value2", |  | ||||||
|                                                             Tag.inserting(Component.text( |  | ||||||
|                                                                     " create [world[:id]] [<modifier>=<value>]...")) |  | ||||||
|                                                     ) |  | ||||||
|                                                     .build() |  | ||||||
|                                     ); |                                     ); | ||||||
|                                     return false; |                                     return false; | ||||||
|                                 } |                                 } | ||||||
| @@ -543,7 +513,7 @@ public class Area extends SubCommand { | |||||||
|                             if (this.worldUtil.isWorld(pa.getWorldName())) { |                             if (this.worldUtil.isWorld(pa.getWorldName())) { | ||||||
|                                 player.sendMessage( |                                 player.sendMessage( | ||||||
|                                         TranslatableCaption.of("setup.setup_world_taken"), |                                         TranslatableCaption.of("setup.setup_world_taken"), | ||||||
|                                         TagResolver.resolver("value", Tag.inserting(Component.text(pa.getWorldName()))) |                                         Template.of("value", pa.getWorldName()) | ||||||
|                                 ); |                                 ); | ||||||
|                                 return false; |                                 return false; | ||||||
|                             } |                             } | ||||||
| @@ -564,7 +534,7 @@ public class Area extends SubCommand { | |||||||
|                                 } else { |                                 } else { | ||||||
|                                     player.sendMessage( |                                     player.sendMessage( | ||||||
|                                             TranslatableCaption.of("errors.error_create"), |                                             TranslatableCaption.of("errors.error_create"), | ||||||
|                                             TagResolver.resolver("world", Tag.inserting(Component.text(pa.getWorldName()))) |                                             Template.of("world", pa.getWorldName()) | ||||||
|                                     ); |                                     ); | ||||||
|                                 } |                                 } | ||||||
|                                 try { |                                 try { | ||||||
| @@ -583,18 +553,12 @@ public class Area extends SubCommand { | |||||||
|                         if (pa.getId() == null) { |                         if (pa.getId() == null) { | ||||||
|                             player.sendMessage( |                             player.sendMessage( | ||||||
|                                     TranslatableCaption.of("commandconfig.command_syntax"), |                                     TranslatableCaption.of("commandconfig.command_syntax"), | ||||||
|                                     TagResolver.resolver("value", Tag.inserting(Component.text(getUsage()))) |                                     Template.of("value", getUsage()) | ||||||
|                             ); |                             ); | ||||||
|                             player.sendMessage( |                             player.sendMessage( | ||||||
|                                     TranslatableCaption.of("commandconfig.command_syntax_extended"), |                                     TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||||
|                                     TagResolver.builder() |                                     Template.of("value1", getCommandString()), | ||||||
|                                             .tag("value1", Tag.inserting(Component.text(getCommandString()))) |                                     Template.of("value2", " create [world[:id]] [<modifier>=<value>]...") | ||||||
|                                             .tag( |  | ||||||
|                                                     "value2", |  | ||||||
|                                                     Tag.inserting(Component.text( |  | ||||||
|                                                             " create [world[:id]] [<modifier>=<value>]...")) |  | ||||||
|                                             ) |  | ||||||
|                                             .build() |  | ||||||
|                             ); |                             ); | ||||||
|                             return false; |                             return false; | ||||||
|                         } |                         } | ||||||
| @@ -611,7 +575,7 @@ public class Area extends SubCommand { | |||||||
|                         metaData.computeIfAbsent(player.getUUID(), missingUUID -> new HashMap<>()).put("area_create_area", pa); |                         metaData.computeIfAbsent(player.getUUID(), missingUUID -> new HashMap<>()).put("area_create_area", pa); | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("single.get_position"), |                                 TranslatableCaption.of("single.get_position"), | ||||||
|                                 TagResolver.resolver("command", Tag.inserting(Component.text(getCommandString()))) |                                 Template.of("command", getCommandString()) | ||||||
|                         ); |                         ); | ||||||
|                         break; |                         break; | ||||||
|                 } |                 } | ||||||
| @@ -621,10 +585,7 @@ public class Area extends SubCommand { | |||||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_INFO)) { |                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_INFO)) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_INFO)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_INFO) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -635,20 +596,15 @@ public class Area extends SubCommand { | |||||||
|                     default -> { |                     default -> { | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("commandconfig.command_syntax_extended"), |                                 TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||||
|                                 TagResolver.builder() |                                 Template.of("value1", getCommandString()), | ||||||
|                                         .tag("value1", Tag.inserting(Component.text(getCommandString()))) |                                 Template.of("value2", " info [area]") | ||||||
|                                         .tag("value2", Tag.inserting(Component.text(" info [area]"))) |  | ||||||
|                                         .build() |  | ||||||
|                         ); |                         ); | ||||||
|                         return false; |                         return false; | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 if (area == null) { |                 if (area == null) { | ||||||
|                     if (args.length == 2) { |                     if (args.length == 2) { | ||||||
|                         player.sendMessage( |                         player.sendMessage(TranslatableCaption.of("errors.not_valid_plot_world"), Template.of("value", args[1])); | ||||||
|                                 TranslatableCaption.of("errors.not_valid_plot_world"), |  | ||||||
|                                 TagResolver.resolver("value", Tag.inserting(Component.text(args[1]))) |  | ||||||
|                         ); |  | ||||||
|                     } else { |                     } else { | ||||||
|                         player.sendMessage(TranslatableCaption.of("errors.not_in_plot_world")); |                         player.sendMessage(TranslatableCaption.of("errors.not_in_plot_world")); | ||||||
|                     } |                     } | ||||||
| @@ -672,35 +628,42 @@ public class Area extends SubCommand { | |||||||
|                     percent = claimed == 0 ? 0 : 100d * claimed / Integer.MAX_VALUE; |                     percent = claimed == 0 ? 0 : 100d * claimed / Integer.MAX_VALUE; | ||||||
|                     region = "N/A"; |                     region = "N/A"; | ||||||
|                 } |                 } | ||||||
|                 TagResolver resolver = TagResolver.builder() |                 Template headerTemplate = Template.of( | ||||||
|                         .tag( |                         "header", | ||||||
|                                 "header", |                         TranslatableCaption.of("info.plot_info_header").getComponent(player) | ||||||
|                                 Tag.inserting(TranslatableCaption.of("info.plot_info_header").toComponent(player)) |                 ); | ||||||
|                         ) |                 Template nameTemplate = Template.of("name", name); | ||||||
|                         .tag("name", Tag.inserting(Component.text(name))) |                 Template typeTemplate = Template.of("type", area.getType().name()); | ||||||
|                         .tag("type", Tag.inserting(Component.text(area.getType().name()))) |                 Template terrainTemplate = Template.of("terrain", area.getTerrain().name()); | ||||||
|                         .tag("terrain", Tag.inserting(Component.text(area.getTerrain().name()))) |                 Template usageTemplate = Template.of("usage", String.format("%.2f", percent)); | ||||||
|                         .tag("usage", Tag.inserting(Component.text(String.format("%.2f", percent)))) |                 Template claimedTemplate = Template.of("claimed", String.valueOf(claimed)); | ||||||
|                         .tag("claimed", Tag.inserting(Component.text(claimed))) |                 Template clustersTemplate = Template.of("clusters", String.valueOf(clusters)); | ||||||
|                         .tag("clusters", Tag.inserting(Component.text(clusters))) |                 Template regionTemplate = Template.of("region", region); | ||||||
|                         .tag("region", Tag.inserting(Component.text(region))) |                 Template generatorTemplate = Template.of("generator", generator); | ||||||
|                         .tag("generator", Tag.inserting(Component.text(generator))) |                 Template footerTemplate = Template.of( | ||||||
|                         .tag( |                         "footer", | ||||||
|                                 "footer", |                         TranslatableCaption.of("info.plot_info_footer").getComponent(player) | ||||||
|                                 Tag.inserting(TranslatableCaption.of("info.plot_info_footer").toComponent(player)) |                 ); | ||||||
|                         ) |                 player.sendMessage( | ||||||
|                         .build(); |                         TranslatableCaption.of("info.area_info_format"), | ||||||
|                 player.sendMessage(TranslatableCaption.of("info.area_info_format"), resolver); |                         headerTemplate, | ||||||
|  |                         nameTemplate, | ||||||
|  |                         typeTemplate, | ||||||
|  |                         terrainTemplate, | ||||||
|  |                         usageTemplate, | ||||||
|  |                         claimedTemplate, | ||||||
|  |                         clustersTemplate, | ||||||
|  |                         regionTemplate, | ||||||
|  |                         generatorTemplate, | ||||||
|  |                         footerTemplate | ||||||
|  |                 ); | ||||||
|                 return true; |                 return true; | ||||||
|             } |             } | ||||||
|             case "l", "list" -> { |             case "l", "list" -> { | ||||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_LIST)) { |                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_LIST)) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_LIST)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_LIST) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -717,10 +680,8 @@ public class Area extends SubCommand { | |||||||
|                     default: |                     default: | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("commandconfig.command_syntax_extended"), |                                 TranslatableCaption.of("commandconfig.command_syntax_extended"), | ||||||
|                                 TagResolver.builder() |                                 Template.of("value1", getCommandString()), | ||||||
|                                         .tag("value1", Tag.inserting(Component.text(getCommandString()))) |                                 Template.of("value2", " list [#]") | ||||||
|                                         .tag("value2", Tag.inserting(Component.text(" list [#]"))) |  | ||||||
|                                         .build() |  | ||||||
|                         ); |                         ); | ||||||
|                         return false; |                         return false; | ||||||
|                 } |                 } | ||||||
| @@ -746,27 +707,37 @@ public class Area extends SubCommand { | |||||||
|                             percent = claimed == 0 ? 0 : (double) claimed / Short.MAX_VALUE * Short.MAX_VALUE; |                             percent = claimed == 0 ? 0 : (double) claimed / Short.MAX_VALUE * Short.MAX_VALUE; | ||||||
|                             region = "N/A"; |                             region = "N/A"; | ||||||
|                         } |                         } | ||||||
|                         Component tooltip = MINI_MESSAGE.deserialize( |                         Template claimedTemplate = Template.of("claimed", String.valueOf(claimed)); | ||||||
|                                 TranslatableCaption.of("info.area_list_tooltip").getComponent(player), |                         Template usageTemplate = Template.of("usage", String.format("%.2f", percent) + "%"); | ||||||
|                                 TagResolver.builder() |                         Template clustersTemplate = Template.of("clusters", String.valueOf(clusters)); | ||||||
|                                         .tag("claimed", Tag.inserting(Component.text(claimed))) |                         Template regionTemplate = Template.of("region", region); | ||||||
|                                         .tag("usage", Tag.inserting(Component.text(String.format("%.2f", percent) + "%"))) |                         Template generatorTemplate = Template.of("generator", generator); | ||||||
|                                         .tag("clusters", Tag.inserting(Component.text(clusters))) |                         String tooltip = MINI_MESSAGE.serialize(MINI_MESSAGE | ||||||
|                                         .tag("region", Tag.inserting(Component.text(region))) |                                 .parse( | ||||||
|                                         .tag("generator", Tag.inserting(Component.text(generator))) |                                         TranslatableCaption.of("info.area_list_tooltip").getComponent(player), | ||||||
|                                         .build() |                                         claimedTemplate, | ||||||
|                         ); |                                         usageTemplate, | ||||||
|                         TagResolver resolver = TagResolver.builder() |                                         clustersTemplate, | ||||||
|                                 .tag("hover_info", Tag.inserting(tooltip)) |                                         regionTemplate, | ||||||
|                                 .tag("command_tp", Tag.preProcessParsed("/plot area tp " + name)) |                                         generatorTemplate | ||||||
|                                 .tag("command_info", Tag.preProcessParsed("/plot area info " + name)) |                                 )); | ||||||
|                                 .tag("number", Tag.inserting(Component.text(i))) |                         Template tooltipTemplate = Template.of("hover_info", tooltip); | ||||||
|                                 .tag("area_name", Tag.inserting(Component.text(name))) |                         Template visitcmdTemplate = Template.of("command_tp", "/plot area tp " + area); | ||||||
|                                 .tag("area_type", Tag.inserting(Component.text(area.getType().name()))) |                         Template infocmdTemplate = Template.of("command_info", "/plot area info " + area); | ||||||
|                                 .tag("area_terrain", Tag.inserting(Component.text(area.getTerrain().name()))) |                         Template numberTemplate = Template.of("number", String.valueOf(i)); | ||||||
|                                 .build(); |                         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.set(TranslatableCaption.of("info.area_list_item")); | ||||||
|                         caption.setTagResolvers(resolver); |                         caption.setTemplates( | ||||||
|  |                                 tooltipTemplate, | ||||||
|  |                                 visitcmdTemplate, | ||||||
|  |                                 numberTemplate, | ||||||
|  |                                 nameTemplate, | ||||||
|  |                                 typeTemplate, | ||||||
|  |                                 terrainTemplate, | ||||||
|  |                                 infocmdTemplate | ||||||
|  |                         ); | ||||||
|                     } |                     } | ||||||
|                 }, "/plot area list", TranslatableCaption.of("list.area_list_header_paged")); |                 }, "/plot area list", TranslatableCaption.of("list.area_list_header_paged")); | ||||||
|                 return true; |                 return true; | ||||||
| @@ -775,10 +746,7 @@ public class Area extends SubCommand { | |||||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_REGEN)) { |                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_REGEN)) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver( |                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_REGEN)) | ||||||
|                                     "node", |  | ||||||
|                                     Tag.inserting(Permission.PERMISSION_AREA_REGEN) |  | ||||||
|                             ) |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -790,12 +758,13 @@ public class Area extends SubCommand { | |||||||
|                 if (area.getType() != PlotAreaType.PARTIAL) { |                 if (area.getType() != PlotAreaType.PARTIAL) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("single.delete_world_region"), |                             TranslatableCaption.of("single.delete_world_region"), | ||||||
|                             TagResolver.resolver("world", Tag.inserting(Component.text(area.getWorldName()))) |                             Template.of("world", area.getWorldName()) | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
|                 QueueCoordinator queue = blockQueue.getNewQueue(worldUtil.getWeWorld(area.getWorldName())); |                 QueueCoordinator queue = blockQueue.getNewQueue(worldUtil.getWeWorld(area.getWorldName())); | ||||||
|                 queue.setChunkConsumer(chunk -> AugmentedUtils.generateChunk( |                 queue.setChunkConsumer(chunk -> AugmentedUtils.generate( | ||||||
|  |                         null, | ||||||
|                         area.getWorldName(), |                         area.getWorldName(), | ||||||
|                         chunk.getX(), |                         chunk.getX(), | ||||||
|                         chunk.getZ(), |                         chunk.getZ(), | ||||||
| @@ -810,23 +779,20 @@ public class Area extends SubCommand { | |||||||
|                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_TP)) { |                 if (!Permissions.hasPermission(player, Permission.PERMISSION_AREA_TP)) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.no_permission"), |                             TranslatableCaption.of("permission.no_permission"), | ||||||
|                             TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_AREA_TP)) |                             Template.of("node", String.valueOf(Permission.PERMISSION_AREA_TP)) | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
|                 if (args.length != 2) { |                 if (args.length != 2) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("commandconfig.command_syntax"), |                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text("/plot area tp [area]"))) |                             Template.of("value", "/plot area tp [area]") | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
|                 PlotArea area = this.plotAreaManager.getPlotAreaByString(args[1]); |                 PlotArea area = this.plotAreaManager.getPlotAreaByString(args[1]); | ||||||
|                 if (area == null) { |                 if (area == null) { | ||||||
|                     player.sendMessage( |                     player.sendMessage(TranslatableCaption.of("errors.not_valid_plot_world"), Template.of("value", args[1])); | ||||||
|                             TranslatableCaption.of("errors.not_valid_plot_world"), |  | ||||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(args[1]))) |  | ||||||
|                     ); |  | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
|                 Location center; |                 Location center; | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.command; | package com.plotsquared.core.command; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,27 @@ | |||||||
| /* | /* | ||||||
|  * PlotSquared, a land and world management plugin for Minecraft. |  *       _____  _       _    _____                                _ | ||||||
|  * Copyright (C) IntellectualSites <https://intellectualsites.com> |  *      |  __ \| |     | |  / ____|                              | | | ||||||
|  * Copyright (C) IntellectualSites team and contributors |  *      | |__) | | ___ | |_| (___   __ _ _   _  __ _ _ __ ___  __| | | ||||||
|  |  *      |  ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` | | ||||||
|  |  *      | |    | | (_) | |_ ____) | (_| | |_| | (_| | | |  __/ (_| | | ||||||
|  |  *      |_|    |_|\___/ \__|_____/ \__, |\__,_|\__,_|_|  \___|\__,_| | ||||||
|  |  *                                    | | | ||||||
|  |  *                                    |_| | ||||||
|  |  *            PlotSquared plot management system for Minecraft | ||||||
|  |  *               Copyright (C) 2014 - 2022 IntellectualSites | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  *     This program is free software: you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  *     it under the terms of the GNU General Public License as published by | ||||||
|  * the Free Software Foundation, either version 3 of the License, or |  *     the Free Software Foundation, either version 3 of the License, or | ||||||
|  * (at your option) any later version. |  *     (at your option) any later version. | ||||||
|  * |  * | ||||||
|  * This program is distributed in the hope that it will be useful, |  *     This program is distributed in the hope that it will be useful, | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  *     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * GNU General Public License for more details. |  *     GNU General Public License for more details. | ||||||
|  * |  * | ||||||
|  * You should have received a copy of the GNU General Public License |  *     You should have received a copy of the GNU General Public License | ||||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. |  *     along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| package com.plotsquared.core.command; | package com.plotsquared.core.command; | ||||||
|  |  | ||||||
| @@ -44,9 +51,7 @@ import com.plotsquared.core.util.task.AutoClaimFinishTask; | |||||||
| import com.plotsquared.core.util.task.RunnableVal; | import com.plotsquared.core.util.task.RunnableVal; | ||||||
| import com.plotsquared.core.util.task.TaskManager; | import com.plotsquared.core.util.task.TaskManager; | ||||||
| import io.leangen.geantyref.TypeToken; | import io.leangen.geantyref.TypeToken; | ||||||
| import net.kyori.adventure.text.Component; | import net.kyori.adventure.text.minimessage.Template; | ||||||
| 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.NonNull; | ||||||
| import org.checkerframework.checker.nullness.qual.Nullable; | import org.checkerframework.checker.nullness.qual.Nullable; | ||||||
|  |  | ||||||
| @@ -112,13 +117,13 @@ public class Auto extends SubCommand { | |||||||
|                     if (diff < 0 && grantedPlots < sizeX * sizeZ) { |                     if (diff < 0 && grantedPlots < sizeX * sizeZ) { | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.cant_claim_more_plots"), |                                 TranslatableCaption.of("permission.cant_claim_more_plots"), | ||||||
|                                 TagResolver.resolver("amount", Tag.inserting(Component.text(diff + grantedPlots))) |                                 Template.of("amount", String.valueOf(diff + grantedPlots)) | ||||||
|                         ); |                         ); | ||||||
|                         return false; |                         return false; | ||||||
|                     } else if (diff >= 0 && grantedPlots + diff < sizeX * sizeZ) { |                     } else if (diff >= 0 && grantedPlots + diff < sizeX * sizeZ) { | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("permission.cant_claim_more_plots"), |                                 TranslatableCaption.of("permission.cant_claim_more_plots"), | ||||||
|                                 TagResolver.resolver("amount", Tag.inserting(Component.text(diff + grantedPlots))) |                                 Template.of("amount", String.valueOf(diff + grantedPlots)) | ||||||
|                         ); |                         ); | ||||||
|                         return false; |                         return false; | ||||||
|                     } else { |                     } else { | ||||||
| @@ -130,16 +135,15 @@ public class Auto extends SubCommand { | |||||||
|                         } |                         } | ||||||
|                         player.sendMessage( |                         player.sendMessage( | ||||||
|                                 TranslatableCaption.of("economy.removed_granted_plot"), |                                 TranslatableCaption.of("economy.removed_granted_plot"), | ||||||
|                                 TagResolver.builder() |                                 Template.of("usedGrants", String.valueOf(grantedPlots - left)), | ||||||
|                                         .tag("usedGrants", Tag.inserting(Component.text(grantedPlots - left))) |                                 Template.of("remainingGrants", String.valueOf(left)) | ||||||
|                                         .tag("remainingGrants", Tag.inserting(Component.text(left))) |  | ||||||
|                                         .build() |  | ||||||
|                         ); |                         ); | ||||||
|                     } |                     } | ||||||
|                 } else { |                 } else { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("permission.cant_claim_more_plots"), |                             TranslatableCaption.of("permission.cant_claim_more_plots"), | ||||||
|                             TagResolver.resolver("amount", Tag.inserting(Component.text(player.getAllowedPlots()))) |                             Template.of("amount", String.valueOf(player.getAllowedPlots()) | ||||||
|  |                             ) | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
| @@ -218,7 +222,7 @@ public class Auto extends SubCommand { | |||||||
|                 } else { |                 } else { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("commandconfig.command_syntax"), |                             TranslatableCaption.of("commandconfig.command_syntax"), | ||||||
|                             TagResolver.resolver("value", Tag.inserting(Component.text(getUsage()))) |                             Template.of("value", getUsage()) | ||||||
|                     ); |                     ); | ||||||
|                     return true; |                     return true; | ||||||
|                 } |                 } | ||||||
| @@ -241,7 +245,7 @@ public class Auto extends SubCommand { | |||||||
|         if (event.getEventResult() == Result.DENY) { |         if (event.getEventResult() == Result.DENY) { | ||||||
|             player.sendMessage( |             player.sendMessage( | ||||||
|                     TranslatableCaption.of("events.event_denied"), |                     TranslatableCaption.of("events.event_denied"), | ||||||
|                     TagResolver.resolver("value", Tag.inserting(Component.text("Auto claim"))) |                     Template.of("value", "Auto claim") | ||||||
|             ); |             ); | ||||||
|             return true; |             return true; | ||||||
|         } |         } | ||||||
| @@ -252,13 +256,13 @@ public class Auto extends SubCommand { | |||||||
|         if (!force && mega && !Permissions.hasPermission(player, Permission.PERMISSION_AUTO_MEGA)) { |         if (!force && mega && !Permissions.hasPermission(player, Permission.PERMISSION_AUTO_MEGA)) { | ||||||
|             player.sendMessage( |             player.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.no_permission"), |                     TranslatableCaption.of("permission.no_permission"), | ||||||
|                     TagResolver.resolver("node", Tag.inserting(Permission.PERMISSION_AUTO_MEGA)) |                     Template.of("node", String.valueOf(Permission.PERMISSION_AUTO_MEGA)) | ||||||
|             ); |             ); | ||||||
|         } |         } | ||||||
|         if (!force && sizeX * sizeZ > Settings.Claim.MAX_AUTO_AREA) { |         if (!force && sizeX * sizeZ > Settings.Claim.MAX_AUTO_AREA) { | ||||||
|             player.sendMessage( |             player.sendMessage( | ||||||
|                     TranslatableCaption.of("permission.cant_claim_more_plots_num"), |                     TranslatableCaption.of("permission.cant_claim_more_plots_num"), | ||||||
|                     TagResolver.resolver("amount", Tag.inserting(Component.text(Settings.Claim.MAX_AUTO_AREA))) |                     Template.of("amount", String.valueOf(Settings.Claim.MAX_AUTO_AREA)) | ||||||
|             ); |             ); | ||||||
|             return false; |             return false; | ||||||
|         } |         } | ||||||
| @@ -276,10 +280,8 @@ public class Auto extends SubCommand { | |||||||
|             if (!plotarea.hasSchematic(schematic)) { |             if (!plotarea.hasSchematic(schematic)) { | ||||||
|                 player.sendMessage( |                 player.sendMessage( | ||||||
|                         TranslatableCaption.of("schematics.schematic_invalid_named"), |                         TranslatableCaption.of("schematics.schematic_invalid_named"), | ||||||
|                         TagResolver.builder() |                         Template.of("schemname", schematic), | ||||||
|                                 .tag("schemname", Tag.inserting(Component.text(schematic))) |                         Template.of("reason", "non-existent") | ||||||
|                                 .tag("reason", Tag.inserting(Component.text("non-existent"))) |  | ||||||
|                                 .build() |  | ||||||
|                 ); |                 ); | ||||||
|                 return true; |                 return true; | ||||||
|             } |             } | ||||||
| @@ -290,7 +292,7 @@ public class Auto extends SubCommand { | |||||||
|                     .hasPermission(player, "plots.admin.command.schematic")) { |                     .hasPermission(player, "plots.admin.command.schematic")) { | ||||||
|                 player.sendMessage( |                 player.sendMessage( | ||||||
|                         TranslatableCaption.of("permission.no_permission"), |                         TranslatableCaption.of("permission.no_permission"), | ||||||
|                         TagResolver.resolver("node", Tag.inserting(Component.text("plots.claim.%s0"))) |                         Template.of("node", "plots.claim.%s0") | ||||||
|                 ); |                 ); | ||||||
|                 return true; |                 return true; | ||||||
|             } |             } | ||||||
| @@ -309,20 +311,15 @@ public class Auto extends SubCommand { | |||||||
|                 if (!force && this.econHandler.getMoney(player) < cost) { |                 if (!force && this.econHandler.getMoney(player) < cost) { | ||||||
|                     player.sendMessage( |                     player.sendMessage( | ||||||
|                             TranslatableCaption.of("economy.cannot_afford_plot"), |                             TranslatableCaption.of("economy.cannot_afford_plot"), | ||||||
|                             TagResolver.builder() |                             Template.of("money", this.econHandler.format(cost)), | ||||||
|                                     .tag("money", Tag.inserting(Component.text(this.econHandler.format(cost)))) |                             Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player))) | ||||||
|                                     .tag( |  | ||||||
|                                             "balance", |  | ||||||
|                                             Tag.inserting(Component.text(this.econHandler.format(this.econHandler.getMoney(player)))) |  | ||||||
|                                     ) |  | ||||||
|                                     .build() |  | ||||||
|                     ); |                     ); | ||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
|                 this.econHandler.withdrawMoney(player, cost); |                 this.econHandler.withdrawMoney(player, cost); | ||||||
|                 player.sendMessage( |                 player.sendMessage( | ||||||
|                         TranslatableCaption.of("economy.removed_balance"), |                         TranslatableCaption.of("economy.removed_balance"), | ||||||
|                         TagResolver.resolver("money", Tag.inserting(Component.text(this.econHandler.format(cost)))) |                         Template.of("money", this.econHandler.format(cost)) | ||||||
|                 ); |                 ); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| @@ -356,7 +353,7 @@ public class Auto extends SubCommand { | |||||||
|             if (!force && mergeEvent.getEventResult() == Result.DENY) { |             if (!force && mergeEvent.getEventResult() == Result.DENY) { | ||||||
|                 player.sendMessage( |                 player.sendMessage( | ||||||
|                         TranslatableCaption.of("events.event_denied"), |                         TranslatableCaption.of("events.event_denied"), | ||||||
|                         TagResolver.resolver("value", Tag.inserting(Component.text("Auto merge"))) |                         Template.of("value", "Auto merge") | ||||||
|                 ); |                 ); | ||||||
|                 return false; |                 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