PlotSquared source diff between v6 and v7

Files changed (239) hide show
  1. .github/ISSUE_TEMPLATE/bug_report.yml +5 -2
  2. .github/ISSUE_TEMPLATE/config.yml +1 -1
  3. .github/ISSUE_TEMPLATE/feature_request.yml +1 -1
  4. .github/renovate.json +19 -0
  5. .github/workflows/announce-release-on-discord.yml +2 -2
  6. .github/workflows/build-pr.yml +3 -3
  7. .github/workflows/build.yml +10 -10
  8. .github/workflows/codeql.yml +13 -5
  9. .github/workflows/release-drafter.yml +3 -3
  10. .gitignore +4 -0
  11. .idea/icon.svg +125 -29
  12. Bukkit/build.gradle.kts +15 -15
  13. Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java +19 -3
  14. Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java +86 -187
  15. Bukkit/src/main/java/com/plotsquared/bukkit/generator/BlockStatePopulator.java +2 -14
  16. Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java +208 -21
  17. Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java +8 -2
  18. Bukkit/src/main/java/com/plotsquared/bukkit/generator/LegacyBlockStatePopulator.java +2 -2
  19. Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java +93 -25
  20. Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener117.java +12 -6
  21. Bukkit/src/main/java/com/plotsquared/bukkit/listener/ChunkListener.java +28 -17
  22. Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntityEventListener.java +12 -28
  23. Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java +31 -36
  24. Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener113.java +0 -91
  25. Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java +156 -89
  26. Bukkit/src/main/java/com/plotsquared/bukkit/listener/ProjectileEventListener.java +14 -4
  27. Bukkit/src/main/java/com/plotsquared/bukkit/listener/SingleWorldListener.java +23 -24
  28. Bukkit/src/main/java/com/plotsquared/bukkit/managers/HyperverseWorldManager.java +0 -63
  29. Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/MVdWPlaceholders.java +1 -1
  30. Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitOfflinePlayer.java +1 -1
  31. Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java +8 -24
  32. Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayerManager.java +1 -3
  33. Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitQueueCoordinator.java +1 -1
  34. Bukkit/src/main/java/com/plotsquared/bukkit/queue/GenChunk.java +8 -6
  35. Bukkit/src/main/java/com/plotsquared/bukkit/schematic/StateWrapper.java +69 -37
  36. Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEntityUtil.java +35 -9
  37. Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java +1 -1
  38. Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitRegionManager.java +4 -4
  39. Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitSetupUtils.java +1 -1
  40. Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java +5 -4
  41. Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitWorld.java +0 -8
  42. Bukkit/src/main/java/com/plotsquared/bukkit/util/TranslationUpdateManager.java +78 -0
  43. Bukkit/src/main/java/com/plotsquared/bukkit/util/UpdateUtility.java +2 -1
  44. Bukkit/src/main/java/com/plotsquared/bukkit/util/fawe/FaweRegionManager.java +0 -5
  45. Bukkit/src/main/java/com/plotsquared/bukkit/uuid/SQLiteUUIDService.java +2 -2
  46. Bukkit/src/main/resources/plugin.yml +5 -5
  47. CODE_OF_CONDUCT.md +3 -3
  48. Core/build.gradle.kts +13 -12
  49. Core/src/main/java/com/plotsquared/core/PlotAPI.java +3 -3
  50. Core/src/main/java/com/plotsquared/core/PlotSquared.java +10 -4
  51. Core/src/main/java/com/plotsquared/core/backup/PlayerBackupProfile.java +1 -1
  52. Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java +8 -11
  53. Core/src/main/java/com/plotsquared/core/command/Add.java +16 -8
  54. Core/src/main/java/com/plotsquared/core/command/Alias.java +19 -8
  55. Core/src/main/java/com/plotsquared/core/command/Area.java +141 -100
  56. Core/src/main/java/com/plotsquared/core/command/Auto.java +35 -21
  57. Core/src/main/java/com/plotsquared/core/command/Backup.java +74 -30
  58. Core/src/main/java/com/plotsquared/core/command/Biome.java +10 -10
  59. Core/src/main/java/com/plotsquared/core/command/Buy.java +15 -9
  60. Core/src/main/java/com/plotsquared/core/command/Caps.java +14 -9
  61. Core/src/main/java/com/plotsquared/core/command/Chat.java +0 -54
  62. Core/src/main/java/com/plotsquared/core/command/Claim.java +33 -15
  63. Core/src/main/java/com/plotsquared/core/command/Clear.java +31 -29
  64. Core/src/main/java/com/plotsquared/core/command/Cluster.java +164 -116
  65. Core/src/main/java/com/plotsquared/core/command/CmdConfirm.java +8 -4
  66. Core/src/main/java/com/plotsquared/core/command/Command.java +42 -22
  67. Core/src/main/java/com/plotsquared/core/command/CommandCaller.java +2 -2
  68. Core/src/main/java/com/plotsquared/core/command/CommandCategory.java +7 -0
  69. Core/src/main/java/com/plotsquared/core/command/Comment.java +19 -9
  70. Core/src/main/java/com/plotsquared/core/command/Condense.java +28 -13
  71. Core/src/main/java/com/plotsquared/core/command/Continue.java +8 -4
  72. Core/src/main/java/com/plotsquared/core/command/Copy.java +10 -4
  73. Core/src/main/java/com/plotsquared/core/command/CreateRoadSchematic.java +4 -2
  74. Core/src/main/java/com/plotsquared/core/command/DatabaseCommand.java +17 -7
  75. Core/src/main/java/com/plotsquared/core/command/Debug.java +47 -17
  76. Core/src/main/java/com/plotsquared/core/command/DebugExec.java +17 -9
  77. Core/src/main/java/com/plotsquared/core/command/DebugPaste.java +16 -12
  78. Core/src/main/java/com/plotsquared/core/command/DebugRoadRegen.java +19 -13
  79. Core/src/main/java/com/plotsquared/core/command/Delete.java +10 -5
  80. Core/src/main/java/com/plotsquared/core/command/Deny.java +10 -5
  81. Core/src/main/java/com/plotsquared/core/command/Desc.java +5 -3
  82. Core/src/main/java/com/plotsquared/core/command/Done.java +6 -4
  83. Core/src/main/java/com/plotsquared/core/command/Download.java +39 -21
  84. Core/src/main/java/com/plotsquared/core/command/FlagCommand.java +106 -59
  85. Core/src/main/java/com/plotsquared/core/command/Grant.java +9 -7
  86. Core/src/main/java/com/plotsquared/core/command/Help.java +28 -16
  87. Core/src/main/java/com/plotsquared/core/command/HomeCommand.java +10 -6
  88. Core/src/main/java/com/plotsquared/core/command/Inbox.java +53 -36
  89. Core/src/main/java/com/plotsquared/core/command/Info.java +14 -5
  90. Core/src/main/java/com/plotsquared/core/command/Kick.java +9 -7
  91. Core/src/main/java/com/plotsquared/core/command/Leave.java +4 -2
  92. Core/src/main/java/com/plotsquared/core/command/Like.java +6 -4
  93. Core/src/main/java/com/plotsquared/core/command/ListCmd.java +75 -63
  94. Core/src/main/java/com/plotsquared/core/command/Load.java +11 -43
  95. Core/src/main/java/com/plotsquared/core/command/MainCommand.java +6 -5
  96. Core/src/main/java/com/plotsquared/core/command/Merge.java +41 -26
  97. Core/src/main/java/com/plotsquared/core/command/Move.java +7 -3
  98. Core/src/main/java/com/plotsquared/core/command/Music.java +20 -9
  99. Core/src/main/java/com/plotsquared/core/command/Near.java +4 -2
  100. Core/src/main/java/com/plotsquared/core/command/Owner.java +19 -8
  101. Core/src/main/java/com/plotsquared/core/command/PluginCmd.java +6 -4
  102. Core/src/main/java/com/plotsquared/core/command/Purge.java +29 -40
  103. Core/src/main/java/com/plotsquared/core/command/Rate.java +7 -5
  104. Core/src/main/java/com/plotsquared/core/command/RegenAllRoads.java +8 -6
  105. Core/src/main/java/com/plotsquared/core/command/Remove.java +7 -5
  106. Core/src/main/java/com/plotsquared/core/command/Save.java +0 -130
  107. Core/src/main/java/com/plotsquared/core/command/SchematicCmd.java +37 -14
  108. Core/src/main/java/com/plotsquared/core/command/Set.java +9 -4
  109. Core/src/main/java/com/plotsquared/core/command/SetCommand.java +11 -3
  110. Core/src/main/java/com/plotsquared/core/command/SetHome.java +4 -2
  111. Core/src/main/java/com/plotsquared/core/command/Setup.java +7 -2
  112. Core/src/main/java/com/plotsquared/core/command/Swap.java +7 -3
  113. Core/src/main/java/com/plotsquared/core/command/Target.java +5 -3
  114. Core/src/main/java/com/plotsquared/core/command/Template.java +19 -10
  115. Core/src/main/java/com/plotsquared/core/command/Toggle.java +17 -15
  116. Core/src/main/java/com/plotsquared/core/command/Trust.java +19 -9
  117. Core/src/main/java/com/plotsquared/core/command/Unlink.java +4 -2
  118. Core/src/main/java/com/plotsquared/core/command/Visit.java +23 -17
  119. Core/src/main/java/com/plotsquared/core/components/ComponentPreset.java +11 -51
  120. Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java +30 -21
  121. Core/src/main/java/com/plotsquared/core/configuration/Config.java +0 -37
  122. Core/src/main/java/com/plotsquared/core/configuration/Settings.java +6 -6
  123. Core/src/main/java/com/plotsquared/core/configuration/caption/Caption.java +11 -0
  124. Core/src/main/java/com/plotsquared/core/configuration/caption/CaptionHolder.java +32 -6
  125. Core/src/main/java/com/plotsquared/core/configuration/caption/CaptionUtility.java +13 -2
  126. Core/src/main/java/com/plotsquared/core/configuration/caption/StaticCaption.java +7 -0
  127. Core/src/main/java/com/plotsquared/core/configuration/caption/Templates.java +0 -103
  128. Core/src/main/java/com/plotsquared/core/configuration/caption/TranslatableCaption.java +15 -0
  129. Core/src/main/java/com/plotsquared/core/configuration/caption/load/CaptionLoader.java +1 -1
  130. Core/src/main/java/com/plotsquared/core/configuration/caption/load/ClassLoaderCaptionProvider.java +2 -1
  131. Core/src/main/java/com/plotsquared/core/configuration/file/YamlConstructor.java +2 -0
  132. Core/src/main/java/com/plotsquared/core/configuration/file/YamlRepresenter.java +2 -0
  133. Core/src/main/java/com/plotsquared/core/database/SQLManager.java +14 -19
  134. Core/src/main/java/com/plotsquared/core/events/EntityEvent.java +2 -1
  135. Core/src/main/java/com/plotsquared/core/events/PlayerAutoPlotEvent.java +0 -32
  136. Core/src/main/java/com/plotsquared/core/events/PlayerTeleportToPlotEvent.java +0 -9
  137. Core/src/main/java/com/plotsquared/core/generator/AugmentedUtils.java +4 -19
  138. Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java +5 -4
  139. Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java +16 -15
  140. Core/src/main/java/com/plotsquared/core/generator/HybridGen.java +75 -44
  141. Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java +39 -6
  142. Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java +41 -60
  143. Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java +7 -38
  144. Core/src/main/java/com/plotsquared/core/generator/IndependentPlotGenerator.java +23 -13
  145. Core/src/main/java/com/plotsquared/core/generator/SingleWorldGenerator.java +19 -7
  146. Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java +16 -8
  147. Core/src/main/java/com/plotsquared/core/listener/PlotListener.java +49 -55
  148. Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java +4 -2
  149. Core/src/main/java/com/plotsquared/core/location/ChunkWrapper.java +5 -11
  150. Core/src/main/java/com/plotsquared/core/location/UncheckedWorldLocation.java +13 -1
  151. Core/src/main/java/com/plotsquared/core/permissions/Permission.java +12 -6
  152. Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java +4 -4
  153. Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java +11 -10
  154. Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java +53 -91
  155. Core/src/main/java/com/plotsquared/core/plot/Plot.java +86 -133
  156. Core/src/main/java/com/plotsquared/core/plot/PlotArea.java +26 -44
  157. Core/src/main/java/com/plotsquared/core/plot/PlotId.java +0 -11
  158. Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java +1 -1
  159. Core/src/main/java/com/plotsquared/core/plot/PlotManager.java +0 -9
  160. Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java +8 -3
  161. Core/src/main/java/com/plotsquared/core/plot/PlotSettings.java +1 -14
  162. Core/src/main/java/com/plotsquared/core/plot/PlotWorld.java +0 -8
  163. Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java +8 -4
  164. Core/src/main/java/com/plotsquared/core/plot/comment/PlotComment.java +8 -20
  165. Core/src/main/java/com/plotsquared/core/plot/expiration/ExpireManager.java +16 -34
  166. Core/src/main/java/com/plotsquared/core/plot/expiration/ExpiryTask.java +1 -0
  167. Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java +0 -8
  168. Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java +6 -6
  169. Core/src/main/java/com/plotsquared/core/plot/flag/GlobalFlagContainer.java +2 -0
  170. Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java +11 -9
  171. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/BeaconEffectsFlag.java +1 -1
  172. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DenyTeleportFlag.java +15 -19
  173. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/DescriptionFlag.java +1 -1
  174. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FeedFlag.java +6 -4
  175. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/FlyFlag.java +5 -8
  176. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GreetingFlag.java +1 -1
  177. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/HealFlag.java +6 -4
  178. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/ProjectilesFlag.java +1 -1
  179. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/SculkSensorInteractFlag.java +39 -0
  180. Core/src/main/java/com/plotsquared/core/plot/flag/implementations/TitlesFlag.java +4 -2
  181. Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java +4 -17
  182. Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java +5 -4
  183. Core/src/main/java/com/plotsquared/core/plot/world/PlotAreaManager.java +3 -1
  184. Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotArea.java +1 -0
  185. Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotAreaManager.java +2 -2
  186. Core/src/main/java/com/plotsquared/core/queue/BlockArrayCacheScopedQueueCoordinator.java +6 -3
  187. Core/src/main/java/com/plotsquared/core/queue/ChunkCoordinator.java +1 -0
  188. Core/src/main/java/com/plotsquared/core/queue/ChunkQueueCoordinator.java +0 -163
  189. Core/src/main/java/com/plotsquared/core/queue/QueueCoordinator.java +6 -25
  190. Core/src/main/java/com/plotsquared/core/queue/{ScopedQueueCoordinator.java → ZeroedDelegateScopedQueueCoordinator.java} +8 -6
  191. Core/src/main/java/com/plotsquared/core/queue/subscriber/DefaultProgressSubscriber.java +9 -7
  192. Core/src/main/java/com/plotsquared/core/services/plots/AutoQuery.java +94 -0
  193. Core/src/main/java/com/plotsquared/core/services/plots/AutoService.java +10 -90
  194. Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java +7 -2
  195. Core/src/main/java/com/plotsquared/core/setup/PlotAreaBuilder.java +11 -2
  196. Core/src/main/java/com/plotsquared/core/setup/SettingsNodeStep.java +15 -8
  197. Core/src/main/java/com/plotsquared/core/setup/SettingsNodesWrapper.java +4 -17
  198. Core/src/main/java/com/plotsquared/core/synchronization/LockRepository.java +3 -3
  199. Core/src/main/java/com/plotsquared/core/util/BlockUtil.java +0 -36
  200. Core/src/main/java/com/plotsquared/core/util/ChunkManager.java +14 -17
  201. Core/src/main/java/com/plotsquared/core/util/ChunkUtil.java +0 -24
  202. Core/src/main/java/com/plotsquared/core/util/ComponentHelper.java +65 -0
  203. Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java +36 -17
  204. Core/src/main/java/com/plotsquared/core/util/FileBytes.java +4 -9
  205. Core/src/main/java/com/plotsquared/core/util/InventoryUtil.java +8 -6
  206. Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java +11 -5
  207. Core/src/main/java/com/plotsquared/core/util/MainUtil.java +0 -82
  208. Core/src/main/java/com/plotsquared/core/util/MathMan.java +0 -312
  209. Core/src/main/java/com/plotsquared/core/util/PatternUtil.java +4 -2
  210. Core/src/main/java/com/plotsquared/core/util/Permissions.java +0 -148
  211. Core/src/main/java/com/plotsquared/core/util/PlayerManager.java +19 -61
  212. Core/src/main/java/com/plotsquared/core/util/RegExUtil.java +0 -34
  213. Core/src/main/java/com/plotsquared/core/util/RegionManager.java +2 -12
  214. Core/src/main/java/com/plotsquared/core/util/RegionUtil.java +0 -17
  215. Core/src/main/java/com/plotsquared/core/util/StringMan.java +0 -241
  216. Core/src/main/java/com/plotsquared/core/util/TabCompletions.java +2 -56
  217. Core/src/main/java/com/plotsquared/core/util/WEManager.java +0 -52
  218. Core/src/main/java/com/plotsquared/core/util/WorldUtil.java +4 -24
  219. Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpObject.java +24 -17
  220. Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java +20 -24
  221. Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java +5 -15
  222. Core/src/main/java/com/plotsquared/core/util/task/AutoClaimFinishTask.java +4 -2
  223. Core/src/main/java/com/plotsquared/core/uuid/CacheUUIDService.java +2 -2
  224. Core/src/main/java/com/plotsquared/core/uuid/UUIDMapping.java +4 -43
  225. Core/src/main/java/com/plotsquared/core/uuid/UUIDPipeline.java +15 -30
  226. Core/src/main/resources/lang/messages_en.json +21 -18
  227. Core/src/test/java/com/plotsquared/core/plot/FlagTest.java +1 -0
  228. Core/src/test/java/com/plotsquared/core/plot/PlotRangeIteratorTest.java +1 -0
  229. Core/src/test/java/com/plotsquared/core/synchronization/LockRepositoryTest.java +1 -0
  230. Core/src/test/java/com/plotsquared/core/util/StringManTest.java +5 -2
  231. README.md +19 -11
  232. build.gradle.kts +22 -9
  233. gradle/libs.versions.toml +44 -11
  234. gradle/wrapper/gradle-wrapper.jar +0 -0
  235. gradle/wrapper/gradle-wrapper.properties +2 -1
  236. gradlew +12 -7
  237. javadocfooter.html +3 -3
  238. renovate.json +0 -10
  239. settings.gradle.kts +2 -2
.github/ISSUE_TEMPLATE/bug_report.yml CHANGED
@@ -7,8 +7,8 @@ body:
7
7
  attributes:
8
8
  value: |
9
9
  Thanks for taking the time to fill out this bug report for PlotSquared! Fill out the following form to your best ability to help us fix the problem.
10
- Only use this if you're absolutely sure that you found a bug and can reproduce it. For anything else, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.github.io/plotsquared-documentation/).
11
- Do NOT use the public issue tracker to report security vulnerabilities! They are disclosed using [this](https://forms.gle/btgdRn9yhGtzEiGW8) form!
10
+ Only use this if you're absolutely sure that you found a bug and can reproduce it. For anything else, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.gitbook.io/plotsquared/).
11
+ Do NOT use the public issue tracker to report security vulnerabilities! They are disclosed using [this](https://github.com/IntellectualSites/PlotSquared/security/policy) GitHub form!
12
12
 
13
13
  - type: dropdown
14
14
  attributes:
@@ -27,6 +27,9 @@ body:
27
27
  description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
28
28
  multiple: false
29
29
  options:
30
+ - '1.20.1'
31
+ - '1.20'
32
+ - '1.19.4'
30
33
  - '1.19.3'
31
34
  - '1.19.2'
32
35
  - '1.19.1'
.github/ISSUE_TEMPLATE/config.yml CHANGED
@@ -4,5 +4,5 @@ contact_links:
4
4
  url: https://discord.gg/intellectualsites
5
5
  about: Our support Discord, please ask questions and seek support here.
6
6
  - name: PlotSquared Wiki
7
- url: https://intellectualsites.github.io/plotsquared-documentation/
7
+ url: https://intellectualsites.gitbook.io/plotsquared/
8
8
  about: Take a look at the wiki page for instructions how to setup PlotSquared and use its commands.
.github/ISSUE_TEMPLATE/feature_request.yml CHANGED
@@ -7,7 +7,7 @@ body:
7
7
  attributes:
8
8
  value: |
9
9
  Thanks for taking the time to fill out this feature request for PlotSquared! Fill out the following form to your best ability to help us understand your feature request and greately improve the change of it getting added.
10
- For anything else than a feature request, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.github.io/plotsquared-documentation/).
10
+ For anything else than a feature request, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.gitbook.io/plotsquared/).
11
11
 
12
12
  - type: textarea
13
13
  attributes:
.github/renovate.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:base",
5
+ ":semanticCommitsDisabled"
6
+ ],
7
+ "automerge": true,
8
+ "labels": [
9
+ "dependencies"
10
+ ],
11
+ "rebaseWhen": "conflicted",
12
+ "schedule": ["on the first day of the month"],
13
+ "ignoreDeps": [
14
+ "com.google.code.gson:gson",
15
+ "com.google.guava:guava",
16
+ "org.yaml:snakeyaml",
17
+ "org.apache.logging.log4j:log4j-api",
18
+ ]
19
+ }
.github/workflows/announce-release-on-discord.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  name: Announce release on discord
2
2
  on:
3
3
  release:
4
- types: [published]
4
+ types: [ published ]
5
5
  jobs:
6
6
  send_announcement:
7
7
  runs-on: ubuntu-latest
@@ -11,7 +11,7 @@ jobs:
11
11
  DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
12
12
  DISCORD_USERNAME: PlotSquared Release
13
13
  DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
14
- uses: Ilshidur/action-discord@08d9328877d6954120eef2b07abbc79249bb6210 # ratchet:Ilshidur/action-discord@0.3.2
14
+ uses: Ilshidur/action-discord@0.3.2
15
15
  with:
16
16
  args: |
17
17
  "<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
.github/workflows/build-pr.yml CHANGED
@@ -1,17 +1,17 @@
1
1
  name: Build PR
2
- on: [pull_request]
2
+ on: [ pull_request ]
3
3
  jobs:
4
4
  build_pr:
5
5
  if: github.repository_owner == 'IntellectualSites'
6
6
  runs-on: ${{ matrix.os }}
7
7
  strategy:
8
8
  matrix:
9
- os: [ubuntu-latest, windows-latest, macos-latest]
9
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
10
10
  steps:
11
11
  - name: Checkout Repository
12
12
  uses: actions/checkout@v3
13
13
  - name: Validate Gradle Wrapper
14
- uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
14
+ uses: gradle/wrapper-validation-action@v1
15
15
  - name: Setup Java
16
16
  uses: actions/setup-java@v3
17
17
  with:
.github/workflows/build.yml CHANGED
@@ -2,7 +2,7 @@ name: build
2
2
  on:
3
3
  push:
4
4
  branches:
5
- - v6
5
+ - main
6
6
  jobs:
7
7
  build:
8
8
  if: github.repository_owner == 'IntellectualSites'
@@ -11,7 +11,7 @@ jobs:
11
11
  - name: Checkout Repository
12
12
  uses: actions/checkout@v3
13
13
  - name: Validate Gradle Wrapper
14
- uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
14
+ uses: gradle/wrapper-validation-action@v1
15
15
  - name: Setup Java
16
16
  uses: actions/setup-java@v3
17
17
  with:
@@ -28,7 +28,7 @@ jobs:
28
28
  echo "STATUS=release" >> $GITHUB_ENV
29
29
  fi
30
30
  - name: Publish Release
31
- if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
31
+ if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
32
32
  run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
33
33
  env:
34
34
  ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
@@ -36,14 +36,14 @@ jobs:
36
36
  ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
37
37
  ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
38
38
  - name: Publish Snapshot
39
- if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6' }}
39
+ if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
40
40
  run: ./gradlew publishToSonatype
41
41
  env:
42
42
  ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
43
43
  ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
44
44
  - name: Publish core javadoc
45
- if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
46
- uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
45
+ if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
46
+ uses: cpina/github-action-push-to-another-repository@main
47
47
  env:
48
48
  SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
49
49
  with:
@@ -52,10 +52,10 @@ jobs:
52
52
  destination-repository-name: 'plotsquared-javadocs'
53
53
  user-email: ${{ secrets.USER_EMAIL }}
54
54
  target-branch: main
55
- target-directory: core
55
+ target-directory: v7/core
56
56
  - name: Publish bukkit javadoc
57
- if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
58
- uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
57
+ if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
58
+ uses: cpina/github-action-push-to-another-repository@main
59
59
  env:
60
60
  SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
61
61
  with:
@@ -64,4 +64,4 @@ jobs:
64
64
  destination-repository-name: 'plotsquared-javadocs'
65
65
  user-email: ${{ secrets.USER_EMAIL }}
66
66
  target-branch: main
67
- target-directory: bukkit
67
+ target-directory: v7/bukkit
.github/workflows/codeql.yml CHANGED
@@ -1,8 +1,11 @@
1
1
  name: "CodeQL"
2
2
  on:
3
+ push:
4
+ branches: [ main ]
3
5
  pull_request:
4
6
  # The branches below must be a subset of the branches above
5
- branches: [v6]
7
+ branches: [ main ]
8
+
6
9
  jobs:
7
10
  analyze:
8
11
  name: Analyze
@@ -14,15 +17,20 @@ jobs:
14
17
  strategy:
15
18
  fail-fast: false
16
19
  matrix:
17
- language: ['java']
20
+ language: [ 'java' ]
18
21
  steps:
19
22
  - name: Checkout repository
20
23
  uses: actions/checkout@v3
24
+ - name: Setup Java
25
+ uses: actions/setup-java@v3
26
+ with:
27
+ distribution: temurin
28
+ java-version: 17
21
29
  - name: Initialize CodeQL
22
- uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
30
+ uses: github/codeql-action/init@v2
23
31
  with:
24
32
  languages: ${{ matrix.language }}
25
33
  - name: Autobuild
26
- uses: github/codeql-action/autobuild@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
34
+ uses: github/codeql-action/autobuild@v2
27
35
  - name: Perform CodeQL Analysis
28
- uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
36
+ uses: github/codeql-action/analyze@v2
.github/workflows/release-drafter.yml CHANGED
@@ -2,11 +2,11 @@ name: draft release
2
2
  on:
3
3
  push:
4
4
  branches:
5
- - v6
5
+ - main
6
6
  pull_request:
7
- types: [opened, reopened, synchronize]
7
+ types: [ opened, reopened, synchronize ]
8
8
  pull_request_target:
9
- types: [opened, reopened, synchronize]
9
+ types: [ opened, reopened, synchronize ]
10
10
  jobs:
11
11
  update_release_draft:
12
12
  if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
.gitignore CHANGED
@@ -137,3 +137,7 @@ docs/
137
137
  build/
138
138
 
139
139
  .DS_Store
140
+ # Ignore run folders
141
+ run-[0-0].[0-9]/
142
+ run-[0-0].[0-9].[0-9]/
143
+
.idea/icon.svg CHANGED
@@ -1,48 +1,144 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="svg2" xml:space="preserve" width="4000" height="3333.3333" viewBox="0 0 4000 3333.3333" sodipodi:docname="PlotSquared.ai">
3
- <metadata id="metadata8">
2
+ <svg
3
+ version="1.1"
4
+ id="svg2"
5
+ xml:space="preserve"
6
+ width="512"
7
+ height="512"
8
+ viewBox="0 0 512 512.00001"
9
+ sodipodi:docname="icon.svg"
10
+ inkscape:version="1.1.2 (b8e25be8, 2022-02-05)"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ xmlns:svg="http://www.w3.org/2000/svg"
15
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
16
+ xmlns:cc="http://creativecommons.org/ns#"
17
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
18
+ <metadata
19
+ id="metadata8">
4
20
  <rdf:RDF>
5
- <cc:Work rdf:about="">
21
+ <cc:Work
22
+ rdf:about="">
6
23
  <dc:format>image/svg+xml</dc:format>
7
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
24
+ <dc:type
25
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
8
26
  </cc:Work>
9
27
  </rdf:RDF>
10
28
  </metadata>
11
- <defs id="defs6">
12
- <clipPath clipPathUnits="userSpaceOnUse" id="clipPath18">
13
- <path d="M 0,2500 H 3000 V 0 H 0 Z" id="path16" />
29
+ <defs
30
+ id="defs6">
31
+ <clipPath
32
+ clipPathUnits="userSpaceOnUse"
33
+ id="clipPath18">
34
+ <path
35
+ d="M 0,2500 H 3000 V 0 H 0 Z"
36
+ id="path16" />
14
37
  </clipPath>
15
38
  </defs>
16
- <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview4" />
17
- <g id="g10" inkscape:groupmode="layer" inkscape:label="PlotSquared" transform="matrix(1.3333333,0,0,-1.3333333,0,3333.3333)">
18
- <g id="g12">
19
- <g id="g14" clip-path="url(#clipPath18)">
20
- <g id="g20" transform="translate(1486.1511,2242.6453)">
21
- <path d="m 0,0 c 16.533,10.846 33.211,21.453 50.104,31.699 78.972,-48.281 153.985,-102.704 227.269,-159.144 148.61,-115.422 287.884,-243.01 414.393,-382.333 111.39,-122.861 212.751,-255.152 298.898,-396.971 52.744,-87.322 100.544,-177.884 139.514,-272.214 -11.638,-3.551 -23.108,-7.655 -34.362,-12.286 l -0.24,0.288 c -11.135,12.982 -24.141,24.212 -34.915,37.506 -22.557,23.013 -45.425,45.737 -68.03,68.678 -19.725,20.253 -40.601,39.45 -58.958,60.974 -36.355,36.451 -72.517,73.093 -108.944,109.471 -22.628,26.013 -48.064,49.385 -71.965,74.197 -19.029,19.485 -38.706,38.346 -57.519,57.999 -12.166,14.998 -26.684,27.716 -39.93,41.658 -27.668,27.524 -54.903,55.479 -82.571,82.979 -23.924,27.956 -51.664,52.264 -76.692,79.164 -4.68,4.487 -8.855,10.774 -15.886,11.326 -22.34,34.027 -58.311,57.327 -97.377,67.502 -104.312,99.153 -215.487,191.202 -332.661,274.782 -117.942,-83.94 -229.476,-176.781 -334.484,-276.39 -26.684,-0.024 -53.368,0.024 -80.076,-0.024 0.024,-26.564 0.048,-53.104 0,-79.668 -72.229,-73.021 -139.491,-150.937 -202.385,-232.092 -63.758,-82.619 -121.973,-169.51 -173.541,-260.264 131.932,-69.061 257.864,-149.521 375.926,-240.275 0.096,-26.444 -0.12,-52.888 0.096,-79.332 l 0.744,-0.984 c 20.109,-24.14 43.409,-45.233 65.126,-67.861 15.118,-15.382 30.571,-30.404 45.569,-45.881 17.565,-20.733 37.698,-39.042 56.607,-58.503 19.917,-20.781 41.25,-40.218 59.967,-62.151 29.156,-29.299 58.167,-58.815 87.515,-87.922 29.155,-33.043 61.502,-63.111 92.169,-94.738 13.726,-12.67 25.124,-27.571 38.634,-40.457 25.029,-25.365 50.129,-50.657 75.325,-75.853 -37.914,-51.208 -73.741,-103.952 -107.192,-158.183 -167.83,273.317 -397.235,507.305 -662.37,687.158 -81.875,55.335 -167.23,105.584 -255.681,149.641 -52.815,26.276 -106.831,50.248 -162.239,70.381 99.393,233.628 242.795,446.715 410.289,636.79 93.562,106.088 194.634,205.433 301.466,298.13 C -217.335,-155.808 -111.439,-73.789 0,0" style="fill:#062f4c;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path22" />
39
+ <sodipodi:namedview
40
+ pagecolor="#ffffff"
41
+ bordercolor="#666666"
42
+ borderopacity="1"
43
+ objecttolerance="10"
44
+ gridtolerance="10"
45
+ guidetolerance="10"
46
+ inkscape:pageopacity="0"
47
+ inkscape:pageshadow="2"
48
+ inkscape:window-width="1440"
49
+ inkscape:window-height="900"
50
+ id="namedview4"
51
+ inkscape:pagecheckerboard="0"
52
+ showgrid="false"
53
+ inkscape:zoom="0.1632"
54
+ inkscape:cx="1087.6225"
55
+ inkscape:cy="1666.6666"
56
+ inkscape:window-x="0"
57
+ inkscape:window-y="0"
58
+ inkscape:window-maximized="0"
59
+ inkscape:current-layer="g10" />
60
+ <g
61
+ id="g10"
62
+ inkscape:groupmode="layer"
63
+ inkscape:label="PlotSquared"
64
+ transform="matrix(1.3333333,0,0,-1.3333333,0,3333.3333)">
65
+ <g
66
+ id="g12"
67
+ transform="matrix(0.16955078,0,0,0.16955078,-68.456969,2101.8529)">
68
+ <g
69
+ id="g14"
70
+ clip-path="url(#clipPath18)">
71
+ <g
72
+ id="g20"
73
+ transform="translate(1486.1511,2242.6453)">
74
+ <path
75
+ d="m 0,0 c 16.533,10.846 33.211,21.453 50.104,31.699 78.972,-48.281 153.985,-102.704 227.269,-159.144 148.61,-115.422 287.884,-243.01 414.393,-382.333 111.39,-122.861 212.751,-255.152 298.898,-396.971 52.744,-87.322 100.544,-177.884 139.514,-272.214 -11.638,-3.551 -23.108,-7.655 -34.362,-12.286 l -0.24,0.288 c -11.135,12.982 -24.141,24.212 -34.915,37.506 -22.557,23.013 -45.425,45.737 -68.03,68.678 -19.725,20.253 -40.601,39.45 -58.958,60.974 -36.355,36.451 -72.517,73.093 -108.944,109.471 -22.628,26.013 -48.064,49.385 -71.965,74.197 -19.029,19.485 -38.706,38.346 -57.519,57.999 -12.166,14.998 -26.684,27.716 -39.93,41.658 -27.668,27.524 -54.903,55.479 -82.571,82.979 -23.924,27.956 -51.664,52.264 -76.692,79.164 -4.68,4.487 -8.855,10.774 -15.886,11.326 -22.34,34.027 -58.311,57.327 -97.377,67.502 -104.312,99.153 -215.487,191.202 -332.661,274.782 -117.942,-83.94 -229.476,-176.781 -334.484,-276.39 -26.684,-0.024 -53.368,0.024 -80.076,-0.024 0.024,-26.564 0.048,-53.104 0,-79.668 -72.229,-73.021 -139.491,-150.937 -202.385,-232.092 -63.758,-82.619 -121.973,-169.51 -173.541,-260.264 131.932,-69.061 257.864,-149.521 375.926,-240.275 0.096,-26.444 -0.12,-52.888 0.096,-79.332 l 0.744,-0.984 c 20.109,-24.14 43.409,-45.233 65.126,-67.861 15.118,-15.382 30.571,-30.404 45.569,-45.881 17.565,-20.733 37.698,-39.042 56.607,-58.503 19.917,-20.781 41.25,-40.218 59.967,-62.151 29.156,-29.299 58.167,-58.815 87.515,-87.922 29.155,-33.043 61.502,-63.111 92.169,-94.738 13.726,-12.67 25.124,-27.571 38.634,-40.457 25.029,-25.365 50.129,-50.657 75.325,-75.853 -37.914,-51.208 -73.741,-103.952 -107.192,-158.183 -167.83,273.317 -397.235,507.305 -662.37,687.158 -81.875,55.335 -167.23,105.584 -255.681,149.641 -52.815,26.276 -106.831,50.248 -162.239,70.381 99.393,233.628 242.795,446.715 410.289,636.79 93.562,106.088 194.634,205.433 301.466,298.13 C -217.335,-155.808 -111.439,-73.789 0,0"
76
+ style="fill:#062f4c;fill-opacity:1;fill-rule:nonzero;stroke:none"
77
+ id="path22" />
22
78
  </g>
23
- <g id="g24" transform="translate(1201.7948,1741.5303)">
24
- <path d="M 0,0 C 105.008,99.609 216.543,192.45 334.485,276.39 451.659,192.81 562.833,100.76 667.146,1.608 c -34.987,8.83 -71.51,9.718 -107.264,6.431 -41.202,-4.296 -82.907,-19.077 -112.543,-48.953 -33.019,-32.155 -49.456,-77.604 -55.311,-122.501 -28.124,27.908 -56.104,55.983 -84.035,84.083 -2.976,2.976 -6.839,4.823 -10.391,6.911 -19.029,26.348 -45.953,46.673 -76.62,57.495 C 187.555,-2.472 151.513,-0.12 116.166,0 Z" style="fill:#4c8fcc;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path26" />
79
+ <g
80
+ id="g24"
81
+ transform="translate(1201.7948,1741.5303)">
82
+ <path
83
+ d="M 0,0 C 105.008,99.609 216.543,192.45 334.485,276.39 451.659,192.81 562.833,100.76 667.146,1.608 c -34.987,8.83 -71.51,9.718 -107.264,6.431 -41.202,-4.296 -82.907,-19.077 -112.543,-48.953 -33.019,-32.155 -49.456,-77.604 -55.311,-122.501 -28.124,27.908 -56.104,55.983 -84.035,84.083 -2.976,2.976 -6.839,4.823 -10.391,6.911 -19.029,26.348 -45.953,46.673 -76.62,57.495 C 187.555,-2.472 151.513,-0.12 116.166,0 Z"
84
+ style="fill:#4c8fcc;fill-opacity:1;fill-rule:nonzero;stroke:none"
85
+ id="path26" />
25
86
  </g>
26
- <g id="g28" transform="translate(919.3342,1429.7462)">
27
- <path d="m 0,0 c 62.894,81.156 130.156,159.072 202.385,232.092 0.048,-244.21 0.024,-488.421 0,-732.631 C 84.323,-409.785 -41.61,-329.325 -173.541,-260.264 -121.973,-169.51 -63.758,-82.619 0,0" style="fill:#4c8fcc;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path30" />
87
+ <g
88
+ id="g28"
89
+ transform="translate(919.3342,1429.7462)">
90
+ <path
91
+ d="m 0,0 c 62.894,81.156 130.156,159.072 202.385,232.092 0.048,-244.21 0.024,-488.421 0,-732.631 C 84.323,-409.785 -41.61,-329.325 -173.541,-260.264 -121.973,-169.51 -63.758,-82.619 0,0"
92
+ style="fill:#4c8fcc;fill-opacity:1;fill-rule:nonzero;stroke:none"
93
+ id="path30" />
28
94
  </g>
29
- <g id="g32" transform="translate(1649.134,1700.6166)">
30
- <path d="m 0,0 c 29.635,29.875 71.341,44.657 112.543,48.952 35.754,3.288 72.277,2.4 107.263,-6.431 39.066,-10.174 75.037,-33.474 97.377,-67.501 11.879,-17.661 20.181,-37.411 26.42,-57.687 10.871,-38.802 11.95,-79.356 11.446,-119.358 -44.345,-0.072 -88.69,0.048 -133.035,-0.072 -1.032,30.907 3.263,63.686 -10.175,92.626 -9.526,20.325 -32.107,31.243 -53.751,32.131 -21.453,1.44 -45.065,-4.32 -59.175,-21.597 -12.79,-15.861 -15.382,-37.002 -16.558,-56.655 -1.295,-29.132 3.696,-59.031 17.518,-84.923 16.821,-30.619 39.378,-57.783 64.526,-81.9 31.387,-32.634 67.501,-60.374 97.857,-94.041 27.332,-28.988 51.256,-61.479 68.005,-97.785 20.541,-41.13 26.972,-87.827 25.82,-133.372 -0.912,-32.107 -5.231,-64.406 -16.149,-94.737 -11.59,-31.699 -31.123,-61.047 -58.335,-81.371 -25.124,-19.125 -55.696,-29.852 -86.651,-34.771 -49.552,-6.743 -101.888,-4.847 -148.465,14.854 -35.227,14.829 -64.238,42.689 -81.708,76.548 -20.996,40.242 -27.115,86.339 -27.259,131.212 0.048,17.829 0,35.658 0.048,53.463 44.345,0.048 88.69,-0.023 133.059,0.048 1.728,-35.538 -4.055,-72.06 5.663,-106.807 5.783,-22.173 26.204,-37.794 48.185,-41.754 20.733,-3.431 43.577,-2.015 61.622,9.791 15.502,9.43 23.949,26.78 26.78,44.225 5.903,35.922 1.872,74.293 -15.381,106.688 -16.918,30.595 -39.474,57.711 -64.55,81.899 -33.187,34.099 -71.173,63.254 -102.585,99.081 -26.756,28.867 -49.408,61.646 -65.486,97.641 -24.572,52.48 -26.731,112.422 -20.18,169.102 C -49.456,-77.604 -33.019,-32.155 0,0" style="fill:#feeeee;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path34" />
95
+ <g
96
+ id="g32"
97
+ transform="translate(1649.134,1700.6166)">
98
+ <path
99
+ d="m 0,0 c 29.635,29.875 71.341,44.657 112.543,48.952 35.754,3.288 72.277,2.4 107.263,-6.431 39.066,-10.174 75.037,-33.474 97.377,-67.501 11.879,-17.661 20.181,-37.411 26.42,-57.687 10.871,-38.802 11.95,-79.356 11.446,-119.358 -44.345,-0.072 -88.69,0.048 -133.035,-0.072 -1.032,30.907 3.263,63.686 -10.175,92.626 -9.526,20.325 -32.107,31.243 -53.751,32.131 -21.453,1.44 -45.065,-4.32 -59.175,-21.597 -12.79,-15.861 -15.382,-37.002 -16.558,-56.655 -1.295,-29.132 3.696,-59.031 17.518,-84.923 16.821,-30.619 39.378,-57.783 64.526,-81.9 31.387,-32.634 67.501,-60.374 97.857,-94.041 27.332,-28.988 51.256,-61.479 68.005,-97.785 20.541,-41.13 26.972,-87.827 25.82,-133.372 -0.912,-32.107 -5.231,-64.406 -16.149,-94.737 -11.59,-31.699 -31.123,-61.047 -58.335,-81.371 -25.124,-19.125 -55.696,-29.852 -86.651,-34.771 -49.552,-6.743 -101.888,-4.847 -148.465,14.854 -35.227,14.829 -64.238,42.689 -81.708,76.548 -20.996,40.242 -27.115,86.339 -27.259,131.212 0.048,17.829 0,35.658 0.048,53.463 44.345,0.048 88.69,-0.023 133.059,0.048 1.728,-35.538 -4.055,-72.06 5.663,-106.807 5.783,-22.173 26.204,-37.794 48.185,-41.754 20.733,-3.431 43.577,-2.015 61.622,9.791 15.502,9.43 23.949,26.78 26.78,44.225 5.903,35.922 1.872,74.293 -15.381,106.688 -16.918,30.595 -39.474,57.711 -64.55,81.899 -33.187,34.099 -71.173,63.254 -102.585,99.081 -26.756,28.867 -49.408,61.646 -65.486,97.641 -24.572,52.48 -26.731,112.422 -20.18,169.102 C -49.456,-77.604 -33.019,-32.155 0,0"
100
+ style="fill:#feeeee;fill-opacity:1;fill-rule:nonzero;stroke:none"
101
+ id="path34" />
31
102
  </g>
32
- <g id="g36" transform="translate(1262.7214,1613.126)">
33
- <path d="m 0,0 v -301.13 c 23.204,0.024 46.409,-0.048 69.613,0.024 18.525,0.288 38.202,6.575 50.153,21.429 12.43,17.277 13.917,39.522 14.613,60.111 0.024,43.985 -0.048,87.994 0.024,131.979 -0.48,23.637 -0.983,50.369 -17.277,69.23 C 104.864,-5.711 86.867,-0.24 69.589,0 46.385,0.048 23.204,0.024 0,0 m -141.002,128.38 c 26.708,0.048 53.392,0 80.075,0.024 H 55.24 c 35.346,-0.12 71.389,-2.471 104.815,-14.925 30.668,-10.823 57.592,-31.148 76.621,-57.496 26.852,-39.09 36.69,-87.202 38.058,-133.947 0.024,-48.833 0.096,-97.689 -0.024,-146.521 -1.728,-47.993 -11.974,-97.953 -41.514,-136.971 -22.748,-30.644 -57.495,-50.801 -94.281,-59.583 -45.377,-11.878 -92.578,-6.791 -138.891,-7.847 -0.072,-111.799 0,-223.574 -0.024,-335.373 -13.942,0 -27.86,0.024 -41.778,-0.024 -32.802,0.072 -65.605,0 -98.384,0.048 l -0.744,0.984 c -0.216,26.444 0,52.888 -0.096,79.332 0.024,244.211 0.048,488.421 0,732.632 0.048,26.563 0.024,53.103 0,79.667" style="fill:#feeeee;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path38" />
103
+ <g
104
+ id="g36"
105
+ transform="translate(1262.7214,1613.126)">
106
+ <path
107
+ d="m 0,0 v -301.13 c 23.204,0.024 46.409,-0.048 69.613,0.024 18.525,0.288 38.202,6.575 50.153,21.429 12.43,17.277 13.917,39.522 14.613,60.111 0.024,43.985 -0.048,87.994 0.024,131.979 -0.48,23.637 -0.983,50.369 -17.277,69.23 C 104.864,-5.711 86.867,-0.24 69.589,0 46.385,0.048 23.204,0.024 0,0 m -141.002,128.38 c 26.708,0.048 53.392,0 80.075,0.024 H 55.24 c 35.346,-0.12 71.389,-2.471 104.815,-14.925 30.668,-10.823 57.592,-31.148 76.621,-57.496 26.852,-39.09 36.69,-87.202 38.058,-133.947 0.024,-48.833 0.096,-97.689 -0.024,-146.521 -1.728,-47.993 -11.974,-97.953 -41.514,-136.971 -22.748,-30.644 -57.495,-50.801 -94.281,-59.583 -45.377,-11.878 -92.578,-6.791 -138.891,-7.847 -0.072,-111.799 0,-223.574 -0.024,-335.373 -13.942,0 -27.86,0.024 -41.778,-0.024 -32.802,0.072 -65.605,0 -98.384,0.048 l -0.744,0.984 c -0.216,26.444 0,52.888 -0.096,79.332 0.024,244.211 0.048,488.421 0,732.632 0.048,26.563 0.024,53.103 0,79.667"
108
+ style="fill:#feeeee;fill-opacity:1;fill-rule:nonzero;stroke:none"
109
+ id="path38" />
34
110
  </g>
35
- <g id="g40" transform="translate(1966.3174,1675.6364)">
36
- <path d="m 0,0 c 7.031,-0.552 11.206,-6.839 15.885,-11.326 25.029,-26.9 52.768,-51.208 76.693,-79.164 27.667,-27.5 54.903,-55.456 82.571,-82.979 13.246,-13.942 27.764,-26.66 39.93,-41.658 18.813,-19.653 38.49,-38.514 57.519,-57.999 23.9,-24.812 49.337,-48.185 71.965,-74.197 36.427,-36.378 72.589,-73.02 108.943,-109.471 18.358,-21.524 39.234,-40.722 58.959,-60.974 22.605,-22.941 45.473,-45.665 68.03,-68.678 10.774,-13.294 23.78,-24.524 34.914,-37.506 -103.904,-41.97 -203.488,-94.114 -298.922,-152.761 -246.994,-152.28 -466.224,-350.298 -639.333,-583.398 -25.197,25.196 -50.297,50.488 -75.325,75.852 -13.51,12.886 -24.908,27.788 -38.634,40.458 -30.667,31.627 -63.014,61.695 -92.17,94.738 -29.347,29.107 -58.359,58.623 -87.514,87.922 -18.717,21.933 -40.05,41.37 -59.967,62.151 -18.909,19.461 -39.042,37.77 -56.607,58.503 -14.998,15.477 -30.452,30.499 -45.569,45.88 -21.717,22.629 -45.017,43.722 -65.126,67.862 32.779,-0.048 65.582,0.024 98.384,-0.048 114.391,-98.097 220.407,-205.984 315.384,-322.99 92.914,114.318 196.242,220.022 307.753,316.271 30.955,4.919 61.526,15.646 86.65,34.771 27.212,20.325 46.745,49.672 58.335,81.371 107.312,77.988 219.327,149.929 337.509,210.376 -35.299,64.67 -75.829,126.437 -118.254,186.643 C 176.253,-228.037 104.24,-140.115 26.42,-57.687 20.181,-37.41 11.878,-17.661 0,0" style="fill:#042338;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path42" />
111
+ <g
112
+ id="g40"
113
+ transform="translate(1966.3174,1675.6364)">
114
+ <path
115
+ d="m 0,0 c 7.031,-0.552 11.206,-6.839 15.885,-11.326 25.029,-26.9 52.768,-51.208 76.693,-79.164 27.667,-27.5 54.903,-55.456 82.571,-82.979 13.246,-13.942 27.764,-26.66 39.93,-41.658 18.813,-19.653 38.49,-38.514 57.519,-57.999 23.9,-24.812 49.337,-48.185 71.965,-74.197 36.427,-36.378 72.589,-73.02 108.943,-109.471 18.358,-21.524 39.234,-40.722 58.959,-60.974 22.605,-22.941 45.473,-45.665 68.03,-68.678 10.774,-13.294 23.78,-24.524 34.914,-37.506 -103.904,-41.97 -203.488,-94.114 -298.922,-152.761 -246.994,-152.28 -466.224,-350.298 -639.333,-583.398 -25.197,25.196 -50.297,50.488 -75.325,75.852 -13.51,12.886 -24.908,27.788 -38.634,40.458 -30.667,31.627 -63.014,61.695 -92.17,94.738 -29.347,29.107 -58.359,58.623 -87.514,87.922 -18.717,21.933 -40.05,41.37 -59.967,62.151 -18.909,19.461 -39.042,37.77 -56.607,58.503 -14.998,15.477 -30.452,30.499 -45.569,45.88 -21.717,22.629 -45.017,43.722 -65.126,67.862 32.779,-0.048 65.582,0.024 98.384,-0.048 114.391,-98.097 220.407,-205.984 315.384,-322.99 92.914,114.318 196.242,220.022 307.753,316.271 30.955,4.919 61.526,15.646 86.65,34.771 27.212,20.325 46.745,49.672 58.335,81.371 107.312,77.988 219.327,149.929 337.509,210.376 -35.299,64.67 -75.829,126.437 -118.254,186.643 C 176.253,-228.037 104.24,-140.115 26.42,-57.687 20.181,-37.41 11.878,-17.661 0,0"
116
+ style="fill:#042338;fill-opacity:1;fill-rule:nonzero;stroke:none"
117
+ id="path42" />
37
118
  </g>
38
- <g id="g44" transform="translate(1499.3971,1669.1094)">
39
- <path d="m 0,0 c 3.551,-2.088 7.415,-3.935 10.39,-6.911 27.932,-28.1 55.912,-56.175 84.036,-84.083 -6.551,-56.679 -4.392,-116.622 20.18,-169.102 16.078,-35.994 38.73,-68.774 65.486,-97.641 31.412,-35.826 69.398,-64.982 102.585,-99.081 25.076,-24.188 47.632,-51.304 64.55,-81.899 17.253,-32.395 21.284,-70.765 15.381,-106.688 -2.831,-17.445 -11.278,-34.794 -26.78,-44.225 -18.045,-11.806 -40.889,-13.222 -61.622,-9.79 -21.981,3.959 -42.402,19.58 -48.185,41.753 -9.718,34.747 -3.935,71.269 -5.663,106.808 -44.369,-0.072 -88.714,0 -133.059,-0.048 -0.048,-17.806 0,-35.635 -0.048,-53.464 0.144,-44.873 6.263,-90.97 27.259,-131.212 17.47,-33.859 46.481,-61.718 81.708,-76.548 46.577,-19.701 98.913,-21.597 148.465,-14.854 -111.511,-96.249 -214.839,-201.953 -307.753,-316.271 -94.977,117.006 -200.993,224.893 -315.383,322.99 13.918,0.048 27.836,0.024 41.777,0.024 0.024,111.799 -0.048,223.574 0.024,335.372 46.313,1.056 93.514,-4.031 138.891,7.847 36.786,8.783 71.533,28.94 94.282,59.583 29.539,39.018 39.785,88.978 41.513,136.971 0.12,48.833 0.048,97.689 0.024,146.522 C 36.69,-87.203 26.852,-39.09 0,0" style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path46" />
119
+ <g
120
+ id="g44"
121
+ transform="translate(1499.3971,1669.1094)">
122
+ <path
123
+ d="m 0,0 c 3.551,-2.088 7.415,-3.935 10.39,-6.911 27.932,-28.1 55.912,-56.175 84.036,-84.083 -6.551,-56.679 -4.392,-116.622 20.18,-169.102 16.078,-35.994 38.73,-68.774 65.486,-97.641 31.412,-35.826 69.398,-64.982 102.585,-99.081 25.076,-24.188 47.632,-51.304 64.55,-81.899 17.253,-32.395 21.284,-70.765 15.381,-106.688 -2.831,-17.445 -11.278,-34.794 -26.78,-44.225 -18.045,-11.806 -40.889,-13.222 -61.622,-9.79 -21.981,3.959 -42.402,19.58 -48.185,41.753 -9.718,34.747 -3.935,71.269 -5.663,106.808 -44.369,-0.072 -88.714,0 -133.059,-0.048 -0.048,-17.806 0,-35.635 -0.048,-53.464 0.144,-44.873 6.263,-90.97 27.259,-131.212 17.47,-33.859 46.481,-61.718 81.708,-76.548 46.577,-19.701 98.913,-21.597 148.465,-14.854 -111.511,-96.249 -214.839,-201.953 -307.753,-316.271 -94.977,117.006 -200.993,224.893 -315.383,322.99 13.918,0.048 27.836,0.024 41.777,0.024 0.024,111.799 -0.048,223.574 0.024,335.372 46.313,1.056 93.514,-4.031 138.891,7.847 36.786,8.783 71.533,28.94 94.282,59.583 29.539,39.018 39.785,88.978 41.513,136.971 0.12,48.833 0.048,97.689 0.024,146.522 C 36.69,-87.203 26.852,-39.09 0,0"
124
+ style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none"
125
+ id="path46" />
40
126
  </g>
41
- <g id="g48" transform="translate(1748.0469,1601.6797)">
42
- <path d="M 0,0 C 14.11,17.277 37.722,23.036 59.175,21.597 80.82,20.709 103.4,9.791 112.927,-10.534 c 13.438,-28.94 9.142,-61.719 10.174,-92.626 44.345,0.12 88.691,0 133.036,0.072 0.504,40.002 -0.576,80.556 -11.447,119.358 77.82,-82.428 149.833,-170.35 215.583,-262.664 42.426,-60.207 82.956,-121.973 118.254,-186.643 -118.182,-60.447 -230.196,-132.388 -337.508,-210.376 10.918,30.331 15.238,62.63 16.149,94.737 1.152,45.545 -5.279,92.242 -25.82,133.372 -16.749,36.306 -40.673,68.797 -68.005,97.785 -30.355,33.667 -66.47,61.406 -97.857,94.041 -25.148,24.117 -47.705,51.28 -64.526,81.9 -13.822,25.892 -18.813,55.791 -17.517,84.923 C -15.382,-37.002 -12.79,-15.862 0,0" style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path50" />
127
+ <g
128
+ id="g48"
129
+ transform="translate(1748.0469,1601.6797)">
130
+ <path
131
+ d="M 0,0 C 14.11,17.277 37.722,23.036 59.175,21.597 80.82,20.709 103.4,9.791 112.927,-10.534 c 13.438,-28.94 9.142,-61.719 10.174,-92.626 44.345,0.12 88.691,0 133.036,0.072 0.504,40.002 -0.576,80.556 -11.447,119.358 77.82,-82.428 149.833,-170.35 215.583,-262.664 42.426,-60.207 82.956,-121.973 118.254,-186.643 -118.182,-60.447 -230.196,-132.388 -337.508,-210.376 10.918,30.331 15.238,62.63 16.149,94.737 1.152,45.545 -5.279,92.242 -25.82,133.372 -16.749,36.306 -40.673,68.797 -68.005,97.785 -30.355,33.667 -66.47,61.406 -97.857,94.041 -25.148,24.117 -47.705,51.28 -64.526,81.9 -13.822,25.892 -18.813,55.791 -17.517,84.923 C -15.382,-37.002 -12.79,-15.862 0,0"
132
+ style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none"
133
+ id="path50" />
43
134
  </g>
44
- <g id="g52" transform="translate(1262.7214,1613.126)">
45
- <path d="m 0,0 c 23.204,0.024 46.385,0.048 69.589,0 17.278,-0.24 35.275,-5.711 47.537,-18.357 16.294,-18.861 16.797,-45.593 17.277,-69.23 -0.072,-43.985 0,-87.994 -0.024,-131.979 -0.696,-20.589 -2.183,-42.834 -14.613,-60.111 -11.951,-14.854 -31.628,-21.141 -50.153,-21.429 -23.204,-0.072 -46.409,0 -69.613,-0.024 z" style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path54" />
135
+ <g
136
+ id="g52"
137
+ transform="translate(1262.7214,1613.126)">
138
+ <path
139
+ d="m 0,0 c 23.204,0.024 46.385,0.048 69.589,0 17.278,-0.24 35.275,-5.711 47.537,-18.357 16.294,-18.861 16.797,-45.593 17.277,-69.23 -0.072,-43.985 0,-87.994 -0.024,-131.979 -0.696,-20.589 -2.183,-42.834 -14.613,-60.111 -11.951,-14.854 -31.628,-21.141 -50.153,-21.429 -23.204,-0.072 -46.409,0 -69.613,-0.024 z"
140
+ style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none"
141
+ id="path54" />
46
142
  </g>
47
143
  </g>
48
144
  </g>
Bukkit/build.gradle.kts CHANGED
@@ -18,23 +18,23 @@ repositories {
18
18
  }
19
19
 
20
20
  dependencies {
21
- api(projects.plotSquaredCore)
21
+ api(projects.plotsquaredCore)
22
22
 
23
23
  // Metrics
24
- implementation("org.bstats:bstats-bukkit")
24
+ implementation(libs.bstatsBukkit)
25
25
 
26
26
  // Paper
27
- compileOnly("io.papermc.paper:paper-api")
28
- implementation("io.papermc:paperlib")
27
+ compileOnly(libs.paper)
28
+ implementation(libs.paperlib)
29
29
 
30
30
  // Plugins
31
31
  compileOnly(libs.worldeditBukkit) {
32
32
  exclude(group = "org.bukkit")
33
33
  exclude(group = "org.spigotmc")
34
34
  }
35
- compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false }
36
- testImplementation("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false }
37
- compileOnly("com.github.MilkBowl:VaultAPI") {
35
+ compileOnly(libs.faweBukkit) { isTransitive = false }
36
+ testImplementation(libs.faweBukkit) { isTransitive = false }
37
+ compileOnly(libs.vault) {
38
38
  exclude(group = "org.bukkit")
39
39
  }
40
40
  compileOnly(libs.placeholderapi)
@@ -44,16 +44,15 @@ dependencies {
44
44
 
45
45
  // Other libraries
46
46
  implementation(libs.squirrelid) { isTransitive = false }
47
- implementation("dev.notmyfault.serverlib:ServerLib")
47
+ implementation(libs.serverlib)
48
48
 
49
49
  // Our libraries
50
50
  implementation(libs.arkitektonika)
51
- implementation(libs.http4j)
52
- implementation("com.intellectualsites.paster:Paster")
53
- implementation("com.intellectualsites.informative-annotations:informative-annotations")
51
+ implementation(libs.paster)
52
+ implementation(libs.informativeAnnotations)
54
53
 
55
54
  // Adventure
56
- implementation("net.kyori:adventure-platform-bukkit")
55
+ implementation(libs.adventureBukkit)
57
56
  }
58
57
 
59
58
  tasks.processResources {
@@ -63,6 +62,7 @@ tasks.processResources {
63
62
  }
64
63
 
65
64
  tasks.named<ShadowJar>("shadowJar") {
65
+ dependsOn(":plotsquared-core:shadowJar")
66
66
  dependencies {
67
67
  exclude(dependency("org.checkerframework:"))
68
68
  }
@@ -88,7 +88,7 @@ tasks.named<ShadowJar>("shadowJar") {
88
88
  relocate("javax.inject", "com.plotsquared.core.annotation.inject")
89
89
  relocate("net.jcip", "com.plotsquared.core.annotations.jcip")
90
90
  relocate("edu.umd.cs.findbugs", "com.plotsquared.core.annotations.findbugs")
91
- relocate("com.intellectualsites.informative-annotations", "com.plotsquared.core.annotation.informative")
91
+ relocate("com.intellectualsites.annotations", "com.plotsquared.core.annotations.informative")
92
92
 
93
93
  // Get rid of all the libs which are 100% unused.
94
94
  minimize()
@@ -100,10 +100,10 @@ tasks {
100
100
  withType<Javadoc> {
101
101
  val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
102
102
  val opt = options as StandardJavadocDocletOptions
103
- opt.links("https://jd.papermc.io/paper/1.18/")
103
+ opt.links("https://jd.papermc.io/paper/1.19/")
104
104
  opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
105
105
  opt.links("https://intellectualsites.github.io/plotsquared-javadocs/core/")
106
- opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
106
+ opt.links("https://jd.advntr.dev/api/4.14.0/")
107
107
  opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
108
108
  opt.links("https://checkerframework.org/api/")
109
109
  opt.isLinkSource = true
Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java CHANGED
@@ -49,6 +49,7 @@ import com.plotsquared.bukkit.player.BukkitPlayerManager;
49
49
  import com.plotsquared.bukkit.util.BukkitUtil;
50
50
  import com.plotsquared.bukkit.util.BukkitWorld;
51
51
  import com.plotsquared.bukkit.util.SetGenCB;
52
+ import com.plotsquared.bukkit.util.TranslationUpdateManager;
52
53
  import com.plotsquared.bukkit.util.UpdateUtility;
53
54
  import com.plotsquared.bukkit.util.task.BukkitTaskManager;
54
55
  import com.plotsquared.bukkit.util.task.PaperTimeConverter;
@@ -140,6 +141,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
140
141
  import org.incendo.serverlib.ServerLib;
141
142
 
142
143
  import java.io.File;
144
+ import java.io.IOException;
143
145
  import java.lang.reflect.Method;
144
146
  import java.util.ArrayList;
145
147
  import java.util.Arrays;
@@ -293,6 +295,12 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
293
295
  );
294
296
  this.injector.injectMembers(this);
295
297
 
298
+ try {
299
+ this.injector.getInstance(TranslationUpdateManager.class).upgradeTranslationFile();
300
+ } catch (IOException e) {
301
+ throw new RuntimeException(e);
302
+ }
303
+
296
304
  this.serverLocale = Locale.forLanguageTag(Settings.Enabled_Components.DEFAULT_LOCALE);
297
305
 
298
306
  if (PremiumVerification.isPremium() && Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
@@ -358,7 +366,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
358
366
  getServer().getPluginManager().registerEvents(injector().getInstance(ServerListener.class), this);
359
367
  getServer().getPluginManager().registerEvents(injector().getInstance(EntitySpawnListener.class), this);
360
368
  if (PaperLib.isPaper() && Settings.Paper_Components.PAPER_LISTENERS) {
361
- getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
369
+ getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
362
370
  } else {
363
371
  getServer().getPluginManager().registerEvents(injector().getInstance(SpigotListener.class), this);
364
372
  }
@@ -1177,9 +1185,17 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
1177
1185
  public @NonNull String worldEditImplementations() {
1178
1186
  StringBuilder msg = new StringBuilder();
1179
1187
  if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
1180
- msg.append("FastAsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit").getDescription().getVersion());
1188
+ msg.append("FastAsyncWorldEdit: ").append(Bukkit
1189
+ .getPluginManager()
1190
+ .getPlugin("FastAsyncWorldEdit")
1191
+ .getDescription()
1192
+ .getVersion());
1181
1193
  } else if (Bukkit.getPluginManager().getPlugin("AsyncWorldEdit") != null) {
1182
- msg.append("AsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("AsyncWorldEdit").getDescription().getVersion()).append("\n");
1194
+ msg.append("AsyncWorldEdit: ").append(Bukkit
1195
+ .getPluginManager()
1196
+ .getPlugin("AsyncWorldEdit")
1197
+ .getDescription()
1198
+ .getVersion()).append("\n");
1183
1199
  msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
1184
1200
  } else {
1185
1201
  msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java CHANGED
@@ -101,50 +101,26 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
101
101
  this.noGravity = true;
102
102
  }
103
103
  switch (entity.getType().toString()) {
104
- case "BOAT":
104
+ case "BOAT" -> {
105
105
  Boat boat = (Boat) entity;
106
106
  this.dataByte = getOrdinal(TreeSpecies.values(), boat.getWoodType());
107
107
  return;
108
- case "ARROW":
109
- case "EGG":
110
- case "ENDER_CRYSTAL":
111
- case "ENDER_PEARL":
112
- case "ENDER_SIGNAL":
113
- case "EXPERIENCE_ORB":
114
- case "FALLING_BLOCK":
115
- case "FIREBALL":
116
- case "FIREWORK":
117
- case "FISHING_HOOK":
118
- case "LEASH_HITCH":
119
- case "LIGHTNING":
120
- case "MINECART":
121
- case "MINECART_COMMAND":
122
- case "MINECART_MOB_SPAWNER":
123
- case "MINECART_TNT":
124
- case "PLAYER":
125
- case "PRIMED_TNT":
126
- case "SLIME":
127
- case "SMALL_FIREBALL":
128
- case "SNOWBALL":
129
- case "MINECART_FURNACE":
130
- case "SPLASH_POTION":
131
- case "THROWN_EXP_BOTTLE":
132
- case "WITHER_SKULL":
133
- case "UNKNOWN":
134
- case "SPECTRAL_ARROW":
135
- case "SHULKER_BULLET":
136
- case "DRAGON_FIREBALL":
137
- case "AREA_EFFECT_CLOUD":
138
- case "TRIDENT":
139
- case "LLAMA_SPIT":
108
+ }
109
+ case "ARROW", "EGG", "ENDER_CRYSTAL", "ENDER_PEARL", "ENDER_SIGNAL", "EXPERIENCE_ORB", "FALLING_BLOCK", "FIREBALL",
110
+ "FIREWORK", "FISHING_HOOK", "LEASH_HITCH", "LIGHTNING", "MINECART", "MINECART_COMMAND", "MINECART_MOB_SPAWNER",
111
+ "MINECART_TNT", "PLAYER", "PRIMED_TNT", "SLIME", "SMALL_FIREBALL", "SNOWBALL", "MINECART_FURNACE", "SPLASH_POTION",
112
+ "THROWN_EXP_BOTTLE", "WITHER_SKULL", "UNKNOWN", "SPECTRAL_ARROW", "SHULKER_BULLET", "DRAGON_FIREBALL", "AREA_EFFECT_CLOUD",
113
+ "TRIDENT", "LLAMA_SPIT" -> {
140
114
  // Do this stuff later
141
115
  return;
116
+ }
142
117
  // MISC //
143
- case "DROPPED_ITEM":
118
+ case "DROPPED_ITEM" -> {
144
119
  Item item = (Item) entity;
145
120
  this.stack = item.getItemStack();
146
121
  return;
147
- case "ITEM_FRAME":
122
+ }
123
+ case "ITEM_FRAME" -> {
148
124
  this.x = Math.floor(this.getX());
149
125
  this.y = Math.floor(this.getY());
150
126
  this.z = Math.floor(this.getZ());
@@ -152,7 +128,8 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
152
128
  this.dataByte = getOrdinal(Rotation.values(), itemFrame.getRotation());
153
129
  this.stack = itemFrame.getItem().clone();
154
130
  return;
155
- case "PAINTING":
131
+ }
132
+ case "PAINTING" -> {
156
133
  this.x = Math.floor(this.getX());
157
134
  this.y = Math.floor(this.getY());
158
135
  this.z = Math.floor(this.getZ());
@@ -165,20 +142,17 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
165
142
  }
166
143
  this.dataString = art.name();
167
144
  return;
145
+ }
168
146
  // END MISC //
169
147
  // INVENTORY HOLDER //
170
- case "MINECART_CHEST":
171
- case "MINECART_HOPPER":
148
+ case "MINECART_CHEST", "MINECART_HOPPER" -> {
172
149
  storeInventory((InventoryHolder) entity);
173
150
  return;
151
+ }
174
152
  // START LIVING ENTITY //
175
153
  // START AGEABLE //
176
154
  // START TAMEABLE //
177
- case "HORSE":
178
- case "DONKEY":
179
- case "LLAMA":
180
- case "MULE":
181
- case "SKELETON_HORSE":
155
+ case "HORSE", "DONKEY", "LLAMA", "MULE", "SKELETON_HORSE" -> {
182
156
  AbstractHorse horse = (AbstractHorse) entity;
183
157
  this.horse = new HorseStats();
184
158
  this.horse.jump = horse.getJumpStrength();
@@ -194,16 +168,17 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
194
168
  storeLiving(horse);
195
169
  storeInventory(horse);
196
170
  return;
171
+ }
197
172
  // END INVENTORY HOLDER //
198
- case "WOLF":
199
- case "OCELOT":
173
+ case "WOLF", "OCELOT" -> {
200
174
  storeTameable((Tameable) entity);
201
175
  storeAgeable((Ageable) entity);
202
176
  storeLiving((LivingEntity) entity);
203
177
  return;
178
+ }
204
179
  // END TAMEABLE //
205
180
  //todo fix sheep
206
- case "SHEEP":
181
+ case "SHEEP" -> {
207
182
  Sheep sheep = (Sheep) entity;
208
183
  if (sheep.isSheared()) {
209
184
  this.dataByte = (byte) 1;
@@ -214,23 +189,20 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
214
189
  storeAgeable(sheep);
215
190
  storeLiving(sheep);
216
191
  return;
217
- case "VILLAGER":
218
- case "CHICKEN":
219
- case "COW":
220
- case "MUSHROOM_COW":
221
- case "PIG":
222
- case "TURTLE":
223
- case "POLAR_BEAR":
192
+ }
193
+ case "VILLAGER", "CHICKEN", "COW", "MUSHROOM_COW", "PIG", "TURTLE", "POLAR_BEAR" -> {
224
194
  storeAgeable((Ageable) entity);
225
195
  storeLiving((LivingEntity) entity);
226
196
  return;
227
- case "RABBIT":
197
+ }
198
+ case "RABBIT" -> {
228
199
  this.dataByte = getOrdinal(Rabbit.Type.values(), ((Rabbit) entity).getRabbitType());
229
200
  storeAgeable((Ageable) entity);
230
201
  storeLiving((LivingEntity) entity);
231
202
  return;
203
+ }
232
204
  // END AGEABLE //
233
- case "ARMOR_STAND":
205
+ case "ARMOR_STAND" -> {
234
206
  ArmorStand stand = (ArmorStand) entity;
235
207
  this.inventory =
236
208
  new ItemStack[]{stand.getItemInHand().clone(), stand.getHelmet().clone(),
@@ -238,37 +210,30 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
238
210
  stand.getBoots().clone()};
239
211
  storeLiving(stand);
240
212
  this.stand = new ArmorStandStats();
241
-
242
213
  EulerAngle head = stand.getHeadPose();
243
214
  this.stand.head[0] = (float) head.getX();
244
215
  this.stand.head[1] = (float) head.getY();
245
216
  this.stand.head[2] = (float) head.getZ();
246
-
247
217
  EulerAngle body = stand.getBodyPose();
248
218
  this.stand.body[0] = (float) body.getX();
249
219
  this.stand.body[1] = (float) body.getY();
250
220
  this.stand.body[2] = (float) body.getZ();
251
-
252
221
  EulerAngle leftLeg = stand.getLeftLegPose();
253
222
  this.stand.leftLeg[0] = (float) leftLeg.getX();
254
223
  this.stand.leftLeg[1] = (float) leftLeg.getY();
255
224
  this.stand.leftLeg[2] = (float) leftLeg.getZ();
256
-
257
225
  EulerAngle rightLeg = stand.getRightLegPose();
258
226
  this.stand.rightLeg[0] = (float) rightLeg.getX();
259
227
  this.stand.rightLeg[1] = (float) rightLeg.getY();
260
228
  this.stand.rightLeg[2] = (float) rightLeg.getZ();
261
-
262
229
  EulerAngle leftArm = stand.getLeftArmPose();
263
230
  this.stand.leftArm[0] = (float) leftArm.getX();
264
231
  this.stand.leftArm[1] = (float) leftArm.getY();
265
232
  this.stand.leftArm[2] = (float) leftArm.getZ();
266
-
267
233
  EulerAngle rightArm = stand.getRightArmPose();
268
234
  this.stand.rightArm[0] = (float) rightArm.getX();
269
235
  this.stand.rightArm[1] = (float) rightArm.getY();
270
236
  this.stand.rightArm[2] = (float) rightArm.getZ();
271
-
272
237
  if (stand.hasArms()) {
273
238
  this.stand.arms = true;
274
239
  }
@@ -282,53 +247,38 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
282
247
  this.stand.small = true;
283
248
  }
284
249
  return;
285
- case "ENDERMITE":
250
+ }
251
+ case "ENDERMITE" -> {
286
252
  return;
287
- case "BAT":
253
+ }
254
+ case "BAT" -> {
288
255
  if (((Bat) entity).isAwake()) {
289
256
  this.dataByte = (byte) 1;
290
257
  } else {
291
258
  this.dataByte = (byte) 0;
292
259
  }
293
260
  return;
294
- case "ENDER_DRAGON":
261
+ }
262
+ case "ENDER_DRAGON" -> {
295
263
  EnderDragon entity1 = (EnderDragon) entity;
296
264
  this.dataByte = (byte) entity1.getPhase().ordinal();
297
265
  return;
298
- case "SKELETON":
299
- case "WITHER_SKELETON":
300
- case "GUARDIAN":
301
- case "ELDER_GUARDIAN":
302
- case "GHAST":
303
- case "MAGMA_CUBE":
304
- case "SQUID":
305
- case "PIG_ZOMBIE":
306
- case "HOGLIN":
307
- case "ZOMBIFIED_PIGLIN":
308
- case "PIGLIN":
309
- case "PIGLIN_BRUTE":
310
- case "ZOMBIE":
311
- case "WITHER":
312
- case "WITCH":
313
- case "SPIDER":
314
- case "CAVE_SPIDER":
315
- case "SILVERFISH":
316
- case "GIANT":
317
- case "ENDERMAN":
318
- case "CREEPER":
319
- case "BLAZE":
320
- case "SHULKER":
321
- case "SNOWMAN":
266
+ }
267
+ case "SKELETON", "WITHER_SKELETON", "GUARDIAN", "ELDER_GUARDIAN", "GHAST", "MAGMA_CUBE", "SQUID", "PIG_ZOMBIE", "HOGLIN",
268
+ "ZOMBIFIED_PIGLIN", "PIGLIN", "PIGLIN_BRUTE", "ZOMBIE", "WITHER", "WITCH", "SPIDER", "CAVE_SPIDER", "SILVERFISH",
269
+ "GIANT", "ENDERMAN", "CREEPER", "BLAZE", "SHULKER", "SNOWMAN" -> {
322
270
  storeLiving((LivingEntity) entity);
323
271
  return;
324
- case "IRON_GOLEM":
272
+ }
273
+ case "IRON_GOLEM" -> {
325
274
  if (((IronGolem) entity).isPlayerCreated()) {
326
275
  this.dataByte = (byte) 1;
327
276
  } else {
328
277
  this.dataByte = (byte) 0;
329
278
  }
330
279
  storeLiving((LivingEntity) entity);
331
- // END LIVING //
280
+ }
281
+ // END LIVING //
332
282
  }
333
283
  }
334
284
 
@@ -465,20 +415,15 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
465
415
  }
466
416
  Entity entity;
467
417
  switch (this.getType().toString()) {
468
- case "DROPPED_ITEM":
418
+ case "DROPPED_ITEM" -> {
469
419
  return world.dropItem(location, this.stack);
470
- case "PLAYER":
471
- case "LEASH_HITCH":
420
+ }
421
+ case "PLAYER", "LEASH_HITCH" -> {
472
422
  return null;
473
- case "ITEM_FRAME":
474
- entity = world.spawn(location, ItemFrame.class);
475
- break;
476
- case "PAINTING":
477
- entity = world.spawn(location, Painting.class);
478
- break;
479
- default:
480
- entity = world.spawnEntity(location, this.getType());
481
- break;
423
+ }
424
+ case "ITEM_FRAME" -> entity = world.spawn(location, ItemFrame.class);
425
+ case "PAINTING" -> entity = world.spawn(location, Painting.class);
426
+ default -> entity = world.spawnEntity(location, this.getType());
482
427
  }
483
428
  if (this.depth == 0) {
484
429
  return entity;
@@ -506,72 +451,46 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
506
451
  entity.setGravity(false);
507
452
  }
508
453
  switch (entity.getType().toString()) {
509
- case "BOAT":
454
+ case "BOAT" -> {
510
455
  Boat boat = (Boat) entity;
511
456
  boat.setWoodType(TreeSpecies.values()[dataByte]);
512
457
  return entity;
513
- case "SLIME":
458
+ }
459
+ case "SLIME" -> {
514
460
  ((Slime) entity).setSize(this.dataByte);
515
461
  return entity;
516
- case "ARROW":
517
- case "EGG":
518
- case "ENDER_CRYSTAL":
519
- case "ENDER_PEARL":
520
- case "ENDER_SIGNAL":
521
- case "DROPPED_ITEM":
522
- case "EXPERIENCE_ORB":
523
- case "FALLING_BLOCK":
524
- case "FIREBALL":
525
- case "FIREWORK":
526
- case "FISHING_HOOK":
527
- case "LEASH_HITCH":
528
- case "LIGHTNING":
529
- case "MINECART":
530
- case "MINECART_COMMAND":
531
- case "MINECART_MOB_SPAWNER":
532
- case "MINECART_TNT":
533
- case "PLAYER":
534
- case "PRIMED_TNT":
535
- case "SMALL_FIREBALL":
536
- case "SNOWBALL":
537
- case "SPLASH_POTION":
538
- case "THROWN_EXP_BOTTLE":
539
- case "SPECTRAL_ARROW":
540
- case "SHULKER_BULLET":
541
- case "AREA_EFFECT_CLOUD":
542
- case "DRAGON_FIREBALL":
543
- case "WITHER_SKULL":
544
- case "MINECART_FURNACE":
545
- case "LLAMA_SPIT":
546
- case "TRIDENT":
547
- case "UNKNOWN":
462
+ }
463
+ case "ARROW", "EGG", "ENDER_CRYSTAL", "ENDER_PEARL", "ENDER_SIGNAL", "DROPPED_ITEM", "EXPERIENCE_ORB", "FALLING_BLOCK",
464
+ "FIREBALL", "FIREWORK", "FISHING_HOOK", "LEASH_HITCH", "LIGHTNING", "MINECART", "MINECART_COMMAND",
465
+ "MINECART_MOB_SPAWNER", "MINECART_TNT", "PLAYER", "PRIMED_TNT", "SMALL_FIREBALL", "SNOWBALL",
466
+ "SPLASH_POTION", "THROWN_EXP_BOTTLE", "SPECTRAL_ARROW", "SHULKER_BULLET", "AREA_EFFECT_CLOUD",
467
+ "DRAGON_FIREBALL", "WITHER_SKULL", "MINECART_FURNACE", "LLAMA_SPIT", "TRIDENT", "UNKNOWN" -> {
548
468
  // Do this stuff later
549
469
  return entity;
470
+ }
550
471
  // MISC //
551
- case "ITEM_FRAME":
472
+ case "ITEM_FRAME" -> {
552
473
  ItemFrame itemframe = (ItemFrame) entity;
553
474
  itemframe.setRotation(Rotation.values()[this.dataByte]);
554
475
  itemframe.setItem(this.stack);
555
476
  return entity;
556
- case "PAINTING":
477
+ }
478
+ case "PAINTING" -> {
557
479
  Painting painting = (Painting) entity;
558
480
  painting.setFacingDirection(BlockFace.values()[this.dataByte], true);
559
481
  painting.setArt(Art.getByName(this.dataString), true);
560
482
  return entity;
483
+ }
561
484
  // END MISC //
562
485
  // INVENTORY HOLDER //
563
- case "MINECART_CHEST":
564
- case "MINECART_HOPPER":
486
+ case "MINECART_CHEST", "MINECART_HOPPER" -> {
565
487
  restoreInventory((InventoryHolder) entity);
566
488
  return entity;
489
+ }
567
490
  // START LIVING ENTITY //
568
491
  // START AGEABLE //
569
492
  // START TAMEABLE //
570
- case "HORSE":
571
- case "LLAMA":
572
- case "SKELETON_HORSE":
573
- case "DONKEY":
574
- case "MULE":
493
+ case "HORSE", "LLAMA", "SKELETON_HORSE", "DONKEY", "MULE" -> {
575
494
  AbstractHorse horse = (AbstractHorse) entity;
576
495
  horse.setJumpStrength(this.horse.jump);
577
496
  if (horse instanceof ChestedHorse) {
@@ -586,15 +505,16 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
586
505
  restoreLiving(horse);
587
506
  restoreInventory(horse);
588
507
  return entity;
508
+ }
589
509
  // END INVENTORY HOLDER //
590
- case "WOLF":
591
- case "OCELOT":
510
+ case "WOLF", "OCELOT" -> {
592
511
  restoreTameable((Tameable) entity);
593
512
  restoreAgeable((Ageable) entity);
594
513
  restoreLiving((LivingEntity) entity);
595
514
  return entity;
515
+ }
596
516
  // END AGEABLE //
597
- case "SHEEP":
517
+ case "SHEEP" -> {
598
518
  Sheep sheep = (Sheep) entity;
599
519
  if (this.dataByte == 1) {
600
520
  sheep.setSheared(true);
@@ -605,25 +525,22 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
605
525
  restoreAgeable(sheep);
606
526
  restoreLiving(sheep);
607
527
  return sheep;
608
- case "VILLAGER":
609
- case "CHICKEN":
610
- case "COW":
611
- case "TURTLE":
612
- case "POLAR_BEAR":
613
- case "MUSHROOM_COW":
614
- case "PIG":
528
+ }
529
+ case "VILLAGER", "CHICKEN", "COW", "TURTLE", "POLAR_BEAR", "MUSHROOM_COW", "PIG" -> {
615
530
  restoreAgeable((Ageable) entity);
616
531
  restoreLiving((LivingEntity) entity);
617
532
  return entity;
533
+ }
618
534
  // END AGEABLE //
619
- case "RABBIT":
535
+ case "RABBIT" -> {
620
536
  if (this.dataByte != 0) {
621
537
  ((Rabbit) entity).setRabbitType(Rabbit.Type.values()[this.dataByte]);
622
538
  }
623
539
  restoreAgeable((Ageable) entity);
624
540
  restoreLiving((LivingEntity) entity);
625
541
  return entity;
626
- case "ARMOR_STAND":
542
+ }
543
+ case "ARMOR_STAND" -> {
627
544
  // CHECK positions
628
545
  ArmorStand stand = (ArmorStand) entity;
629
546
  if (this.inventory[0] != null) {
@@ -693,56 +610,38 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
693
610
  }
694
611
  restoreLiving(stand);
695
612
  return stand;
696
- case "BAT":
613
+ }
614
+ case "BAT" -> {
697
615
  if (this.dataByte != 0) {
698
616
  ((Bat) entity).setAwake(true);
699
617
  }
700
618
  restoreLiving((LivingEntity) entity);
701
619
  return entity;
702
- case "ENDER_DRAGON":
620
+ }
621
+ case "ENDER_DRAGON" -> {
703
622
  if (this.dataByte != 0) {
704
623
  ((EnderDragon) entity).setPhase(EnderDragon.Phase.values()[this.dataByte]);
705
624
  }
706
625
  restoreLiving((LivingEntity) entity);
707
626
  return entity;
708
- case "ENDERMITE":
709
- case "GHAST":
710
- case "MAGMA_CUBE":
711
- case "SQUID":
712
- case "PIG_ZOMBIE":
713
- case "HOGLIN":
714
- case "PIGLIN":
715
- case "ZOMBIFIED_PIGLIN":
716
- case "PIGLIN_BRUTE":
717
- case "ZOMBIE":
718
- case "WITHER":
719
- case "WITCH":
720
- case "SPIDER":
721
- case "CAVE_SPIDER":
722
- case "SILVERFISH":
723
- case "GIANT":
724
- case "ENDERMAN":
725
- case "CREEPER":
726
- case "BLAZE":
727
- case "SNOWMAN":
728
- case "SHULKER":
729
- case "GUARDIAN":
730
- case "ELDER_GUARDIAN":
731
- case "SKELETON":
732
- case "WITHER_SKELETON":
627
+ }
628
+ case "ENDERMITE", "GHAST", "MAGMA_CUBE", "SQUID", "PIG_ZOMBIE", "HOGLIN", "PIGLIN", "ZOMBIFIED_PIGLIN", "PIGLIN_BRUTE", "ZOMBIE", "WITHER", "WITCH", "SPIDER", "CAVE_SPIDER", "SILVERFISH", "GIANT", "ENDERMAN", "CREEPER", "BLAZE", "SNOWMAN", "SHULKER", "GUARDIAN", "ELDER_GUARDIAN", "SKELETON", "WITHER_SKELETON" -> {
733
629
  restoreLiving((LivingEntity) entity);
734
630
  return entity;
735
- case "IRON_GOLEM":
631
+ }
632
+ case "IRON_GOLEM" -> {
736
633
  if (this.dataByte != 0) {
737
634
  ((IronGolem) entity).setPlayerCreated(true);
738
635
  }
739
636
  restoreLiving((LivingEntity) entity);
740
637
  return entity;
741
- default:
638
+ }
639
+ default -> {
742
640
  if (Settings.DEBUG) {
743
641
  LOGGER.info("Could not identify entity: {}", entity.getType());
744
642
  }
745
643
  return entity;
644
+ }
746
645
  // END LIVING
747
646
  }
748
647
  }
Bukkit/src/main/java/com/plotsquared/bukkit/generator/BlockStatePopulator.java CHANGED
@@ -24,9 +24,8 @@ import com.plotsquared.core.generator.IndependentPlotGenerator;
24
24
  import com.plotsquared.core.location.Location;
25
25
  import com.plotsquared.core.location.UncheckedWorldLocation;
26
26
  import com.plotsquared.core.plot.PlotArea;
27
- import com.plotsquared.core.plot.world.PlotAreaManager;
28
27
  import com.plotsquared.core.plot.world.SinglePlotArea;
29
- import com.plotsquared.core.queue.ScopedQueueCoordinator;
28
+ import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
30
29
  import org.bukkit.generator.BlockPopulator;
31
30
  import org.bukkit.generator.LimitedRegion;
32
31
  import org.bukkit.generator.WorldInfo;
@@ -47,17 +46,6 @@ final class BlockStatePopulator extends BlockPopulator {
47
46
  this.plotGenerator = plotGenerator;
48
47
  }
49
48
 
50
- /**
51
- * @deprecated Use {@link BlockStatePopulator#BlockStatePopulator(IndependentPlotGenerator)} as plotAreManager is unused
52
- */
53
- @Deprecated(forRemoval = true, since = "6.9.0")
54
- public BlockStatePopulator(
55
- final @NonNull IndependentPlotGenerator plotGenerator,
56
- final @NonNull PlotAreaManager plotAreaManager
57
- ) {
58
- this.plotGenerator = plotGenerator;
59
- }
60
-
61
49
  @Override
62
50
  public void populate(
63
51
  @NonNull final WorldInfo worldInfo,
@@ -80,7 +68,7 @@ final class BlockStatePopulator extends BlockPopulator {
80
68
  worldInfo.getMaxHeight(),
81
69
  (chunkZ << 4) + 15
82
70
  );
83
- ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(wrapped, min, max);
71
+ ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(wrapped, min, max);
84
72
  this.plotGenerator.populateChunk(offsetChunkQueue, area);
85
73
  }
86
74
 
Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java CHANGED
@@ -22,28 +22,47 @@ import com.plotsquared.bukkit.queue.GenChunk;
22
22
  import com.plotsquared.bukkit.util.BukkitUtil;
23
23
  import com.plotsquared.bukkit.util.BukkitWorld;
24
24
  import com.plotsquared.core.PlotSquared;
25
+ import com.plotsquared.core.generator.ClassicPlotWorld;
25
26
  import com.plotsquared.core.generator.GeneratorWrapper;
26
27
  import com.plotsquared.core.generator.IndependentPlotGenerator;
27
28
  import com.plotsquared.core.generator.SingleWorldGenerator;
28
29
  import com.plotsquared.core.location.ChunkWrapper;
30
+ import com.plotsquared.core.location.UncheckedWorldLocation;
29
31
  import com.plotsquared.core.plot.PlotArea;
30
32
  import com.plotsquared.core.plot.world.PlotAreaManager;
31
- import com.plotsquared.core.queue.ScopedQueueCoordinator;
33
+ import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
32
34
  import com.plotsquared.core.util.ChunkManager;
35
+ import com.sk89q.worldedit.bukkit.BukkitAdapter;
33
36
  import com.sk89q.worldedit.math.BlockVector2;
37
+ import com.sk89q.worldedit.math.BlockVector3;
38
+ import org.apache.logging.log4j.LogManager;
39
+ import org.apache.logging.log4j.Logger;
40
+ import org.bukkit.HeightMap;
41
+ import org.bukkit.NamespacedKey;
42
+ import org.bukkit.Registry;
34
43
  import org.bukkit.World;
35
44
  import org.bukkit.block.Biome;
45
+ import org.bukkit.generator.BiomeProvider;
36
46
  import org.bukkit.generator.BlockPopulator;
37
47
  import org.bukkit.generator.ChunkGenerator;
48
+ import org.bukkit.generator.WorldInfo;
38
49
  import org.checkerframework.checker.nullness.qual.NonNull;
50
+ import org.jetbrains.annotations.NotNull;
51
+ import org.jetbrains.annotations.Nullable;
39
52
 
40
53
  import java.util.ArrayList;
54
+ import java.util.Arrays;
55
+ import java.util.EnumSet;
41
56
  import java.util.List;
42
57
  import java.util.Random;
43
58
  import java.util.Set;
44
59
 
60
+ import static java.util.function.Predicate.not;
61
+
45
62
  public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> {
46
63
 
64
+ private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BukkitPlotGenerator.class.getSimpleName());
65
+
47
66
  @SuppressWarnings("unused")
48
67
  public final boolean PAPER_ASYNC_SAFE = true;
49
68
 
@@ -52,9 +71,15 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
52
71
  private final ChunkGenerator platformGenerator;
53
72
  private final boolean full;
54
73
  private final String levelName;
74
+ private final boolean useNewGenerationMethods;
75
+ private final BiomeProvider biomeProvider;
55
76
  private List<BlockPopulator> populators;
56
77
  private boolean loaded = false;
57
78
 
79
+ private PlotArea lastPlotArea;
80
+ private int lastChunkX = Integer.MIN_VALUE;
81
+ private int lastChunkZ = Integer.MIN_VALUE;
82
+
58
83
  public BukkitPlotGenerator(
59
84
  final @NonNull String name,
60
85
  final @NonNull IndependentPlotGenerator generator,
@@ -72,18 +97,23 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
72
97
  this.populators.add(new LegacyBlockStatePopulator(this.plotGenerator));
73
98
  }
74
99
  this.full = true;
100
+ this.useNewGenerationMethods = PlotSquared.platform().serverVersion()[1] >= 19;
101
+ this.biomeProvider = new BukkitPlotBiomeProvider();
75
102
  }
76
103
 
77
104
  public BukkitPlotGenerator(final String world, final ChunkGenerator cg, final @NonNull PlotAreaManager plotAreaManager) {
78
105
  if (cg instanceof BukkitPlotGenerator) {
79
- throw new IllegalArgumentException("ChunkGenerator: " + cg.getClass().getName()
80
- + " is already a BukkitPlotGenerator!");
106
+ throw new IllegalArgumentException("ChunkGenerator: " + cg
107
+ .getClass()
108
+ .getName() + " is already a BukkitPlotGenerator!");
81
109
  }
82
110
  this.plotAreaManager = plotAreaManager;
83
111
  this.levelName = world;
84
112
  this.full = false;
85
113
  this.platformGenerator = cg;
86
114
  this.plotGenerator = new DelegatePlotGenerator(cg, world);
115
+ this.useNewGenerationMethods = PlotSquared.platform().serverVersion()[1] >= 19;
116
+ this.biomeProvider = null;
87
117
  }
88
118
 
89
119
  @Override
@@ -111,7 +141,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
111
141
  try {
112
142
  checkLoaded(world);
113
143
  } catch (Exception e) {
114
- e.printStackTrace();
144
+ LOGGER.error("Error attempting to load world into PlotSquared.", e);
115
145
  }
116
146
  ArrayList<BlockPopulator> toAdd = new ArrayList<>();
117
147
  List<BlockPopulator> existing = world.getPopulators();
@@ -128,6 +158,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
128
158
  return toAdd;
129
159
  }
130
160
 
161
+ // Extracted to synchronized method for thread-safety, preventing multiple internal world load calls
131
162
  private synchronized void checkLoaded(@NonNull World world) {
132
163
  // Do not attempt to load configurations until WorldEdit has a platform ready.
133
164
  if (!PlotSquared.get().isWeInitialised()) {
@@ -153,7 +184,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
153
184
  }
154
185
  }
155
186
 
156
- @SuppressWarnings("deprecation")
187
+ @SuppressWarnings("deprecation") // Kept for compatibility with <=1.17.1
157
188
  private void setSpawnLimits(@NonNull World world, int limit) {
158
189
  world.setAmbientSpawnLimit(limit);
159
190
  world.setAnimalSpawnLimit(limit);
@@ -161,17 +192,118 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
161
192
  world.setWaterAnimalSpawnLimit(limit);
162
193
  }
163
194
 
195
+ @Override
196
+ public void generateNoise(
197
+ @NotNull final WorldInfo worldInfo,
198
+ @NotNull final Random random,
199
+ final int chunkX,
200
+ final int chunkZ,
201
+ @NotNull final ChunkData chunkData
202
+ ) {
203
+ if (this.platformGenerator != this) {
204
+ this.platformGenerator.generateNoise(worldInfo, random, chunkX, chunkZ, chunkData);
205
+ return;
206
+ }
207
+ int minY = chunkData.getMinHeight();
208
+ int maxY = chunkData.getMaxHeight();
209
+ GenChunk result = new GenChunk(minY, maxY);
210
+ // Set the chunk location
211
+ result.setChunk(new ChunkWrapper(worldInfo.getName(), chunkX, chunkZ));
212
+ // Set the result data
213
+ result.setChunkData(chunkData);
214
+ result.result = null;
215
+
216
+ // Catch any exceptions (as exceptions usually thrown)
217
+ try {
218
+ generate(BlockVector2.at(chunkX, chunkZ), worldInfo.getName(), result, false);
219
+ } catch (Throwable e) {
220
+ LOGGER.error("Error attempting to generate chunk.", e);
221
+ }
222
+ }
223
+
224
+ @Override
225
+ public void generateSurface(
226
+ @NotNull final WorldInfo worldInfo,
227
+ @NotNull final Random random,
228
+ final int chunkX,
229
+ final int chunkZ,
230
+ @NotNull final ChunkData chunkData
231
+ ) {
232
+ if (platformGenerator != this) {
233
+ platformGenerator.generateSurface(worldInfo, random, chunkX, chunkZ, chunkData);
234
+ }
235
+ }
236
+
237
+ @Override
238
+ public void generateBedrock(
239
+ @NotNull final WorldInfo worldInfo,
240
+ @NotNull final Random random,
241
+ final int chunkX,
242
+ final int chunkZ,
243
+ @NotNull final ChunkData chunkData
244
+ ) {
245
+ if (platformGenerator != this) {
246
+ platformGenerator.generateBedrock(worldInfo, random, chunkX, chunkZ, chunkData);
247
+ }
248
+ }
249
+
250
+ @Override
251
+ public void generateCaves(
252
+ @NotNull final WorldInfo worldInfo,
253
+ @NotNull final Random random,
254
+ final int chunkX,
255
+ final int chunkZ,
256
+ @NotNull final ChunkData chunkData
257
+ ) {
258
+ if (platformGenerator != this) {
259
+ platformGenerator.generateCaves(worldInfo, random, chunkX, chunkZ, chunkData);
260
+ }
261
+ }
262
+
263
+ @Override
264
+ public @Nullable BiomeProvider getDefaultBiomeProvider(@NotNull final WorldInfo worldInfo) {
265
+ if (platformGenerator != this) {
266
+ return platformGenerator.getDefaultBiomeProvider(worldInfo);
267
+ }
268
+ return biomeProvider;
269
+ }
270
+
271
+ @Override
272
+ public int getBaseHeight(
273
+ @NotNull final WorldInfo worldInfo,
274
+ @NotNull final Random random,
275
+ final int x,
276
+ final int z,
277
+ @NotNull final HeightMap heightMap
278
+ ) {
279
+ PlotArea area = getPlotArea(worldInfo.getName(), x, z);
280
+ if (area instanceof ClassicPlotWorld cpw) {
281
+ // Default to plot height being the heighest point before decoration (i.e. roads, walls etc.)
282
+ return cpw.PLOT_HEIGHT;
283
+ }
284
+ return super.getBaseHeight(worldInfo, random, x, z, heightMap);
285
+ }
286
+
164
287
  /**
165
288
  * The entire method is deprecated, but kept for compatibility with versions lower than or equal to 1.16.2.
166
289
  * The method will be removed in future versions, because WorldEdit and FastAsyncWorldEdit only support the latest point
167
290
  * release.
168
291
  */
169
- @Deprecated(forRemoval = true, since = "6.11.0")
292
+ @SuppressWarnings("deprecation") // The entire method is deprecated, but kept for compatibility with <=1.16.2
170
293
  @Override
294
+ @Deprecated(since = "7.0.0")
171
295
  public @NonNull ChunkData generateChunkData(
172
- @NonNull World world, @NonNull Random random, int x, int z,
173
- @NonNull BiomeGrid biome
296
+ @NonNull World world, @NonNull Random random, int x, int z, @NonNull BiomeGrid biome
174
297
  ) {
298
+ if (useNewGenerationMethods) {
299
+ if (this.platformGenerator != this) {
300
+ return this.platformGenerator.generateChunkData(world, random, x, z, biome);
301
+ } else {
302
+ // Throw exception to be caught by the server that indicates the new generation API is being used.
303
+ throw new UnsupportedOperationException("Using new generation methods. This method is unsupported.");
304
+ }
305
+ }
306
+
175
307
  int minY = BukkitWorld.getMinWorldHeight(world);
176
308
  int maxY = BukkitWorld.getMaxWorldHeight(world);
177
309
  GenChunk result = new GenChunk(minY, maxY);
@@ -181,7 +313,6 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
181
313
  for (int chunkZ = 0; chunkZ < 16; chunkZ++) {
182
314
  for (int y = minY; y < maxY; y++) {
183
315
  biome.setBiome(chunkX, y, chunkZ, Biome.PLAINS);
184
-
185
316
  }
186
317
  }
187
318
  }
@@ -201,35 +332,32 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
201
332
  if (this.platformGenerator != this) {
202
333
  return this.platformGenerator.generateChunkData(world, random, x, z, biome);
203
334
  } else {
204
- generate(BlockVector2.at(x, z), world, result);
335
+ generate(BlockVector2.at(x, z), world.getName(), result, true);
205
336
  }
206
337
  } catch (Throwable e) {
207
- e.printStackTrace();
338
+ LOGGER.error("Error attempting to load world into PlotSquared.", e);
208
339
  }
209
340
  // Return the result data
210
341
  return result.getChunkData();
211
342
  }
212
343
 
213
- private void generate(BlockVector2 loc, World world, ScopedQueueCoordinator result) {
344
+ private void generate(BlockVector2 loc, String world, ZeroedDelegateScopedQueueCoordinator result, boolean biomes) {
214
345
  // Load if improperly loaded
215
346
  if (!this.loaded) {
216
- checkLoaded(world);
347
+ synchronized (this) {
348
+ PlotSquared.get().loadWorld(world, this);
349
+ }
217
350
  }
218
351
  // Process the chunk
219
352
  if (ChunkManager.preProcessChunk(loc, result)) {
220
353
  return;
221
354
  }
222
- PlotArea area = this.plotAreaManager.getPlotArea(world.getName(), null);
223
- if (area == null && (area = this.plotAreaManager.getPlotArea(this.levelName, null)) == null) {
224
- throw new IllegalStateException(
225
- "Cannot regenerate chunk that does not belong to a plot area." + " Location: " + loc
226
- + ", world: " + world);
227
- }
355
+ PlotArea area = getPlotArea(world, loc.getX(), loc.getZ());
228
356
  try {
229
- this.plotGenerator.generateChunk(result, area);
357
+ this.plotGenerator.generateChunk(result, area, biomes);
230
358
  } catch (Throwable e) {
231
359
  // Recover from generator error
232
- e.printStackTrace();
360
+ LOGGER.error("Error attempting to generate chunk.", e);
233
361
  }
234
362
  ChunkManager.postProcessChunk(loc, result);
235
363
  }
@@ -283,4 +411,63 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
283
411
  return this.levelName;
284
412
  }
285
413
 
414
+ private synchronized PlotArea getPlotArea(String name, int chunkX, int chunkZ) {
415
+ // Load if improperly loaded
416
+ if (!this.loaded) {
417
+ PlotSquared.get().loadWorld(name, this);
418
+ // Do not set loaded to true as we want to ensure spawn limits are set when "loading" is actually able to be
419
+ // completed properly.
420
+ }
421
+ if (lastPlotArea != null && name.equals(this.levelName) && chunkX == lastChunkX && chunkZ == lastChunkZ) {
422
+ return lastPlotArea;
423
+ }
424
+ BlockVector3 loc = BlockVector3.at(chunkX << 4, 0, chunkZ << 4);
425
+ if (lastPlotArea != null && lastPlotArea.getRegion().contains(loc) && lastPlotArea.getRegion().contains(loc)) {
426
+ return lastPlotArea;
427
+ }
428
+ PlotArea area = UncheckedWorldLocation.at(name, loc).getPlotArea();
429
+ if (area == null) {
430
+ throw new IllegalStateException(String.format(
431
+ "Cannot generate chunk that does not belong to a plot area. World: %s",
432
+ name
433
+ ));
434
+ }
435
+ this.lastChunkX = chunkX;
436
+ this.lastChunkZ = chunkZ;
437
+ return this.lastPlotArea = area;
438
+ }
439
+
440
+ /**
441
+ * Biome provider should never need to be accessed outside of this class.
442
+ */
443
+ private final class BukkitPlotBiomeProvider extends BiomeProvider {
444
+
445
+ private static final List<Biome> BIOMES;
446
+
447
+ static {
448
+ Set<Biome> disabledBiomes = EnumSet.of(Biome.CUSTOM);
449
+ if (PlotSquared.platform().serverVersion()[1] <= 19) {
450
+ final Biome cherryGrove = Registry.BIOME.get(NamespacedKey.minecraft("cherry_grove"));
451
+ if (cherryGrove != null) {
452
+ disabledBiomes.add(cherryGrove);
453
+ }
454
+ }
455
+ BIOMES = Arrays.stream(Biome.values())
456
+ .filter(not(disabledBiomes::contains))
457
+ .toList();
458
+ }
459
+
460
+ @Override
461
+ public @NotNull Biome getBiome(@NotNull final WorldInfo worldInfo, final int x, final int y, final int z) {
462
+ PlotArea area = getPlotArea(worldInfo.getName(), x >> 4, z >> 4);
463
+ return BukkitAdapter.adapt(plotGenerator.getBiome(area, x, y, z));
464
+ }
465
+
466
+ @Override
467
+ public @NotNull List<Biome> getBiomes(@NotNull final WorldInfo worldInfo) {
468
+ return BIOMES; // Allow all biomes
469
+ }
470
+
471
+ }
472
+
286
473
  }
Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java CHANGED
@@ -24,9 +24,10 @@ import com.plotsquared.core.generator.IndependentPlotGenerator;
24
24
  import com.plotsquared.core.location.Location;
25
25
  import com.plotsquared.core.plot.PlotArea;
26
26
  import com.plotsquared.core.plot.PlotId;
27
- import com.plotsquared.core.queue.ScopedQueueCoordinator;
27
+ import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
28
28
  import com.plotsquared.core.util.MathMan;
29
29
  import com.sk89q.worldedit.bukkit.BukkitAdapter;
30
+ import com.sk89q.worldedit.world.biome.BiomeType;
30
31
  import org.bukkit.World;
31
32
  import org.bukkit.block.Biome;
32
33
  import org.bukkit.generator.BlockPopulator;
@@ -49,6 +50,11 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator {
49
50
  public void initialize(PlotArea area) {
50
51
  }
51
52
 
53
+ @Override
54
+ public BiomeType getBiome(final PlotArea settings, final int x, final int y, final int z) {
55
+ return null;
56
+ }
57
+
52
58
  @Override
53
59
  public String getName() {
54
60
  return this.chunkGenerator.getClass().getName();
@@ -60,7 +66,7 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator {
60
66
  }
61
67
 
62
68
  @Override
63
- public void generateChunk(final ScopedQueueCoordinator result, PlotArea settings) {
69
+ public void generateChunk(final ZeroedDelegateScopedQueueCoordinator result, PlotArea settings, boolean biomes) {
64
70
  World world = BukkitUtil.getWorld(this.world);
65
71
  Location min = result.getMin();
66
72
  int chunkX = min.getX() >> 4;
Bukkit/src/main/java/com/plotsquared/bukkit/generator/LegacyBlockStatePopulator.java CHANGED
@@ -26,7 +26,7 @@ import com.plotsquared.core.location.UncheckedWorldLocation;
26
26
  import com.plotsquared.core.plot.PlotArea;
27
27
  import com.plotsquared.core.plot.world.SinglePlotArea;
28
28
  import com.plotsquared.core.queue.QueueCoordinator;
29
- import com.plotsquared.core.queue.ScopedQueueCoordinator;
29
+ import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
30
30
  import com.sk89q.worldedit.bukkit.BukkitWorld;
31
31
  import com.sk89q.worldedit.util.SideEffectSet;
32
32
  import org.bukkit.Chunk;
@@ -65,7 +65,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator {
65
65
  queue.setChunkObject(source);
66
66
  Location min = UncheckedWorldLocation.at(world.getName(), chunkMinX, world.getMinHeight(), chunkMinZ);
67
67
  Location max = UncheckedWorldLocation.at(world.getName(), chunkMinX + 15, world.getMaxHeight(), chunkMinZ + 15);
68
- ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(queue, min, max);
68
+ ZeroedDelegateScopedQueueCoordinator offsetChunkQueue = new ZeroedDelegateScopedQueueCoordinator(queue, min, max);
69
69
  this.plotGenerator.populateChunk(offsetChunkQueue, area);
70
70
  queue.enqueue();
71
71
  }
Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java CHANGED
@@ -61,11 +61,12 @@ import com.plotsquared.core.util.task.TaskTime;
61
61
  import com.sk89q.worldedit