Compare commits

..

119 Commits
6.1.2 ... 6.3.0

Author SHA1 Message Date
8b6e7b2f2b build: Release 6.3.0 2022-01-14 11:14:00 +01:00
06f0b42a97 refactor: Update SquirrelID GAV 2022-01-14 10:58:44 +01:00
9a85080bf6 Allow restoration of road schematic height calculation behaviour from pre 6.1.4 (#3444) 2022-01-14 10:46:04 +01:00
d14d2caa2d refactor: Prepare removal of our maven repository (#3451) 2022-01-13 14:50:07 +01:00
bcfe7c58dd feat: Add 1.18's music disc additions to /plot music (#3446) 2022-01-12 22:22:01 +01:00
289f0f3bfd Sort plugins on /plot debugpaste alphabetically (#3447)
* feat: Sort plugins on debugpaste alphabetically

* Put (F[A])WE at the top
2022-01-12 22:21:51 +01:00
6fc4005c72 Fix for unwanted audio panning (#3430)
* Fixes https://github.com/IntellectualSites/PlotSquared/issues/3422

* Removed old code

Co-authored-by: Alex <mc.cache@web.de>
2022-01-11 11:02:23 +01:00
8f7c2e4c02 fix: /plot music being able to be used on unclaimed plots (#3432) 2022-01-11 11:01:36 +01:00
b43d08f4aa feat: Display explosion particles even after the event got canceled (with setting to control behavior) (#3436)
* feat: display explosion particles even after event cancel
And add settings option to change behavior

* refactor

* refactor: Change settings comment to clearer connect to it's purpose.
2022-01-10 13:18:19 +01:00
2c55c6a92e build: Update dependency org.checkerframework:checker-qual to v3.21.1 (#3441)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 11:26:53 +01:00
31f48cc7d1 Fix: 1.18 uses the same field as 1.17 for mustNotSave (#3428) 2022-01-05 21:22:09 +01:00
4b77f1ab28 Make road flags great again (#3420)
Fixes #3111
2022-01-05 21:21:58 +01:00
7cc38b5fa8 Fix: use ownersInclude instead of ownedBy where required (#3419)
* Fix: use ownersInclude instead of ownedBy where required
- Also account for multiple plot owners in Cluster player removal
- Add whereBasePlot to avoid merged plots listing multiple times if required
- Only use ownersInclude in visit if enabled in config
- Fixes #3143

* Remove static import
2022-01-05 21:21:48 +01:00
0c76d08b10 Only send border area exit message once (#3418)
Fixes #3335
2022-01-05 21:21:37 +01:00
9c474570c8 Fix: use portal corners to test for event cancellation as entity can be null (#3417)
* Fix: use portal corners to test for event cancellation as entity can be null

* Remove duplicate flag check?

* Simplify to Set#of
2022-01-05 21:21:25 +01:00
7e1d56c849 fix: Reimplement the "unknown owner" option to plot purge (#3412)
- Warn user that backgorund UUID caching may fix the issue
- Also correct the UUID set when purging based on "shared" (added) player
- Fixes #3353
2022-01-05 21:21:08 +01:00
07d0f124b4 ci: Let release drafter listen to forks too 2022-01-05 11:56:28 +01:00
8d6c621763 ci: Setup auto rebase (#3431) 2022-01-04 15:38:21 +01:00
cef7098014 build: Update plugin shadow to v7.1.2 (#3427)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-03 13:52:29 +01:00
e1efa7266e build: Update dependency cloud.commandframework:cloud-services to v1.6.1 (#3425)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-03 11:45:04 +01:00
f363941719 build: Update dependency org.apache.logging.log4j:log4j-api to v2.17.1 (#3426)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-03 11:14:52 +01:00
25095f4546 chore: Welcome 2022 2022-01-02 22:22:19 +01:00
fd0c2050d8 Refactor: Replace Rörledning with Cloud-Services (#3409)
* Refactor: Replace Rörledning with Cloud-Services

Cloud-Services is actually maintained, as opposed to Rörledning. Furthermore, Rörledning is available through Maven Central, whereas rörledning isn't.

This is a semi-breaking change, but because we relocate, it might be fine? Either way, this is a necessary change.

* build: Provide jsr at runtime

* Merge branch 'v6' into refactor/v6/cloud-services

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-12-31 15:49:11 +01:00
07fdc94dd8 Account for mutability of plot objects when sending move/swap success messages (#3414)
Fixes #3337
2021-12-31 15:46:08 +01:00
b501a81e21 build: Exchange mvdwapi version to our ones 2021-12-31 01:29:30 +01:00
eb334b3aac Fix: add missing placeholders for plot info
Fixes #3339
2021-12-30 14:41:31 +00:00
a77a51b6f2 build: Back to snapshot for development 2021-12-30 10:31:08 +01:00
7d981bc610 build: Release 6.2.2 2021-12-30 10:14:15 +01:00
3eb485e900 refactor: Drop guava annotations and create annotation helper (#3389) 2021-12-29 16:18:19 +01:00
9f4af889f7 fix: npe thrown in entity spawn listener (#3399) 2021-12-27 11:01:28 +01:00
2559c889e2 build: Update dependency me.clip:placeholderapi to v2.11.1 (#3403)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-27 10:42:37 +01:00
2cf268b99c build: Update actions/setup-java action to v2.5.0 (#3404)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-27 10:42:07 +01:00
e6fad8309c build: Update dependency gradle to v7.3.3 (#3402)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-27 10:40:00 +01:00
7551450cf9 fix: Send user-friendly message on join of denied plot (#3388)
Also refactor local variable `now` to a more fitting name
2021-12-26 23:28:50 +01:00
e042566bb7 fix: Strip redundant space at flag collection (#3400) 2021-12-26 23:28:03 +01:00
1f26808c7b Don't return the "side" for world plots when accessing default home locations 2021-12-22 17:47:48 +00:00
a7026047d0 Adding gold at the end might stop the prefix weirdness? 2021-12-22 17:46:39 +00:00
af2613202d refactor: Satisfy Semgrep 2021-12-22 02:06:07 +01:00
3da1e9255a build: Update dependency me.clip:placeholderapi to v2.11.0 (#3395)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-21 10:49:47 +01:00
9394906a79 build: Update dependency org.checkerframework:checker-qual to v3.21.0 (#3394)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-20 13:47:16 +01:00
d881cb6084 build: Update dependency com.intellectualsites.paster:Paster to v1.1.3 (#3391)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-20 11:55:54 +01:00
b9d43897af build: Update dependency net.essentialsx:EssentialsX to v2.19.2 (#3392)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-20 11:55:46 +01:00
76b58485a9 build: Update actions/checkout action to v2.4.0 (#3393)
* build: Update actions/checkout action to v2.4.0

* chore: Invert bolt's status

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: NotMyFault <mc.cache@web.de>
2021-12-20 11:55:14 +01:00
7002df0bc7 build: Bump dependencies for 1.18 2021-12-18 23:10:41 +01:00
958aac3cb1 chore: Configure bolt 2021-12-18 13:12:00 +01:00
a93402e27b fix: Standardize projectile permissions (#3374)
* fix: Standardize projectile permissions

- Let all projectiles (not just splash potions) have a permissions check on throwing
- Fixes snowballs, eggs, etc. being able to be thrown when not added to the plot, etc.
- Fixes #2986 (splash potions only able being to be thrown when also added to the plot)
- Remove the specialized code for egg hatching as now eggs are cancelled entirely
- Remove the non-standard plots.projectile.unowned and plots.projectile.other permissions in favor of the standard admin ones

* docs: Add back deprecated projectile permissions

* docs: Update Core/src/main/java/com/plotsquared/core/permissions/Permission.java

Co-authored-by: Alex <mc.cache@web.de>

Co-authored-by: Alex <mc.cache@web.de>
2021-12-17 22:06:56 +01:00
92f41f43c5 fix: Ignore the use flag for liquid placement/removal (#3375)
Fixes #3069
2021-12-17 21:52:15 +01:00
392ee9fa07 ci: Escape workflow tasks 2021-12-17 21:36:56 +01:00
8859871e89 build: Back to snapshot for development 2021-12-14 23:14:35 +01:00
93d99630a9 build: Release 6.2.1 2021-12-14 23:06:55 +01:00
47ae79e123 Revert "refactor: Address MiniMessage deprecations (#3354)" (#3371)
This reverts commit f086826942.
2021-12-14 23:04:36 +01:00
f9ad00c2c8 build: Update dependency org.apache.logging.log4j:log4j-api to v2.16.0 (#3368)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-14 13:57:16 +01:00
566af259db build: Update dependency org.checkerframework:checker-qual to v3.20.0 (#3369)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-13 15:11:48 +01:00
d9a6431078 build: Back to snapshot for development 2021-12-13 13:47:28 +01:00
e9c9375e78 build: Release 6.2.0 2021-12-13 13:35:37 +01:00
7c99c8aabf build: Update dependency com.intellectualsites.arkitektonika:Arkitektonika-Client to v2.1.1 (#3365)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-13 11:31:15 +01:00
88eb8f88a7 build: Update com.fastasyncworldedit to v1.17-419
Closes #3363
2021-12-13 11:11:00 +01:00
fd118c2c37 build: Update com.sk89q.worldedit to v7.2.8 (#3364)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-13 10:42:47 +01:00
858b6b5471 tests: Move to JUnit 5 (#3357) 2021-12-13 10:41:36 +01:00
f086826942 refactor: Address MiniMessage deprecations (#3354)
* refactor: Address MiniMessage deprecations

* refactor: More MiniMessage deprecations

* Move away from our `Templates#of`

* Address comments

* style: Address migration style issues

* docs: Add javadoc link for MiniMessage
2021-12-13 09:48:34 +01:00
9c84dc2bc0 build: Update pipeline version to release build 2021-12-10 11:25:21 +01:00
cba0f3ac1f build: Switch PRTree GAV to our deployment (#3360)
* build: Switch PRTree repository

* build: Use our GAV
2021-12-09 18:30:35 +01:00
b9a130ab00 feat: Add -Post events firing after operational plot events (#3334)
* Create Post* events

* Address license violations

* address review

* standardize post event calls in EventDispatcher

* Add package-info.java

* Add @since-tag to Post* events

* fix licenser issue

Co-authored-by: Alex <mc.cache@web.de>
2021-12-06 19:50:04 +01:00
688056352b build: Update dependency net.kyori:adventure-platform-bukkit to v4.0.1 (#3356)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-06 14:33:04 +01:00
2a40f52dea docs: Update issue template to 1.18 2021-12-05 23:29:28 +01:00
3ed369de19 style: Add missing bracket for deny example (#3351) 2021-11-29 20:56:48 +01:00
bec51401a3 build: Update dependency org.junit.jupiter:junit-jupiter to v5.8.2 (#3350)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 11:25:01 +01:00
109f884b5f build: Update dependency io.papermc:paperlib to v1.0.7 (#3349)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 11:13:23 +01:00
8f3fa419c4 Fixes #3344, Wrong iterator algorithm in PlotRangeIterator (#3345) 2021-11-23 19:52:23 +00:00
a9f08bc885 build: Update dependencies
Closes #3330
2021-11-15 12:41:52 +01:00
a8923ec729 build: Back to snapshot for development 2021-11-11 23:01:37 +01:00
4eafd043a3 Release 6.1.4 2021-11-11 22:49:46 +01:00
826cc8c835 build: Update Gradle 2021-11-11 22:43:48 +01:00
d1dbf777a4 Don't check/set if a chunk should be saved if it's a world-plot 2021-11-11 17:57:59 +00:00
823e78377b feat: Better deciding of heights to use for generation and schematics (#3300)
* Better deciding of heights to use for generation and schematics
 - If bedrock is disabled, we should still be filling the space with something
 - Use minBuildHeight instead of hardcoding "1" for schematics (it is still 1 by default) to ensure all-encompassing schematics
 - Schematic generation/handling for roads etc. should be accounting for all of wall, road, and plot heights for deciding point of origin
 - Fixes #3269
 - Starts to address #3175

* Also do for HybridPlotManager clear
2021-11-11 17:33:38 +00:00
87a2e81ec3 Don't write biome data to schematics if it's not present 2021-11-10 19:51:14 +00:00
88775334b7 Schematic paths are configurable (#3303) 2021-11-09 10:32:07 +00:00
e126547e97 chore: Update com.fastasyncworldedit to v1.17-390 (#3324)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-09 10:00:14 +01:00
c1163cdb2e feat: Split configuration for teleport on claim/auto (#3308)
- Fixes #2953
2021-11-07 22:29:49 +01:00
30d06b7801 build: Reduce consumer dependencies 2021-11-05 11:57:58 +01:00
a5cf7bf2c2 Fix BlockLoc to the requirements for use as a home location
- Add home locations to #fromString
 - Switch to y=Integer#minValue more
 - May help with #3321
2021-11-04 20:47:56 +00:00
3d4d413de8 Minor adjustment to plot home location logic
- Allow "centre" spelling
 - ClassicPlotWorld contains the PLOT_HEIGHT config setting, not HPW
2021-11-02 15:41:16 +00:00
b97e843849 perf: Get rid of Guice overhead when accessing the plot area manager (#3315)
Fixes #3311
Co-authored-by: Jordan <dordsor21@gmail.com>
2021-11-02 13:38:48 +00:00
48c7a3e94e refactor: Use player friendly done message on restricted building (#3309) 2021-11-02 13:32:04 +00:00
7263290bbe fix: Untrusted visit flag not working with untrusted visit permission
Fixes #3317 
Co-authored-by: Alex <mc.cache@web.de>
2021-11-02 13:28:39 +00:00
e99c4e3289 chore: Update dependency org.checkerframework:checker-qual to v3.19.0 (#3320)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-01 21:51:53 +01:00
87cb26189f Closes #3313 2021-11-01 14:07:44 +01:00
2dae336a5f chore: Update com.fastasyncworldedit to v1.17-380 (#3312)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-01 14:06:47 +01:00
258ed1469b chore: Update dependency net.kyori:adventure-api to v4.9.3 (#3314)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-01 14:06:40 +01:00
6f3eabba0e feat: Don't display the default plot title if on a server-plot, unless configured otherwise. (#3305)
- If plot-title flag is set, title will still be displayed.
2021-11-01 11:23:53 +00:00
804228fa6c Allow pitch and yaw to be used in default home location (#3304) 2021-10-29 10:48:35 +01:00
be85708e5a feat: Add border bypass permission (#3302)
* Add border bypass permission
 - Fixes #3297

* Add permission to plots.admin permpack

* Implement messages on leaving/entering border area

* Rename to border.denied and make border msg red

* change too le/ge as tthey are likely to be equal to border when hit.
 - Since we check for being across the border beforehand, it will hopefully not be spammed too much?
 - If it's spammed then either we use meta to set if a player's left the border, or we just remove the come-back-in altogether because it's a little looong
2021-10-28 10:13:36 +02:00
f2368f97df chore: Update com.sk89q.worldedit to v7.2.7 (#3299)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 11:22:31 +02:00
df87bcb743 build: Back to snapshot for development 2021-10-18 20:30:28 +02:00
5653d0f175 Release 6.1.3 2021-10-18 20:22:13 +02:00
b022a97196 fix: Flag list parsing for console players (#3277)
Instead of recreating the logic, we can simply reuse what we created above and string-ify that for parsing.
2021-10-18 20:20:52 +02:00
cb596ee6ea Fix StackOverFlow 2021-10-18 17:27:51 +01:00
4e391136c0 Add and Trust permission now count correctly (#3290) 2021-10-15 11:28:23 +01:00
a6a0e1d12f chore: Update dependency org.checkerframework:checker-qual to v3.18.1 (#3283)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-10 00:23:32 +02:00
d2776eed5a [ci skip] Move to work level templates 2021-10-08 18:09:58 +02:00
6528c60f4d fix: Fix greeting & farewell captions not being used (#3272)
* fix: Fix greeting & farewell captions not being used

Fixes #3250

* feat: Allow alias in greeting & farewell flag
2021-10-07 08:10:00 +00:00
7ee46be2ac feat: Allow plot alias in title (#3273)
Fixes #3171
2021-10-07 08:07:13 +00:00
13bc231091 chore: Update com.fastasyncworldedit to v1.17-343 (#3282)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-05 10:26:42 +02:00
55d1a40394 chore: Update plugin shadow to v7.1.0 (#3284)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-04 20:18:56 +02:00
d70f99b489 fix: Respect tab-complete aliases (Fixes #3266) (#3268)
* Fixes #3250

* ListFlag#merge should not allow duplicates (Fixes #3157) (#3265)

* feat: Respect non-visible players in tab completion (Closes #3263) (#3264)

* Respect non-visible players in tab completion (Closes #3263)

* Deprecate old Tab-Complete methods instead of hard-replacing them

* wtf git

* Mark for removal, useless new-lines

* Pass ConsolePlayer.getConsole() instead of Nullable param

* Respect tab-complete aliases (Fixes #3266)

* Useless import

Co-authored-by: NotMyFault <mc.cache@web.de>
Co-authored-by: dordsor21 <dordsor21@gmail.com>
2021-10-04 17:10:36 +02:00
fde9735da2 chore: Update dependency net.kyori:adventure-api to v4.9.2 (#3278)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-04 17:05:52 +02:00
20f0aa3656 chore: Update com.fastasyncworldedit to v1.17-341 (#3275)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-04 17:05:38 +02:00
0b7bf2d26d chore: Update dependency dev.notmyfault.serverlib:ServerLib to v2.3.1 (#3276)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-04 17:05:24 +02:00
f10e38af63 [ci skip] chore: Improve pr template fields 2021-10-04 15:43:44 +02:00
21727ebfc7 build: Overhaul build & deployment workflow (#3267)
* Fixes #3250

* build: Overhaul build & deployment workflow

- Move to release drafter
- Replace publishing with gradle nexus
- Conventional commits are handy
- Determine build status in gh actions before deploying
2021-10-04 15:28:47 +02:00
e322ee85fd feat: Respect non-visible players in tab completion (Closes #3263) (#3264)
* Respect non-visible players in tab completion (Closes #3263)

* Deprecate old Tab-Complete methods instead of hard-replacing them

* wtf git

* Mark for removal, useless new-lines

* Pass ConsolePlayer.getConsole() instead of Nullable param
2021-10-03 14:32:02 +02:00
541255fe7e ListFlag#merge should not allow duplicates (Fixes #3157) (#3265) 2021-10-03 14:31:57 +02:00
20c2f36f6c Update com.fastasyncworldedit to v1.17-336 (#3258)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-29 18:09:46 +02:00
744f7a18ae Update dependency org.junit.jupiter:junit-jupiter to v5.8.1 (#3259)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-29 18:09:35 +02:00
18eece0b71 [ci skip] chore: Renovate
Closes #3260
2021-09-29 18:09:12 +02:00
4f12dcf966 Return base plot when using alias (#3253) 2021-09-25 15:58:31 +02:00
ee832528db [ci skip] Adjust renovate config
Closes #3252
2021-09-21 00:52:25 +02:00
bb5d6c91da Update Fawe version 2021-09-20 16:21:18 +02:00
6d4adecb32 6.1.3 2021-09-18 23:07:10 +01:00
580 changed files with 2274 additions and 1414 deletions

View File

@ -1008,6 +1008,6 @@ ij_html_uniform_ident = false
indent_size = 2 indent_size = 2
ij_yaml_keep_indents_on_empty_lines = false ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true ij_yaml_keep_line_breaks = true
ij_yaml_space_before_colon = true ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true ij_yaml_spaces_within_brackets = true

12
.github/FUNDING.yml vendored
View File

@ -1,12 +0,0 @@
# These are supported funding model platforms
github: [NotMyFault, dordsor21, SirYwell]
patreon: IntellectualSites # Replace with a single Patreon username
open_collective: IntellectualSites
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://www.paypal.me/AlexanderBrandes # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@ -18,8 +18,6 @@ body:
options: options:
- Paper - Paper
- Spigot - Spigot
- Tuinity
- Purpur
validations: validations:
required: true required: true
@ -29,6 +27,8 @@ body:
description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first. description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
multiple: false multiple: false
options: options:
- '1.18.1'
- '1.18'
- '1.17.1' - '1.17.1'
- '1.16.5' - '1.16.5'
- '1.15.2' - '1.15.2'

View File

@ -1,17 +0,0 @@
## Overview
<!-- Please describe which issue this Pull Request targets
If there is no issue, please create one so we can look into it before approving your PR.
You can do so here: https://github.com/IntellectualSites/PlotSquared/issues
-->
**Fixes {Link to issue}**
## Description
## Checklist
<!-- Make sure you have completed the following steps (put an "X" between of brackets): -->
- [] I included all information required in the sections above
- [] I tested my changes and approved their functionality
- [] I ensured my changes do not break other parts of the code
- [] I read and followed the [contribution guidelines](https://github.com/IntellectualSites/PlotSquared/blob/v6/CONTRIBUTING.md)

1
.github/release-drafter.yml vendored Normal file
View File

@ -0,0 +1 @@
_extends: .github

2
.github/stale.yml vendored
View File

@ -1,4 +1,4 @@
daysUntilStale: 60 daysUntilStale: 30
daysUntilClose: 7 daysUntilClose: 7
only: issues only: issues
exemptLabels: exemptLabels:

View File

@ -1,17 +1,41 @@
name: "build" name: build
on: ["pull_request", "push"] on: [ pull_request, push ]
jobs: jobs:
build: build:
runs-on: "ubuntu-20.04" runs-on: ubuntu-latest
steps: steps:
- name: "Checkout Repository" - name: Checkout Repository
uses: "actions/checkout@v2.3.4" uses: actions/checkout@v2.4.0
- name: "Setup JDK 16" - name: Validate Gradle Wrapper"
uses: "actions/setup-java@v2.2.0" uses: gradle/wrapper-validation-action@v1.0.4
- name: Setup Java
uses: actions/setup-java@v2.5.0
with: with:
distribution: "temurin" distribution: temurin
java-version: "16" java-version: 17
- name: "Clean Build" - name: Clean Build
run: "./gradlew clean build" run: ./gradlew clean build
- name: Determine release status
if: ${{ runner.os == 'Linux' }}
run: |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
else
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: Publish Release
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: Publish Snapshot
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6' }}
run: ./gradlew publishToSonatype
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}

20
.github/workflows/rebase.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Rebase Pull Request
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2.4.0
with:
token: ${{ secrets.REBASE_TOKEN }}
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.5
env:
GITHUB_TOKEN: ${{ secrets.REBASE_TOKEN }}

18
.github/workflows/release-drafter.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: draft release
on:
push:
branches:
- v6
pull_request:
types: [ opened, reopened, synchronize ]
pull_request_target:
types: [ opened, reopened, synchronize ]
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.15.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,12 +0,0 @@
name: "validate gradle wrapper"
on: ["pull_request", "push"]
jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v2.3.4"
- name: "Validate Gradle Wrapper"
uses: "gradle/wrapper-validation-action@v1.0.4"

13
.whitesource Normal file
View File

@ -0,0 +1,13 @@
{
"scanSettings": {
"baseBranches": ["v6"]
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "success",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
},
"enableRenovate": "true"
}

View File

@ -24,7 +24,7 @@ dependencies {
implementation(libs.bstats) implementation(libs.bstats)
// Paper // Paper
compileOnlyApi(libs.paper) compileOnly(libs.paper)
implementation(libs.paperlib) implementation(libs.paperlib)
// Plugins // Plugins
@ -32,15 +32,14 @@ dependencies {
exclude(group = "org.bukkit") exclude(group = "org.bukkit")
exclude(group = "org.spigotmc") exclude(group = "org.spigotmc")
} }
compileOnlyApi(libs.fastasyncworldeditBukkit) compileOnly(libs.fastasyncworldeditBukkit) { isTransitive = false }
testImplementation(libs.fastasyncworldeditBukkit) testImplementation(libs.fastasyncworldeditBukkit) { isTransitive = false }
compileOnly(libs.vault) { compileOnly(libs.vault) {
exclude(group = "org.bukkit") exclude(group = "org.bukkit")
} }
compileOnly(libs.placeholderapi) compileOnly(libs.placeholderapi)
compileOnly(libs.luckperms) compileOnly(libs.luckperms)
compileOnly(libs.essentialsx) compileOnly(libs.essentialsx)
compileOnly(libs.hyperverse) { isTransitive = false }
compileOnly(libs.mvdwapi) { isTransitive = false } compileOnly(libs.mvdwapi) { isTransitive = false }
// Other libraries // Other libraries
@ -75,7 +74,8 @@ tasks.named<ShadowJar>("shadowJar") {
relocate("org.khelekore.prtree", "com.plotsquared.prtree") relocate("org.khelekore.prtree", "com.plotsquared.prtree")
relocate("com.google.inject", "com.plotsquared.google") relocate("com.google.inject", "com.plotsquared.google")
relocate("org.aopalliance", "com.plotsquared.core.aopalliance") relocate("org.aopalliance", "com.plotsquared.core.aopalliance")
relocate("com.intellectualsites.services", "com.plotsquared.core.services") relocate("cloud.commandframework.services", "com.plotsquared.core.services")
relocate("io.leangen.geantyref", "com.plotsquared.core.geantyref")
relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika") relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika")
relocate("com.intellectualsites.http", "com.plotsquared.core.http") relocate("com.intellectualsites.http", "com.plotsquared.core.http")
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster") relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
@ -83,6 +83,7 @@ tasks.named<ShadowJar>("shadowJar") {
relocate("org.jetbrains", "com.plotsquared.core.annotations") relocate("org.jetbrains", "com.plotsquared.core.annotations")
relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations") relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations")
relocate("javax.annotation", "com.plotsquared.core.annotation") relocate("javax.annotation", "com.plotsquared.core.annotation")
relocate("com.google.code.findbugs", "com.plotsquared.core.findbugs")
relocate("javax.inject", "com.plotsquared.core.annotation.inject") relocate("javax.inject", "com.plotsquared.core.annotation.inject")
// Get rid of all the libs which are 100% unused. // Get rid of all the libs which are 100% unused.
@ -95,9 +96,9 @@ tasks {
withType<Javadoc> { withType<Javadoc> {
val opt = options as StandardJavadocDocletOptions val opt = options as StandardJavadocDocletOptions
opt.links("https://papermc.io/javadocs/paper/1.17/") opt.links("https://papermc.io/javadocs/paper/1.17/")
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/7.2.6/") opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/7.2.7/")
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/7.2.6/") opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/7.2.7/")
opt.links("https://jd.adventure.kyori.net/api/4.9.1/") opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
opt.links("https://google.github.io/guice/api-docs/5.0.1/javadoc/") opt.links("https://google.github.io/guice/api-docs/5.0.1/javadoc/")
opt.links("https://checkerframework.org/api/") opt.links("https://checkerframework.org/api/")
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -27,6 +27,7 @@ package com.plotsquared.bukkit;
import com.plotsquared.bukkit.util.BukkitUtil; import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.command.MainCommand; import com.plotsquared.core.command.MainCommand;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.player.ConsolePlayer; import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
import org.bukkit.command.Command; import org.bukkit.command.Command;
@ -42,6 +43,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale;
public class BukkitCommand implements CommandExecutor, TabCompleter { public class BukkitCommand implements CommandExecutor, TabCompleter {
@ -63,7 +65,7 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
@Override @Override
public List<String> onTabComplete( public List<String> onTabComplete(
CommandSender commandSender, Command command, String s, CommandSender commandSender, Command command, String label,
String[] args String[] args
) { ) {
if (!(commandSender instanceof Player)) { if (!(commandSender instanceof Player)) {
@ -73,8 +75,11 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
if (args.length == 0) { if (args.length == 0) {
return Collections.singletonList("plots"); return Collections.singletonList("plots");
} }
if (!Settings.Enabled_Components.TAB_COMPLETED_ALIASES.contains(label.toLowerCase(Locale.ENGLISH))) {
return List.of();
}
Collection<com.plotsquared.core.command.Command> objects = Collection<com.plotsquared.core.command.Command> objects =
MainCommand.getInstance().tab(player, args, s.endsWith(" ")); MainCommand.getInstance().tab(player, args, label.endsWith(" "));
if (objects == null) { if (objects == null) {
return null; return null;
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -147,6 +147,8 @@ import java.io.File;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
@ -266,7 +268,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
faweHook = true; faweHook = true;
} catch (Exception ignored) { } catch (Exception ignored) {
LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" + LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" +
".net/job/FastAsyncWorldEdit-1.17/"); ".net/job/FastAsyncWorldEdit/");
} }
} }
} }
@ -1141,8 +1143,10 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
@Override @Override
public @NonNull String pluginsFormatted() { public @NonNull String pluginsFormatted() {
StringBuilder msg = new StringBuilder(); StringBuilder msg = new StringBuilder();
Plugin[] plugins = Bukkit.getServer().getPluginManager().getPlugins(); List<Plugin> plugins = new ArrayList<>();
msg.append("Plugins (").append(plugins.length).append("): \n"); Collections.addAll(plugins, Bukkit.getServer().getPluginManager().getPlugins());
plugins.sort(Comparator.comparing(Plugin::getName));
msg.append("Plugins (").append(plugins.size()).append("): \n");
for (Plugin p : plugins) { for (Plugin p : plugins) {
msg.append(" - ").append(p.getName()).append(":").append("\n") msg.append(" - ").append(p.getName()).append(":").append("\n")
.append(" • Version: ").append(p.getDescription().getVersion()).append("\n") .append(" • Version: ").append(p.getDescription().getVersion()).append("\n")
@ -1156,6 +1160,21 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
return msg.toString(); return msg.toString();
} }
@Override
@SuppressWarnings("ConstantConditions")
public @NonNull String worldEditImplementations() {
StringBuilder msg = new StringBuilder();
if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
msg.append("FastAsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit").getDescription().getVersion());
} else if (Bukkit.getPluginManager().getPlugin("AsyncWorldEdit") != null) {
msg.append("AsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("AsyncWorldEdit").getDescription().getVersion()).append("\n");
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
} else {
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
}
return msg.toString();
}
@Override @Override
public com.plotsquared.core.location.@NonNull World<?> getPlatformWorld(final @NonNull String worldName) { public com.plotsquared.core.location.@NonNull World<?> getPlatformWorld(final @NonNull String worldName) {
return BukkitWorld.of(worldName); return BukkitWorld.of(worldName);
@ -1180,6 +1199,11 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
return this.injector; return this.injector;
} }
@Override
public @NonNull PlotAreaManager plotAreaManager() {
return this.plotAreaManager;
}
@NonNull @NonNull
@Override @Override
public Locale getLocale() { public Locale getLocale() {

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -29,7 +29,6 @@ import com.google.inject.AbstractModule;
import com.google.inject.Provides; import com.google.inject.Provides;
import com.google.inject.Singleton; import com.google.inject.Singleton;
import com.plotsquared.bukkit.managers.BukkitWorldManager; import com.plotsquared.bukkit.managers.BukkitWorldManager;
import com.plotsquared.bukkit.managers.HyperverseWorldManager;
import com.plotsquared.bukkit.managers.MultiverseWorldManager; import com.plotsquared.bukkit.managers.MultiverseWorldManager;
import com.plotsquared.core.util.PlatformWorldManager; import com.plotsquared.core.util.PlatformWorldManager;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -40,9 +39,7 @@ public class WorldManagerModule extends AbstractModule {
@Provides @Provides
@Singleton @Singleton
PlatformWorldManager<World> provideWorldManager() { PlatformWorldManager<World> provideWorldManager() {
if (Bukkit.getPluginManager().getPlugin("Hyperverse") != null) { if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) {
return new HyperverseWorldManager();
} else if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) {
return new MultiverseWorldManager(); return new MultiverseWorldManager();
} else { } else {
return new BukkitWorldManager(); return new BukkitWorldManager();

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -318,8 +318,7 @@ public class BlockEventListener implements Listener {
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
pp.sendMessage( pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("done.building_restricted")
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
); );
event.setCancelled(true); event.setCancelled(true);
return; return;
@ -401,8 +400,7 @@ public class BlockEventListener implements Listener {
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
plotPlayer.sendMessage( plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("done.building_restricted")
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER))
); );
event.setCancelled(true); event.setCancelled(true);
return; return;

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -32,6 +32,7 @@ import com.plotsquared.core.location.Location;
import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea; import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.plot.world.SinglePlotArea;
import com.plotsquared.core.util.ReflectionUtils.RefClass; import com.plotsquared.core.util.ReflectionUtils.RefClass;
import com.plotsquared.core.util.ReflectionUtils.RefField; import com.plotsquared.core.util.ReflectionUtils.RefField;
import com.plotsquared.core.util.ReflectionUtils.RefMethod; import com.plotsquared.core.util.ReflectionUtils.RefMethod;
@ -107,41 +108,11 @@ public class ChunkListener implements Listener {
this.isTrueForNotSave = false; this.isTrueForNotSave = false;
} else { } else {
this.mustSave = classChunk.getField("mustNotSave"); this.mustSave = classChunk.getField("mustNotSave");
/*
this.worldServer = classCraftWorld.getField("world");
this.methodGetChunkProvider = getRefClass("{nms}.WorldServer").getMethod("getChunkProvider");
this.playerChunkMap = getRefClass("{nms}.ChunkProviderServer").getField("playerChunkMap");
RefClass classPlayerChunkMap = getRefClass("{nms}.PlayerChunkMap");
if (PaperLib.isPaper() && version == 16) {
this.updatingChunks = classPlayerChunkMap.getField("updatingChunks");
this.methodGetVisibleMap = getRefClass("com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object").getMethod(
"getVisibleMap");
} else {
this.visibleChunks = classPlayerChunkMap.getField("visibleChunks");
}
this.methodGetFullChunk = getRefClass("{nms}.PlayerChunk").getMethod("getFullChunk");
this.methodGetBukkitChunk = getRefClass("{nms}.Chunk").getMethod("getBukkitChunk");
*/
} }
} else if (version == 17) { } else {
RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.Chunk"); RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.Chunk");
this.mustSave = classChunk.getField("mustNotSave"); this.mustSave = classChunk.getField("mustNotSave");
/*
this.worldServer = classCraftWorld.getField("world");
this.methodGetChunkProvider = getRefClass("net.minecraft.server.level.WorldServer").getMethod(
"getChunkProvider");
this.playerChunkMap = getRefClass("net.minecraft.server.level.ChunkProviderServer").getField("a");
RefClass classPlayerChunkMap = getRefClass("net.minecraft.server.level.PlayerChunkMap");
if (PaperLib.isPaper()) {
this.updatingChunks = classPlayerChunkMap.getField("updatingChunks");
this.methodGetVisibleMap = getRefClass("com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object").getMethod(
"getVisibleMap");
} else {
this.visibleChunks = classPlayerChunkMap.getField("l");
}
this.methodGetFullChunk = getRefClass("net.minecraft.server.level.PlayerChunk").getMethod("getFullChunk");
this.methodGetBukkitChunk = getRefClass("net.minecraft.world.level.chunk.Chunk").getMethod("getBukkitChunk");
*/
} }
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
e.printStackTrace(); e.printStackTrace();
@ -181,32 +152,7 @@ public class ChunkListener implements Listener {
} }
toUnload.add(chunk); toUnload.add(chunk);
} }
}/* else { }
Object worldServer = this.worldServer.of(craftWorld).get();
Object chunkProviderServer = methodGetChunkProvider.of(worldServer).call();
Object playerChunkMap = this.playerChunkMap.of(chunkProviderServer).get();
Long2ObjectLinkedOpenHashMap<?> chunks;
if (PaperLib.isPaper() && version > 15) {
Object updatingChunks = this.updatingChunks.of(playerChunkMap).get();
chunks = (Long2ObjectLinkedOpenHashMap<?>) this.methodGetVisibleMap.of(updatingChunks).call();
} else {
chunks = (Long2ObjectLinkedOpenHashMap<?>) this.visibleChunks.of(playerChunkMap).get();
}
for (Object playerChunk : chunks.values()) {
Object nmsChunk = this.methodGetFullChunk.of(playerChunk).call();
if (nmsChunk == null) {
continue;
}
Chunk chunk = (Chunk) this.methodGetBukkitChunk.of(nmsChunk).call();
int x = chunk.getX();
int z = chunk.getZ();
if (!shouldSave(worldName, x, z)) {
unloadChunk(worldName, chunk, false);
continue;
}
toUnload.add(chunk);
}
}*/
} }
if (toUnload.isEmpty()) { if (toUnload.isEmpty()) {
return; return;
@ -295,7 +241,7 @@ public class ChunkListener implements Listener {
Chunk chunk = event.getChunk(); Chunk chunk = event.getChunk();
if (Settings.Chunk_Processor.AUTO_TRIM) { if (Settings.Chunk_Processor.AUTO_TRIM) {
String world = chunk.getWorld().getName(); String world = chunk.getWorld().getName();
if (this.plotAreaManager.hasPlotArea(world)) { if ((!Settings.Enabled_Components.WORLDS || !SinglePlotArea.isSinglePlotWorld(world)) && this.plotAreaManager.hasPlotArea(world)) {
if (unloadChunk(world, chunk, true)) { if (unloadChunk(world, chunk, true)) {
return; return;
} }
@ -365,8 +311,7 @@ public class ChunkListener implements Listener {
} }
private void cleanChunk(final Chunk chunk) { private void cleanChunk(final Chunk chunk) {
TaskManager.index.incrementAndGet(); final int currentIndex = TaskManager.index.incrementAndGet();
final int currentIndex = TaskManager.index.get();
PlotSquaredTask task = TaskManager.runTaskRepeat(() -> { PlotSquaredTask task = TaskManager.runTaskRepeat(() -> {
if (!chunk.isLoaded()) { if (!chunk.isLoaded()) {
Objects.requireNonNull(TaskManager.removeTask(currentIndex)).cancel(); Objects.requireNonNull(TaskManager.removeTask(currentIndex)).cancel();

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -48,6 +48,7 @@ import com.plotsquared.core.util.Permissions;
import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockType;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Ageable; import org.bukkit.entity.Ageable;
@ -323,6 +324,10 @@ public class EntityEventListener implements Listener {
} }
} }
event.setCancelled(true); event.setCancelled(true);
//Spawn Explosion Particles when enabled in settings
if (Settings.General.ALWAYS_SHOW_EXPLOSIONS) {
event.getLocation().getWorld().spawnParticle(Particle.EXPLOSION_HUGE, event.getLocation(), 0);
}
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@ -371,14 +376,14 @@ public class EntityEventListener implements Listener {
if (shooter instanceof Player) { if (shooter instanceof Player) {
PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter); PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter);
if (plot == null) { if (plot == null) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_PROJECTILE_UNOWNED)) { if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) {
entity.remove(); entity.remove();
event.setCancelled(true); event.setCancelled(true);
} }
return; return;
} }
if (plot.isAdded(pp.getUUID()) || Permissions if (plot.isAdded(pp.getUUID()) || Permissions
.hasPermission(pp, Permission.PERMISSION_PROJECTILE_OTHER)) { .hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) {
return; return;
} }
entity.remove(); entity.remove();

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -75,8 +75,7 @@ public class EntitySpawnListener implements Listener {
public static void testCreate(final Entity entity) { public static void testCreate(final Entity entity) {
@NonNull World world = entity.getWorld(); @NonNull World world = entity.getWorld();
if (areaName == world.getName()) { if (!world.getName().equals(areaName)) {
} else {
areaName = world.getName(); areaName = world.getName();
hasPlotArea = PlotSquared.get().getPlotAreaManager().hasPlotArea(areaName); hasPlotArea = PlotSquared.get().getPlotAreaManager().hasPlotArea(areaName);
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -39,11 +39,13 @@ import com.plotsquared.core.command.MainCommand;
import com.plotsquared.core.configuration.Settings; import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.configuration.caption.TranslatableCaption; import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.location.Location; import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea; import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.flag.implementations.DoneFlag; import com.plotsquared.core.plot.flag.implementations.DoneFlag;
import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.Permissions;
import net.kyori.adventure.text.minimessage.Template; import net.kyori.adventure.text.minimessage.Template;
import org.bukkit.Chunk; import org.bukkit.Chunk;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -53,7 +55,6 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile; import org.bukkit.entity.Projectile;
import org.bukkit.entity.Slime; import org.bukkit.entity.Slime;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
@ -321,9 +322,6 @@ public class PaperListener implements Listener {
return; return;
} }
Projectile entity = event.getProjectile(); Projectile entity = event.getProjectile();
if (!(entity instanceof ThrownPotion)) {
return;
}
ProjectileSource shooter = entity.getShooter(); ProjectileSource shooter = entity.getShooter();
if (!(shooter instanceof Player)) { if (!(shooter instanceof Player)) {
return; return;
@ -332,11 +330,36 @@ public class PaperListener implements Listener {
if (!this.plotAreaManager.hasPlotArea(location.getWorldName())) { if (!this.plotAreaManager.hasPlotArea(location.getWorldName())) {
return; return;
} }
PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter); PlotPlayer<Player> pp = BukkitUtil.adapt((Player) shooter);
Plot plot = location.getOwnedPlot(); Plot plot = location.getOwnedPlot();
if (plot != null && !plot.isAdded(pp.getUUID())) {
entity.remove(); if (plot == null) {
event.setCancelled(true); if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) {
pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD))
);
entity.remove();
event.setCancelled(true);
}
} else if (!plot.hasOwner()) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) {
pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED))
);
entity.remove();
event.setCancelled(true);
}
} else if (!plot.isAdded(pp.getUUID())) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) {
pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER))
);
entity.remove();
event.setCancelled(true);
}
} }
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -68,11 +68,9 @@ import com.plotsquared.core.plot.flag.implementations.PlayerInteractFlag;
import com.plotsquared.core.plot.flag.implementations.PreventCreativeCopyFlag; import com.plotsquared.core.plot.flag.implementations.PreventCreativeCopyFlag;
import com.plotsquared.core.plot.flag.implementations.TamedInteractFlag; import com.plotsquared.core.plot.flag.implementations.TamedInteractFlag;
import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag; import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag;
import com.plotsquared.core.plot.flag.implementations.UseFlag;
import com.plotsquared.core.plot.flag.implementations.VehicleBreakFlag; import com.plotsquared.core.plot.flag.implementations.VehicleBreakFlag;
import com.plotsquared.core.plot.flag.implementations.VehicleUseFlag; import com.plotsquared.core.plot.flag.implementations.VehicleUseFlag;
import com.plotsquared.core.plot.flag.implementations.VillagerInteractFlag; import com.plotsquared.core.plot.flag.implementations.VillagerInteractFlag;
import com.plotsquared.core.plot.flag.types.BlockTypeWrapper;
import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.EventDispatcher; import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.MathMan; import com.plotsquared.core.util.MathMan;
@ -94,6 +92,7 @@ import org.bukkit.FluidCollisionMode;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.block.data.Waterlogged; import org.bukkit.block.data.Waterlogged;
import org.bukkit.command.PluginCommand; import org.bukkit.command.PluginCommand;
import org.bukkit.entity.ArmorStand; import org.bukkit.entity.ArmorStand;
@ -127,7 +126,6 @@ import org.bukkit.event.player.PlayerBucketFillEvent;
import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerChangedWorldEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerEggThrowEvent;
import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerInteractAtEntityEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEntityEvent;
@ -156,6 +154,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
@ -418,8 +417,8 @@ public class PlayerEventListener extends PlotListener implements Listener {
.getHomeSynchronous() .getHomeSynchronous()
.equals(BukkitUtil.adaptComplete(to)))) { .equals(BukkitUtil.adaptComplete(to)))) {
pp.sendMessage( pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("deny.no_enter"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_ENTRY_DENIED)) Template.of("plot", plot.toString())
); );
event.setCancelled(true); event.setCancelled(true);
} }
@ -552,8 +551,8 @@ public class PlayerEventListener extends PlotListener implements Listener {
ForceFieldListener.handleForcefield(player, pp, now); ForceFieldListener.handleForcefield(player, pp, now);
} else if (!plotEntry(pp, now) && this.tmpTeleport) { } else if (!plotEntry(pp, now) && this.tmpTeleport) {
pp.sendMessage( pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("deny.no_enter"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_ENTRY_DENIED)) Template.of("plot", now.toString())
); );
this.tmpTeleport = false; this.tmpTeleport = false;
to.setX(from.getBlockX()); to.setX(from.getBlockX());
@ -564,19 +563,31 @@ public class PlayerEventListener extends PlotListener implements Listener {
return; return;
} }
int border = area.getBorder(); int border = area.getBorder();
int x1;
if (x2 > border && this.tmpTeleport) { if (x2 > border && this.tmpTeleport) {
to.setX(border - 1); if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BYPASS_BORDER)) {
this.tmpTeleport = false; to.setX(border - 1);
player.teleport(event.getTo()); this.tmpTeleport = false;
this.tmpTeleport = true; player.teleport(event.getTo());
pp.sendMessage(TranslatableCaption.of("border.border")); this.tmpTeleport = true;
} pp.sendMessage(TranslatableCaption.of("border.denied"));
if (x2 < -border && this.tmpTeleport) { } else if (MathMan.roundInt(from.getX()) <= border) { // Only send if they just moved out of the border
to.setX(-border + 1); pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
this.tmpTeleport = false; }
player.teleport(event.getTo()); } else if (x2 < -border && this.tmpTeleport) {
this.tmpTeleport = true; if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BYPASS_BORDER)) {
pp.sendMessage(TranslatableCaption.of("border.border")); to.setX(-border + 1);
this.tmpTeleport = false;
player.teleport(event.getTo());
this.tmpTeleport = true;
pp.sendMessage(TranslatableCaption.of("border.denied"));
} else if (MathMan.roundInt(from.getX()) >= -border) { // Only send if they just moved out of the border
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
}
} else if (((x1 = MathMan.roundInt(from.getX())) >= border && x2 <= border) || (x1 <= -border && x2 >= -border)) {
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BYPASS_BORDER)) {
pp.sendMessage(TranslatableCaption.of("border.bypass.entered"));
}
} }
} }
int z2; int z2;
@ -601,13 +612,13 @@ public class PlayerEventListener extends PlotListener implements Listener {
} }
return; return;
} }
Plot now = area.getPlot(location); Plot plot = area.getPlot(location);
Plot lastPlot; Plot lastPlot;
try (final MetaDataAccess<Plot> lastPlotAccess = try (final MetaDataAccess<Plot> lastPlotAccess =
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) { pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) {
lastPlot = lastPlotAccess.get().orElse(null); lastPlot = lastPlotAccess.get().orElse(null);
} }
if (now == null) { if (plot == null) {
try (final MetaDataAccess<Boolean> kickAccess = try (final MetaDataAccess<Boolean> kickAccess =
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) { pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) { if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) {
@ -626,12 +637,12 @@ public class PlayerEventListener extends PlotListener implements Listener {
return; return;
} }
} }
} else if (now.equals(lastPlot)) { } else if (plot.equals(lastPlot)) {
ForceFieldListener.handleForcefield(player, pp, now); ForceFieldListener.handleForcefield(player, pp, plot);
} else if (!plotEntry(pp, now) && this.tmpTeleport) { } else if (!plotEntry(pp, plot) && this.tmpTeleport) {
pp.sendMessage( pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("deny.no_enter"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_ENTRY_DENIED)) Template.of("plot", plot.toString())
); );
this.tmpTeleport = false; this.tmpTeleport = false;
player.teleport(from); player.teleport(from);
@ -643,18 +654,31 @@ public class PlayerEventListener extends PlotListener implements Listener {
return; return;
} }
int border = area.getBorder(); int border = area.getBorder();
int z1;
if (z2 > border && this.tmpTeleport) { if (z2 > border && this.tmpTeleport) {
to.setZ(border - 1); if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BYPASS_BORDER)) {
this.tmpTeleport = false; to.setZ(border - 1);
player.teleport(event.getTo()); this.tmpTeleport = false;
this.tmpTeleport = true; player.teleport(event.getTo());
pp.sendMessage(TranslatableCaption.of("border.border")); this.tmpTeleport = true;
pp.sendMessage(TranslatableCaption.of("border.denied"));
} else if (MathMan.roundInt(from.getZ()) <= border) { // Only send if they just moved out of the border
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
}
} else if (z2 < -border && this.tmpTeleport) { } else if (z2 < -border && this.tmpTeleport) {
to.setZ(-border + 1); if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BYPASS_BORDER)) {
this.tmpTeleport = false; to.setZ(-border + 1);
player.teleport(event.getTo()); this.tmpTeleport = false;
this.tmpTeleport = true; player.teleport(event.getTo());
pp.sendMessage(TranslatableCaption.of("border.border")); this.tmpTeleport = true;
pp.sendMessage(TranslatableCaption.of("border.denied"));
} else if (MathMan.roundInt(from.getZ()) >= -border) { // Only send if they just moved out of the border
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
}
} else if (((z1 = MathMan.roundInt(from.getZ())) >= border && z2 <= border) || (z1 <= -border && z2 >= -border)) {
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BYPASS_BORDER)) {
pp.sendMessage(TranslatableCaption.of("border.bypass.entered"));
}
} }
} }
} }
@ -960,8 +984,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
pp.sendMessage( pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("done.building_restricted")
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
); );
e.setCancelled(true); e.setCancelled(true);
return; return;
@ -1215,13 +1238,6 @@ public class PlayerEventListener extends PlotListener implements Listener {
); );
event.setCancelled(true); event.setCancelled(true);
} else if (!plot.isAdded(pp.getUUID())) { } else if (!plot.isAdded(pp.getUUID())) {
List<BlockTypeWrapper> use = plot.getFlag(UseFlag.class);
final BlockType blockType = BukkitAdapter.asBlockType(block.getType());
for (final BlockTypeWrapper blockTypeWrapper : use) {
if (blockTypeWrapper.accepts(blockType)) {
return;
}
}
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
return; return;
} }
@ -1233,8 +1249,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
pp.sendMessage( pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("done.building_restricted")
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
); );
event.setCancelled(true); event.setCancelled(true);
} }
@ -1288,14 +1303,6 @@ public class PlayerEventListener extends PlotListener implements Listener {
); );
event.setCancelled(true); event.setCancelled(true);
} else if (!plot.isAdded(plotPlayer.getUUID())) { } else if (!plot.isAdded(plotPlayer.getUUID())) {
List<BlockTypeWrapper> use = plot.getFlag(UseFlag.class);
Block block = event.getBlockClicked();
final BlockType blockType = BukkitAdapter.asBlockType(block.getType());
for (final BlockTypeWrapper blockTypeWrapper : use) {
if (blockTypeWrapper.accepts(blockType)) {
return;
}
}
if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
return; return;
} }
@ -1307,8 +1314,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) { } else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
plotPlayer.sendMessage( plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("done.building_restricted")
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
); );
event.setCancelled(true); event.setCancelled(true);
} }
@ -1588,43 +1594,6 @@ public class PlayerEventListener extends PlotListener implements Listener {
} }
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onPlayerEggThrow(PlayerEggThrowEvent event) {
Location location = BukkitUtil.adapt(event.getEgg().getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
Player player = event.getPlayer();
BukkitPlayer plotPlayer = BukkitUtil.adapt(player);
Plot plot = area.getPlot(location);
if (plot == null) {
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD))
);
event.setHatching(false);
}
} else if (!plot.hasOwner()) {
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED))
);
event.setHatching(false);
}
} else if (!plot.isAdded(plotPlayer.getUUID())) {
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER))
);
event.setHatching(false);
}
}
}
@EventHandler @EventHandler
public void onItemDrop(PlayerDropItemEvent event) { public void onItemDrop(PlayerDropItemEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
@ -1733,22 +1702,49 @@ public class PlayerEventListener extends PlotListener implements Listener {
@EventHandler @EventHandler
public void onPortalCreation(PortalCreateEvent event) { public void onPortalCreation(PortalCreateEvent event) {
Location location = BukkitUtil.adapt(event.getEntity().getLocation()); String world = event.getWorld().getName();
PlotArea area = location.getPlotArea(); if (PlotSquared.get().getPlotAreaManager().getPlotAreasSet(world).size() == 0) {
if (area == null) {
return; return;
} }
Plot plot = location.getOwnedPlot(); int minX = Integer.MAX_VALUE;
if (plot == null) { int maxX = Integer.MIN_VALUE;
if (area.isRoadFlags() && area.getRoadFlag(DenyPortalsFlag.class)) { int minZ = Integer.MAX_VALUE;
event.setCancelled(true); int maxZ = Integer.MIN_VALUE;
for (BlockState state : event.getBlocks()) {
minX = Math.min(state.getX(), minX);
maxX = Math.max(state.getX(), maxX);
minZ = Math.min(state.getZ(), minZ);
maxZ = Math.max(state.getZ(), maxZ);
}
int y = event.getBlocks().get(0).getY(); // Don't need to worry about this too much
for (Location location : Set.of( // Use Set to lazily avoid duplicate locations
Location.at(world, minX, y, maxX),
Location.at(world, minZ, y, maxZ),
Location.at(world, minX, y, maxZ),
Location.at(world, minZ, y, maxX)
)) {
PlotArea area = location.getPlotArea();
if (area == null) {
continue;
}
Plot plot = location.getOwnedPlot();
if (plot == null) {
if (area.isRoadFlags() && area.getRoadFlag(DenyPortalsFlag.class)) {
event.setCancelled(true);
return;
}
continue;
} }
return;
}
if (plot.getFlag(DenyPortalsFlag.class)) {
if (plot.getFlag(DenyPortalsFlag.class)) { if (plot.getFlag(DenyPortalsFlag.class)) {
plot.debug(event.getEntity().getName() + " did not create a portal because of deny-portals = true"); StringBuilder builder = new StringBuilder();
if (event.getEntity() != null) {
builder.append(event.getEntity().getName()).append(" did not create a portal");
} else {
builder.append("Portal creation cancelled");
}
plot.debug(builder.append(" because of deny-portals = true").toString());
event.setCancelled(true); event.setCancelled(true);
return;
} }
} }
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -28,6 +28,7 @@ package com.plotsquared.bukkit.listener;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.plotsquared.bukkit.util.BukkitEntityUtil; import com.plotsquared.bukkit.util.BukkitEntityUtil;
import com.plotsquared.bukkit.util.BukkitUtil; import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.location.Location; import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission; import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
@ -36,6 +37,7 @@ import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotHandler; import com.plotsquared.core.plot.PlotHandler;
import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.Permissions; import com.plotsquared.core.util.Permissions;
import net.kyori.adventure.text.minimessage.Template;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -96,9 +98,6 @@ public class ProjectileEventListener implements Listener {
@EventHandler @EventHandler
public void onProjectileLaunch(ProjectileLaunchEvent event) { public void onProjectileLaunch(ProjectileLaunchEvent event) {
Projectile entity = event.getEntity(); Projectile entity = event.getEntity();
if (!(entity instanceof ThrownPotion)) {
return;
}
ProjectileSource shooter = entity.getShooter(); ProjectileSource shooter = entity.getShooter();
if (!(shooter instanceof Player)) { if (!(shooter instanceof Player)) {
return; return;
@ -109,9 +108,34 @@ public class ProjectileEventListener implements Listener {
} }
PlotPlayer<Player> pp = BukkitUtil.adapt((Player) shooter); PlotPlayer<Player> pp = BukkitUtil.adapt((Player) shooter);
Plot plot = location.getOwnedPlot(); Plot plot = location.getOwnedPlot();
if (plot != null && !plot.isAdded(pp.getUUID())) {
entity.remove(); if (plot == null) {
event.setCancelled(true); if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_ROAD)) {
pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_ROAD))
);
entity.remove();
event.setCancelled(true);
}
} else if (!plot.hasOwner()) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) {
pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED))
);
entity.remove();
event.setCancelled(true);
}
} else if (!plot.isAdded(pp.getUUID())) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) {
pp.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER))
);
entity.remove();
event.setCancelled(true);
}
} }
} }
@ -131,14 +155,14 @@ public class ProjectileEventListener implements Listener {
if (shooter instanceof Player) { if (shooter instanceof Player) {
PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter); PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter);
if (plot == null) { if (plot == null) {
if (!Permissions.hasPermission(pp, Permission.PERMISSION_PROJECTILE_UNOWNED)) { if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) {
entity.remove(); entity.remove();
event.setCancelled(true); event.setCancelled(true);
} }
return; return;
} }
if (plot.isAdded(pp.getUUID()) || Permissions if (plot.isAdded(pp.getUUID()) || Permissions
.hasPermission(pp, Permission.PERMISSION_PROJECTILE_OTHER)) { .hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) {
return; return;
} }
entity.remove(); entity.remove();

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -27,6 +27,7 @@ package com.plotsquared.bukkit.listener;
import com.plotsquared.core.PlotSquared; import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.plot.world.SinglePlotArea;
import com.plotsquared.core.plot.world.SinglePlotAreaManager; import com.plotsquared.core.plot.world.SinglePlotAreaManager;
import com.plotsquared.core.util.ReflectionUtils; import com.plotsquared.core.util.ReflectionUtils;
import org.bukkit.Chunk; import org.bukkit.Chunk;
@ -86,7 +87,7 @@ public class SingleWorldListener implements Listener {
if (!(man instanceof SinglePlotAreaManager)) { if (!(man instanceof SinglePlotAreaManager)) {
return; return;
} }
if (!isPlotId(name)) { if (!SinglePlotArea.isSinglePlotWorld(name)) {
return; return;
} }
@ -103,31 +104,4 @@ public class SingleWorldListener implements Listener {
handle(event); handle(event);
} }
private boolean isPlotId(String worldName) {
int len = worldName.length();
int separator = 0;
for (int i = 0; i < len; i++) {
switch (worldName.charAt(i)) {
case '_':
separator++;
break;
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
break;
default:
return false;
}
}
return separator == 1;
}
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -25,6 +25,7 @@
*/ */
package com.plotsquared.bukkit.managers; package com.plotsquared.bukkit.managers;
/*
import com.google.inject.Singleton; import com.google.inject.Singleton;
import org.bukkit.World; import org.bukkit.World;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
@ -35,10 +36,9 @@ import se.hyperver.hyperverse.world.WorldConfigurationBuilder;
import se.hyperver.hyperverse.world.WorldFeatures; import se.hyperver.hyperverse.world.WorldFeatures;
import se.hyperver.hyperverse.world.WorldType; import se.hyperver.hyperverse.world.WorldType;
/** Hyperverse implementation is currently put on ice until Hyperverse is released on a stable line and deployed to the central
* Hyperverse specific manager that creates worlds repository.
* using Hyperverse's API
*/
@Singleton @Singleton
public class HyperverseWorldManager extends BukkitWorldManager { public class HyperverseWorldManager extends BukkitWorldManager {
@ -67,3 +67,4 @@ public class HyperverseWorldManager extends BukkitWorldManager {
} }
} }
*/

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -178,8 +178,7 @@ public class BukkitEntityUtil {
if (!Permissions if (!Permissions
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) { .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
plotPlayer.sendMessage( plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"), TranslatableCaption.of("done.building_restricted")
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
); );
return false; return false;
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -248,9 +248,12 @@ permissions:
plots.admin.components.other: true plots.admin.components.other: true
plots.admin.vehicle.break.unowned: true plots.admin.vehicle.break.unowned: true
plots.admin.pve.unowned: true plots.admin.pve.unowned: true
plots.admin.border.bypass: true
plots.teleport.delay.bypass: plots.teleport.delay.bypass:
default: op default: op
plots.admin.border.bypass:
default: op
plots.worldedit.bypass: plots.worldedit.bypass:
default: op default: op
plots.gamemode.bypass: plots.gamemode.bypass:

View File

@ -1,8 +0,0 @@
# Contributing
If you feel like you can improve the plugin any way, then you are more than welcome to contribute to PlotSquared. It would be highly appreciated if you made sure to test your code before committing it, as it will save us a lot of time and effort.
### Code Style
If you are planning to commit any changes to the project, it would be highly appreciated if you were to follow the project
code style conventions. To make this easier we have provided settings that can be picked up by your IDE.
IntelliJ: Install the `EditorConfig` plugin. Now IntelliJ is able to pick up the provided `.editorconfig` file automatically.

View File

@ -5,8 +5,8 @@ dependencies {
compileOnlyApi(libs.checkerqual) compileOnlyApi(libs.checkerqual)
// Minecraft expectations // Minecraft expectations
compileOnlyApi(libs.guava)
compileOnlyApi(libs.gson) compileOnlyApi(libs.gson)
compileOnly(libs.guava)
// Platform expectations // Platform expectations
compileOnlyApi(libs.snakeyaml) compileOnlyApi(libs.snakeyaml)
@ -22,17 +22,17 @@ dependencies {
api(libs.guiceassistedinject) { api(libs.guiceassistedinject) {
exclude("com.google.inject", "guice") exclude("com.google.inject", "guice")
} }
compileOnlyApi(libs.findbugs) api(libs.findbugs)
// Plugins // Plugins
compileOnlyApi(libs.worldeditCore) { compileOnly(libs.worldeditCore) {
exclude(group = "bukkit-classloader-check") exclude(group = "bukkit-classloader-check")
exclude(group = "mockito-core") exclude(group = "mockito-core")
exclude(group = "dummypermscompat") exclude(group = "dummypermscompat")
} }
testImplementation(libs.worldeditCore) testImplementation(libs.worldeditCore)
compileOnlyApi(libs.fastasyncworldeditCore) compileOnly(libs.fastasyncworldeditCore) { isTransitive = false }
testImplementation(libs.fastasyncworldeditCore) testImplementation(libs.fastasyncworldeditCore) { isTransitive = false }
// Logging // Logging
compileOnlyApi(libs.log4j) compileOnlyApi(libs.log4j)
@ -40,9 +40,7 @@ dependencies {
// Other libraries // Other libraries
api(libs.prtree) api(libs.prtree)
api(libs.aopalliance) api(libs.aopalliance)
api(libs.pipeline) { api(libs.cloudServices)
exclude(group = "com.google.guava")
}
api(libs.arkitektonika) api(libs.arkitektonika)
api(libs.paster) api(libs.paster)
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -25,10 +25,10 @@
*/ */
package com.plotsquared.core; package com.plotsquared.core;
import cloud.commandframework.services.ServicePipeline;
import com.google.inject.Injector; import com.google.inject.Injector;
import com.google.inject.Key; import com.google.inject.Key;
import com.google.inject.TypeLiteral; import com.google.inject.TypeLiteral;
import com.intellectualsites.services.ServicePipeline;
import com.plotsquared.core.backup.BackupManager; import com.plotsquared.core.backup.BackupManager;
import com.plotsquared.core.configuration.caption.LocaleHolder; import com.plotsquared.core.configuration.caption.LocaleHolder;
import com.plotsquared.core.generator.GeneratorWrapper; import com.plotsquared.core.generator.GeneratorWrapper;
@ -38,7 +38,9 @@ import com.plotsquared.core.inject.annotations.DefaultGenerator;
import com.plotsquared.core.location.World; import com.plotsquared.core.location.World;
import com.plotsquared.core.permissions.PermissionHandler; import com.plotsquared.core.permissions.PermissionHandler;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.queue.GlobalBlockQueue; import com.plotsquared.core.queue.GlobalBlockQueue;
import com.plotsquared.core.util.AnnotationHelper;
import com.plotsquared.core.util.ChunkManager; import com.plotsquared.core.util.ChunkManager;
import com.plotsquared.core.util.EconHandler; import com.plotsquared.core.util.EconHandler;
import com.plotsquared.core.util.PlatformWorldManager; import com.plotsquared.core.util.PlatformWorldManager;
@ -268,6 +270,13 @@ public interface PlotPlatform<P> extends LocaleHolder {
return injector().getInstance(ChunkManager.class); return injector().getInstance(ChunkManager.class);
} }
/**
* Get the {@link PlotAreaManager} implementation.
*
* @return the PlotAreaManager
*/
@NonNull PlotAreaManager plotAreaManager();
/** /**
* Get the platform specific console {@link Audience} * Get the platform specific console {@link Audience}
* *
@ -283,6 +292,15 @@ public interface PlotPlatform<P> extends LocaleHolder {
*/ */
@NonNull String pluginsFormatted(); @NonNull String pluginsFormatted();
/**
* Get the kind of WorldEdit implementation
*
* @return worldedit implementations
* @since 6.3.0
*/
@AnnotationHelper.ApiDescription(info = "Internal use only")
@NonNull String worldEditImplementations();
/** /**
* Load the caption maps * Load the caption maps
*/ */

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -283,7 +283,7 @@ public class PlotSquared {
* @return Plot area manager * @return Plot area manager
*/ */
public @NonNull PlotAreaManager getPlotAreaManager() { public @NonNull PlotAreaManager getPlotAreaManager() {
return this.platform.injector().getInstance(PlotAreaManager.class); return this.platform.plotAreaManager();
} }
public void startExpiryTasks() { public void startExpiryTasks() {
@ -758,6 +758,9 @@ public class PlotSquared {
if (this_max < last_max) { if (this_max < last_max) {
plot.getArea().setMeta("lastPlot", plot.getId()); plot.getArea().setMeta("lastPlot", plot.getId());
} }
if (callEvent) {
eventDispatcher.callPostDelete(plot);
}
return true; return true;
} }
return false; return false;

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -193,19 +193,28 @@ public class PlayerBackupProfile implements BackupProfile {
future.completeExceptionally(new IllegalArgumentException( future.completeExceptionally(new IllegalArgumentException(
"The backup is non-existent or not in the correct format")); "The backup is non-existent or not in the correct format"));
} else { } else {
this.schematicHandler.paste(schematic, plot, 0, 1, 0, false, player, new RunnableVal<Boolean>() { this.schematicHandler.paste(
@Override schematic,
public void run(Boolean value) { plot,
if (value) { 0,
future.complete(null); plot.getArea().getMinBuildHeight(),
} else { 0,
future.completeExceptionally(new RuntimeException(MINI_MESSAGE.stripTokens( false,
TranslatableCaption player,
.of("schematics.schematic_paste_failed") new RunnableVal<>() {
.getComponent(ConsolePlayer.getConsole())))); @Override
public void run(Boolean value) {
if (value) {
future.complete(null);
} else {
future.completeExceptionally(new RuntimeException(MINI_MESSAGE.stripTokens(
TranslatableCaption
.of("schematics.schematic_paste_failed")
.getComponent(ConsolePlayer.getConsole()))));
}
}
} }
} );
});
} }
}); });
} }

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -8,7 +8,7 @@
* | | * | |
* |_| * |_|
* PlotSquared plot management system for Minecraft * PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites * Copyright (C) 2014 - 2022 IntellectualSites
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

Some files were not shown because too many files have changed in this diff Show More