Compare commits

...

3693 Commits
v3.1.0 ... v6

Author SHA1 Message Date
renovate[bot]
52823f5024
Update Ilshidur/action-discord digest to 08d9328 (#3974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-05 10:15:38 +01:00
renovate[bot]
1326c257a0
Update dependency com.intellectualsites.arkitektonika:Arkitektonika-Client to v2.1.2 (#3972)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-05 10:15:27 +01:00
ByteExceptionM
fc3137cd96
Fix farmland moisturize (#3978)
* fix: Fix farmland gets moisturizes

Signed-off-by: ByteExceptionM <git@byteexception.eu>

* chore: Revert code reformat

Signed-off-by: ByteExceptionM <git@byteexception.eu>

---------

Signed-off-by: ByteExceptionM <git@byteexception.eu>
2023-03-05 10:15:05 +01:00
Alexander Brandes
c46cc73f52
Turn down renovate a bit 2023-03-05 00:03:39 +01:00
renovate[bot]
f11acacedd
Update dependency com.intellectualsites.prtree:PRTree to v2.0.1 (#3975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-02 22:36:18 +01:00
Alexander Brandes
d1bac90745
Update developers field 2023-03-02 20:48:33 +01:00
Alexander Brandes
e98f628d34
Pin GH actions to SHA to avoid mutable refs (#3973) 2023-03-02 12:30:14 +01:00
renovate[bot]
b2ab61559c
Update dependency com.diffplug.spotless to v6.16.0 (#3970)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-02 00:46:34 +01:00
renovate[bot]
dd6eb8e74f
Update dependency cloud.commandframework:cloud-services to v1.8.2 (#3971)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-02 00:46:19 +01:00
renovate[bot]
97cdd03ea4
Update dependency gradle to v7.6.1 (#3967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-27 21:24:04 +01:00
Alexander Brandes
f5118e6802
Don't fire 'PlotUnlinkEvent' twice on plot clear (#3947) 2023-02-23 09:26:30 +01:00
renovate[bot]
94ca5cf679
Update dependency cloud.commandframework:cloud-services to v1.8.1 (#3965)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-22 23:47:31 +01:00
renovate[bot]
5a55a1f602
Update dependency io.github.gradle-nexus.publish-plugin to v1.2.0 (#3966)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-22 23:47:13 +01:00
renovate[bot]
ed33635a15
Update dependency com.diffplug.spotless to v6.15.0 (#3959)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-11 09:35:35 +01:00
renovate[bot]
888682e5d0
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.24 (#3960)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-11 09:35:21 +01:00
Alexander Brandes
72bb5f00b0
Back to snapshot for development 2023-02-10 17:16:52 +01:00
Alexander Brandes
773fd6f59f
Release 6.11.0 2023-02-10 17:12:15 +01:00
ByteExceptionM
5cce86d924
feat: Add event firing on remove road entity (#3955)
* feat: Add event firing on remove road entity

Signed-off-by: ByteExceptionM <git@byteexception.eu>

* chore: Add some more entity vars

Signed-off-by: ByteExceptionM <git@byteexception.eu>

* chore: Rename method

Signed-off-by: ByteExceptionM <git@byteexception.eu>

* chore: Code cleanup

Signed-off-by: ByteExceptionM <git@byteexception.eu>

* chore: Code reformat

Signed-off-by: ByteExceptionM <git@byteexception.eu>

* chore: Change iterator removal

Signed-off-by: ByteExceptionM <git@byteexception.eu>

* Comply with checkstyle

---------

Signed-off-by: ByteExceptionM <git@byteexception.eu>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-02-09 20:51:59 +01:00
renovate[bot]
84567bcb00
Update dependency com.diffplug.spotless to v6.14.1 (#3957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-06 12:48:30 +01:00
Traks
d7c2ab1d16
Make farmland keep its moisture (#3952)
Handle MoistureChangeEvent for farm land
2023-01-31 11:22:13 +01:00
renovate[bot]
0d359ade0c
Update dependency com.diffplug.spotless to v6.14.0 (#3950)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-28 19:21:35 +01:00
renovate[bot]
ffbec24290
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.23 (#3948)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-24 22:35:15 +01:00
Alexander Brandes
ab357deb48
Put more legacy web interface deprecations in place 2023-01-23 13:40:35 +01:00
Alexander Brandes
6130c3dfa5
Clarify 2D biome deprecation 2023-01-23 13:28:05 +01:00
Alexander Brandes
5787588500
Move BukkitPlotGenerator#generateChunkData() deprecation from v7 to v6 2023-01-23 13:18:20 +01:00
Alexander Brandes
b40383b5a4
Back to snapshot for development 2023-01-23 12:33:51 +01:00
Alexander Brandes
be8903128d
Release 6.10.9 2023-01-23 12:28:33 +01:00
Alexander Brandes
08800ec16d
Cleanup deperecated WorldEdit met
Co-authored-by: Matthew Kaulfers <42121989+mkaulfers@users.noreply.github.com>
2023-01-22 11:26:07 +01:00
Alexander Brandes
83e274ff9f
Revert "PS-3908: Cleanup deprecated methods to improve code maturity. (#3944)"
This reverts commit 0dd8b1053cfac7b137dc04e254dbe0582d77a6d3.
2023-01-22 11:21:01 +01:00
Matthew Kaulfers
0dd8b1053c
PS-3908: Cleanup deprecated methods to improve code maturity. (#3944)
https://github.com/IntellectualSites/PlotSquared/issues/3908
2023-01-22 00:02:15 +01:00
Alexander Brandes
0558fcf5d5
Provide full verbosity for invalid components 2023-01-21 22:27:20 +01:00
Jordan
c45bbe3ec5
fix: ensure plots are fully unlinked before the clear itself is run (#3933)
* fix: ensure plots are fully unlinked before the clear itself is run

* Update Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-01-19 09:01:06 +01:00
Jordan
07e598e48f
fix: account for exclusivity of max build height where requires (#3935) 2023-01-16 21:15:35 +00:00
Jordan
f6f00dfcda
fix: Remove chunk#isLoaded call in BukkitChunkCoordinator (#3934) 2023-01-16 17:14:20 +00:00
Alexander Brandes
63a6bdc1d6
Terminate process if .git folder is not a repository (#3937)
Terminate process if folder is not a repository
2023-01-16 00:18:51 +01:00
Alexander Brandes
abbac057ed
Default to unix line endings (#3932)
* Default to unix line endings

* Respect preconfigured settings
2023-01-15 17:54:52 +01:00
Alexander Brandes
c978322036
Separate workflows between PRs and pushes (#3928)
* Separate workflows between PRs and pushes

* Fixup
2023-01-15 14:10:41 +01:00
Jordan
39d2f1a72c
chore: remove uses of deprecated Permissions class and add javadoc notes (#3930)
- Closes #3907
2023-01-15 14:08:59 +01:00
renovate[bot]
86919b8841
Update dependency com.diffplug.spotless to v6.13.0 (#3929)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-15 10:28:43 +01:00
Hannes Greule
00722bc463
Reduce /plot home overhead (#3921)
* Add JFR events

* Replace global connected plots cache with local cache

* Simplify isOwner check

* Avoid extensive hashing of plots

* Clear caches in more cases

* Revert "Add JFR events"

This reverts commit 78c107f1
2023-01-14 00:27:09 +01:00
renovate[bot]
6a34a1996f
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.22 (#3918)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 22:28:58 +01:00
Alexander Brandes
1d201b04ba
chore: Update a few deprecations (#3913) 2023-01-13 17:48:13 +01:00
Alexander Brandes
e887a59158
Officially deprecated BukkitPlayer#BukkitPlayer() (#3922)
* Officially deprecated BukkitPlayer#BukkitPlayer()

* Address review feedback
2023-01-12 10:03:11 +01:00
renovate[bot]
d1b8f652a7
Update dependency org.junit.jupiter:junit-jupiter to v5.9.2 (#3923)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-11 22:16:12 +01:00
Alexander Brandes
4aa7bc51bc
Include missing javadoc option 2023-01-11 22:11:11 +01:00
Alexander Brandes
0f0030916f
Add source documentation to javadocs and add dependency tab (#3917)
Get the most out of javadocs
2023-01-11 18:25:51 +01:00
Alexander Brandes
bbf1e4fe61
Back to snapshot for development 2023-01-09 15:53:19 +01:00
Alexander Brandes
febac6fa40
Release 6.10.8 2023-01-09 15:43:51 +01:00
Alexander Brandes
99ee8a780d
Back to snapshot for development 2023-01-09 15:40:32 +01:00
Alexander Brandes
577a0d8ed9
Unstage 6.10.7 2023-01-09 15:28:31 +01:00
Alexander Brandes
02ae14894a
Stage 6.10.7 2023-01-09 15:23:50 +01:00
Alexander Brandes
78dbe7fbbc
Back to snapshot for development 2023-01-09 11:41:59 +01:00
Alexander Brandes
669293566b
Release 6.10.6 2023-01-09 11:41:12 +01:00
Alexander Brandes
707c7be5bd
Remove unused editorconfig rules (#3915) 2023-01-09 10:26:05 +01:00
Alexander Brandes
becd8c4eaf
Replace licenser with spotless (#3914) 2023-01-08 23:16:40 +01:00
Hannes Greule
339ca8e30f
Fix wrong plot id calculation for negative coordinates (#3898) 2023-01-04 12:35:12 +01:00
Alexander Brandes
742d78a505
Add 1.19.3 to the issue template 2022-12-23 13:41:58 +01:00
Hraponssi
120bf37196
Fix dispensers loading Legacy Material Support (#3894)
Fixes https://github.com/IntellectualSites/PlotSquared/issues/3883
2022-12-23 09:08:38 +00:00
renovate[bot]
2a40a6b35e
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.21 (#3890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-13 22:45:51 +01:00
renovate[bot]
ea1f35b45a
Update dependency cloud.commandframework:cloud-services to v1.8.0 (#3891)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-13 22:44:29 +01:00
renovate[bot]
15e63378a7
Update worldedit to v7.2.13 (#3889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-11 08:39:32 +01:00
Jordan
f3bc504a6f
refactor: adjust specific Nullable annotations used (#3869) 2022-12-02 12:39:38 +00:00
renovate[bot]
3a8fae47a0
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.20 (#3882)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-28 15:23:44 +01:00
Alexander Brandes
70cb1cd100
Back to snapshot for development 2022-11-28 11:18:56 +01:00
Alexander Brandes
2067cc1670
Release 6.10.5 2022-11-28 11:18:06 +01:00
renovate[bot]
e6338976dd
Update dependency gradle to v7.6 (#3880)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-25 19:20:37 +01:00
Jordan
90ebd5d5ed
feat: add a permission to override-allow a merge if the other plot's owner is offline (#3844) 2022-11-25 10:48:33 +00:00
Alexander Brandes
c973ee8649
Revert "feat: check merge limits when completing auto-merge (#3868)" - Fixes a bug in 6.10.4 (#3876)
Revert "feat: check merge limits when completing auto-merge (#3868)"

This reverts commit 25ce7a83f134921c1fc2c69f5d92ecb23edf1761.
2022-11-20 10:58:04 +01:00
Jordan
c1543f034c
feat: improve handling of null issues in plot analysis (#3867) 2022-11-17 17:23:44 +00:00
renovate[bot]
6baf339ecb
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.19 (#3874)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-16 18:35:03 +01:00
Alexander Brandes
11906ef1c9
Back to snapshot for development 2022-11-16 11:30:23 +01:00
Alexander Brandes
ee8902154a
Release 6.10.4 2022-11-16 11:26:03 +01:00
Jordan
b5bc1988e5
feature: implement road flags as widely as seems reasonable (#3870)
* feature: implement road flags as widely as seems reasonable
 - Closes #3047
 - Any further road flag implementations would be very specific from what I can gather, and thus the gist of #3047 is now implemented

* Add javadoc since tag

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

* Create util class for method

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-11-15 19:07:38 +01:00
Jordan
2147012beb
chore: deprecate paper 1.13 listener as P2 effectively doesn't support 1.13 (#3872) 2022-11-14 22:58:05 +01:00
Jordan
52bb561689
fix: attempt to recover from IllegalStateException when restoring block tags (#3838)
- Fixes #3801
2022-11-14 16:47:24 +01:00
Jordan
25ce7a83f1
feat: check merge limits when completing auto-merge (#3868)
- Closes #3748
2022-11-13 11:57:41 +01:00
Jordan
55c8a590e7
Fix item thrower/owner can be null (#3866)
fix: item thrower/owner can be nuill
 - Fixes #3862
2022-11-12 17:10:21 +01:00
renovate[bot]
28bd993680
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.18 (#3864)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-06 11:13:29 +01:00
Alexander Brandes
8330f37d8a
Back to snapshot for development 2022-11-02 09:35:57 +01:00
Alexander Brandes
985fae65b6
ÂRelease 6.10.3 2022-11-02 09:34:33 +01:00
Jordan
db2d590e8e
fix: account for mismatched road-schematic heights (#3854) 2022-10-23 21:22:21 +02:00
renovate[bot]
c8d356783a
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.17 (#3853)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-20 10:23:56 +02:00
Alexander Brandes
4947450ff0
Back to snapshot for development 2022-10-18 23:14:03 +02:00
Alexander Brandes
de4e91ff62
Release 6.10.2 2022-10-18 23:12:27 +02:00
Pierre Maurice Schwang
fe5e3d5f6d
Annotate ExpireManager with @Inject (#3852)
fix: annotate ExpireManager with @Inject
2022-10-18 10:17:34 +02:00
michizhou
b8b3098022
feat: Move ExpireManager to Guice by removing legacy IMP references (#3845)
* feat: Move ExpireManager to Guice by removing legacy IMP references

* Mark ExpireManager IMP as deprecated and add comments

* Add import for PlotPlatform for function reference

* Add ExpireManager instance call and optimize performance
2022-10-17 09:31:48 +02:00
renovate[bot]
0ae8fc46b8
Update dependency com.github.spotbugs:spotbugs-annotations to v4.7.3 (#3851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-17 09:24:42 +02:00
Alexander Brandes
e0762f63a8
chore: Replace paper reference in favor of bom 2022-10-15 16:04:30 +02:00
Jordan
9f3850000c
fix: adjust nullability checks for shulkers in the kill road mobs task (#3842)
- Fixes #3789
2022-10-15 15:26:14 +02:00
BlockyTheDev
76c6be9ba7
Fix 'No resource for locale 'lang' found ' error (#3830)
* Fix #3820

* Reword message and add link to completed translations

* Fix #3820

* Reword message and add link to completed translations

* Add line breaks for better code readability

* Add line breaks for better code readability

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-10-13 19:19:20 +02:00
Jordan
308a5aa781
Ensure all setBlock methods in BlockArrayCacheScopedQueueCoordinator apply the correct offset (#3843)
- Fixes #3783
2022-10-13 19:17:27 +02:00
Hannes Greule
e244527538
Make more complex patterns work correctly (#3847)
allow more complex patterns to work correctly
2022-10-13 19:16:19 +02:00
Jordan
11dd013333
fix: Adjust schematic height logic when pasting and actually set air as well (#3840) 2022-10-13 16:46:29 +01:00
Pierre Maurice Schwang
b740d5854c
Support MiniMessage in plot-title flag (#3835) 2022-10-10 17:41:35 +01:00
BlockyTheDev
d5445cfbef
Don't kill owned road entities (leashed / named) (#3829) 2022-10-10 17:41:25 +01:00
Alexander Brandes
3effaefda7
chore: Announce releases on Discord (#3839) 2022-10-09 16:40:51 +02:00
Hannes Greule
49b19e0eaf
Check proper locations on PortalCreateEvent (#3834)
check proper locations on PortalCreateEvent
2022-10-08 15:13:11 +02:00
Hannes Greule
caef3a923b
Deprecate PlotId#copy (#3821) 2022-10-08 14:11:16 +01:00
BlockyTheDev
d4c3ceaf2b
Move license into jar during compile process (#3826) 2022-10-08 14:10:57 +01:00
renovate[bot]
25e6aecf13
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.16 (#3825)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-04 22:54:56 +02:00
Alexander Brandes
33c11fdee9
Back to snapshot for development 2022-10-04 19:31:27 +02:00
Alexander Brandes
316dd92667
Release 6.10.1 2022-10-04 19:30:44 +02:00
StealWonders
e53d2ac449
Update the plot sign when a plot has been purchased (#3822) 2022-10-03 21:51:17 +02:00
StealWonders
5786e8cc7a
refactor: replace guava's Iterables with Java's stream API (#3823) 2022-10-03 21:51:05 +02:00
Pierre Maurice Schwang
1b717c9b10
Only show visible players in /plot near (#3819)
feat: check visibility of player in `/plot near`
2022-10-03 21:50:41 +02:00
Hannes Greule
35abae99ca
Improve feedback for invalid patterns (#3818)
improve feedback for invalid patterns
2022-10-02 22:22:08 +02:00
Schuwi
d1a85982fb
Fix "set block timer" error after "/plot download" with legacy-webinterface setting (#3812)
Add missing `Plot.removeRunning` call to Download
2022-10-01 11:37:24 +02:00
resi23
3446b913cd
plots.auto.mega fix for #3815 (#3816)
Co-authored-by: Resi <unconfigured@null.spigotmc.org>
2022-09-28 10:53:44 +02:00
renovate[bot]
8b8fd6aab7
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.15 (#3809)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-22 22:26:11 +02:00
Alexander Brandes
520bb64eca
Back to snapshot for development 2022-09-21 16:29:17 +02:00
Alexander Brandes
60d266b2d7
Release 6.10.0 2022-09-21 16:28:17 +02:00
Hannes Greule
8deeef4f7d
Add allay to animals (#3788)
add allay to animals
2022-09-21 16:18:34 +02:00
resi23
9b0b071c0c
Add GLOW_BERRIES to VineGrowFlag (#3803) 2022-09-21 16:18:18 +02:00
renovate[bot]
81a3f1098d
Update dependency org.junit.jupiter:junit-jupiter to v5.9.1 (#3807)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-21 16:18:08 +02:00
renovate[bot]
efc248dcdb
Update dependency com.intellectualsites.bom:bom-1.18.x to v1.14 (#3794)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-12 11:19:07 +02:00
DerEingerostete
476f3d328d
feature: add flag for beacon effects of other plots (#3627)
* feature: add flag for beacon effects of other plots

Took 7 minutes

* fix: don't add the beacon effect flag if the platform is not paper

Took 2 minutes

* fix: creating consistency in documentation

Took 7 minutes

* feature: add global paper setting for the beacon-effect

* fix: description of the plot flag and rewrite of the listener

* fix: renamed flag and added road support

* fix: renamed flag and changed flag functionality

* fix: added spigot fallback listener and fixed NPE

* refactor: Address checkstyle violations

* addition: remove beacon effects when player leaves a plot

* fix: updated javadoc and fixed usage of the PlotListener#addEffect method

* chore: Run license updater

Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-09-05 20:06:37 +02:00
renovate[bot]
69f5f88183
Update dependency com.github.spotbugs:spotbugs-annotations to v4.7.2 (#3793)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-05 09:40:41 +02:00
Alexander Brandes
6df63f7fc7
Invoke -parameters on compile time (#3787)
chore: Invoke -parameters on compile time
2022-09-03 12:55:55 +02:00
renovate[bot]
295b8a0135
Update dependency cloud.commandframework:cloud-services to v1.7.1 (#3784)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-27 09:32:40 +02:00
renovate[bot]
fcc5bc5473
Update dependency net.essentialsx:EssentialsX to v2.19.7 (#3780)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-24 09:56:33 +02:00
Alexander Brandes
408b834376
[ci skip] chore: Add renovate schema URL 2022-08-20 15:31:51 +02:00
Pierre Maurice Schwang
986812b9e4
chore: make snow set more future-proof (#3768) 2022-08-19 13:41:04 +02:00
renovate[bot]
8d4333ad9d
fix(deps): update dependency net.essentialsx:essentialsx to v2.19.6 (#3770)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-13 10:12:05 +02:00
renovate[bot]
9ff9097ff9
fix(deps): update dependency net.essentialsx:essentialsx to v2.19.5 (#3767)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-12 14:13:42 +02:00
renovate[bot]
1ef424a2f1
fix(deps): update dependency com.intellectualsites.bom:bom-1.18.x to v1.13 (#3766)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-10 16:52:47 +02:00
Alexander Brandes
9fd96dbaa2
build: Back to snapshot for development 2022-08-10 11:10:41 +02:00
Alexander Brandes
b0a4e11c46
build: Release 6.9.4 2022-08-10 11:09:51 +02:00
Hannes Greule
77bce43ace
fix: replace usages of snow tag (#3758)
* replace usages of snow tag

* powder snow is 1.17+
2022-08-10 11:03:20 +02:00
Pierre Maurice Schwang
cba1927cc7
Items no longer despawn on road when natural_mob_spawning = true and kill-road-items = false (#3764)
* fix: handling of item despawning on road

* chore: de-duplicate check

* chore: check in PaperListener for consistency
2022-08-10 10:22:19 +02:00
Hannes Greule
3d19c5c2ad
perf: avoid quadratic overhead for UUID collection (#3749)
avoid quadratic overhead for UUID collection
2022-08-08 12:50:22 +02:00
Hannes Greule
e0eff15694
fix: use correct uuid type in /grant (#3759)
use correct type
2022-08-07 21:19:01 +02:00
renovate[bot]
0bdeeea83b
fix(deps): update worldedit to v7.2.12 (#3762)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-07 21:16:18 +02:00
Alexander Brandes
6f96daae56
Update bug_report.yml 2022-08-06 13:49:25 +02:00
renovate[bot]
d1021d19da
chore(deps): update dependency gradle to v7.5.1 (#3761)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-06 13:49:01 +02:00
renovate[bot]
ee589ac7f0
fix(deps): update worldedit to v7.2.11 (#3750)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-31 15:58:38 +02:00
Traks
3b747ffecf
Don't allow wall corals to dry (#3746) 2022-07-29 23:00:55 +02:00
Alexander Brandes
4e5a2b9f96
fix: Add user friendly message for creationdate placeholder (#3745) 2022-07-29 23:00:37 +02:00
Alexander Brandes
aeb4350ccb
Update bug_report.yml 2022-07-29 19:01:35 +02:00
renovate[bot]
9609990832
build: Update dependency com.intellectualsites.bom:bom-1.18.x to v1.12 (#3739)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-26 22:47:51 +02:00
renovate[bot]
0e4319b757
build: Update dependency org.junit.jupiter:junit-jupiter to v5.9.0 (#3741)
* build: Update dependency org.junit.jupiter:junit-jupiter to v5.9.0

* Update renovate.json

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-07-26 22:47:25 +02:00
Alexander Brandes
c8f4907f77
build: Back to snapshot for development 2022-07-25 21:11:35 +02:00
Alexander Brandes
dcf98c2298
build: Release 6.9.3 2022-07-25 21:10:39 +02:00
Hannes Greule
ae59c7442f
fix: improve handling of missing message files (#3718)
* improve handling of missing message files

* fix javadoc

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-07-25 21:02:54 +02:00
Jordan
98708118d8
Deprecate the static Permissions "util" class that is almost entirely superseded by methods in PermissionHolder instances themselves (#3695)
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-07-24 15:55:43 +02:00
Bernhard
276d8f8e1e
change message of /p remove <player> if player does not need to be removed (#3734)
refactor: change message of `/p remove <player>` if unnecessary
2022-07-24 10:32:29 +02:00
renovate[bot]
87f89541b5
build: Update dependency com.intellectualsites.bom:bom-1.18.x to v1.11 (#3726)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-15 10:04:01 +02:00
renovate[bot]
93f6de7029
build: Update dependency gradle to v7.5 (#3727)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-15 10:03:27 +02:00
renovate[bot]
73d2686b17
build: Update dependency com.intellectualsites.bom:bom-1.18.x to v1.10 (#3723)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-06 00:14:20 +02:00
Alexander Brandes
c446a95b07
build: Back to snapshot for development 2022-07-05 22:26:52 +02:00
Alexander Brandes
3676e1df35
build: Release 6.9.2 2022-07-05 22:25:57 +02:00
Alexander Brandes
12e2705260
Revert #3681 (#3722)
Revert "Adjust schematic height logic when pasting and actually set air as well (#3681)"

This reverts commit 08ce4c872c0f7a95e1106a4f2ee6030ee92f4de0.
2022-07-05 15:02:25 +02:00
renovate[bot]
31e777a03a
build: Update dependency me.clip:placeholderapi to v2.11.2 (#3720)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-04 14:07:14 +02:00
Alexander Brandes
7f436c405b
fix: Don't fail post processing compilation on non-ascii charmap (#3719) 2022-07-03 14:58:17 +02:00
Traks
4d4d2ab087
Ignore cancelled projectile launch events (#3709) 2022-06-28 21:15:09 +02:00
dordsor21
91017acce4
Realistically only need the "highest" y level of adding overlay block errors 2022-06-27 17:41:47 +01:00
renovate[bot]
e90fd231d9
build: Update dependency com.github.spotbugs:spotbugs-annotations to v4.7.1 (#3714)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-27 17:00:13 +02:00
Alexander Brandes
cd9f0789de
build: Update bom to 1.9 2022-06-27 16:47:32 +02:00
Alexander Brandes
5f4c8d92df
build: Back to snapshot for development 2022-06-27 14:57:32 +02:00
Alexander Brandes
263cb47a21
build: Release 6.9.1 2022-06-27 14:56:44 +02:00
Traks
005600c99e
Show old flag value in remove command (#3711) 2022-06-27 13:31:45 +02:00
NotMyFault
26bec7fe2f
style: Address javadoc violations 2022-06-26 11:18:33 +02:00
Jordan
f4b886d977
Minor cleanup of the plot analyze code (#3708)
- No need to wrap the final analysis into another async method. It's already contained in an async task
 - Don't overstretch a chunk bounday when setting blocks to newBlocks array
2022-06-23 19:18:29 +02:00
Traks
c09d0d882e
Use single PlotListener instance (#3704) 2022-06-22 12:50:56 +01:00
Traks
312cb2996c
Better handling of offline projectile shooters (#3705) 2022-06-22 12:50:46 +01:00
Jordan
f218902581
Implement build height limits into more events (#3691)
* Implement build height limits into more events

* Implement util method to check if y is within world build limits

* Extract duplicate player-build-height-checking to plot area
 - Extract to core module to allow any possible future platforms to access the method, as they will always duplicate

* Add code tag to javadoc

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

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-06-21 19:09:29 +02:00
Alexander Brandes
f27009216c
chore: Replace AnnotationHelper class (#3706) 2022-06-21 19:09:17 +02:00
renovate[bot]
dda52ebc2e
build: Update dependency cloud.commandframework:cloud-services to v1.7.0 (#3701)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-20 10:47:49 +02:00
Alexander Brandes
9ac8d38bab
chore: Remove checkerframework from gradle libs
Closes #3700
2022-06-20 10:43:43 +02:00
Hannes Greule
6a54328f7d
refactor: replace usages of switch over keyed enums (#3673) 2022-06-19 00:59:43 +01:00
Alexander Brandes
7279862def
docs: Publish javadocs to GH actions (#3686)
* docs: Publish javadocs to GH actions

* chore: Use updated URL

* chore: Use correct URL
2022-06-17 23:40:29 +02:00
Jordan
08ce4c872c
Adjust schematic height logic when pasting and actually set air as well (#3681) 2022-06-17 15:39:41 +01:00
Jordan
2b0c5b1e21
Reset wall filling on clear (#3680)
- Implements #3591
2022-06-16 16:22:27 +02:00
Alexander Brandes
3d5c694daa
chore: Comply with OSSRH licensing guidelines (#3684) 2022-06-15 20:17:17 +02:00
Schuwi
d153232969
Fix maximum plot number check in /plot continue counting the current plot twice (#3674)
Fix max plot restriction check in continue command

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-06-13 23:44:56 +02:00
Alexander Brandes
bb0aa8d5cc
fix: Don't publish root directory to maven repository (#3676)
* fix: Don't publish root directory (Fixes #3647)

* fix: More investigations

* fix: Exclude task 'jar' from root project

* chore: Keep group ID in the root scope
2022-06-13 15:23:12 +02:00
renovate[bot]
d69f3b0893
build: Update dependency com.intellectualsites.bom:bom-1.18.x to v1.5 (#3677)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-13 11:38:28 +02:00
Alexander Brandes
565838ad43
[ci skip] chore: Update renovate excludes (Closes #3678) 2022-06-13 11:36:46 +02:00
Alexander Brandes
8b52461271
build: Back to snapshot for development 2022-06-13 11:25:07 +02:00
Alexander Brandes
d08381dfed
build: Release 6.9.0 2022-06-13 11:23:48 +02:00
Jordan
b6c45f2df3
Add an on-complete task to PlotArea#mergePlots (#3671)
* Add an on-complete task to PlotArea#mergePlots

* Fix typo
2022-06-13 09:06:01 +02:00
Jordan
b9479405e1
Ensure forceSync is provided when constructing chunk coordinators (#3657)
* Ensure forceSync is provided when constructing chunk coordinators

* Re-add old factory create method and deprecate for removal

* Remove old create method that Guice doesn't like
2022-06-12 10:47:43 +02:00
Jordan
a238ff19bf
Implement tile entities to generation using Populators (#3665)
* Implement tile entities to generation using Populators
 - Fixes #3051

* Javadocs

* Don't do the big error if heads don't work

* Address comments regarding javadocs/comments

* Ensure Location is still sealed, and add api description annotation to public methods in UncheckedWorldLocation

* Clean up HybridGen
 - There's no need for while loops acting as a modulo after we've already performed a modulo
 - Make the code-sections calculating if positions are in the wall/road more readable
 - Collaps duplicate if-elseif bodies

* Better exception handling when setting data to LimitedRegion during chunk population

* Address comments

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

* Better naming for "legacy" block state populator

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-06-12 10:47:25 +02:00
Alexander Brandes
c93b08d0c7
feat: Add 1.19 music disk to the /plot music GUI (#3668)
feat: Add 1.19 music disk to the GUI
2022-06-12 10:47:00 +02:00
Alexander Brandes
1470b7117a
chore: Add tadpole buckets to the list of dispensable items (#3669)
chore: Add tadpole buckets to the list of disposables

Signed-off-by: Alexander Brandes <mc.cache@web.de>
2022-06-12 10:46:21 +02:00
Alexander Brandes
7cbc67f4fc
chore: Fix typo 2022-06-11 17:14:51 +02:00
Alexander Brandes
0a76bbb2b0
Update README.md 2022-06-11 17:14:05 +02:00
Alexander Brandes
09cc59a1c1
docs: Unify WE, P2 and Fawe abbreviations (#3672) 2022-06-11 16:16:06 +02:00
Jordan
bf646be482
Only load world cofigurations if WorldEdit has fully enabled (safe to do) (#3666)
* Only load world cofigurations if WorldEdit has fully enabled (safe to do)
 - Fixes #3664

(cherry picked from commit f2e1e99be3b4f1fd5ce00e32ea7773dd4d1855aa)

* Fix imports

* QueryCapability is effectively a "dumb" method

* Update Core/src/main/java/com/plotsquared/core/PlotSquared.java

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-06-10 16:52:17 +02:00
Alexander Brandes
cc7e17960b
docs: Add 1.19 to issue template 2022-06-10 13:42:09 +02:00
Bernhard
3c75b170f0
fix: mob cap counting for each connected plot individually (#3643)
cap meta is now handled in the base plot
2022-06-10 01:27:39 +02:00
dordsor21
a79c474957
Deprecate methods for removal that will be removed/had their signatures changed in v7 2022-06-09 13:49:58 +01:00
Alexander Brandes
4bb480a238
chore: Update Code of conduct email (#3661) 2022-06-09 12:58:31 +02:00
Alexander Brandes
9ffa935c0c
build: Switch to bill of materials (#3653)
* build: Switch to managed dependencies

* build: Move bom to root build script

* build: Update bom

* Update build.gradle.kts

* fix: Use the correct bom version
2022-06-09 12:57:37 +02:00
Bernhard
0a32268784
Prevent blocks moving/generating below and above build height (#3641)
* fix: cancel BlockFormEvent outside of build limit

* refactor: rename variables for easier readability

* fix: cancel liquid flow outside build limit

* refactor: implement to/from context
2022-06-05 20:51:07 +02:00
Alexander Brandes
ae3b8c06f6
chore: Address Paper javadoc warnings (#3648) 2022-06-05 20:50:49 +02:00
Alexander Brandes
713c4ad0d2
Remove aggregation of cross module javadocs (#3646)
chore: Don't aggregate javadocs anymore
2022-06-03 23:13:41 +02:00
NotMyFault
48386c0828
build: Back to snapshot for development 2022-06-01 20:12:50 +02:00
NotMyFault
625b3921e1
build: Release 6.8.1 2022-06-01 20:09:36 +02:00
Alexander Brandes
48aa37d173
Update Readme SVG (#3642)
docs: Update Readme SVG
2022-05-30 13:47:25 +02:00
Bernhard
2c2314e95c
refactor: return info.server for %plotsquared_currentplot_owner% if plot is a server plot (#3640) 2022-05-25 10:18:10 +02:00
Bernhard
5eb2fc3ad0
Kick players on merged plots appropriately (#3639)
fix: kick denied player regardless on all connected plots
2022-05-24 20:30:06 +02:00
renovate[bot]
82cd9a092c
build: Update fawe to v2.2.0 (#3637)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-24 13:33:54 +02:00
Alexander Brandes
62754362c2
build: Don't expose jcip and findbugs annotations to the world on runtime (#3533)
* build: Don't expose jcip and findbugs

* build: Revert relocation change of unpublished, shaded deps

* chore: Exclude .DS_Store files
2022-05-21 10:01:06 +00:00
BlockyTheDev
2e9dfd6f6f
chore: Update PaperMC repository endpoint (#3633)
Migration - New PaperMC endpoints
2022-05-21 07:57:22 +02:00
Alexander Brandes
fc9fe1462f
build: Back to snapshot for development 2022-05-18 22:07:22 +02:00
Alexander Brandes
41f546ca6b
build: Release 6.8.0 2022-05-18 22:05:31 +02:00
Alexander Brandes
d037da33cb
chore: Ignore .DS_Store files 2022-05-18 21:59:09 +02:00
renovate[bot]
dc2d08c67e
build: Update release-drafter/release-drafter action to v5.20.0 (#3624)
* build: Update release-drafter/release-drafter action to v5.20.0

* Update release-drafter.yml

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-05-18 17:19:23 +02:00
Jordan
96dfc27411
Fix lag caused when generating augmented worlds with roads (#3614)
- Begin by implementing forceSync to the queue system as we know the chunk will be accessible to edits in some cases (i.e. population).
 - Also implement custom SideEffectSets to override any decided by the default chunk consumer, as we do NOT want to update neighbours in population (this caused infinite generation to be required causing the lag and server death). We also do not want to enqueue the QueueCoordinator in AugmentedUtils as this would write to the world and update neighbours before we might want to (plus it's just used to restrict and offset the blocks being set)
 - Then implement disabling any biomes from being saved/set to the queue to prevent augmented worlds having their biomes overridden in roads
 - Consequently fix ScopedQueueCoordinator, preventing the y value of blocks being set from needlessly being changed, fixing road heights in augmented worlds
 - Finally we do not need a method with chunkObject in the signature in AugmentedUtils as this is no longer used by the method
2022-05-16 13:27:41 +01:00
Jordan
171d2e5e99
Fix generation of augmented/partial worlds when single worlds are enabled (#3615) 2022-05-16 13:21:43 +01:00
Bernhard
4433892431
fix: Block Endermites from spawning if mob spawning is disabled (#3623) 2022-05-16 13:20:03 +01:00
Jordan
98a07dad1b
Fix plot analysis (#3618)
* Fix plot analysis
 - Stop using deprecated ChunkQueueCoordinator and create a new purpose-built coordinator
 - Generation is chunk-by-chunk thus the old blocks cache needs to be filled accordingly
 - Remove the **four** System#gc calls
 - Fixes #3464
 - Fix really weird dumb... maths? in ExpiryTask
 - Fixes #3600

* Add since annotation

* Address comments and maxY should be inclusive

* Annotate new queue as internal use only
2022-05-15 11:58:04 +02:00
Jordan
0ffa22b7a6
Deprecations to Queues (#3613)
* Deprecations and niceties
 - Deprecate ScopedQueueCoordinator as it is poorly named
 - Deprecate ChunkQueueCoordinator for complete removal as it is poorly designed (though still used)

* Add since tags
2022-05-15 11:57:26 +02:00
Jordan
60a0129fe9
Correctly use yIndex when regenerating plots in certain world configurations (#3601)
- Fixes #3597
2022-05-15 11:42:19 +02:00
Hannes Greule
d5f8a0842b
make y location of homes always absolute part 2 (#3620) 2022-05-13 15:46:52 +02:00
Jordan
f7d55ce105
Implement restoring tags directly using a supplied block (#3616)
- Reduces overhead when setting blocks via fallback
 - Also means blocks will not be accessed via world when they should be access via chunk (https://github.com/IntellectualSites/PlotSquared/pull/3612)
2022-05-11 13:12:19 +01:00
Bernhard
85911646f3
Add ability to disable random Mojang uuid API calls (#3586)
* feature: ability to disable impromtu Mojang uuid API calls

* refactor: update comment for the new setting
2022-05-11 13:11:57 +01:00
Jordan
8b75dece69
Implement chunkObject into queueing (#3612) 2022-05-11 13:11:38 +01:00
Bernhard
7d6e515ba8
Improvements to /plot list command (#3585)
* refactor: list command shows owner better
added check for:
- unknown owners (UUID not cached/invalid)
- server plots
- plots owner by everyone

* fix: show correct color in list command if plot is owned by everyone

* refactor: improved List command for server plots

(cherry picked from commit fed700f0d8d20b0c53e7767b3b4bf04c40f9a9b5)

* refactor: removed duplicate code

* refactor: renamed placeholders to reflect their use

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-05-10 09:50:27 +02:00
dordsor21
13d7357c85
Niceties
- Better ordering of augmented information printed to consol on startup
 - Override
2022-05-10 01:43:01 +01:00
renovate[bot]
16e26b910c
build: Update dependency com.github.spotbugs:spotbugs-annotations to v4.7.0 (#3606)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-09 13:53:59 +02:00
Alexander Brandes
faadebd30e
chore: Update my name (#3599) 2022-05-07 15:56:24 +02:00
Alexander Brandes
2aeacb3dcf
build: Back to snapshot for development 2022-05-05 10:07:58 +02:00
Alexander Brandes
9db7791835
build: Release 6.7.0 2022-05-05 09:58:14 +02:00
Bernhard
f49ddb819d
Add Plot flag for projectiles (#3581)
* feature: add flag for projectiles

* build: add License to ProjectilesFlag.java

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-05-04 23:21:24 +02:00
renovate[bot]
d71c62771e
build: Update dependency org.checkerframework:checker-qual to v3.22.0 (#3595)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 09:58:14 +02:00
Traks
a6aaa9538f
Set plot biome chunk by chunk (#3590)
* Actually set plot biome chunk by chunk

* Better variable name for chunk position
2022-04-30 14:16:58 +02:00
renovate[bot]
0974fb2834
[ci skip] build: Update com.fastasyncworldedit to v2.1.2 (#3588)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-25 16:56:30 +02:00
renovate[bot]
8982b33b6c
build: Update github/codeql-action action to v2 (#3589)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-25 15:59:30 +02:00
Alexander Brandes
a7b3b3b7df
build: Back to snapshot for development 2022-04-19 08:50:50 +02:00
NotMyFault
888bb20e78
build: Release 6.6.3 2022-04-19 08:45:44 +02:00
Hannes Greule
b11bb6fa22
make y location of homes always absolute (#3568) 2022-04-19 00:48:51 +02:00
Alexander Brandes
e5764b958d
build: Replace jsr305 with spotbugs (#3576) 2022-04-19 00:48:23 +02:00
Alexander Brandes
bfe3141ff1
style: Emphasize project icon in idea selection (#3577) 2022-04-19 00:47:38 +02:00
Alexander Brandes
73c82deeb0
build: Switch back to upstream SquirrelID (#3575) 2022-04-19 00:46:39 +02:00
Pierre Maurice Schwang
38682ecff6
fix: share the QueueCoordinator in PlotModificationManager#unlinkPlot (#3571)
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-04-15 07:01:53 +00:00
Pierre Maurice Schwang
6a54dc7eff
fix: typo (MaxBuildHeight -> MinBuildHeight) (#3572) 2022-04-15 08:59:01 +02:00
Pierre Maurice Schwang
8454c29c91
fix: Make PlayerManager#resolveName blocking for entry title (#3556) 2022-04-11 14:38:02 +00:00
renovate[bot]
b2c9311a47
build: Update com.fastasyncworldedit to v2.1.1 (#3562)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-04 15:32:02 +02:00
renovate[bot]
c4aa497a2b
build: Update actions/setup-java action to v3.1.0 (#3563)
* build: Update actions/setup-java action to v3.1.0

* Update build.yml

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-04-04 15:31:53 +02:00
NotMyFault
c13f544390
build: Back to snapshot for development 2022-04-04 13:03:49 +02:00
NotMyFault
c28177d6af
build: Release 6.6.2 2022-04-04 12:56:13 +02:00
NotMyFault
8a80f252cf
chore: Fill in since TODOs 2022-04-04 12:54:42 +02:00
renovate[bot]
93571c72d1
build: Update dependency org.checkerframework:checker-qual to v3.21.4 (#3561)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-04 12:47:38 +02:00
renovate[bot]
6fd7379221
build: Update dependency gradle to v7.4.2 (#3560)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-04 12:46:49 +02:00
Hannes Greule
dc5c80d812
clean up PlayerCommandPreprocess listener (#3557) 2022-04-01 19:30:37 +02:00
Alexander Brandes
96e9a61e7c
refactor: Deprecate Load#secToTime() (#3558) 2022-04-01 19:30:11 +02:00
Jordan
b9bd9b81e6
Make confirm tasks synchronous. It was changed in 7ac3f7ca03e2ae6066b17aa101f4be82d0b541d2 (#3551) 2022-03-23 15:04:39 +01:00
renovate[bot]
ec77812879
build: Update com.sk89q.worldedit to v7.2.10 (#3554)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-21 11:49:34 +01:00
dordsor21
efc2083798 Change the default sign orientation to better match the wall location 2022-03-15 16:25:40 +00:00
dordsor21
3a6f845c01 Use correct field for unsaved in 1.18 2022-03-15 16:25:23 +00:00
NotMyFault
7efd42ae45
build: Ignore kyori updates until we update MM
Closes #3543
2022-03-14 20:09:52 +01:00
renovate[bot]
f43f4cbf5d
build: Update com.fastasyncworldedit to v2.1.0 (#3541)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-14 15:36:43 +01:00
renovate[bot]
104cc4b7a4
build: Update dependency net.essentialsx:EssentialsX to v2.19.4 (#3540)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-14 12:40:03 +01:00
renovate[bot]
218be43143
build: Update dependency gradle to v7.4.1 (#3539)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-14 12:39:46 +01:00
Jordan
308dba5601
Only add extent to WE operations once (#3537) 2022-03-10 22:40:09 +01:00
dordsor21
5f233bb5d1 Use new FAWE method including actor for schematic pasting 2022-03-09 16:31:33 +01:00
NotMyFault
5e188d114f
build: Misc dependency updates 2022-03-08 20:50:19 +01:00
NotMyFault
660e05d27f
build: Back to snapshot for development 2022-03-08 20:21:23 +01:00
NotMyFault
4c0ad148bf
build: Release 6.6.1 2022-03-08 20:15:16 +01:00
dordsor21
5c7bfb988c
Fix #3532 2022-03-08 18:14:19 +00:00
renovate[bot]
b46f486680
build: Update actions/checkout action to v3 (#3530)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 23:14:24 +01:00
renovate[bot]
05797d0c78
build: Update dependency org.checkerframework:checker-qual to v3.21.3 (#3528)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 20:55:39 +01:00
renovate[bot]
36ef2cf9ba
build: Update dependency net.essentialsx:EssentialsX to v2.19.3 (#3527)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 20:55:28 +01:00
NotMyFault
26ec31a012
build: Back to snapshot for development 2022-03-07 15:55:25 +01:00
NotMyFault
fd4a542062
build: Release 6.6.0 2022-03-07 15:35:00 +01:00
NotMyFault
dc13f2565f
ci: Pin GH workflow dependencies 2022-03-07 15:26:41 +01:00
Jordan
9f632af0ae
Implement extended world heights from Y-64 to Y319 #3473 (#3473)
* Begin to implement extended world heights:
 - Implemented in Bukkit module (and where required in Core module)

* Implement extended world heights into core module

* Add min gen height to setup,

* Default gen/build heights based on minecraft version

* Few fixes

* Fix up queues

* Address comments

* Make road schematic stuff slightly more efficient by sharing queues

* Minor fixes, don't overlay error many times for the same y

* Fix incorrect schematic paste height, undo changes to HybridUtils

* Overhall regenallroads method to make it work, make sure BukkitChunkCoordinator can/will finish

* Process chunks in order when regenerating all roads

* Address comments

* Address comments

* Ground level//bedrock is at min gen height
 - Add comment on == rather than <= being used
 - It's because it's only checking for the bedrock layer being broken if that's disabled

* Fix offset for min build height in SchematicHandler

* Better javadoc

Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>

* Address inclusivity issues for max world height

* Javadocs/comments/deprecation

* Use world min/max heights if present in QueueCoordinator

* Address some deprecations for regions and biome setting

* Add a count for chunks we're currently trying to load to not skip chunks at the end of a queue's edit

* Use minGenHeight + 1 rather than build height in AugmentedUtils

* Create utility method for layer index in GenChunk

* Correct height in HybridUtils, also use minGenHeight + 1

* Don't magically split to 128 height in regeneration

* Add utility methods for world height in QueueCoordinator

* Clean up ClassicPlotManager road creation/removal

* Start generation at min gen height if bedrock is disabled

* min gen height is set in PlotArea

* Add note on schem y normalisation

* Improve plot getVolume method readability

* Don't overly extend height when regenerating road region

* y index utility method in ChunknQueueCoordinator

* Layer index utility method in LocalChunk

* Use version min/max heights if world not present in QueueCoordinator

* Fix min -> max

* Don't allow players to modify outside build height when using plot set  / schematics.
 - Also fixes schematic height issues

* Remove debug

* Address comments

* Switch loadingChunks to AtomicInteger to be safe (in case of multi-threaded)

* Fix "security" issue that was already present

* Ensure sign isn't physicsed

Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
2022-03-05 19:03:39 +01:00
Alex
d698c6a1e5
[ci skip] Update issue templates for 1.18.2 2022-03-04 13:25:50 +01:00
renovate[bot]
40e1bd9897
build: Update dependency cloud.commandframework:cloud-services to v1.6.2 (#3522)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-01 16:31:40 +01:00
Hannes Greule
75f31c5bf6
Replace delombok-ed equals and hashCode methods (#3518)
* regenerate leftover delombok-ed equals and hashCode methods

* delegate to hashCode directly instead of single parameter calls
2022-02-27 18:51:37 +01:00
NotMyFault
954c813cef
build: Update gradle wrapper properly 2022-02-27 18:48:37 +01:00
Alex
05e055e9cf
ci: Bump actions/setup-java to 3.0.0 (#3519) 2022-02-25 22:43:24 +01:00
NotMyFault
2ea21c150f
build: Back to snapshot for development 2022-02-23 11:05:40 +01:00
NotMyFault
c2fd4edad5
build: Release 6.5.1 2022-02-23 11:00:45 +01:00
NotMyFault
78b8696778
refactor: Delete rebase.yml 2022-02-23 10:54:07 +01:00
Alex
e653961385
Fix shulkers teleporting on the road (#3501)
* fix: Don't teleport shulkers on the road

* Address comments
2022-02-16 13:48:20 +01:00
renovate[bot]
b21d12fd52
build: Update dependency net.luckperms:api to v5.4 (#3505)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-14 11:58:35 +01:00
Pierre Maurice Schwang
7557df96c7
Cancel block placement if the block consists of two block states (#3487)
* fix: cancel block placements out of area

* chore: use BlockMultiPlaceEvent

* chore: fix comment typo

* fix: max build height should be exclusive
2022-02-11 11:21:59 +01:00
NotMyFault
61797c3aff
build: Back to snapshot for development 2022-02-10 12:44:17 +01:00
NotMyFault
78125ff1e2
build: Release 6.5.0 2022-02-10 12:32:02 +01:00
Alex
d7c8715b25
Don't open the component GUI if the actor has no permission for a specific preset (#3496)
* fix: Handle an empty component GUI gracefully

* Address comments
2022-02-10 12:19:35 +01:00
Alex
34f005c244
Restore ability to use PlaceholderAPI in greeting and farewell flag (#3489)
Fixes #3465
2022-02-10 12:11:39 +01:00
Alex
6fbd1376ca
Don't enable presets with prices if economy is disabled (#3497) 2022-02-10 12:10:47 +01:00
Pierre Maurice Schwang
951767dc64
fix: synchronize confirmExpiry (#3481)
Prevents that the MetaDataAccess is closed before setting the data
2022-02-08 15:57:09 +01:00
Pierre Maurice Schwang
16928b05f1
Display "/plot help" categories only, if the player has permission to access these commands (#3490)
* feat: only show categories with access in help-menu

* chore: cleanup imports

* feat: tab complete should respect category permissions as well

* chore: cleanup imports again

* chore: rename ambiguous method name and update access modifier
2022-02-08 15:56:29 +01:00
renovate[bot]
fff14b05cb
build: Update release-drafter/release-drafter action to v5.18.1 (#3494)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-07 10:37:26 +01:00
renovate[bot]
e619c867e9
build: Update dependency org.checkerframework:checker-qual to v3.21.2 (#3493)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-07 10:34:53 +01:00
Pierre Maurice Schwang
543284e016
fix: NPE on unavailable music discs on lower versions (#3475)
* fix: NPE on unavailable music discs

* chore: documentation for InventoryUtil changes

* fix: no need for additional decrement

* chore: address requested changes

* fix: prevent binary mismatch

Co-authored-by: Alex <mc.cache@web.de>
2022-02-04 18:21:43 +01:00
NotMyFault
0d78ba5f35
[ci skip] ci: Don't run actions twice 2022-01-31 21:12:00 +01:00
NotMyFault
9ba2b62fc2
[ci skip] style: Restore GlobalFlagContainer's entry list being sorted alphabetically
Mostly helps me when updating the wiki
2022-01-31 15:50:44 +01:00
renovate[bot]
f10ee27fdd
build: Update dependency org.bstats:bstats-bukkit to v3 (#3486)
* build: Update dependency org.bstats:bstats-bukkit to v3

* build: Update bStats

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: NotMyFault <mc.cache@web.de>
2022-01-31 10:35:31 +01:00
renovate[bot]
3278ce1fe9
build: Update dependency com.intellectualsites.paster:Paster to v1.1.4 (#3485)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-31 10:24:16 +01:00
renovate[bot]
fefb0334bd
build: Update com.fastasyncworldedit to v2.0.1 (#3484)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-31 10:23:57 +01:00
Hannes Greule
d06a827e31
Always call plot events through the event dispatcher (#3479) 2022-01-29 13:12:00 +01:00
Alex
10bb520f3a
docs: Switch to generated wiki (#3482) 2022-01-29 00:12:54 +01:00
NotMyFault
126aa53b61
build: Back to snapshot for development 2022-01-27 14:00:51 +01:00
NotMyFault
ac71046feb
build: Release 6.4.0 2022-01-27 13:49:17 +01:00
Alex
7c290e6bd0
Align plugin's java version with API java version - Java 17 (#3468)
* refactor!: Align plugin's java version with API java version

* fix: Bump Guice to fix private injection on Java 17
2022-01-27 13:26:58 +01:00
Alex
4d297cc829
Separate linked javadocs per module (#3476)
* docs: Separate javadocs per module

* docs: Read javadoc version from Gradle version catalog
2022-01-27 13:26:27 +01:00
Alex
5ab410a5c5
fix: Don't ommit flag int input in no permission message (#3466) 2022-01-27 12:14:39 +01:00
Jordan
1f28bac955
Fix: Plot#getOwner can be nullable, and redstone may be present on unowned plots (#3472) 2022-01-27 12:14:16 +01:00
Pierre Maurice Schwang
92c54de5e9
fix: run whenDone on empty queue (#3474) 2022-01-27 12:13:55 +01:00
Alex
ff5d79699d
docs: Add @since annotation for v6 changes (#3471) 2022-01-24 21:46:01 +01:00
Alex
a0594c19ee
docs: Address dangling @see tags (#3469) 2022-01-24 21:43:35 +01:00
Alex
da41c136fe
docs: Unify true/false style in @return (#3470) 2022-01-24 21:41:54 +01:00
renovate[bot]
6a5859ee0f
build: Update release-drafter/release-drafter action to v5.17.6 (#3467)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-24 11:06:27 +01:00
Pierre Maurice Schwang
59e0b4b67a
feat: unknown owner(s) for plot expiry (#3452)
* feat: unknown owner(s) for plot expiry

* Sort plugins on `/plot debugpaste` alphabetically (#3447)

* feat: Sort plugins on debugpaste alphabetically

* Put (F[A])WE at the top

* feat: Add 1.18's music disc additions to `/plot music` (#3446)

* refactor: Prepare removal of our maven repository (#3451)

* Allow restoration of road schematic height calculation behaviour from pre 6.1.4 (#3444)

* refactor: Update SquirrelID GAV

* build: Release 6.3.0

* build: Back to snapshot for development

* fix: fallback method in BukkitQueueCoordinator uses world coordinates

* mark since tags as TODO

* fix: get the lowest diff for plot age

* fix: initialize with high value and better readability

* fix: no need for multiple age checks

* fix: address exceptions in plot analysis

* chore: address requested changes

* chore: Fix introduced violations

Co-authored-by: Alex <mc.cache@web.de>
Co-authored-by: Jordan <dordsor21@gmail.com>
2022-01-23 10:44:11 +01:00
Jordan
5fc153d896
fix: PlayerInteractEvent does not necessarily interact with a block (#3463) 2022-01-22 17:25:41 +01:00
Yannick Lamprecht
a003836dbc
feat: plot-title flag value should allow single values (#3410) 2022-01-22 11:02:08 +01:00
NotMyFault
42bf413528
chore: Address more violations 2022-01-20 21:01:38 +01:00
Alex
827f46566c
draft: Address false positives in code style issues (#3461)
* chore: Address false positive code style issues

* chore: More work

* More work
2022-01-20 12:39:40 +01:00
Pierre Maurice Schwang
6f4d2f6d5a
Fix: Missing Component returns + plot info on unknown plot owner (#3449)
* Fix: getName should return something

* Fix caption typo

* Deprecate old getName methods + add new methods for username retrieval

* Remove wildcard import

* Use @since TODO instead of hard coded version

* chore: Update `@since` tags to TODO

Co-authored-by: NotMyFault <mc.cache@web.de>
2022-01-19 15:56:31 +01:00
Bernhard
6073b96317
feat: add worldname to the notify flags (#3457)
* feat: add worldname to the notify flags

* fix: change default message

* refactor: extract duplicated code

* fix: use area instead of world
2022-01-18 20:42:44 +01:00
renovate[bot]
74a490f9f0
build: Update release-drafter/release-drafter action to v5.17.5 (#3460)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-17 11:19:28 +01:00
NotMyFault
3a752db698
build: Switch to Fawe release 2022-01-15 16:50:03 +01:00
NotMyFault
7cdde5a822
build: Back to snapshot for development 2022-01-14 11:46:02 +01:00
NotMyFault
8b6e7b2f2b
build: Release 6.3.0 2022-01-14 11:14:00 +01:00
NotMyFault
06f0b42a97
refactor: Update SquirrelID GAV 2022-01-14 10:58:44 +01:00
Jordan
9a85080bf6
Allow restoration of road schematic height calculation behaviour from pre 6.1.4 (#3444) 2022-01-14 10:46:04 +01:00
Alex
d14d2caa2d
refactor: Prepare removal of our maven repository (#3451) 2022-01-13 14:50:07 +01:00
Alex
bcfe7c58dd
feat: Add 1.18's music disc additions to /plot music (#3446) 2022-01-12 22:22:01 +01:00
Alex
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
StealWonders
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
Alex
8f7c2e4c02
fix: /plot music being able to be used on unclaimed plots (#3432) 2022-01-11 11:01:36 +01:00
Xaver106
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
renovate[bot]
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
Jordan
31f48cc7d1
Fix: 1.18 uses the same field as 1.17 for mustNotSave (#3428) 2022-01-05 21:22:09 +01:00
Jordan
4b77f1ab28
Make road flags great again (#3420)
Fixes #3111
2022-01-05 21:21:58 +01:00
Jordan
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
Jordan
0c76d08b10
Only send border area exit message once (#3418)
Fixes #3335
2022-01-05 21:21:37 +01:00
Jordan
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
Jordan
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
NotMyFault
07d0f124b4
ci: Let release drafter listen to forks too 2022-01-05 11:56:28 +01:00
Alex
8d6c621763
ci: Setup auto rebase (#3431) 2022-01-04 15:38:21 +01:00
renovate[bot]
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
renovate[bot]
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
renovate[bot]
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
NotMyFault
25095f4546
chore: Welcome 2022 2022-01-02 22:22:19 +01:00
Alexander Söderberg
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
Jordan
07fdc94dd8
Account for mutability of plot objects when sending move/swap success messages (#3414)
Fixes #3337
2021-12-31 15:46:08 +01:00
NotMyFault
b501a81e21
build: Exchange mvdwapi version to our ones 2021-12-31 01:29:30 +01:00
dordsor21
eb334b3aac
Fix: add missing placeholders for plot info
Fixes #3339
2021-12-30 14:41:31 +00:00
NotMyFault
a77a51b6f2
build: Back to snapshot for development 2021-12-30 10:31:08 +01:00
NotMyFault
7d981bc610
build: Release 6.2.2 2021-12-30 10:14:15 +01:00
Alex
3eb485e900
refactor: Drop guava annotations and create annotation helper (#3389) 2021-12-29 16:18:19 +01:00
Yannick Lamprecht
9f4af889f7
fix: npe thrown in entity spawn listener (#3399) 2021-12-27 11:01:28 +01:00
renovate[bot]
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
renovate[bot]
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
renovate[bot]
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
Alex
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
Yannick Lamprecht
e042566bb7
fix: Strip redundant space at flag collection (#3400) 2021-12-26 23:28:03 +01:00
dordsor21
1f26808c7b
Don't return the "side" for world plots when accessing default home locations 2021-12-22 17:47:48 +00:00
dordsor21
a7026047d0
Adding gold at the end might stop the prefix weirdness? 2021-12-22 17:46:39 +00:00
NotMyFault
af2613202d
refactor: Satisfy Semgrep 2021-12-22 02:06:07 +01:00
renovate[bot]
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
renovate[bot]
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
renovate[bot]
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
renovate[bot]
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
renovate[bot]
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
NotMyFault
7002df0bc7
build: Bump dependencies for 1.18 2021-12-18 23:10:41 +01:00
NotMyFault
958aac3cb1
chore: Configure bolt 2021-12-18 13:12:00 +01:00
zombachu
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
zombachu
92f41f43c5
fix: Ignore the use flag for liquid placement/removal (#3375)
Fixes #3069
2021-12-17 21:52:15 +01:00
NotMyFault
392ee9fa07
ci: Escape workflow tasks 2021-12-17 21:36:56 +01:00
NotMyFault
8859871e89
build: Back to snapshot for development 2021-12-14 23:14:35 +01:00
NotMyFault
93d99630a9
build: Release 6.2.1 2021-12-14 23:06:55 +01:00
Alex
47ae79e123
Revert "refactor: Address MiniMessage deprecations (#3354)" (#3371)
This reverts commit f086826942288bcdfb99ee8eff450cd7cf0db038.
2021-12-14 23:04:36 +01:00
renovate[bot]
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
renovate[bot]
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
NotMyFault
d9a6431078
build: Back to snapshot for development 2021-12-13 13:47:28 +01:00
NotMyFault
e9c9375e78
build: Release 6.2.0 2021-12-13 13:35:37 +01:00
renovate[bot]
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
NotMyFault
88eb8f88a7
build: Update com.fastasyncworldedit to v1.17-419
Closes #3363
2021-12-13 11:11:00 +01:00
renovate[bot]
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
Alex
858b6b5471
tests: Move to JUnit 5 (#3357) 2021-12-13 10:41:36 +01:00
Alex
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
NotMyFault
9c84dc2bc0
build: Update pipeline version to release build 2021-12-10 11:25:21 +01:00
Alex
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
Pierre Maurice Schwang
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
renovate[bot]
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
NotMyFault
2a40f52dea
docs: Update issue template to 1.18 2021-12-05 23:29:28 +01:00
Alex
3ed369de19
style: Add missing bracket for deny example (#3351) 2021-11-29 20:56:48 +01:00
renovate[bot]
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
renovate[bot]
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
Pascal Bürklin
8f3fa419c4
Fixes #3344, Wrong iterator algorithm in PlotRangeIterator (#3345) 2021-11-23 19:52:23 +00:00
NotMyFault
a9f08bc885
build: Update dependencies
Closes #3330
2021-11-15 12:41:52 +01:00
NotMyFault
a8923ec729
build: Back to snapshot for development 2021-11-11 23:01:37 +01:00
NotMyFault
4eafd043a3
Release 6.1.4 2021-11-11 22:49:46 +01:00
NotMyFault
826cc8c835
build: Update Gradle 2021-11-11 22:43:48 +01:00
dordsor21
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
Jordan
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
dordsor21
87a2e81ec3
Don't write biome data to schematics if it's not present 2021-11-10 19:51:14 +00:00
Alex
88775334b7
Schematic paths are configurable (#3303) 2021-11-09 10:32:07 +00:00
renovate[bot]
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
Jordan
c1163cdb2e
feat: Split configuration for teleport on claim/auto (#3308)
- Fixes #2953
2021-11-07 22:29:49 +01:00
NotMyFault
30d06b7801
build: Reduce consumer dependencies 2021-11-05 11:57:58 +01:00
dordsor21
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
dordsor21
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
Hannes Greule
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
Alex
48c7a3e94e
refactor: Use player friendly done message on restricted building (#3309) 2021-11-02 13:32:04 +00:00
mindw0rm
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
renovate[bot]
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
Alex
87cb26189f
Closes #3313 2021-11-01 14:07:44 +01:00
renovate[bot]
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
renovate[bot]
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
Jordan
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
Jordan
804228fa6c
Allow pitch and yaw to be used in default home location (#3304) 2021-10-29 10:48:35 +01:00
Jordan
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
renovate[bot]
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
NotMyFault
df87bcb743
build: Back to snapshot for development 2021-10-18 20:30:28 +02:00
NotMyFault
5653d0f175
Release 6.1.3 2021-10-18 20:22:13 +02:00
NotMyFault
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
dordsor21
cb596ee6ea
Fix StackOverFlow 2021-10-18 17:27:51 +01:00
Xaver106
4e391136c0
Add and Trust permission now count correctly (#3290) 2021-10-15 11:28:23 +01:00
renovate[bot]
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
NotMyFault
d2776eed5a
[ci skip] Move to work level templates 2021-10-08 18:09:58 +02:00
NotMyFault
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
NotMyFault
7ee46be2ac
feat: Allow plot alias in title (#3273)
Fixes #3171
2021-10-07 08:07:13 +00:00
renovate[bot]
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
renovate[bot]
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
Pierre Maurice Schwang
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
renovate[bot]
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
renovate[bot]
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
renovate[bot]
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
NotMyFault
f10e38af63
[ci skip] chore: Improve pr template fields 2021-10-04 15:43:44 +02:00
NotMyFault
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
Pierre Maurice Schwang
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
Pierre Maurice Schwang
541255fe7e
ListFlag#merge should not allow duplicates (Fixes #3157) (#3265) 2021-10-03 14:31:57 +02:00
renovate[bot]
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
renovate[bot]
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
NotMyFault
18eece0b71
[ci skip] chore: Renovate
Closes #3260
2021-09-29 18:09:12 +02:00
Kevin Ludwig
4f12dcf966
Return base plot when using alias (#3253) 2021-09-25 15:58:31 +02:00
NotMyFault
ee832528db
[ci skip] Adjust renovate config
Closes #3252
2021-09-21 00:52:25 +02:00
NotMyFault
bb5d6c91da
Update Fawe version 2021-09-20 16:21:18 +02:00
dordsor21
6d4adecb32
6.1.3 2021-09-18 23:07:10 +01:00
dordsor21
c37b13dcb3
Fix bad move to adventure 2021-09-18 21:54:22 +01:00
renovate[bot]
086dac2ea4
Update dependency net.kyori:adventure-platform-bukkit to v4.0.0 (#3245)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-16 15:29:17 +02:00
dordsor21
b2b8598b5b
Fix #3246 2021-09-15 13:19:25 +01:00
NotMyFault
61e5d9f1b6
Move /p components title to translations file matching other parts of components
- Also component-ify title, this must not be limited to a String.
2021-09-15 11:13:03 +02:00
renovate[bot]
c8989b3332
Update dependency org.junit.jupiter:junit-jupiter to v5.8.0 (#3244)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 10:23:38 +02:00
NotMyFault
9f54472dd6
Relocate annotations properly 2021-09-12 13:56:08 +02:00
NotMyFault
115932c65a
6.1.2 2021-09-11 14:28:08 +02:00
dordsor21
04821f777e
Mappings be obfuscated 2021-09-11 12:19:46 +01:00
dordsor21
cfae804780
6.1.1 2021-09-10 15:01:05 +01:00
dordsor21
4568b17c54
Fix issues with chunk saving in single world plots 2021-09-10 14:05:12 +01:00
NotMyFault
7bc76a3824
Update serverlib 2021-09-09 21:50:11 +02:00
renovate[bot]
4b8180807c
Update dependency com.intellectualsites.http:HTTP4J to v1.3 (#3239)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-09 21:44:23 +02:00
dordsor21
d77a8c8fa4
Some improvements to events (#3238)
#3222 #3072
2021-09-09 21:37:44 +02:00
NotMyFault
27a8fcd739
Plot location may be final 2021-09-09 12:36:09 +02:00
SirYwell
c25a0c65a2 Don't check same plot over and over again 2021-09-08 18:37:45 +02:00
NotMyFault
b224a8d1b8
Include world in plot chat & spy template 2021-09-07 16:36:08 +02:00
NotMyFault
87d134215f
Fix placeholder if world already exists. 2021-09-07 16:20:45 +02:00
dordsor21
93e280dba4
Remove unneeded commented out code 2021-09-07 15:08:00 +01:00
dordsor21
732f79bbfc
Fix #3231 2021-09-07 14:47:37 +01:00
dordsor21
8e5e33eec2
Fix #3127 2021-09-07 14:02:48 +01:00
NotMyFault
da3fb1abec
Closes #3236 2021-09-07 13:52:47 +02:00
NotMyFault
62d6b21081
[ci skip] Closes #3232 Closes #3233 2021-09-06 15:04:07 +02:00
NotMyFault
4caaead7ee
Renovate
Closes #3217
Closes #3226
Closes #3227
Closes #3229
Closes #3230
2021-09-06 13:47:40 +02:00
NotMyFault
be38086f6c
Update Fawe 2021-09-05 00:13:32 +02:00
NotMyFault
c18b0f943c
Switch deployment to the central repository 2021-09-04 13:58:16 +02:00
NotMyFault
f036980dc5
Disband wilderness permission pack 2021-09-03 20:01:37 +02:00
dordsor21
0e4f54e9c0
Bump (FA)WE versions 2021-08-29 10:56:57 +01:00
dordsor21
7a3d5bd737
Don't trigger async catcher when adding chunk ticket
- Apparently PaperLib#getChunkAtAsync#whenComplete doesn't necessarily run the task on the main thread
2021-08-25 15:24:07 +01:00
NotMyFault
2ab1973668
Handle administrative overrides sanely 2021-08-25 11:49:54 +02:00
NotMyFault
387c6e79ba
Return after invalid plot size 2021-08-25 11:10:02 +02:00
NotMyFault
e3e00d34ef
Improve error message claiming plots with ids 2021-08-25 01:36:19 +02:00
NotMyFault
40e651188e
Improve javadoc linking 2021-08-24 15:34:21 +02:00
SirYwell
b2915d9bd7 add license... 2021-08-23 10:11:43 +02:00
SirYwell
6ec136a03d Make sure lock is free'd even on error (fixes #3116) 2021-08-23 10:05:38 +02:00
dordsor21
a8fc6662e0
Allow visit to work when players are not the owner of the base plot 2021-08-22 16:26:49 +01:00
dordsor21
fb8e749411
Still allow serialisation of PlotTitle flag 2021-08-22 15:58:15 +01:00
dordsor21
4b26a7e300
Allow PlotTitle to have a "null" mode (default plot title flag should be the configured values) 2021-08-22 15:55:09 +01:00
dordsor21
8a53b41b52
Improve ChunkListener class
- Add quicker method for getting chunks (not requiring a slow stream done by CB) but comment it out for now because we shouldn't need to do our own GC for loaded chunks; they're "handled much better by minecraft as of 1.14" (not really) meaning the required methods for testing if a chunk is allowed to be unloaded is not present. We instead must now rely on the ChunkUnloadEvent for setting if a chunk should be saved.
- Optimise the shouldSave method by not requiring access to injected classes frequently. Location#getPlot methods are not optimised for frequent usage in the same task.
2021-08-22 15:54:05 +01:00
NotMyFault
daa8ffc38f
6.0.10 2021-08-19 20:51:51 +02:00
dordsor21
34f0236e9f
Add option to "update" blocks that are altered in P2 queues. (#3200) 2021-08-19 20:30:38 +02:00
Traks
8f0ae7e51d
Clean up chunk coordinators and queue coordinators (#3208) 2021-08-19 12:31:47 +01:00
NotMyFault
2988ad6b11
Address style violations 2021-08-18 11:58:18 +02:00
dordsor21
252d6a2866
Fix nms chunk reference 2021-08-17 22:43:58 +01:00
dordsor21
b8c9ae2b0b
Bump FAWE version 2021-08-17 22:43:47 +01:00
NotMyFault
bfe2dda5b1
Closes #3212 2021-08-17 16:38:24 +02:00
dordsor21
33a79595af
Add TitleFlag (#3202) 2021-08-16 09:02:58 +00:00
dordsor21
eb2848e5d7
Fix bad method names etc for chunk/world listener 2021-08-15 13:58:56 +01:00
dordsor21
da4ae9f4f5
Slightly change how flag permissions are handled (#3201) 2021-08-14 13:13:01 +00:00
NotMyFault
b841a7c03b
Fix javadoc linking of deprecated methods 2021-08-11 17:58:24 +02:00
dordsor21
4ee5e3d134
Invert toggle messages where the toggle disables rather than enables 2021-08-08 16:51:21 +01:00
dordsor21
0e05935ad4
Fix #3166 2021-08-08 14:06:59 +01:00
dordsor21
78a775530a
Merge branch 'v6' of github.com:IntellectualSites/PlotSquared into v6 2021-08-08 12:36:23 +01:00
dordsor21
dd36036334
Allow players to /plot home from non-plot-areas if per-world-teleport is enabled 2021-08-08 12:36:08 +01:00
Hannes Greule
3b2a04e4db
Fix/v6/click event actions (#3178)
Co-authored-by: NotMyFault <mc.cache@web.de>
Co-authored-by: dordsor21 <dordsor21@gmail.com>
2021-08-08 11:28:43 +00:00
SirYwell
5ab8d50b86 Don't keep PlotFlagUpdateHandlers forever
This allows Plots, FlagContainers and its PlotFlagUpdateHandlers being cleaned up by the GC correctly
2021-08-08 12:18:25 +01:00
NotMyFault
391476ba26
6.0.9 2021-08-05 14:08:41 +02:00
NotMyFault
25a69f4ca0
Escalate null entries in the db to the warn level 2021-08-04 23:09:38 +02:00
Patrick "IPat" Hein
c8c946cc10
Fix /p kick msg (#3186)
* Negate mob-place flag debug message

* fixed a little typo :)

* Added check for dragon egg teleportation event
https://github.com/IntellectualSites/PlotSquared/issues/3074

* Basic dragon egg interact bugfix (Left-click interaction)

* Lifted admin if-condition out of roads (out-of-plot) only block (for animals)

* Fix https://github.com/IntellectualSites/PlotSquared/issues/3185
/p kick missing permission feedback format fix

* remove unnecessary import

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-08-04 20:59:19 +02:00
Traks
a405611b3a
Fix emptying buckets in plot border (#3192)
* Fix emptying buckets in plot border

* Note on 1.13 compatibility for bucket-empty event

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-08-03 21:03:53 +00:00
Traks
fd4cec39c4
Fix sponge absorbing water across plot borders (#3191)
* Fix sponge absorbing water across plot borders

* Shorten for-loops by using removeIf

* Use 'Location' instead of 'var'

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-08-03 19:07:02 +00:00
NotMyFault
e7fa057abe
Detach shoulder entities from natural mob spawning 2021-08-03 10:20:59 +02:00
NotMyFault
a86c06bb81
Update a few dependencies 2021-08-01 20:10:06 +02:00
NotMyFault
9afaead81c
Move to security advisory 2021-07-31 18:15:53 +02:00
NotMyFault
6e7bd0a536
Left over from 89e17bb468476d2399576090393a79018e22fd0d 2021-07-31 10:43:11 +02:00
SirYwell
89e17bb468 Properly handle economy initialization (fixes #3189) 2021-07-30 20:29:12 +02:00
NotMyFault
8fc9e0b13f
Be a bit more helpful with deleted plotworlds and invalid db entries 2021-07-28 22:23:55 +02:00
Aurélien
6ad51bba65
Hot-fix for IntellectualSites#3179 (#3188)
Authored by @SirYwell ty!
2021-07-28 12:42:20 +02:00
NotMyFault
9d396fa91f
Fixes #3184 2021-07-27 15:04:22 +02:00
NotMyFault
a8c3ac6cee
Fixes #3181 2021-07-26 22:19:17 +02:00
NotMyFault
9a9365a04d
Fixes #3180 2021-07-26 21:23:59 +02:00
NotMyFault
c9b012ea5b
Leave a note when using deprecated commands 2021-07-24 18:01:26 +02:00
NotMyFault
9dd35e87d6
We're using .editorconfig > code_style.xml 2021-07-23 22:23:49 +02:00
NotMyFault
82f0b4194f
Update Fawe version 2021-07-23 17:36:34 +02:00
dordsor21
3b27b6c850
FAWE-Bukkit shouldn't be in core 2021-07-23 16:24:30 +01:00
Traks
1e41734826 Send usage for '/p v' for too many arguments 2021-07-23 15:34:25 +01:00
Traks
a83a79c17e Error message for '/p v' when page out of range 2021-07-23 15:34:25 +01:00
Traks
8a77d5a450 Fix index out of bounds for '/p h' 2021-07-23 15:33:35 +01:00
dordsor21
2676b76107
6.0.8 2021-07-22 21:46:25 +01:00
dordsor21
51ff043af9
Prevent users defining their own click events in descriptions/farewells/greetings by default 2021-07-22 21:45:51 +01:00
Traks
fbde60fcf9
Handle edge cases of EntityChangeBlockEvent (#3163)
* Handle edge cases of EntityChangeBlockEvent

* Remove excessive plot area existence check

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-07-21 19:57:42 +00:00
NotMyFault
a0557112a1
Handle db command args sanely 2021-07-21 15:55:26 +02:00
NotMyFault
6d71e0f8be
Fixes 3168 2021-07-20 22:21:32 +02:00
NotMyFault
62e17f5fc5
[ci skip] Fix CONTRIBUTING.md link 2021-07-20 11:23:57 +02:00
dordsor21
613a92eeb9
6.0.7 2021-07-17 17:59:41 +01:00
dordsor21
31522b6502
Check plot ownership/event before handling Direction.ALL 2021-07-17 17:51:48 +01:00
Traks
2e64ac6d25
Revert projectile hit on splash (#3162)
* Revert projectile hit on splash

* Notes about potions splashing after hit cancelled
2021-07-15 18:43:05 +02:00
Traks
fe65a0c548
Fix off-by-one error in schematic pasting (#3160) 2021-07-14 17:58:04 +02:00
Traks
cc60d50dd2
Actually cancel projectile hit events (#3154)
Co-authored-by: NotMyFault <mc.cache@web.de>
2021-07-13 08:57:12 +00:00
NotMyFault
a797d748ea
Handle /p f add message properly
- Leave a note if the database connection has been established properly
2021-07-12 22:55:28 +02:00
NotMyFault
2d1e3b8c03
Fixes #3148 2021-07-12 18:12:54 +02:00
NotMyFault
635e18e7ed
Add copper-oxide flag 2021-07-10 15:50:38 +02:00
dordsor21
b9cb6842e2
Add an online check for teleport listener
- Some plugins seem to like teleport players before they're online (e.g. NoCheatPlus)
 - Addresses #3142
2021-07-10 10:40:44 +01:00
Patrick "IPat" Hein
991703914c
Batching task count reset (#3144)
* Negate mob-place flag debug message

* fixed a little typo :)

* Added check for dragon egg teleportation event
https://github.com/IntellectualSites/PlotSquared/issues/3074

* Basic dragon egg interact bugfix (Left-click interaction)

* Lifted admin if-condition out of roads (out-of-plot) only block (for animals)

* See 4514d39bbd

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-07-07 10:10:51 +02:00
NotMyFault
fdb6367351
Remove unneeded maven repos 2021-07-05 15:25:22 +02:00
NotMyFault
bbee330f4f
Don't append color codes to component lore
- Color codes are defined thru the file. Adding these here will clash with any other codes you already use
- Remove prefix from component GUI
2021-07-05 11:08:07 +02:00
renovate[bot]
8b8ac76852
Merge pull request #3136 from IntellectualSites/renovate/gradle-7.x
Update dependency gradle to v7.1.1
2021-07-02 17:58:00 +02:00
NotMyFault
3b5b51b40c
Update link if outdated Fawe version is spotted 2021-07-02 14:22:33 +02:00
NotMyFault
5395ddc6a3
Update build.gradle.kts 2021-06-29 11:50:47 +02:00
NotMyFault
60c701d20b
Don't display plot rating placeholder in scientific notation
Fixes #3091
2021-06-28 18:49:03 +02:00
NotMyFault
eb11d9e3aa
Handle add & trust permission ranges properly 2021-06-28 16:40:01 +02:00
SirYwell
7898313b0b Check super types and interfaces on PlotPlayer#from
fixes https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1140
2021-06-28 09:53:00 +02:00
NotMyFault
8e23b10f7c
Fix update notification ingame message 2021-06-27 18:11:57 +02:00
NotMyFault
c46647d491
Handle plots.deny.<amount> properly 2021-06-27 16:40:45 +02:00
NotMyFault
013e8fcda5
Leave a note where to get additional translations 2021-06-27 15:23:11 +02:00
dordsor21
f4ff9c0336
6.0.5 2021-06-27 13:21:44 +01:00
dordsor21
7c4d96e176
Fix #3117 2021-06-27 13:06:10 +01:00
dordsor21
2c920bd016
6.0.4 2021-06-26 20:11:15 +01:00
dordsor21
a5452012b5
separate 1.17-only events 2021-06-26 20:08:25 +01:00
dordsor21
43dd35f54b
6.0.3 2021-06-26 19:53:59 +01:00
dordsor21
67bbd64fa1
Update to FAWE 1.17 2021-06-26 16:19:07 +01:00
SirYwell
8f48b83c79 Replace the proper string in expressions 2021-06-24 19:14:59 +02:00
NotMyFault
6a57a5c369
Fixes #3100 2021-06-24 16:40:10 +02:00
NotMyFault
20df062d9f
Back to snapshot for development 2021-06-23 11:50:24 +02:00
NotMyFault
9fa0a8b27b
Update ServerLib & remove Java version check
We now require Java 16 onwards
2021-06-22 23:49:31 +02:00
NotMyFault
9acf9f4f19
Improve documentation of deprecated methods 2021-06-22 18:11:48 +02:00
SirYwell
0e84cf085b Fix compatibility issues with Citizens (fixes #3105) 2021-06-22 10:18:48 +02:00
SirYwell
ca9e371067 Teleport all players from plot on clear and delete (fixes #3102) 2021-06-21 18:20:47 +02:00
SirYwell
56920fe833 Load configs before accessing them (fixes #3099) 2021-06-21 16:38:40 +02:00
NotMyFault
f2e6fd9692
Bump PlotAPI version 2021-06-21 12:05:56 +02:00
NotMyFault
b2966cbc45
Back to snapshot for development 2021-06-21 11:51:20 +02:00
NotMyFault
45c566859e
Don't fail loading on versions prior to 1.17 2021-06-21 10:30:48 +02:00
NotMyFault
654f7ed3ae
Fix arkitektonika backend url 2021-06-20 20:13:37 +02:00
NotMyFault
f1ef07bee0
Merge branch 'v6' of https://github.com/IntellectualSites/PlotSquared into v6 2021-06-20 18:28:29 +02:00
NotMyFault
3e28d39285
We don't need "no-nashorn" config option in v6 2021-06-20 18:28:13 +02:00
NotMyFault
8eb8c24209
Merge branch 'v5' into v6 2021-06-20 18:22:21 +02:00
NotMyFault
4dbbf8f599
1.17 (#3088)
* Minor work for 1.17

* Address TODOs

Introduce `entity-change-block` flag covering blocks affected by `onPeskyMobsChangeTheWorldLikeWTFEvent`. Previously this was covered by the mob-place flag, however, changing the tilt state of big drip leafs and a series of other blocks call `EntityChangeBlockEvent` so this shouldn't be covered by mob flags only.

* Address other TODOs

* Compile against paper 1.17

This will only work if you built paper locally and deployed it to your local maven repo.

* Updated linked javadoc links

* Handle sculk sensor events in a more controllable way

* Update issue forms for 1.17
2021-06-20 18:17:18 +02:00
dordsor21
a3ebabacb8
Fix #3095 2021-06-18 15:45:45 +01:00
NotMyFault
440afcca5d
Fixes #3066 2021-06-18 16:37:25 +02:00
NotMyFault
8220d4aa31
Update licenser & gradle 2021-06-18 01:22:24 +02:00
NotMyFault
b196c9ce8e
Fix place flag message 2021-06-16 01:15:09 +02:00
dordsor21
93568f9f7f
Update pom 2021-06-12 12:09:40 +01:00
dordsor21
b01291c4ff
Add note about PlayerPlotAutoEvent return null plot 2021-06-12 11:36:33 +01:00
dordsor21
a9d896eb45
Add note about PlayerPlotAutoEvent return null plot 2021-06-12 11:35:55 +01:00
dordsor21
3cd9b76805
Implement "off" to PlotWeather flag and make it default
- Players with "player weather" will no longer have their weather reset on plots that do not set the PlotWeather flag
2021-06-10 11:43:12 +01:00
dordsor21
e2700d3b28
Implement "off" to PlotWeather flag and make it default
- Players with "player weather" will no longer have their weather reset on plots that do not set the PlotWeather flag
2021-06-10 11:41:55 +01:00
NotMyFault
942d799c9c
Make "NaN" in placeholders translatable 2021-06-09 21:51:51 +02:00
dordsor21
f0cbc4f23e Add whenDone task to setCuboids and ensure whenDone tasks are added to the queue before FAWE might do something 2021-06-09 13:09:50 +01:00
dordsor21
9bd14b142b Move FAWE detection before guice injection/configuration 2021-06-09 13:09:50 +01:00
dordsor21
4ba1217b84 Fix licences 2021-06-09 13:09:50 +01:00
dordsor21
50d4353045 begin integration with fawe 2021-06-09 13:09:50 +01:00
dordsor21
19e97a7738
Correctly handle coordinates in swapping
Fixes #3030
2021-06-08 20:31:53 +01:00
SirYwell
2ac5fe45e3 Make CaptionLoader namespace-aware 2021-06-08 15:36:03 +02:00
NotMyFault
7f3d3ecb00
Fixes #3018 2021-06-08 14:25:08 +02:00
NotMyFault
331a6ea1b3
Remove "ORE" from setup steps
Touches #3068
Generating a world with just ore is used nowhere and needs to be reimplemented properly at some time.
2021-06-08 13:06:42 +02:00
SirYwell
8f2f673438 👀 2021-06-08 12:24:57 +02:00
SirYwell
66e12e2a0c Make world settings reloadable 2021-06-08 12:10:21 +02:00
SirYwell
2b3ecc178a Fix some inbox issues 2021-06-08 11:56:03 +02:00
NotMyFault
df842c355e
5.13.13 2021-06-08 10:52:51 +02:00
NotMyFault
9b043b7444
Make /plot rate categories translatable 2021-06-08 10:49:26 +02:00
NotMyFault
ce287cf218
Add toggle allowing to opt out nashorn 2021-06-08 00:16:55 +02:00
NotMyFault
24945efc7d
Merge branch 'v5' into v6 2021-06-06 21:41:24 +02:00
NotMyFault
a01ad5aa04
Update wiki location 2021-06-06 21:40:34 +02:00
NotMyFault
fa14c40283
Update wiki links 2021-06-06 21:38:49 +02:00
NotMyFault
d8f19cec66
Adjust improper origin -> target message of plot moving 2021-06-04 19:17:20 +02:00
SirYwell
955341ff9f Move enqueue to the actual end of the code 2021-06-04 18:41:57 +02:00
SirYwell
cb342de934 Check merge status from correct plot 2021-06-04 13:39:03 +02:00
SirYwell
ea0342f100 Enqueue on unlink 2021-06-04 13:39:03 +02:00
NotMyFault
cd57741a51
Fix typo introduced in f4552e358d900968e7c1f09cebb4d118ce055d8b 2021-06-03 12:53:47 +02:00
NotMyFault
f4552e358d
Fixes #3027
- Ditch slf4j in favor of log4j. slf4j is (unfortunately) very much unmaintained at this time and future versions of MC (1.17+) will use log4j version 2.14.1 onwards over some ancient sfl4j version.
- Using log4j reduces our jar size as well, because we don't need to bridge it as the game provides it natively.
2021-06-03 12:40:27 +02:00
NotMyFault
1dc225362d
Bump gh action tasks prevent failing of gradle wrapper validation 2021-06-02 23:29:43 +02:00
Mariell Hoversholm
a6b3e97cda
feat: re-add aggregated javadocs task (#3077)
* feat: re-add aggregated javadocs task

This was removed by IntellectualSites/PlotSquared#2922.
Closes IntellectualSites/PlotSquared#3037.

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* feat: aggregate javadocs on root build task

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* Address changes requested

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-06-02 23:26:27 +02:00
Patrick "IPat" Hein
8a244d12fc
Fix if-condition limited to roads for animal attack cancelling on plots (#3079)
* Negate mob-place flag debug message

* fixed a little typo :)

* Added check for dragon egg teleportation event
https://github.com/IntellectualSites/PlotSquared/issues/3074

* Basic dragon egg interact bugfix (Left-click interaction)

* Lifted admin if-condition out of roads (out-of-plot) only block (for animals)

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-06-02 19:55:35 +02:00
NotMyFault
5a5d1f5e62
Fixes #3063 2021-06-01 21:54:00 +02:00
NotMyFault
21214814b7
Fixes #3032 2021-05-31 21:59:15 +02:00
NotMyFault
3ac93dcfca
Enhance /plot target & expiry confirm message 2021-05-28 20:21:41 +02:00
NotMyFault
c509882a18
Enhance alias message with placeholders 2021-05-28 11:37:13 +02:00
Orlaando
c146d6207d
Make /plot pardon an alias of Plot Remove (#3071)
* Make /plot pardon an alias of /plot undeny

* Make Remove state more clearly what it does

* Lazily target v6
2021-05-28 11:01:42 +02:00
Patrick "IPat" Hein
2045a4988d
Prevent dragon eggs from leaving or entering plot bounds (#3075)
* Negate mob-place flag debug message

* fixed a little typo :)

* Added check for dragon egg teleportation event
https://github.com/IntellectualSites/PlotSquared/issues/3074

* Basic dragon egg interact bugfix (Left-click interaction)

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-05-28 10:57:48 +02:00
NotMyFault
dc7e6010cb
Fixes #3073
- Also add new caption if attempting to clear an empty alias
2021-05-27 17:06:04 +02:00
NotMyFault
b1fc17e045
Remove scripting from javadocs 2021-05-25 20:51:26 +02:00
NotMyFault
daf0e6e1ba
Use same creation message for templates like for setup 2021-05-25 11:02:37 +02:00
NotMyFault
6f263735f0
Move notification-as-actionbar into the Chat config block
- Move titles alongside all its new options into its own config block
- Move `titles-as-actionbar` into the new titles block
- Enhance notification about removed config entries
2021-05-24 21:52:27 +02:00
NotMyFault
1d2aa74e51
Add actionbar message for notification flags
- Move title_as_actionbar boolean into enabled_components
2021-05-24 13:49:00 +02:00
Glare
a69b1d895c
Implemented the ability to change titles to actionbar on plot entry (#3060)
* Implemented the ability to change titles to actionbar on plot entry

* Fixed typo in action

* Updated explanation in Javadoc

* Implemented suggestions

* Remove excess import

* Implemented PR suggestions

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-05-23 17:28:03 +02:00
NotMyFault
399d77c60f
Component-ify plot setup wizard
Touches #3068
2021-05-22 19:49:22 +02:00
NotMyFault
b768ee6d41
Don't send teleport message before the teleportation is initiated 2021-05-22 18:15:34 +02:00
NotMyFault
58faffed6d
Remove chat.interactive option
Whether the chat is interactive or not can be declared in the strings.json by using MMs <click:_action_:_value_> type.
2021-05-22 13:22:44 +02:00
NotMyFault
87706d471b
Add option for legacy sign material
Follow up to cde27899dd019e40bb8b6008a456a9477ad246b7
2021-05-22 12:34:04 +02:00
Glare
eb7eb15ee7
Implemented tab completion for /plot help (#3053)
Co-authored-by: NotMyFault <mc.cache@web.de>
2021-05-22 02:23:54 +02:00
NotMyFault
a17085bb18
Remove dead imports 2021-05-21 20:56:44 +02:00
NotMyFault
cde27899dd
Fixes #3064 2021-05-21 19:14:13 +02:00
NotMyFault
93ff778de0
Add administrative override for /plot components 2021-05-21 17:54:26 +02:00
NotMyFault
17f91c8eb9
Make /plot rate GUI items customizable
Bye bye legacy items :)
2021-05-21 16:48:34 +02:00
NotMyFault
7775cd0073
Do not rely on a static file path
Doing so will cause issues with the `--plugins` flag.
E.g. `java -jar server.jar --plugins /path/to/plugins/`
2021-05-21 00:35:19 +02:00
NotMyFault
cc48f273c0
Fixes #3057
Actually execute a kick from server if ordered
2021-05-20 21:59:05 +02:00
NotMyFault
c8406681d7
Notify the kicked person over the actor 2021-05-20 21:22:00 +02:00
NotMyFault
a05dd19986
Fixes #3058
- Anonymize meta data keys
2021-05-20 21:04:07 +02:00
NotMyFault
aae350c1b3
Enhance flag tutorial message 2021-05-20 19:57:06 +02:00
NotMyFault
c48559410f
Provide instruction about the .editorconfig 2021-05-20 00:26:35 +02:00
NotMyFault
9c59bfde52
Rephrase message if user has no access to sub-command help pages 2021-05-19 23:48:32 +02:00
Patrick "IPat" Hein
eb9d7e97d9
Bug through last Economy PR - Withdrawn money for non-affordable plots (#3036)
* Replaced economy supported (Vault) check within cost condition with a pre-eliminating if-guard

* Negate mob-place flag debug message

* Actually prevent purchase of plots if they can't afford it (whoops)

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-05-19 17:44:45 +02:00
NotMyFault
24eebe6711
Update gradle to 7.0.2 2021-05-19 11:51:55 +02:00
SirYwell
a2b8e4493f Fix infinite loop on multi auto (fixes #3022) 2021-05-18 22:30:40 +02:00
Patrick "IPat" Hein
7c4a85325c
Added event handler for cauldron water level modification to prevent untrusted players interacting with a plot (#3035)
* Added check for burning players using non-trusted plots cauldrons to extinguish themselves, causing the cauldron level to decrease

* Cancelling burning of players without downscaling water instead of ignoring their burn status

* Using Java 14 JEP 305 enhanced instanceOf

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

* Players without permissions may not wash banners or armor now either. Rain modification is now permitted.

* Extinguishing is now explicitly handled so that event handling for other plugins has the actual information of the new cauldron water level

* Un-nestified the if-condition :)

* Properly cancelled the event (since it is semantically cancelled)

* (Actually) properly cancelled the event (since it is semantically cancelled)

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-05-18 19:23:22 +00:00
SirYwell
94ba90d694 Always initialize PermissionHandler (fixes #3019) 2021-05-18 21:17:47 +02:00
NotMyFault
e97bc25fb8
Log plot chat to console
- Fix plot music removal template
- Fix debug args
2021-05-17 10:35:09 +02:00
NotMyFault
73936bb10d
Fix licenser issues 2021-05-17 09:31:33 +02:00
NotMyFault
23e65ac5d3
Merge branch 'feature/v6/update-licenser' into v6 2021-05-17 09:29:08 +02:00
NotMyFault
9dc0396411
Fix plot list coloring 2021-05-16 22:47:02 +02:00
NotMyFault
cc6db9ae9e
Merge branch 'v5' into v6 2021-05-15 20:47:01 +02:00
NotMyFault
3748d8e246
Minor cleanup in favor of Java 16
- Addressing a few command deprecations during the major release superseded by toggles
- Don't swallow SQL warnings in loggers behind debug, as it's often set to false
- Deleted JavaVersionCheck, it's part of ServerLib.
2021-05-15 20:39:16 +02:00
NotMyFault
0341111f8f
Add lectern-read-book flag
Fixes https://github.com/IntellectualSites/PlotSquared/issues/2980
2021-05-14 18:22:02 +02:00
NotMyFault
a7c4b40fcc
Add no-portals and deny-portal-travel flag 2021-05-14 15:51:20 +02:00
NotMyFault
e7fb3571ac
Update licenser 2021-05-14 13:36:18 +02:00
NotMyFault
58ad9db5ed
Jump to Java 16 2021-05-14 01:04:09 +02:00
Aurélien
6fd55b47c2 Fix typo 2021-05-13 21:41:10 +01:00
NotMyFault
3d7c191d1c
Make the plot jukebox gui translatable
Fixes https://github.com/IntellectualSites/PlotSquared-Translations/issues/2
2021-05-13 20:21:19 +02:00
NotMyFault
9344e1ca79
Make /plot setup header translatable
- Document a couple of permission nodes
2021-05-13 13:32:34 +02:00
Patrick "IPat" Hein
68eb5cd74f
Replaced economy supported (Vault) check within cost condition with a pre-eliminating if-guard (#3014) 2021-05-12 19:00:14 +02:00
NotMyFault
ca7ac71e76
Update gradle and shadow 2021-05-12 03:00:34 +02:00
NotMyFault
3a280f3b6a
Fix a few typos 2021-05-11 19:26:39 +02:00
NotMyFault
19cea0e129
Un-stringify plot id calls
- PlotId#toString() already stringifies IDs, no need to call String.valueOf()
- Add tab completion to `/plot debugroadregen`
- Add `plots.flag.notify-leave.bypass` permission separating from notify-enter
- Add message notifying the player if the attempt to enter a plot they are denied from
2021-05-11 18:50:37 +02:00
Patrick "IPat" Hein
2c40648a60
Fixed feedback recipient for notify flags (Owner instead of entering / leaving player) (#3011) 2021-05-11 18:26:24 +02:00
NotMyFault
48815649a8
Clarify native dependency versions 2021-05-07 22:12:14 +02:00
NotMyFault
f690e14a14
Exchange EssentialsX maven repo 2021-05-07 11:08:07 +02:00
NotMyFault
b37ad79e50
Beautify empty /plot caps output
Also strip prefix from empty plot description
2021-05-07 09:59:17 +02:00
NotMyFault
a990205d41
Fix empty templates when vault not found 2021-05-07 01:53:18 +02:00
NotMyFault
891230c78e
Fix /plot sethome returning usage message & working on unclaimed plots 2021-05-07 01:27:11 +02:00
NotMyFault
8bfdf8ecf2
Fix /plot cluster sethome triggering usage message
Enhance cluster messages a bit
2021-05-07 01:18:33 +02:00
NotMyFault
78655102b9
Fix flag exception coloring 2021-05-06 19:06:50 +02:00
NotMyFault
491a171409
Fix invalid backup messages & component prefix & update minimessage 2021-05-06 10:30:04 +02:00
NotMyFault
b3aec8f839
Fix empty default flag message 2021-05-02 20:31:23 +02:00
NotMyFault
0106a4222d
Address a few deprecations 2021-05-01 18:33:02 +02:00
NotMyFault
11af33f2d5
Fixup inbox javadocs 2021-04-30 19:04:44 +02:00
NotMyFault
812442fbbc
Don't double color the inbox 2021-04-30 13:22:00 +02:00
NotMyFault
1750dd3b97
Opt in future proof gradle features 🚀 (#2950)
* Opt in future proof gradle features

* Resolve merge conflicts
2021-04-30 09:50:22 +02:00
NotMyFault
ffe298710d
Lazy merge v5/v6 2021-04-28 20:17:10 +02:00
NotMyFault
5cdb7e76fd
Update wiki and issue links 2021-04-28 20:06:19 +02:00
NotMyFault
361b936aa0
Update ServerLib 2021-04-27 11:58:49 +02:00
NotMyFault
9503b0bfc4
Merge branch 'v5' into v6 2021-04-27 11:52:44 +02:00
NotMyFault
823beaf268
Update a few dependencies 2021-04-27 11:46:14 +02:00
NotMyFault
3ada55989f
[ci skip] Setup new issue templates (#2951)
* Setup issue templates

* Exchange issue url
2021-04-26 16:25:15 +02:00
NotMyFault
de597391dc
Fix keep-inventory flag & adjust disallowed-blocks translation 2021-04-21 11:03:14 +02:00
NotMyFault
59599261ff
Fixes https://issues.intellectualsites.com/issue/PS-237 2021-04-12 16:08:31 +02:00
NotMyFault
e1fb8c1ae5
Take building min height also into consideration 2021-04-11 10:12:37 +02:00
NotMyFault
ba4146f82c
Update to gradle 7 2021-04-10 16:52:46 +02:00
Hannes Greule
a5c43bb823 Suggest flag name instead of value 2021-04-10 09:34:53 +02:00
NotMyFault
050cf3edb3
Update a few dependencies 2021-04-04 13:30:09 +02:00
NotMyFault
84d5ebfa41
Make use of because args 2021-04-03 23:15:40 +02:00
NotMyFault
6bc4e5b45c
Re add per-world-teleport 2021-04-03 22:34:43 +02:00
NotMyFault
496fe09f78
Merge branch 'v5' into v6 2021-04-03 22:31:54 +02:00
NotMyFault
19daf1bd52
5.13.12 2021-04-03 22:18:03 +02:00
Hannes Greule
74a9c2f6b4 Reimplement per-world-visit 2021-04-03 21:48:21 +02:00
NotMyFault
dd9edb68b2
Fixes https://github.com/IntellectualSites/PlotSquaredSuggestions/issues/23 2021-04-02 23:48:16 +02:00
NotMyFault
b02177e1d0
Add tab completion for gamemode flag 2021-04-02 23:20:39 +02:00
NotMyFault
600d38d3e2
Add flag placeholders to flag commands 2021-04-02 17:50:37 +02:00
NotMyFault
07fd7e497f
Strip commands from translation files 2021-04-02 14:04:17 +02:00
NotMyFault
932873ba02
Do not access nms for older versions on newer ones 2021-03-31 12:42:32 +02:00
NotMyFault
567f1d4247
Fix backup captions and add placeholders to copy/move/swap 2021-03-30 13:44:04 +02:00
Hannes Greule
3f05dfe4bf
Sort plots for /plot home the same as for /plot visit, fixes PS-188 2021-03-30 11:19:43 +02:00
NotMyFault
fbebcf57c1
Fix exporting all plots 2021-03-29 17:07:58 +02:00
NotMyFault
30d3a458e2
Addressing more issues 2021-03-28 17:39:02 +02:00
NotMyFault
7591d88d00
Fixes PS-229
Closes #2948

Co-Authored-By: Benjamin Govaerts <17101059+BenjaminGoGurts@users.noreply.github.com>
2021-03-23 23:44:27 +01:00
NotMyFault
22baabf751
Don't fail on Java 17 (and higher) 2021-03-23 10:39:17 +01:00
NotMyFault
0cdda8b0ae
Fix a few issues with debugexec 2021-03-12 15:05:25 +01:00
NotMyFault
295a63087f
Strip lesser used debug commands 2021-03-12 14:45:43 +01:00
NotMyFault
797d3ed362
Don't invert the debug status message 2021-03-04 21:43:16 +01:00
NotMyFault
31de7de385
Cover a couple of NPEs 2021-03-01 16:21:12 +01:00
NotMyFault
5780ad370a
Strip Java 15 note 2021-03-01 10:58:27 +01:00
NotMyFault
3833d2cd83
Restrict a few more commands from plot world plots
And add missing tab completion for debug commands
2021-02-24 23:21:54 +01:00
Hannes Greule
38b60205e8 Use javax for Nullable + guice, hope I didn't miss anything 2021-02-24 20:35:38 +01:00
NotMyFault
027456fd77
Add crop-grow flag 2021-02-24 18:41:36 +01:00
Hannes Greule
10e2d65221
Remove scripting-related stuff (#2947)
* Remove scripting-related stuff

* Cleanup

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-02-24 09:53:55 +01:00
Hannes Greule
d9b5dc5dd7 Sort plots for /plot home the same as for /plot visit, fixes PS-188 2021-02-24 08:46:16 +01:00
NotMyFault
c7e6564667 Add new metrics pies 2021-02-22 15:22:38 +01:00
NotMyFault
da45813a06 Add new metrics pies 2021-02-22 15:18:20 +01:00
NotMyFault
6cc9b5c62b
Remove eol config entries 2021-02-22 13:24:46 +01:00
Hannes Greule
1172e02f1b Fix several issues with debug command 2021-02-21 12:34:14 +01:00
Hannes Greule
46fbc05040 Don't fail to load when moving components file 2021-02-20 19:41:58 +01:00
NotMyFault
fee1ffa2e9
Switch to vanity url 2021-02-17 00:50:50 +01:00
NotMyFault
22be81b5cb
Switch to vanity url 2021-02-16 23:50:53 +01:00
NotMyFault
12d260ca82
Fixes https://issues.intellectualsites.com/issue/PS-23 2021-02-09 18:20:50 +01:00
NotMyFault
82e90553bc Enhance continue message 2021-02-03 15:44:18 +01:00
NotMyFault
18c1a0e4f6
Remove duplicated translation strings 2021-02-02 16:48:01 +01:00
NotMyFault
c42102d1c4
Don't shade without relocation 2021-02-01 15:31:25 +01:00
NotMyFault
aca2d2e510
Fixes https://issues.intellectualsites.com/issue/PS-186 2021-01-31 11:44:22 +01:00
NotMyFault
666938b738
Update ServerLib 2021-01-30 13:17:36 +01:00
NotMyFault
a75db92007
Update ServerLib 2021-01-30 13:16:36 +01:00
NotMyFault
aaf2fa8807
Update bStats to 2.1.0 2021-01-24 10:39:03 +01:00
NotMyFault
e549235d83
Switch to ServerLib 2021-01-22 23:42:45 +01:00
NotMyFault
86e8457574
Move to ServerLib 2021-01-22 23:34:47 +01:00
Alexander Söderberg
8292ed9e31
More annotation work 2021-01-10 00:01:48 +01:00
Alexander Söderberg
57fc51d013 Initial annotation usage cleanup + EditorConfig 2021-01-09 22:28:41 +01:00
dordsor21
8b332adbe7 Address comments 2021-01-09 21:34:42 +01:00
dordsor21
ae0ee1ebdd fix teleport to "*" 2021-01-09 21:34:42 +01:00
dordsor21
3cea734b9b Fix singleworlds 2021-01-09 21:34:42 +01:00
dordsor21
7ac3f7ca03 Fix sync tasks not being sync 2021-01-09 20:39:25 +01:00
N0tMyFaultOG
0a5c73478d
Fix improper missing permission message on /plot list world 2021-01-08 17:16:38 +01:00
N0tMyFaultOG
495952acb0
Fixes https://github.com/IntellectualSites/PlotSquaredSuggestions/issues/129 2021-01-08 16:46:57 +01:00
N0tMyFaultOG
25a8f1522a
Move creation date up in plot header 2021-01-08 16:08:42 +01:00
N0tMyFaultOG
f13f7ce129
Disable destructive operations for plot world plots 2021-01-08 16:06:15 +01:00
dordsor21
cc90127af9
fix two <> errors in lang 2021-01-07 13:45:01 +00:00
dordsor21
98e8476a88
Bring v5 entity spawn changes to v6 2021-01-06 21:56:26 +00:00
dordsor21
ec8bdc9af6
Actually place the debugroadregen blocks 2021-01-04 19:23:31 +00:00
dordsor21
9598416932
handle cancellation properly in DefaultProgressSubscriber 2021-01-04 18:23:45 +00:00
dordsor21
4c0bc79e49
Allow over/undersizes schematics to be saved and pasted (#2944)
Co-authored-by: NotMyFault <mc.cache@web.de>
2021-01-03 23:46:53 +01:00
Hannes Greule
01dd2d8097 Should be code, not link
Co-authored-by: Alexander Söderberg <4096670+Citymonstret@users.noreply.github.com>
2021-01-03 23:42:32 +01:00
Hannes Greule
e09444d94f code style 2021-01-03 23:42:32 +01:00
Hannes Greule
0c76833997 Implement CaptionLoader API to be used by third party plugins/addons
This allows to load resources from other classloaders than the P2 one. Therefore, we can use this in addons too to manage messages the same way.
2021-01-03 23:42:32 +01:00
Hannes Greule
ad99ca1723
Use WE Expressions instead of js evaluation (#2941)
* Implement thread-safe expression evaluation

* Update `{args}` to `plot` automatically

* Stringify more money/balance/price occurrences with EconHandler#format
2021-01-02 16:32:07 +00:00
N0tMyFaultOG
f47561b580
Invert leaf-decay message 2021-01-01 21:51:28 +01:00
N0tMyFaultOG
4f60da292a
Add leaf-decay flag
Stop leaves from decaying.
2021-01-01 21:47:09 +01:00
N0tMyFaultOG
70fb86a1c3
Remove redundant legacy version check
"api-version" backs us up here.
2021-01-01 14:09:59 +01:00
N0tMyFaultOG
bf79639d07
Update license to 2021
Happy new year 🎆
2021-01-01 00:46:30 +01:00
N0tMyFaultOG
e8642df674
Update licenses to 2021
Happy new year 🎆
2021-01-01 00:19:45 +01:00
N0tMyFaultOG
b648717079
5.13.11 2020-12-29 15:14:00 +01:00
N0tMyFaultOG
3702caa25f
Replace toggle permission with plots.toggle 2020-12-28 16:06:24 +01:00
N0tMyFaultOG
4200bbfd0a
Update permission range declaration 2020-12-28 15:38:42 +01:00
N0tMyFaultOG
0fcca4c141
Use hasPermissionRange to check for trust and add limits 2020-12-28 15:36:00 +01:00
Hannes Greule
fafdae9ba9
Only check ice-form for ice (#2940)
Co-authored-by: NotMyFault <mc.cache@web.de>
2020-12-28 14:11:30 +00:00
dordsor21
ef215b1b0c
fix debugpaste with multiverse 2020-12-28 12:31:51 +00:00
dordsor21
1d0721034d
fix debugpaste with multiverse 2020-12-28 12:30:53 +00:00
dordsor21
3cfbe9585a
Merge branch 'v6' of github.com:IntellectualSites/PlotSquared into v6 2020-12-28 12:27:12 +00:00
dordsor21
71305e636c
cache bukkitworld 2020-12-28 12:10:27 +00:00
Hannes Greule
ce23c153ee Fix added_list and denied_list placeholders 2020-12-28 12:15:34 +01:00
Hannes Greule
019da4d2f4 Expose legacy serializer for placeholders 2020-12-28 11:21:35 +01:00
Hannes Greule
ffc31f565b Use builder for flags component 2020-12-28 00:05:33 +01:00
N0tMyFaultOG
7f01f2d716
Rename placeholders matching more appropriately 2020-12-27 19:37:09 +01:00
N0tMyFaultOG
bf20b0dd79
Beautify placeholder output for '*' permission 2020-12-27 19:16:26 +01:00
N0tMyFaultOG
867826759b
Make placeholders translatable 2020-12-26 13:50:00 +01:00
dordsor21
3be370071c
fix purge <owner> 2020-12-23 14:13:50 +00:00
dordsor21
2b9a194244
5.13.10 2020-12-23 14:07:42 +00:00
dordsor21
67a928b1ae
Merge branch 'v5' of github.com:IntellectualSites/PlotSquared into v5 2020-12-23 13:54:35 +00:00
dordsor21
67a7211b77
use correct UUID pipeline methods in purge command 2020-12-23 13:52:47 +00:00
N0tMyFaultOG
1d4fe01db0
Rename database chart id 2020-12-22 20:54:22 +01:00
N0tMyFaultOG
07491d8028
Rename database chart id 2020-12-22 20:53:13 +01:00
N0tMyFaultOG
7f1baca872
Add database type to debugpaste 2020-12-22 17:55:37 +01:00
N0tMyFaultOG
8c3a0a8275
Fix compiling 2020-12-21 20:33:49 +01:00
N0tMyFaultOG
eba6043d26
Update paster 2020-12-21 15:59:12 +01:00
N0tMyFaultOG
397692d113
Update Paster 2020-12-21 15:58:34 +01:00
NotMyFault
035ecc1517
Delete dependabot.yml 2020-12-21 10:58:30 +01:00
N0tMyFaultOG
bb52301200
Merge remote-tracking branch 'origin/renovate/configure' into v6 2020-12-20 22:38:35 +01:00
Renovate Bot
f4adf5d7e7
Add renovate.json 2020-12-20 21:24:38 +00:00
dordsor21
e4a8459798
Switch to IncendoPaster "library" 2020-12-19 16:20:44 +00:00
dordsor21
14fa738fbe
switch to InvendoPaster "library" 2020-12-19 16:00:13 +00:00
N0tMyFaultOG
4da7aa38ea
@Sauilitired can't spell properly 2020-12-16 13:23:14 +01:00
N0tMyFaultOG
5147d67318
Add charts for complex plot components 2020-12-16 13:20:23 +01:00
dordsor21
cbc599cb20
don't double-up schematic x/z offsets 2020-12-16 12:13:39 +00:00
dordsor21
09c84e25bf
don't double-up schematic x/z offsets 2020-12-16 12:07:36 +00:00
dordsor21
224e3b6ad4
Fix publishing. I am an author. 2020-12-14 18:09:09 +00:00
dordsor21
992a683ba2
another annoying cache thing 2020-12-14 15:22:10 +00:00
dordsor21
e8e116312a
Merge branch 'v5' into v6
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntityEventListener.java
#	Core/src/main/java/com/plotsquared/core/command/Deny.java
#	Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java
2020-12-14 15:15:27 +00:00
dordsor21
de3ba9a25c
re-send block change for blocks with gravity if they're physicsed
fixes PS-159
2020-12-14 14:53:53 +00:00
dordsor21
5e88cabb4b
compare UUID to UUID, not UUIDMapping
fix PS-182
2020-12-14 14:32:34 +00:00
dordsor21
6d71177394
Don't save corrupt schematics so that when they load, they work. 2020-12-13 21:09:05 +00:00
N0tMyFaultOG
edd9ae5118
Fix more flag message issues. 2020-12-12 22:46:37 +01:00
Hannes Greule
23ae3b5830 Use builder for flag list message 2020-12-12 21:19:28 +01:00
Hannes Greule
6746aab7ef Improve /plot info formatting 2020-12-12 18:56:19 +01:00
NotMyFault
c85ff7ddda
Update README.md 2020-12-12 17:52:24 +01:00
dordsor21
cf70efabb0
we want throwable to be null 2020-12-11 16:51:13 +00:00
dordsor21
6eb2958afc
Fix merge issue 2020-12-11 11:42:19 +00:00
dordsor21
18f13b7d15
Merge branch 'v5' into v6 2020-12-10 21:28:28 +00:00
dordsor21
0bb959d26a
Merge branch 'v6' of github.com:IntellectualSites/PlotSquared into v6 2020-12-10 21:15:51 +00:00
dordsor21
b4f3e85001
allow "owned" road mobs to be killed as well
(those that are leashed, being ridden, etc)
2020-12-10 21:14:32 +00:00
Hannes Greule
25100c46f7 Don't unclaim claimed plots with /p claim 2020-12-10 22:13:13 +01:00
dordsor21
540f4c0958
fix info for server-plots 2020-12-10 21:05:50 +00:00
dordsor21
8930ebe572
Relight command is pointless as we'd just use FAWE for it anyway. 2020-12-10 18:06:32 +00:00
dordsor21
8f93f2b6d2
Revert "Allow "Server" owner" as that has its own UUID
This reverts commit 9ba91889e0e1662164911cc9b89196a3cd244590.
2020-12-10 18:02:38 +00:00
dordsor21
9ba91889e0
Allow "Server" owner 2020-12-10 17:58:00 +00:00
dordsor21
67683fbddb
Ensure not to parse null parameters into templates for titles 2020-12-10 17:56:22 +00:00
Hannes Greule
824f9d7ad0 Add missing returns to /plot cluster 2020-12-09 23:14:52 +01:00
Hannes Greule
3e99f90eb1 Don't spit NPEs on NonNull values 2020-12-09 22:45:47 +01:00
N0tMyFaultOG
3ca8a94419
Update java 8 notice 2020-12-08 00:18:40 +01:00
N0tMyFaultOG
714837dd00
Add charts for complex components 2020-12-07 23:05:25 +01:00
N0tMyFaultOG
bc1d3ddd5d
Fix spelling 2020-12-07 21:25:32 +01:00
N0tMyFaultOG
bf7b75b619
Make titles duration configurable 2020-12-07 21:23:38 +01:00
N0tMyFaultOG
469d6ab907
Fixes https://github.com/IntellectualSites/PlotSquaredSuggestions/issues/77 2020-12-07 14:46:16 +01:00
N0tMyFaultOG
a4dd5bb62f
Add tab completion to like/dislike and fix more messages 2020-12-07 12:51:14 +01:00
N0tMyFaultOG
60859de0bd
Add an option to teleport the player on plot clearing or deletion 2020-12-07 10:55:34 +01:00
Hannes Greule
ff70d5db14
Feature/v6/arkitektonika (#2916)
* Start working on Arkitektonika support

* Progress on Arkitektonika

* Add license headers

* Some QoL and javadocs

* Fix maximum calculation

* Fix minor formatting

* Reimplement legacy webinterface support

* Add documentation and fix deletion link

* Resolve conflicts/gradle stuff

* Fix links

* Make message readable

* Do not allow download of merged plots
2020-12-05 19:50:41 +01:00
Alexander Söderberg
c8ad936d26
Clean up PlotPlatform a bit and make the placeholder registry injectible 2020-12-05 18:41:41 +01:00
N0tMyFaultOG
60b5f5fe48
Add note about Nashorn 2020-12-05 18:38:10 +01:00
Hannes Greule
14ec7fb816 Fix PlotRangeIterator 2020-12-05 18:03:24 +01:00
N0tMyFaultOG
b4ea230ff1
Minor translation changes 2020-12-05 15:35:33 +01:00
N0tMyFaultOG
410879d154
Fixes https://github.com/IntellectualSites/PlotSquaredSuggestions/issues/141 2020-12-05 15:20:19 +01:00
N0tMyFaultOG
f14121e99c
Initiate placeholder registry 2020-12-05 15:08:27 +01:00
N0tMyFaultOG
19d7444946
Fix flag description 2020-12-04 19:27:34 +01:00
N0tMyFaultOG
d9aaed0035
Update dependencies 2020-12-04 18:07:59 +01:00
N0tMyFaultOG
cfd3c159f9
Follow up to 4ff50525ed83c1d6103ee9a60b715968719bb77f
Skipping deprecation here, this exists for so long and and has been superseded by permissions now.
2020-12-04 17:33:41 +01:00
N0tMyFaultOG
4ff50525ed
Fixes https://github.com/IntellectualSites/PlotSquaredSuggestions/issues/110 2020-12-04 17:30:11 +01:00
N0tMyFaultOG
34e02e9f3a
Make JavaVersionCheck private 2020-12-04 16:00:18 +01:00
N0tMyFaultOG
62690c2a53
Postpone java version during startup 2020-12-04 12:25:53 +01:00
N0tMyFaultOG
5d30e0854f
Add java version checker 2020-12-04 12:15:56 +01:00
NotMyFault
ec683cdf88
Update ClassicPlotWorld.java 2020-11-29 17:48:59 +01:00
N0tMyFaultOG
39feed6fac
Improve wording of generation steps 2020-11-29 17:35:41 +01:00
dordsor21
ee7f683b76
Bump paperlib, fix single worlds. 2020-11-26 16:54:38 +00:00
N0tMyFaultOG
209d52e920
Update adventure 2020-11-26 11:35:46 +01:00
Traks
585111ca38
Cancel boat placement on interactable blocks, fixes PS-175 (#2934)
* Cancel boat placement on interactable blocks, fixes PS-175

* Keep boat protection for old game versions

Co-authored-by: NotMyFault <mc.cache@web.de>
2020-11-24 16:32:35 +01:00
N0tMyFaultOG
ef95334fe6
Update actions worflow 2020-11-23 18:35:44 +01:00
N0tMyFaultOG
4595534a6f
Update actions workflow 2020-11-23 18:32:28 +01:00
N0tMyFaultOG
be9d9264ae Make use of Permission class in tab completion
Plus document a few more permission nodes
2020-11-19 22:29:44 +01:00
N0tMyFaultOG
a8495c67d4 Update gradle to 6.7.1 2020-11-19 22:05:45 +01:00
N0tMyFaultOG
eec369ea4f Improve tab completion, adjust permissions and more v6 changes 2020-11-19 21:53:27 +01:00
N0tMyFaultOG
abed07b613 Add tab completion for /plot area 2020-11-19 21:24:23 +01:00
N0tMyFaultOG
6cfdedb823 Don't collapse imports 2020-11-19 21:13:35 +01:00
N0tMyFaultOG
db903ebb0a Revert "Update gradle.yml"
This reverts commit e12c83fd830491569e7ad4a2b97daac7ab69543b.
2020-11-19 21:05:48 +01:00
N0tMyFaultOG
e12c83fd83 Update gradle.yml 2020-11-19 17:44:57 +01:00
N0tMyFaultOG
12861f6c07 Add tab completion for /plot setowner 2020-11-19 17:39:58 +01:00
N0tMyFaultOG
52065b8313 Add tab completion for /plot schematic 2020-11-19 17:36:14 +01:00
N0tMyFaultOG
f6ff843cfb Send message when attempting to leave an own plot
This is a temporary workaround for the todo addressed below.
2020-11-19 17:30:26 +01:00
N0tMyFaultOG
aedf402c17 Fix /plot leave requiring an arg when none is needed 2020-11-19 17:10:01 +01:00
N0tMyFaultOG
0745b03271 Add tab completion for /plot cluster 2020-11-19 17:00:21 +01:00
N0tMyFaultOG
bb5c0de367 Fix /plot download world not being clickable 2020-11-19 16:39:44 +01:00
N0tMyFaultOG
9478251d44 Fix /plot buy message and enhance it with player balance 2020-11-19 16:32:30 +01:00
NotMyFault
47cb85d3db
Merge pull request #2932 from IntellectualSites/feature/v6/generify-perms
Generify permissions thru Permission class
2020-11-16 10:34:29 +01:00
N0tMyFaultOG
ce7ceccc1c Merge branch 'v6' into feature/v6/generify-perms 2020-11-16 10:25:48 +01:00
dordsor21
5d4cf3b705
setowner should allow null UUIDs 2020-11-10 17:24:37 +00:00
NotMyFault
f33fc092e3
Add java 11 to actions test 2020-11-08 21:48:23 +01:00
N0tMyFaultOG
0ff8abcd6f Update town template for schem 2 v2 2020-11-08 15:22:31 +01:00
NotMyFault
b0d55d434d
5.13.9 2020-11-03 21:14:07 +01:00
N0tMyFaultOG
092690e9f0 Update permission in regards of https://github.com/IntellectualSites/PlotSquared/pull/2932 2020-11-03 15:44:07 +00:00
N0tMyFaultOG
5b11175cf3 Add plots.visit.denied permission 2020-11-03 15:44:07 +00:00
N0tMyFaultOG
7a203a12a3 Merge branch 'v6' of https://github.com/IntellectualSites/PlotSquared into v6 2020-11-03 16:43:48 +01:00
N0tMyFaultOG
f7dd8af35e Enhance plot claim message 2020-11-03 15:43:28 +00:00
N0tMyFaultOG
7a9b3442d2 1.16.4 2020-11-03 16:43:18 +01:00
N0tMyFaultOG
b66e2359d1 Update to 1.16.4
- Bump WorldEdit to 7.2.0 release
2020-11-03 15:58:17 +01:00
N0tMyFaultOG
81c72ee5d9 Finish up permissions 2020-11-02 21:03:46 +01:00
N0tMyFaultOG
fed7f89f96 Fix compiling 2020-11-02 11:58:07 +01:00
N0tMyFaultOG
aefa629509 Generify permissions thru Permission class
- Fixed a few improper permissions
- Fixed a couple of typos
2020-11-02 00:55:58 +01:00
N0tMyFaultOG
bc32581cbd Improve empty global flag list message 2020-11-02 00:00:38 +01:00
NotMyFault
3f7f6af051
Merge pull request #2913 from IntellectualSites/features/v6/queue-features
Features/v6/queue features
2020-11-01 21:16:32 +01:00
dordsor21
ee9b2e8bf8
Just merge the whole thing. Merge branch 'v6' into features/v6/queue-features
# Conflicts:
#	Core/src/main/resources/lang/messages_en.json
2020-11-01 18:58:24 +00:00
dordsor21
0b968abfe4
fix merging conflicts 2020-11-01 17:45:38 +00:00
N0tMyFaultOG
7e7ecd6a0f Update paperlib 2020-11-01 17:17:12 +01:00
dordsor21
7e9a9e14c7 Fix various instances where Adventure is being used incorrectly 2020-10-25 22:38:00 +00:00
Mariell Hoversholm
333493f351 adventure v4.1.0; project now compiles 2020-10-17 21:10:02 +01:00
Mariell Hoversholm
38333a6d11 Update to Gradle 6.7 2020-10-17 21:10:02 +01:00
NotMyFault
4213957d76
Delete dependabot.yml 2020-10-12 12:21:32 +02:00
dordsor21
565f9e3e29
5.13.8 2020-10-11 19:27:01 +01:00
dordsor21
a1bfc1cb26
correctly handle road flags 2020-10-11 19:24:50 +01:00
dordsor21
cfd432886d
Correctly handle road flags 2020-10-11 19:19:17 +01:00
N0tMyFaultOG
191666a2f2 Fix logo 2020-10-11 13:03:22 +02:00
N0tMyFaultOG
aeeae7c167 Fix links not being clickable 2020-10-11 12:47:49 +02:00
N0tMyFaultOG
08c7d4d15e Remove dead imports 2020-10-09 21:03:23 +02:00
N0tMyFaultOG
29b92659c7 Fix typos 2020-10-09 20:50:12 +02:00
N0tMyFaultOG
209f25a5cf Update default branch 2020-10-09 20:21:57 +02:00
N0tMyFaultOG
4622f4b51d Fix plot leave 2020-10-09 20:21:02 +02:00
dordsor21
4d51dc9b6c
Switch to translateable captions 2020-10-09 17:47:51 +01:00
dordsor21
76b992509b
use format not silly round stuff 2020-10-09 17:29:05 +01:00
dordsor21
925978db8f
change default lighting to 1 2020-10-09 17:26:52 +01:00
dordsor21
c0e90ddb33
increase interval of progress notify 2020-10-09 17:25:48 +01:00
dordsor21
a7a29eaf97
Correctly cancel notify tasks and add notifications to commands 2020-10-09 17:24:59 +01:00
dordsor21
a451d2d6f2
Fix the injection 2020-10-09 16:34:59 +01:00
dordsor21
914429ab4f
Merge branch 'v6' into features/v6/queue-features
# Conflicts:
#	Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java
#	Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java
#	Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java
2020-10-09 15:23:09 +01:00
N0tMyFaultOG
f721a7c66c Update build.gradle.kts 2020-10-08 21:25:09 +02:00
N0tMyFaultOG
bba499649b No need to point if PAPI is not in use 2020-10-08 20:56:33 +02:00
N0tMyFaultOG
f9cd54c445 Shift logger.info -> error when running in an outdated environment 2020-10-08 20:54:06 +02:00
N0tMyFaultOG
0d89125a8e Replace sys out with logger factory 2020-10-08 20:52:02 +02:00
N0tMyFaultOG
6b37d678df Fix plot template tab completion 2020-10-08 20:47:43 +02:00
N0tMyFaultOG
02698b3a0e Fix plot grant tab completion 2020-10-08 20:42:17 +02:00
N0tMyFaultOG
6f0512c18c Fix plot set tab completions 2020-10-08 20:16:29 +02:00
N0tMyFaultOG
e46b38b301 Fix plot set values 2020-10-08 19:51:42 +02:00
N0tMyFaultOG
5841817fb5 Missing space 2020-10-08 19:29:09 +02:00
N0tMyFaultOG
e28fb49015 Add override permission for /plot music 2020-10-08 19:27:05 +02:00
N0tMyFaultOG
841eef6a52 Fix done message on backup and add done message to grant 2020-10-08 18:57:11 +02:00
Mariell Hoversholm
2eee1ef203 Fix log4j 2020-10-08 14:33:48 +02:00
Mariell Hoversholm
cd605f4996 Relocate log4j, move slf4j declaration 2020-10-08 14:02:08 +02:00
Mariell Hoversholm
54a8482a88 Minecraft does not always provide slf4j 2020-10-08 14:02:08 +02:00
Mariell Hoversholm
e15b5a07fb It runs! And it's small! 2020-10-08 14:02:08 +02:00
Mariell Hoversholm
c198305b5e Add missing relocations 2020-10-08 14:02:08 +02:00
Mariell Hoversholm
a637a8970b Add maven publishing 2020-10-08 14:02:08 +02:00
Mariell Hoversholm
d97f68eec0 Address review issues 2020-10-08 14:02:08 +02:00
Mariell Hoversholm
c3069a425d Format licence headers 2020-10-08 14:02:08 +02:00
Mariell Hoversholm
9b1dc7d42e She compiles! 2020-10-08 14:02:08 +02:00
N0tMyFaultOG
ec23fcdd75 Rewrite build scripts
Co-Authored By: Mariell Hoversholm <proximyst@proximyst.com>
2020-10-08 14:02:08 +02:00
dordsor21
544d57c720
Merge branch 'v5' into v6
# Conflicts:
#	Bukkit/build.gradle
#	Bukkit/pom.xml
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/uuid/BungeePermsUUIDService.java
#	Core/src/main/java/com/plotsquared/core/PlotPlatform.java
#	Core/src/main/java/com/plotsquared/core/command/DebugPaste.java
#	Core/src/main/java/com/plotsquared/core/command/Grant.java
#	build.gradle
2020-10-07 12:20:32 +01:00
dordsor21
b55d836871
5.13.7 2020-10-07 11:59:44 +01:00
N0tMyFaultOG
a210f523a5 Add more information to debugpaste 2020-10-04 18:19:29 +02:00
Aurora
e6237d68d0 Also remove BungeePerms from the config 2020-10-04 13:26:56 +02:00
Aurora
56e6922279 Remove BungeePerms UUID fetcher 2020-10-04 13:26:56 +02:00
Alexander Söderberg
6e2f738d86 Stop relying on maxim's repo as it's very unreliable. 2020-10-04 12:24:37 +01:00
Hannes Greule
81d0bf6f04 Prevent blocks from getting waterlogged
In some cases, the PlayerInteractEvent doesn't cancel right clicks on blocks that can be waterlogged
2020-10-03 21:54:14 +02:00
dordsor21
95f509d337
Stop forcing loiwercase world names 2020-10-02 15:08:14 +01:00
dordsor21
2f5ce67154
add back setShouldAbortSpawn 2020-09-29 15:55:08 +01:00
dordsor21
89318be5f4
Apply e2f9b4245b9f7168fc38d9cb10cd05efcb42fe05 to paper listener too 2020-09-29 15:53:23 +01:00
dordsor21
f80e8c8d11
For sake of allowing v5 -> v6 2020-09-25 20:08:28 +01:00
dordsor21
8c4bb4140a
5.13.6 2020-09-20 19:51:54 +01:00
dordsor21
ff83931a3f
Fix plot grant 2020-09-20 19:42:13 +01:00
N0tMyFaultOG
2468be4736 Merge branch 'v6' of https://github.com/IntellectualSites/PlotSquared into v6 2020-09-20 17:36:35 +02:00
Hannes Greule
4e835ed3ff Add missing command description 2020-09-20 00:51:54 +02:00
dordsor21
41f494fbff
Remove jetbrains annotations 2020-09-18 12:45:26 +01:00
dordsor21
e974fe5dc7
Merge branch 'v6' into features/v6/queue-features 2020-09-18 12:22:32 +01:00
dordsor21
85a23442cc
bump minimessage version to fix build 2020-09-18 12:22:01 +01:00
dordsor21
a822a70f00
bump minimessage so it compiles 2020-09-18 12:11:34 +01:00
dordsor21
819902c24e
Fix licenses 2020-09-14 22:00:09 +01:00
dordsor21
554efbb057
Merge branch 'v5' into v6
# Conflicts:
#	.github/CODEOWNERS
#	Bukkit/pom.xml
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java
#	Core/src/main/java/com/plotsquared/core/command/Alias.java
#	Core/src/main/java/com/plotsquared/core/command/HomeCommand.java
#	Core/src/main/java/com/plotsquared/core/command/Music.java
#	Core/src/main/java/com/plotsquared/core/listener/PlotListener.java
#	Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java
#	Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java
#	Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeWrapper.java
#	build.gradle
2020-09-11 15:44:04 +01:00
dordsor21
8547533210
update pom 2020-09-11 15:04:09 +01:00
dordsor21
d843d1715d
Allow /plot home [area|world] 2020-09-11 15:03:48 +01:00
dordsor21
1552a8e74b
Add option to change lighting behaviour in queues 2020-09-11 14:18:50 +01:00
dordsor21
f0e9a8c5fe
Implement progress subscribers 2020-09-11 12:59:40 +01:00
NotMyFault
648953ec1f
5.13.5 2020-09-11 12:27:23 +02:00
dordsor21
9e85748b2e
Merge branch 'features/v6/queue-features' of github.com:IntellectualSites/PlotSquared into features/v6/queue-features 2020-09-11 11:21:23 +01:00
dordsor21
a98b23af02
progress subscriber 2020-09-11 11:20:38 +01:00
NotMyFault
5463f15633
Add pigstep music disc 2020-09-11 01:16:57 +02:00
NotMyFault
0c6113b0d1
5.13.4 2020-09-09 23:31:30 +02:00
Hannes Greule
c5906e780a
Merge pull request #2912 from IntellectualSites/fix/v5/blocktypewrapper
Add default namespace when wrapping block categories by their ids
2020-09-08 18:50:08 +02:00
Hannes Greule
f2355a76d6 Add default namespace when wrapping block categories by their ids 2020-09-06 23:36:36 +02:00
Alexander Söderberg
0aeca40137
Take player visibility into account when sending notify-enter and notify-leave messages. Fixes PS-103. 2020-09-05 18:48:58 +02:00
Hannes Greule
5c48e4ad19 Add missing license header 2020-09-05 18:39:56 +02:00
Hannes Greule
f6d1e2b3b8 Check TileState manually on 1.13.2, fixes PS-122 2020-09-05 18:39:56 +02:00
NotMyFault
37010d92ee
Create CODEOWNERS 2020-09-05 13:42:11 +02:00
Hannes Greule
babad3ab6d Don't validate plot aliases with offline players (Fixes PS-126) 2020-09-04 14:49:02 +02:00
N0tMyFaultOG
b12e9832c9 Update pom.xml 2020-09-02 17:20:54 +02:00
N0tMyFaultOG
0f9554c717 Merge branch 'v5' into v6 2020-09-02 17:19:12 +02:00
N0tMyFaultOG
d19dde2f85 Add more debugs 2020-09-02 17:18:41 +02:00
N0tMyFaultOG
7a529e156d Add deb for onBlockIgnite event 2020-09-02 17:03:56 +02:00
N0tMyFaultOG
cba2474df7 Merge v5/v6 2020-09-02 16:44:18 +02:00
NotMyFault
03c889383b
Merge pull request #2908 from IntellectualSites/dependabot/gradle/v5/org.yaml-snakeyaml-1.26
Bump snakeyaml from 1.25 to 1.26
2020-09-02 16:15:26 +02:00
NotMyFault
da54478767
Merge pull request #2907 from IntellectualSites/dependabot/gradle/v5/org.jetbrains-annotations-20.1.0
Bump annotations from 20.0.0 to 20.1.0
2020-09-02 16:14:26 +02:00
NotMyFault
acf9c2554f
Merge pull request #2904 from IntellectualSites/dependabot/gradle/v5/org.ajoberstar.grgit-4.0.2
Bump org.ajoberstar.grgit from 4.0.1 to 4.0.2
2020-09-02 16:12:56 +02:00
dependabot[bot]
7c53bfc870
Bump snakeyaml from 1.25 to 1.26
Bumps [snakeyaml](https://bitbucket.org/asomov/snakeyaml) from 1.25 to 1.26.
- [Commits](https://bitbucket.org/asomov/snakeyaml/branches/compare/snakeyaml-1.26..snakeyaml-1.25)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-02 14:10:44 +00:00
dependabot[bot]
32a8dcd411
Bump annotations from 20.0.0 to 20.1.0
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 20.0.0 to 20.1.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/20.0.0...20.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-02 14:10:44 +00:00
dependabot[bot]
20b4cec0ca
Bump org.ajoberstar.grgit from 4.0.1 to 4.0.2
Bumps org.ajoberstar.grgit from 4.0.1 to 4.0.2.

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-02 14:10:39 +00:00
NotMyFault
c51c938e8d
Merge pull request #2903 from IntellectualSites/dependabot/add-v2-config-file
Create Dependabot config file
2020-09-02 16:10:14 +02:00
dependabot-preview[bot]
49984f2560
Create Dependabot config file 2020-09-02 13:55:15 +00:00
N0tMyFaultOG
b3c77ef099 Merge branch 'dependabot/gradle/v5/org.jetbrains.kotlin-kotlin-stdlib-1.4.0' into v5 2020-09-02 12:57:05 +02:00
N0tMyFaultOG
97e34844b4 Add option to opt-out MvDW Placeholder API 2020-09-02 12:13:23 +02:00
N0tMyFaultOG
e924a1920e Add message to rgar 2020-09-01 00:02:56 +02:00
NotMyFault
1441cc293c
5.13.3 2020-08-26 13:57:20 +02:00
Hannes Greule
311a2ddc75 Replace null checks with NullEconHandler 2020-08-25 12:41:03 +02:00
Hannes Greule
551d1d9f1a Add NullEconHandler to avoid verbose null checks 2020-08-25 12:41:03 +02:00
N0tMyFaultOG
a5dea9e7f6 Permission cleanup 2020-08-24 20:51:23 +02:00
N0tMyFaultOG
02bd83bd90 Merge v5 into v6 2020-08-24 14:33:53 +02:00
Hannes Greule
c42d5390a4 Allow teleporting to merged plots with multiple owners using /p home 2020-08-24 13:37:12 +02:00
Hannes Greule
31ea7297c2 Generate signs by default 2020-08-24 13:30:50 +02:00
Hannes Greule
c53cffb745 Generate signs by default 2020-08-24 13:17:15 +02:00
N0tMyFaultOG
26a99a122a Minor permission fix 2020-08-23 19:34:22 +02:00
dependabot-preview[bot]
acb0bd95f2
Bump kotlin-stdlib from 1.3.72 to 1.4.0
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.3.72 to 1.4.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.4.0/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.3.72...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-22 23:05:56 +00:00
NotMyFault
5d73b17415
Merge pull request #2899 from IntellectualSites/dependabot/gradle/v5/org.jetbrains-annotations-20.0.0
Bump annotations from 19.0.0 to 20.0.0
2020-08-23 01:04:40 +02:00
N0tMyFaultOG
3a8fa9f5b6 Update WorldEdit version
That doesn't appear to break stuff 👀
2020-08-22 13:18:00 +02:00
N0tMyFaultOG
e93d7feb2c Fixes PS-114 2020-08-22 11:48:03 +02:00
N0tMyFaultOG
116b870152 Apply missing license header 2020-08-22 11:44:34 +02:00
Alexander Söderberg
667c7b07b6
Merge pull request #2897 from IntellectualSites/features/v6/services 2020-08-21 23:03:29 +02:00
Alexander Söderberg
45e75cc06e
Merge branch 'v6' into features/v6/services 2020-08-21 23:02:52 +02:00
N0tMyFaultOG
5c08db2f44 Merge branch 'feature/v5/1.16.2-support' into v5 2020-08-21 19:02:23 +02:00
NotMyFault
28fc29c3ab
Merge pull request #2890 from MeFisto94/fix-1-16-worldserver-regression
Fixes an OfflinePlayerUtil breakaged caused by NMS Changes
2020-08-21 18:29:03 +02:00
NotMyFault
b2ac67692e
Merge pull request #2892 from TimonMi/v5
[Bugfix] No chat message confirmation on /p add /p trust, etc.
2020-08-21 18:28:05 +02:00
Hannes Greule
1064d777c2 Clean up unused code 2020-08-21 00:02:07 +02:00
Hannes Greule
62f675adbe Allow visiting all owners of merged plots 2020-08-21 00:01:53 +02:00
Hannes Greule
cee0bbb805 Revert target usage 2020-08-20 23:29:51 +02:00
Hannes Greule
77eb75fcc6 Adapt adventure changes 2020-08-20 23:28:42 +02:00
Hannes Greule
55211907f2 Use command descriptions from translations 2020-08-20 23:16:15 +02:00
Alexander Söderberg
e1e7cd1479
Add missing license headers 2020-08-20 17:11:12 +02:00
Alexander Söderberg
2d3c729215
Extract plot modifications to external class 2020-08-20 17:10:50 +02:00
Alexander Söderberg
f391cfd432
Extract comment logic from the plot class 2020-08-20 16:03:06 +02:00
N0tMyFaultOG
352136f0c6 Cleanup logging system 2020-08-18 15:50:28 +02:00
N0tMyFaultOG
b6e7f90f6a Fix logger.info format 2020-08-18 15:34:43 +02:00
N0tMyFaultOG
86cfeb76b6 More json stuff 2020-08-18 12:22:26 +02:00
NotMyFault
d91357a807
Update messages_en.json 2020-08-18 10:59:44 +02:00
N0tMyFaultOG
3c8d7a808b Prefix changes and others 2020-08-17 23:21:18 +02:00
N0tMyFaultOG
d6a80c7ea5 More json stuff, fixes and enhancements 2020-08-17 22:26:01 +02:00
N0tMyFaultOG
05a15ac689 Fix a few typos and spaces 2020-08-17 19:39:43 +02:00
N0tMyFaultOG
580cc359e5 fabb9b6fd7 (r41530745) 2020-08-17 18:56:27 +02:00
N0tMyFaultOG
630284e7ae More json fixes 2020-08-17 18:42:42 +02:00
N0tMyFaultOG
cc562033e7 Fix console requirement 2020-08-17 18:29:51 +02:00
N0tMyFaultOG
fabb9b6fd7 More json stuff 2020-08-17 18:15:29 +02:00
dordsor21
e8ffcaae46
progress subscriber 2020-08-17 16:21:11 +01:00
Hannes Greule
47d9895077 Fix ms to ticks conversion on Paper 2020-08-17 16:37:27 +02:00
Hannes Greule
aacf15757f Use less confusing variable name 2020-08-17 15:32:17 +02:00
Hannes Greule
914b44069b Convert item display name 2020-08-17 15:22:41 +02:00
Hannes Greule
4789327378 Encapsulate fields 2020-08-17 15:17:40 +02:00
Hannes Greule
c55f2945ac Fix sign text 2020-08-17 15:08:21 +02:00
N0tMyFaultOG
c6a368d6f2 More json fixes 2020-08-17 13:24:15 +02:00
dependabot-preview[bot]
869a579655
Bump annotations from 19.0.0 to 20.0.0
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 19.0.0 to 20.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/19.0.0...20.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 09:08:30 +00:00
Alexander Söderberg
7cd1e8ea76
Fix command registration 2020-08-17 04:39:59 +02:00
Alexander Söderberg
351ae1b2c7
Synchronize auto queries 2020-08-17 01:27:45 +02:00
Hannes Greule
457f3e25cc resolve rebase issue 2020-08-17 01:10:46 +02:00
Hannes Greule
41c670450b Remove PlotFilter 2020-08-17 01:10:46 +02:00
Hannes Greule
f636db49f7 Remove SetupObject 2020-08-17 01:10:46 +02:00
Hannes Greule
505bba7612 Fix recursive call 2020-08-17 00:53:39 +02:00
Hannes Greule
72507aba4b Change player locale on event 2020-08-17 00:29:53 +02:00
Hannes Greule
9b086b3f2a Insert missing keys into message files 2020-08-17 00:29:53 +02:00
N0tMyFaultOG
f9d7d2d1dd Fix clickable messages 2020-08-16 19:43:27 +02:00
N0tMyFaultOG
e9efa3f2d3 Fix some translation issues 2020-08-16 18:24:54 +02:00
dordsor21
665a72a08f
Fill out a lot more JavaDoc.
I've left DB stuff alone
2020-08-16 13:22:49 +01:00
MeFisto94
61d1dcc231 Ignore Events if they are not caused by real players (i.e. citizens) 2020-08-16 14:09:32 +02:00
MeFisto94
6c9b73b100 Apply patch by @SirYwell to construct the ResourceKey without consulting the DimensionManager 2020-08-16 14:02:03 +02:00
Alexander Söderberg
a4c9ed90b7
Fix startup issues and make messages send properly 2020-08-16 13:49:16 +02:00
Alexander Söderberg
28d6d4db92
Fix shading mess and make the plugin start 2020-08-16 12:44:10 +02:00
dordsor21
12def37194
clean up some javadoc stuff 2020-08-16 11:34:08 +01:00
Alexander Söderberg
ed2302e545
Remove illegal import 2020-08-16 12:10:19 +02:00
N0tMyFaultOG
618adb913d Update license and remove dead module entries 2020-08-15 19:17:29 +02:00
N0tMyFaultOG
4a220f9bfb Update license header 2020-08-15 14:59:29 +02:00
NotMyFault
300abd868a
Merge pull request #2888 from IntellectualSites/fix-conversion
Fix problem with config creation
2020-08-14 18:36:57 +02:00
Alexander Söderberg
87f0b1fc97
Add service system and rewrite Auto to use the service system 2020-08-14 17:24:34 +02:00
NotMyFault
78a6e72fe1
5.13.2 2020-08-14 15:26:32 +02:00
dordsor21
8f1b2a9d2a
fix pve against animals on other plots and roads 2020-08-14 14:21:45 +01:00
NotMyFault
5b27b652e7
Fix color tag 2020-08-14 12:52:00 +02:00
NotMyFault
556ff0baf4
Fix line break 2020-08-14 12:27:38 +02:00
NotMyFault
8cc536b20f
Fix spelling 2020-08-14 11:57:37 +02:00
N0tMyFaultOG
5e20c871a5 Fix metrics setting 2020-08-14 11:36:17 +02:00
NotMyFault
56fb892818
Fix brackets 2020-08-14 00:37:06 +02:00
N0tMyFaultOG
7f104c249a Permission cleanup
- Removed plotme perms
- Fixed incorrect permission for "/plot flag remove"
- Fixed incorrect administrative unlink node
- Removed compat alias from "/plot set alias" command

I've documented all removed permission packages and fixed permissions in detail on the v6 page. So it's easy to go-by when updating.
2020-08-13 23:32:13 +02:00
N0tMyFaultOG
0eeface374 Remove old translations 2020-08-13 21:37:28 +02:00
N0tMyFaultOG
ffe1e1e40d Core is Core 2020-08-13 21:25:17 +02:00
N0tMyFaultOG
5efdef19cf Remove dead asset setting 2020-08-13 21:16:30 +02:00
N0tMyFaultOG
c9fae6a070 Remove old translation setup and move commands to templates 2020-08-13 21:11:07 +02:00
N0tMyFaultOG
2b17f730d4 Merge v5 into v6 2020-08-12 18:20:37 +02:00
NotMyFault
808bddbfbb
Apply scaling to image 2020-08-12 10:30:05 +02:00
N0tMyFaultOG
d6dfa9a0b9 https 2020-08-11 20:12:31 +02:00
NotMyFault
924b73f070
Merge pull request #2896 from luca-gg/patch-1
Update de-DE.yml
2020-08-11 19:33:41 +02:00
Luca
64181c6ab8
Update de-DE.yml
adjusted grammar
2020-08-11 19:29:40 +02:00
N0tMyFaultOG
a1b10a2900 Remove dead files 2020-08-11 17:49:04 +02:00
N0tMyFaultOG
6315b9ea52 gradle 6.6 2020-08-11 17:43:24 +02:00
N0tMyFaultOG
7c756304b5 1.16.2 support
- Bump EssentialsX version to the latest release
2020-08-11 16:20:33 +02:00
NotMyFault
9fd11fbe13
Merge pull request #2893 from JunTVDE/de-translation-edit
added german translation for flag-descriptions to de-DE.yml
2020-08-09 13:21:31 +02:00
NotMyFault
7cd9a03b0f
Merge pull request #2894 from TimonMi/patch-1
Update link for contributing
2020-08-09 13:20:17 +02:00
EinDev
f8bd844c6c
Update link for contributing 2020-08-09 13:18:35 +02:00
JunTVDE
987d9a267c added german translation for flag-descriptions to de-DE.yml 2020-08-09 13:05:40 +02:00
EinDev
98d1bb9264 Merge remote-tracking branch 'upstream/v5' into v5 2020-08-08 18:39:47 +02:00
EinDev
b46a19f5ca Keep player names, so they don't have to be looked up again.
That way the lookup function MainUtil#getName won't get called which would throw an exception if called in the Bukkit Thread.
As the player enters the Name, we don't have to look it up again.

Fixes PS-96
2020-08-08 18:07:49 +02:00
dordsor21
6e16ef1246
remove PllayerEvents 2020-08-08 13:21:46 +01:00
dordsor21
7bad242944
Merge branch 'v6' into feature/v6/json. It builds!
# Conflicts:
#	Bukkit/build.gradle
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/inject/BukkitModule.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/queue/ChunkCoordinator.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/queue/GenChunk.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/command/Area.java
#	Core/src/main/java/com/plotsquared/core/command/Clear.java
#	Core/src/main/java/com/plotsquared/core/command/Debug.java
#	Core/src/main/java/com/plotsquared/core/command/DebugRoadRegen.java
#	Core/src/main/java/com/plotsquared/core/command/Relight.java
#	Core/src/main/java/com/plotsquared/core/command/Set.java
#	Core/src/main/java/com/plotsquared/core/command/Template.java
#	Core/src/main/java/com/plotsquared/core/command/Trim.java
#	Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java
#	Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java
#	Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java
#	Core/src/main/java/com/plotsquared/core/plot/Plot.java
#	Core/src/main/java/com/plotsquared/core/plot/flag/GlobalFlagContainer.java
#	Core/src/main/java/com/plotsquared/core/queue/AreaBoundDelegateQueueCoordinator.java
#	Core/src/main/java/com/plotsquared/core/queue/ChunkQueueCoordinator.java
#	Core/src/main/java/com/plotsquared/core/queue/LocalBlockQueue.java
#	Core/src/main/java/com/plotsquared/core/util/ChunkUtil.java
#	Core/src/main/java/com/plotsquared/core/util/EntityUtil.java
#	Core/src/main/java/com/plotsquared/core/util/RegionManager.java
#	Core/src/main/java/com/plotsquared/core/util/WorldUtil.java
#	Core/src/main/java/com/plotsquared/core/uuid/UUIDPipeline.java
#	build.gradle
2020-08-08 13:20:30 +01:00
dordsor21
74a5c48214
Finish up core and bukkit json 2020-08-08 12:16:48 +01:00
N0tMyFaultOG
11af906c79 Fix a little oopsie 2020-08-07 18:55:22 +02:00
N0tMyFaultOG
c31c4b4286 More work 2020-08-07 18:52:45 +02:00
dordsor21
7f29b5d1e8
ComponentPreset inventory to json 2020-08-07 13:22:10 +01:00
dordsor21
6012705e95
Implement Permission#format to replace the CaptionUtility#format method 2020-08-07 12:12:16 +01:00
dordsor21
21a97863ac
Refactor Captions to Permission, reimplement message list in debug command 2020-08-07 11:53:32 +01:00
dordsor21
50cfecb3fd
Several minor progress. Couple of bigger (inboxes and help) 2020-08-07 11:08:03 +01:00
dordsor21
1461804039
Remove last reference to PlotMessage in Core 2020-08-07 10:20:11 +01:00
Timon
dc3f45acd4 Added UseFlag check at Roads 2020-08-07 09:57:02 +01:00
Hannes Greule
6970dfa5f8 More json progress 2020-08-07 02:53:05 +02:00
MeFisto94
48d3c2105d Fixes an OfflinePlayerUtil breakage caused by NMS Changes 2020-08-06 15:23:36 +02:00
dordsor21
18f630ba15
Bit more json 2020-08-06 14:06:19 +01:00
dordsor21
f68eb9c778
update plot list 2020-08-06 13:36:15 +01:00
dordsor21
4a960d9f2c
update pagination to new json 2020-08-06 12:23:47 +01:00
Timon
c745b99922 Added UseFlag check at Roads 2020-08-06 12:01:43 +02:00
dordsor21
f1e3902fea
Several more progress 2020-08-05 11:48:10 +01:00
N0tMyFaultOG
41a623a643 More work towards json 2020-08-04 19:01:25 +02:00
dordsor21
d3fe1d3b2b
Fix plot info, sign usage in Plot.class 2020-08-04 15:07:07 +01:00
Hannes Greule
3fd3baaa47 Making progress on messages 2020-08-03 23:59:16 +02:00
N0tMyFaultOG
01d2b0024f Add more information to the debugpaste 2020-07-31 20:33:17 +02:00
N0tMyFaultOG
01e66f8833 Readd skyblock template 2020-07-29 14:53:09 +02:00
dordsor21
afd9b56e71
Merge branch 'v5' of github.com:IntellectualSites/PlotSquared into v5 2020-07-28 13:58:37 +01:00
dordsor21
e2f9b4245b
Fixes https://issues.intellectualsites.com/issue/PS-81
- Add break statements to switches to prevent bleed from normal spawning to breeding
 - Separate misc spawning from mob spawning
2020-07-28 13:56:37 +01:00
N0tMyFaultOG
22a007b514 Revert "Update zh-CN.yml"
This reverts commit 240362a16d1ee37228ea95672360417034a19af3.
2020-07-28 12:33:04 +02:00
dordsor21
38988b4819
A little spring cleaning
- Add Javadoc comments for where QueueCoordinator can be given or nulled
 - Add some more Javadoc comments in general
 - Squash methods into one where QueueCoordinator can be given
 - Only use one queue in some places where it makes sense
2020-07-28 10:18:49 +01:00
dordsor21
704e92c3d0
Use placeholder 2020-07-28 09:38:27 +01:00
dordsor21
97b1a60ae8
Move comments to ChunkCoordinator, remove Range annotations 2020-07-28 08:44:16 +01:00
dordsor21
3288721259
Better constructor error handling in QueueProvider.
Add back default constructor requiring world to QueueCoordinator to indicate extents require this constructor
2020-07-28 08:34:14 +01:00
N0tMyFaultOG
ab121c7eee Fixes https://github.com/IntellectualSites/PlotSquaredSuggestions/issues/133 2020-07-26 21:12:32 +02:00
NotMyFault
240362a16d
Update zh-CN.yml 2020-07-26 17:08:58 +02:00
Alexander Söderberg
f2dcbce490
Fix problem where servers created in v5 (not converted from v4) would fail to start properly.
This is a quite major issue and I hope this fix resolves it. Although, it should be tested with migration from v4 to v5 and then a fresh v5 server.
2020-07-25 03:16:36 +02:00
Alexander Söderberg
88df434404
Create CODE_OF_CONDUCT.md 2020-07-25 03:11:07 +02:00
dordsor21
b3ddabda29
Fix DelegateQueueCoordinator 2020-07-24 18:20:26 +01:00
dordsor21
b8b3e1e72a
Merge branch 'v6' into feature/v6/pipeline-queue
# Conflicts:
#	Bukkit/build.gradle
#	Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java
2020-07-24 18:18:42 +01:00
dordsor21
615a5212bf
update bukkit pom 2020-07-24 17:57:16 +01:00
dordsor21
221d299052
Fix a few remaining merge issues (+1 squashed commits)
Squashed commits:

[8c6b55dd4] Fix a few remaining merge issues
2020-07-24 17:57:16 +01:00
dordsor21
3180d2ddf2
Merge branch 'v5' into v6
# Conflicts:
#	Bukkit/build.gradle
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/placeholder/Placeholders.java
#	Core/src/main/java/com/plotsquared/core/PlotPlatform.java
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java
#	Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java
#	Core/src/main/java/com/plotsquared/core/uuid/UUIDPipeline.java
#	build.gradle
2020-07-24 17:15:58 +01:00
dordsor21
7aaa075ba8
Javadoc, some cleanup 2020-07-24 17:00:08 +01:00
Alexander Söderberg
4fb590889a
Remove all permission related errors 2020-07-24 17:44:47 +02:00
Alexander Söderberg
115ca903b2
Remove unused stuff 2020-07-24 17:36:48 +02:00
Alexander Söderberg
e90170a384
Merge remote-tracking branch 'origin/v6' into feature/v6/json
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitOfflinePlayer.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitLocalQueue.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEconHandler.java
#	Core/pom.xml
#	Core/src/main/java/com/plotsquared/core/PlotAPI.java
#	Core/src/main/java/com/plotsquared/core/PlotPlatform.java
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/command/Area.java
#	Core/src/main/java/com/plotsquared/core/command/Auto.java
#	Core/src/main/java/com/plotsquared/core/command/Claim.java
#	Core/src/main/java/com/plotsquared/core/command/CmdConfirm.java
#	Core/src/main/java/com/plotsquared/core/command/Command.java
#	Core/src/main/java/com/plotsquared/core/command/CommandCaller.java
#	Core/src/main/java/com/plotsquared/core/command/DebugExec.java
#	Core/src/main/java/com/plotsquared/core/command/Grant.java
#	Core/src/main/java/com/plotsquared/core/command/Inbox.java
#	Core/src/main/java/com/plotsquared/core/command/Load.java
#	Core/src/main/java/com/plotsquared/core/command/Save.java
#	Core/src/main/java/com/plotsquared/core/command/Setup.java
#	Core/src/main/java/com/plotsquared/core/listener/PlotListener.java
#	Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java
#	Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java
#	Core/src/main/java/com/plotsquared/core/plot/Plot.java
#	Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java
#	Core/src/main/java/com/plotsquared/core/util/BlockUtil.java
#	Core/src/main/java/com/plotsquared/core/util/Permissions.java
2020-07-24 17:28:52 +02:00
dordsor21
1d0760c630
Formatting, mark nonnull, nullable etc 2020-07-24 16:24:53 +01:00
Alexander Söderberg
af44fe74ff
Add namespaces for translations 2020-07-24 17:19:25 +02:00
dordsor21
72c0021306
A couple of reworks
- Redo how regeneration works a little to also take a cuboid region for regeneration off-chunk plots
 - Fix a couple of cases where we were writing to the queue instead of the world in the ChunkConsumer (dum)
 - this seems to be working.
2020-07-24 15:17:42 +01:00
dordsor21
18918eb3a3
Fix a couple more Guice issues. Refactor read chunks to be a list of chunks rather than CuboidRegion 2020-07-24 14:36:50 +01:00
dordsor21
416e181992
Merge branch 'v6' into feature/v6/pipeline-queue 2020-07-24 13:10:11 +01:00
Alexander Söderberg
d7a49e3316
This is not my fault 2020-07-24 14:08:40 +02:00
dordsor21
cf13f13fbf
Merge branch 'v6' into feature/v6/pipeline-queue 2020-07-24 13:03:42 +01:00
Alexander Söderberg
f53a8d3b06
Fix permissionprofile initialisation order 2020-07-24 14:02:49 +02:00
dordsor21
8c5c1922c9
Merge branch 'v6' into feature/v6/pipeline-queue 2020-07-24 12:34:41 +01:00
Alexander Söderberg
707559e023 Merge remote-tracking branch 'origin/v6' into v6 2020-07-24 13:33:00 +02:00
Alexander Söderberg
97a2ccbfe0 make sure the PlayerMetaDataKeys keys are loaded 2020-07-24 13:32:46 +02:00
dordsor21
95f2a7a908
fix version 2020-07-24 12:22:13 +01:00
dordsor21
e53c53bb4a
Merge branch 'v6' into feature/v6/pipeline-queue
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/inject/BukkitModule.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
#	Core/src/main/java/com/plotsquared/core/queue/BasicLocalBlockQueue.java
2020-07-24 12:21:40 +01:00
dordsor21
d906a85095
Fix some issues I caused with Guice 2020-07-24 12:18:36 +01:00
Alexander Söderberg
dc1f669a1f Remove permission caching 2020-07-24 13:01:38 +02:00
Alexander Söderberg
0ea862b572
Merge pull request #2886 from IntellectualSites/features/v6/permissions
Permission system fixup
2020-07-24 12:49:37 +02:00
Alexander Söderberg
fe7a57b2b7 Remove mainutil cache workaround 2020-07-24 12:48:45 +02:00
Alexander Söderberg
c9c62a1083 Remove dumb permission mess. 2020-07-24 12:44:04 +02:00
Alexander Söderberg
5608c5a901 Merge branch 'v6' into features/v6/permissions
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java
#	Core/src/main/java/com/plotsquared/core/command/Auto.java
#	Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java
#	Core/src/main/java/com/plotsquared/core/util/Permissions.java
2020-07-24 12:20:45 +02:00
Alexander Söderberg
722361aedb Implement suggestions from PR comments 2020-07-24 12:15:25 +02:00
Alexander Söderberg
d2f40612f4 Switch from Class<T> to TypeLiteral, and implement managed meta access for temporary meta 2020-07-24 12:15:25 +02:00
Alexander Söderberg
6a63e5bb51 Expose the player's lock repository 2020-07-24 12:15:25 +02:00
Alexander Söderberg
ad40ab7e1e Grant plots to the correct player 2020-07-24 12:15:25 +02:00
Alexander Söderberg
05ce67fbfe Trick the compiler 2020-07-24 12:15:25 +02:00
Alexander Söderberg
555860cf83 Add managed persistent meta data access 2020-07-24 12:15:25 +02:00
Alexander Söderberg
2575787bd0 Add LockRepository 2020-07-24 12:15:25 +02:00
dordsor21
2cfb646065
Javadoc no fun 2020-07-23 18:11:52 +01:00
dordsor21
a1da452c41
Fix build properly 2020-07-23 18:09:37 +01:00
dordsor21
420e38bead
idek? 2020-07-23 18:07:23 +01:00
dordsor21
41c4018a27
Merge branch 'v6' into feature/v6/pipeline-queue 2020-07-23 18:06:45 +01:00
dordsor21
4d4f755607
6.0.0-SUPER-SNAPSHOT 2020-07-23 18:06:14 +01:00
dordsor21
d8e5daf12b
Fix missing Main->Chunk Util change 2020-07-23 18:04:01 +01:00
dordsor21
c3322021d0
mavenLocal, poms 2020-07-23 18:02:29 +01:00
dordsor21
45cc88091e
Merge branch 'v6' into feature/v6/pipeline-queue
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
2020-07-23 17:33:05 +01:00
dordsor21
27498f68fb
Many Much
- Add readregions to queues for when we're setting our own consumer (usually meaning the queue writes its own blocks, so it doesn't know which chunks to actually load)
 - Finish removing chunk/regionTasks
 - Allow the queue to not remove tickets from chunks (useful for swapping chunks so they don't unload needlessly)
 - Remove a lot of unused methods
 - Implement entities to queues
 - Remove chunk unloading (the server should really handle it)
2020-07-23 17:30:23 +01:00
Alexander Söderberg
d8e80daa93 Fix annoying guice injection issue 2020-07-23 15:40:43 +02:00
Alexander Söderberg
384a6730a4 Merge remote-tracking branch 'origin/features/v6/permissions' into features/v6/permissions
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
2020-07-23 15:06:00 +02:00
N0tMyFaultOG
a7de76d150 Fix dependencies 2020-07-23 15:03:57 +02:00
Alexander Söderberg
2154e237ff Remove construction of fake player entities for offline players. 2020-07-23 15:03:57 +02:00
Alexander Söderberg
5fda3e9765 Get rid of PermHandler 2020-07-23 15:03:57 +02:00
Alexander Söderberg
b302bb9379 Make VaultPermissionHandler extent BukkitPermissionHandler 2020-07-23 15:03:57 +02:00
Alexander Söderberg
bfbb81030f Start working on the new permission system 2020-07-23 15:03:57 +02:00
Alexander Söderberg
63ce3292aa Fix PlayerManager injection 2020-07-23 15:03:27 +02:00
Alexander Söderberg
b9a8846ee9 Fix WorldManager injection 2020-07-23 14:56:53 +02:00
Alexander Söderberg
6ae1d28f80 Fix WorldManager injection 2020-07-23 14:56:06 +02:00
Alexander Söderberg
17d358f8fe Fix plot ID issues 2020-07-23 14:14:15 +02:00
Alexander Söderberg
cfd71457d2 Clean up BlockUtil 2020-07-23 14:14:15 +02:00
Alexander Söderberg
87285e08dc Fix plot ID issues 2020-07-23 14:11:34 +02:00
N0tMyFaultOG
b3a63123fd Fix dependencies 2020-07-23 14:03:56 +02:00
Alexander Söderberg
7fc8238fb0 Remove construction of fake player entities for offline players. 2020-07-23 12:47:00 +02:00
Alexander Söderberg
32a0765484 Force more compilation errors 2020-07-22 21:09:38 +02:00
Alexander Söderberg
c5e1b87c61 Fix small issues 2020-07-22 21:06:23 +02:00
N0tMyFaultOG
603d1ee9bb Even more
Ok seriously, I stop here
2020-07-22 20:38:46 +02:00
Alexander Söderberg
86a0816b26 Merge remote-tracking branch 'origin/feature/v6/json' into feature/v6/json 2020-07-22 19:55:03 +02:00
Alexander Söderberg
287cb0f5ad Fix minor issues 2020-07-22 19:54:35 +02:00
N0tMyFaultOG
3009db3aa7 Update FlagCommand.java 2020-07-22 19:47:58 +02:00
N0tMyFaultOG
32e095ce15 More progress
I need a break, if something is missing, feel free to exchange that. K thx 🙏
2020-07-22 19:42:22 +02:00
Alexander Söderberg
9d6744ec15 Get rid of PermHandler 2020-07-22 12:35:48 +02:00
Alexander Söderberg
532f2caa37 Make VaultPermissionHandler extent BukkitPermissionHandler 2020-07-22 12:06:56 +02:00
Alexander Söderberg
da2fa24e74 Merge remote-tracking branch 'origin/v6' into v6 2020-07-22 12:05:50 +02:00
N0tMyFaultOG
8d04728ebc More work 2020-07-22 00:08:51 +02:00
N0tMyFaultOG
2aa5c276c9 Some more work done towards json 2020-07-21 21:39:52 +02:00
Alexander Söderberg
6dba31b257
Start working on the new permission system 2020-07-21 14:28:54 +02:00
Alexander Söderberg
6040e1bb5e
remove mainutil 2020-07-21 13:14:55 +02:00
Alexander Söderberg
20e9d13f60
Merge branch 'v6' into feature/v6/json
# Conflicts:
#	Core/src/main/java/com/plotsquared/core/util/MainUtil.java
#	Core/src/main/java/com/plotsquared/core/util/OperationUtil.java
2020-07-21 13:13:10 +02:00
Alexander Söderberg
73e3572c72
Fix the redstone flag on roads 2020-07-21 13:11:28 +02:00
Alexander Söderberg
5f76cc4f7b
Give ConsolePlayer the same treatment 2020-07-21 13:07:33 +02:00
Alexander Söderberg
186a810bf6
Bring back PAPI placeholders and raw colour formatting 2020-07-21 13:05:40 +02:00
dordsor21
207e56969b
Remove ChunkManager#chunkTask 2020-07-19 16:03:40 +01:00
dordsor21
94b6a27cf3
add missing license headers 2020-07-19 16:02:30 +01:00
dordsor21
21693e344c
Switch from MainUtil 2020-07-19 14:37:42 +01:00
dordsor21
d2443f6de8
Merge branch 'v6' into feature/v6/pipeline-queue
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/queue/GenChunk.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitRegionManager.java
#	Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java
#	Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java
#	Core/src/main/java/com/plotsquared/core/plot/Plot.java
#	Core/src/main/java/com/plotsquared/core/plot/PlotArea.java
#	Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java
#	Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java
2020-07-19 14:29:08 +01:00
dordsor21
ed27422e69
Move IJ/xyz cache out of MainUItil to its own class 2020-07-19 14:21:52 +01:00
dordsor21
d24c89405a
Switch to using a Clipboard for regen in preparation for WE changes 2020-07-19 14:17:38 +01:00
Alexander Söderberg
2d518dfe2b Clean up BlockUtil 2020-07-19 14:49:26 +02:00
Alexander Söderberg
f357fa74f3 Remove unused files 2020-07-19 14:37:53 +02:00
Alexander Söderberg
335cf5d2e9 Fix issues 2020-07-19 14:34:42 +02:00
Alexander Söderberg
ed3eedd238 Merge branch 'v6' into feature/v6/json
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/command/Add.java
#	Core/src/main/java/com/plotsquared/core/command/Auto.java
#	Core/src/main/java/com/plotsquared/core/command/Buy.java
#	Core/src/main/java/com/plotsquared/core/command/Template.java
#	Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java
#	Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java
#	Core/src/main/java/com/plotsquared/core/listener/PlotListener.java
#	Core/src/main/java/com/plotsquared/core/location/Location.java
#	Core/src/main/java/com/plotsquared/core/plot/Plot.java
#	Core/src/main/java/com/plotsquared/core/plot/PlotArea.java
#	Core/src/main/java/com/plotsquared/core/plot/PlotCluster.java
#	Core/src/main/java/com/plotsquared/core/plot/PlotId.java
#	Core/src/main/java/com/plotsquared/core/plot/expiration/ExpireManager.java
#	Core/src/main/java/com/plotsquared/core/plot/flag/implementations/KeepFlag.java
#	Core/src/main/java/com/plotsquared/core/util/MainUtil.java
#	Core/src/main/java/com/plotsquared/core/util/PlayerManager.java
#	Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java
#	Core/src/main/java/com/plotsquared/core/util/query/PlotQuery.java
#	Core/src/main/java/com/plotsquared/core/util/query/SearchPlotProvider.java
2020-07-19 14:32:31 +02:00
Alexander Söderberg
23783b8b0b add deprecations 2020-07-19 14:24:42 +02:00
Alexander Söderberg
193054f1fc Move shit out of MainUtil into more appropriate classes 2020-07-19 14:23:55 +02:00
N0tMyFaultOG
87a8ff742f 5.13.1 2020-07-19 14:16:13 +02:00
dordsor21
656700b5be
Start reimplementing chunk generation.
This would either need to be one WorldEdit operation or (preferable) WorldEdit allows Extents (including EditSessions) into the regenerate adapter method
2020-07-19 13:12:27 +01:00
dordsor21
3e84f3b3a4
Merge branch 'v6' into feature/v6/pipeline-queue
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
#	Core/src/main/java/com/plotsquared/core/plot/Plot.java
#	Core/src/main/java/com/plotsquared/core/util/WorldUtil.java
2020-07-18 15:27:52 +01:00
Alexander Söderberg
5360df6012 Add PlotRangeIterator for the many places where it'll be used. All one of them, in fact. This was not a waste of time. I am very happy I did this. This was worthwhile. Yup. 2020-07-18 16:19:12 +02:00
Alexander Söderberg
39fdaa367c Make PlotQuery iterable 2020-07-18 16:18:23 +02:00
Hannes Greule
7e0cdb12d7 Replace some common messages 2020-07-18 15:06:51 +02:00
dordsor21
03983e8886
Allow forcing of queues down pipelines to ensure whenDone runnables are called correctly
Also remove autoQueue since it's never used and would be a bad idea
2020-07-18 13:55:54 +01:00
dordsor21
57af50ed49
Continue implementation of new queue system
- Move ChunkCoordinatorBuild to Core
- Add core ChunkCoordinator
- Add Factories for ChunkCoordinator and its Builder
- Reimplement refreshChunk but in WorldUtil
- Allow custom Consumers to be used by the Queue when sent to the ChunkCoordinator
- Start switching ChunkTasks to use the new ChunkCoordinator system
- Replace GlobalBlockQueue's "empty task" system with normal sync TaskManager
- Remove lombok from the queue system
- Add back forceSync and chunkObject from LocalBlockQueue
2020-07-18 12:07:56 +01:00
Alexander Söderberg
e80ade65c7 Clean up PlotId 2020-07-18 11:05:16 +02:00
Alexander Söderberg
4d24112ec7 Fix merge issues 2020-07-17 23:06:40 +02:00
Alexander Söderberg
1a269a1227 Merge branch 'v6' into feature/v6/json
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
#	Core/src/main/java/com/plotsquared/core/util/WorldUtil.java
2020-07-17 23:05:45 +02:00
Alexander Söderberg
d077fafd29 Some random bukkitutil/worldutil improvements 2020-07-17 23:00:09 +02:00
Alexander Söderberg
5478e70576 Fix some more captions 2020-07-17 21:46:15 +02:00
dordsor21
66b94ab9f1
Start switching to WorldEdit Worlds 2020-07-17 17:21:32 +01:00
dordsor21
74c6fc954e
Merge branch 'v6' into feature/v6/pipeline-queue
# Conflicts:
#	Core/src/main/java/com/plotsquared/core/command/Trim.java
#	Core/src/main/java/com/plotsquared/core/queue/BasicLocalBlockQueue.java
#	Core/src/main/java/com/plotsquared/core/queue/GlobalBlockQueue.java
2020-07-17 17:16:49 +01:00
Alexander Söderberg
22bd2eb238 Super minor issues from previous merges 2020-07-17 18:06:38 +02:00
Alexander Söderberg
2a72f274c9 Fix failed merge 2020-07-17 18:00:08 +02:00
Alexander Söderberg
3a1b56494a Merge branch 'v6' into feature/v6/json
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
#	Core/src/main/java/com/plotsquared/core/command/Claim.java
#	Core/src/main/java/com/plotsquared/core/command/Condense.java
#	Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java
#	Core/src/main/java/com/plotsquared/core/util/task/AutoClaimFinishTask.java
#	Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java
#	Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java
2020-07-17 17:58:14 +02:00
Alexander Söderberg
932052772c Fix edge cases for time conversion 2020-07-17 17:53:30 +02:00
Alexander Söderberg
43d058d3db Address comments 2020-07-17 17:53:30 +02:00
Alexander Söderberg
020b030667 More fixes 2020-07-17 17:53:30 +02:00
Alexander Söderberg
5a3eacde0b Replace method synchronization logic 2020-07-17 17:53:30 +02:00
Alexander Söderberg
7f412f5472 Begin work on the task system 2020-07-17 17:53:30 +02:00
Alexander Söderberg
33b6ef66d6 Delombok + import organisation 2020-07-17 17:24:45 +02:00
dordsor21
9fefe57c90
Switch to using QueueCoordinators everywhere 2020-07-17 15:41:06 +01:00
dordsor21
ed77522c08
Add wna block setting, use WorldEdit worlds rather than Strings. 2020-07-17 14:38:50 +01:00
dordsor21
09aca839a8
Add back changes to ChunkCoordinator 2020-07-17 14:00:01 +01:00
dordsor21
def9a1bcf8
begin new block setting/chunk pipeline
This will ultimately replace both the GlobalBlockQueue and the ChunkTask stuff
2020-07-17 13:22:33 +01:00
dordsor21
57435fdf34
verbosely ensure items cannot be duplicated when keeping inventory on death
Seemingly there's duplication issues on some servers (and apparently even when only PlotSquared is installed). Likely a Spigot issue, but there's nothing to be done for Spigot on 1.13/14/15
2020-07-16 23:24:11 +01:00
N0tMyFaultOG
01ff9a34c2 Merge branch 'features/v5/placeholders' into v5 2020-07-16 18:48:45 +02:00
N0tMyFaultOG
ff3a94933a Bump version 2020-07-16 18:43:52 +02:00
Hannes Greule
97a356c4a0 Very attentive reviewers, can recommend 2020-07-16 18:13:02 +02:00
Hannes Greule
10ab28c1ec Add missing license headers 2020-07-16 18:08:00 +02:00
Hannes Greule
2d9cf8b759 Get placeholders working 2020-07-16 18:04:17 +02:00
Alexander Söderberg
32b28a4ca5
Turn all UUID messages into debug messages 2020-07-15 22:42:58 +02:00
N0tMyFaultOG
4996d8bcd1 Remove left over debugs 2020-07-15 14:05:15 +02:00
NotMyFault
e5963a8590
Merge pull request #2877 from IntellectualSites/features/v5/split-bukkit-listeners
Clean up bukkit listeners by splitting them up
2020-07-15 13:35:38 +02:00
N0tMyFaultOG
e8c155763b Register placeholders 2020-07-15 12:44:07 +02:00
N0tMyFaultOG
a52249513e Update MVdW version 2020-07-15 12:05:42 +02:00
Alexander Söderberg
5d2d4ac12b
fix language issue 2020-07-14 20:47:15 +02:00
Alexander Söderberg
64f5580edd
Fix code styling issue 2020-07-14 20:46:52 +02:00
Alexander Söderberg
b989531a60
Merge branch 'v5' into features/v5/placeholders 2020-07-14 20:41:17 +02:00
Alexander Söderberg
34655b8d41
Add (untested) MVdWPlaceholderAPI support 2020-07-14 20:41:08 +02:00
dordsor21
30327d2fa3
update bukkit pom 2020-07-14 19:11:46 +01:00
dordsor21
2e4c43c251
Add config option to disable placing top wall blocks 2020-07-14 19:10:53 +01:00
Alexander Söderberg
c0a0d36e5d
Remove remaining jetbrains imports 2020-07-14 19:40:47 +02:00
Alexander Söderberg
b68d7150f1
Manually fix some merge conflicts 2020-07-14 19:34:44 +02:00
Alexander Söderberg
198bcfdf4d
Merge branch 'v6' into feature/v6/json
# Conflicts:
#	Bukkit/build.gradle
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
#	Core/build.gradle
#	Core/src/main/java/com/plotsquared/core/PlotPlatform.java
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/command/Add.java
#	Core/src/main/java/com/plotsquared/core/command/Area.java
#	Core/src/main/java/com/plotsquared/core/command/Auto.java
#	Core/src/main/java/com/plotsquared/core/command/Command.java
#	Core/src/main/java/com/plotsquared/core/command/ListCmd.java
#	Core/src/main/java/com/plotsquared/core/configuration/Caption.java
#	Core/src/main/java/com/plotsquared/core/listener/PlotListener.java
#	Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java
#	Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java
#	Core/src/main/java/com/plotsquared/core/plot/message/PlotMessage.java
#	Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java
#	Core/src/main/java/com/plotsquared/core/util/MainUtil.java
#	Core/src/main/java/com/plotsquared/core/util/WorldUtil.java
2020-07-14 19:25:14 +02:00
Alexander Söderberg
8eb903ad72
Merge branch 'v5' into v6
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
2020-07-14 19:18:08 +02:00
Alexander Söderberg
c853147635
Merge pull request #2870 from IntellectualSites/feature/v6/platform 2020-07-14 19:13:00 +02:00
Alexander Söderberg
0294397021
Manually resolve a bunch of merge issues 2020-07-14 19:10:52 +02:00
Alexander Söderberg
97fed21811
Merge branch 'v6' into feature/v6/platform
# Conflicts:
#	Bukkit/build.gradle
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/ChunkListener.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitRegionManager.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/uuid/SquirrelIdUUIDService.java
#	Core/build.gradle
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/command/Claim.java
#	Core/src/main/java/com/plotsquared/core/command/Debug.java
#	Core/src/main/java/com/plotsquared/core/command/DebugExec.java
#	Core/src/main/java/com/plotsquared/core/command/Purge.java
#	Core/src/main/java/com/plotsquared/core/command/Trim.java
#	Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java
#	Core/src/main/java/com/plotsquared/core/database/SQLManager.java
#	Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java
#	Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java
#	Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java
#	Core/src/main/java/com/plotsquared/core/generator/SquarePlotWorld.java
#	Core/src/main/java/com/plotsquared/core/listener/ProcessedWEExtent.java
#	Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java
#	Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java
#	Core/src/main/java/com/plotsquared/core/plot/Plot.java
#	Core/src/main/java/com/plotsquared/core/plot/PlotArea.java
#	Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java
#	Core/src/main/java/com/plotsquared/core/plot/expiration/ExpireManager.java
#	Core/src/main/java/com/plotsquared/core/plot/expiration/PlotAnalysis.java
#	Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java
#	Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeWrapper.java
#	Core/src/main/java/com/plotsquared/core/plot/message/PlotMessage.java
#	Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java
#	Core/src/main/java/com/plotsquared/core/util/MainUtil.java
#	Core/src/main/java/com/plotsquared/core/util/RegionManager.java
#	Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java
#	Core/src/main/java/com/plotsquared/core/uuid/UUIDPipeline.java
2020-07-14 19:05:05 +02:00
Alexander Söderberg
510ea56431
Finalize DI stuff 2020-07-14 18:49:40 +02:00
Alexander Söderberg
7897d78f0d
Merge pull request #2868 from IntellectualSites/feature/v6/slf4j 2020-07-14 18:49:34 +02:00
Alexander Söderberg
25a58a5c46
Merge branch 'v6' into feature/v6/platform 2020-07-14 17:45:33 +02:00
Alexander Söderberg
f9e5fd714d
Merge remote-tracking branch 'origin/feature/v6/platform' into feature/v6/platform 2020-07-14 17:07:03 +02:00
Alexander Söderberg
55eefd09da
Merge branch 'v6' into feature/v6/json 2020-07-14 16:52:40 +02:00
Alexander Söderberg
0ce1f3e0f6
Send special message when caption cannot be found 2020-07-14 16:36:13 +02:00
Alexander Söderberg
99be181aea
Migrate some more captions 2020-07-14 16:31:58 +02:00
Alexander Söderberg
fbf6a3517d
Add back title method that somehow went missing and add a template utility class to make templates less annoying to work with 2020-07-14 15:04:31 +02:00
Alexander Söderberg
1dc4da8beb
Fix issues from previous merge 2020-07-14 13:21:59 +02:00
Alexander Söderberg
1908588fcb
Change expansion author and version 2020-07-14 13:17:21 +02:00
Alexander Söderberg
af7db08036
Add new placeholder system 2020-07-14 13:14:02 +02:00
NotMyFault
e72ce9c90e
Update gradle.yml 2020-07-14 12:44:11 +02:00
NotMyFault
32264ae5e3
Update gradle.yml 2020-07-14 12:43:45 +02:00
Alexander Söderberg
33f2ff7e6d
Merge branch 'v6' into feature/v6/slf4j 2020-07-13 23:11:40 +02:00
Alexander Söderberg
6664d49928
Prefix all log messages 2020-07-13 23:04:27 +02:00
Alexander Söderberg
d648a6d3db
Merge remote-tracking branch 'origin/feature/v6/slf4j' into feature/v6/slf4j
# Conflicts:
#	Bukkit/pom.xml
#	Core/pom.xml
2020-07-13 22:52:10 +02:00
Alexander Söderberg
a1f262b5b2
Fix gradle setup and replace all debug calls 2020-07-13 22:51:57 +02:00
Alexander Söderberg
b109b76120
Nevermind, it doesn't allow for relocations 2020-07-13 20:50:49 +02:00
N0tMyFaultOG
1388f280e6 Update module poms 2020-07-13 20:46:34 +02:00
Alexander Söderberg
d141b040d6
Fix relocations 2020-07-13 20:45:04 +02:00
Alexander Söderberg
e84d82315c Add log4j config (this might work :p) 2020-07-13 20:39:52 +02:00
N0tMyFaultOG
c6962ef4d2 Shift a few more messages to debug 2020-07-13 19:56:34 +02:00
N0tMyFaultOG
f93714a44e Properly add prefixes to messages 2020-07-13 13:01:13 +02:00
Hannes Greule
564efd77f7 Fix some messages 2020-07-12 22:11:23 +02:00
Hannes Greule
5442c7cc2e Start moving commands to new message system 2020-07-12 22:06:07 +02:00
Alexander Söderberg
0fa5a16cd0 replace remaining debug calls 2020-07-12 21:49:05 +02:00
N0tMyFaultOG
1881cdc9ab Revert "Add prefix"
This reverts commit fb2aa44f78cdb6f2548671b78f22c8c78b86b31a.
2020-07-12 21:28:38 +02:00
N0tMyFaultOG
fb2aa44f78 Add prefix 2020-07-12 21:25:22 +02:00
Alexander Söderberg
e88da3cea9 Add chunk coordinator 2020-07-12 20:58:48 +02:00
dordsor21
14b6f84816
fix typos that were c/p over 2020-07-12 18:50:04 +01:00
N0tMyFaultOG
ac8841447c 6cf2c0ad97 (r40542418) 2020-07-12 17:11:25 +02:00
Alexander Söderberg
6cf2c0ad97
Disable the paper uuid service for offline mode servers and add toggles for all third party uuid services 2020-07-12 17:04:30 +02:00
dordsor21
c045ef698c
Add license headers and fix method change in PlotSquared.java 2020-07-12 11:42:45 +01:00
Alexander Söderberg
5cdb3f4fd5 Add missing injection points 2020-07-12 12:25:44 +02:00
Alexander Söderberg
5a5c5721cc
fix compiler crashing 2020-07-12 07:38:57 +02:00
dordsor21
3a11ffc77a
Clean up bukkit listeners by splitting them up 2020-07-11 19:03:55 +01:00
Alexander Söderberg
916675fb08
Guice progress 2020-07-11 17:19:19 +02:00
dordsor21
a2ec404014
Fix /plot target nearest 2020-07-11 13:40:22 +01:00
Alexander Söderberg
6f6cb4b630 More DI progress 2020-07-11 05:29:41 +02:00
Alexander Söderberg
c0f69f321d
Guice progress 2020-07-10 22:12:37 +02:00
Alexander Söderberg
55bf41d2da
Remove dumdum static access 2020-07-10 19:25:05 +02:00
Alexander Söderberg
7687d7705b
Fix merge issue 2020-07-10 18:38:14 +02:00
Alexander Söderberg
21ad9a36c8
Merge branch 'v6' into feature/v6/platform
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/generator/HybridUtils.java
#	Core/src/main/java/com/plotsquared/core/location/Location.java
2020-07-10 18:37:18 +02:00
dordsor21
afb72aa102
Don't include eggs with spawn*_eggs* 2020-07-10 17:31:46 +01:00
Alexander Söderberg
d00dc658df Inject EventDispatcher and PlotListener 2020-07-10 18:17:44 +02:00
Alexander Söderberg
2dab7c8dda Inject PlotAreaManager 2020-07-10 17:32:07 +02:00
Alexander Söderberg
c37cc40ad9 Move annotation in BukkitWorld 2020-07-10 12:27:26 +02:00
Alexander Söderberg
5341015cb1 Finalize immutable locations and add a platform world implementation 2020-07-10 12:21:29 +02:00
dordsor21
2fb76e6636
Split road and plot paste-on-top settings 2020-07-09 22:39:06 +01:00
dordsor21
5b260ea8da
update bukkit pom 2020-07-09 22:33:01 +01:00
dordsor21
55139eb134
Do not respect paste on top for road schematics. 2020-07-09 22:19:23 +01:00
dordsor21
5e44bb60c6
Merge branch 'v5' of github.com:IntellectualSites/PlotSquared into v5 2020-07-09 22:14:38 +01:00
dordsor21
96740fd282
Couple of fixes to road flag logic 2020-07-09 21:52:51 +01:00
Alexander Söderberg
cf1b027db9
Start making locations immutable 2020-07-09 22:28:46 +02:00
NotMyFault
fb050ac3da
5.12.5 2020-07-09 21:15:28 +02:00
Alexander Söderberg
b36c6427d1 Split failed UUID batches into individual requests in order to identify the invalid UUIDs 2020-07-09 20:37:14 +02:00
Traks
63c308971b Update location block vector on add and subtract 2020-07-09 20:14:06 +02:00
Traks
cfd389883b Improve piston interaction with area border 2020-07-09 20:14:06 +02:00
Traks
4576cfd961 Improve piston interaction with plot border
Fixes retracting pistons being able to modify plot borders. Prevents
piston heads from sticking outside plots.
2020-07-09 20:14:06 +02:00
Alexander Söderberg
89cb6450fb
Fix issue where PlotPlayer#getLocation returns a mutable location 2020-07-09 20:04:00 +02:00
Alexander Söderberg
699eb71e2a
Fix kill-road-mobs. Fixes PS-73 2020-07-09 19:46:17 +02:00
Alexander Söderberg
6b07f38cff
Send teleportation cancellation message immediately on movement, rather than after the timer has finished. This fixes PS-33. 2020-07-09 16:45:25 +02:00
Alexander Söderberg
904f5485ab
Merge remote-tracking branch 'origin/v5' into v5 2020-07-09 16:38:53 +02:00
Alexander Söderberg
e05d817482
Fix plot owner placeholder. Fixes PS-62. 2020-07-09 16:38:46 +02:00
Alexander Söderberg
db37077af7
Make signs able to use captions 2020-07-09 12:58:28 +02:00
Traks
61de18190f More dispense blocking on roads 2020-07-09 12:33:23 +02:00
dordsor21
1310f9470e
5.12.4 2020-07-08 19:34:08 +01:00
Hannes Greule
d652225f36 Let players teleport to their merged plots 2020-07-08 19:33:58 +02:00
dordsor21
2936b806f3
Allow players to interact on their own plot 2020-07-08 17:10:09 +01:00
Alexander Söderberg
3fa532a3c0
Move message sending into PlotPlayer to make it platform independent 2020-07-08 15:35:58 +02:00
dordsor21
d267d1bb98
Start expiry tasks 2020-07-08 14:35:46 +01:00
Alexander Söderberg
9792d4cc4b
Remove style.yml 2020-07-08 15:23:33 +02:00
Alexander Söderberg
090bd69be5
Merge branch 'v6' into feature/v6/json
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/chat/FancyMessage.java
2020-07-08 15:22:02 +02:00
Alexander Söderberg
c36e311520
Continue cleaning up PlotSquared.java 2020-07-08 15:09:25 +02:00
Alexander Söderberg
f2191cb731 Save style.yml again 2020-07-08 13:59:31 +02:00
Alexander Söderberg
265c10ec1c Remove commands.yml 2020-07-08 13:59:31 +02:00
Alexander Söderberg
51bd21a464
Merge branch 'v6' into feature/v6/platform
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java
2020-07-08 13:57:33 +02:00
N0tMyFaultOG
5004005c5a Fixes PS-65
EssentialsX uses paperlib 1.0.4 where we compile explicitly against 1.0.2
2020-07-08 12:21:31 +02:00
N0tMyFaultOG
67a49a2ca7 5.12.3 2020-07-07 21:03:30 +02:00
Hannes Greule
57127537f7 Add permission check for /plot home 2020-07-07 20:45:52 +02:00
Hannes Greule
3476522c00 Allow /p v <alias> 2020-07-07 20:45:52 +02:00
Hannes Greule
3d087b1bbe Fix tab completion and usage 2020-07-07 20:45:52 +02:00
Hannes Greule
c058614fcc Split visit command into home and visit 2020-07-07 20:45:52 +02:00
dordsor21
9e9db0f1df
Merge branch 'features/v5/road-respect-flags' into v5 2020-07-07 17:49:32 +01:00
dordsor21
e826836c36
Merge branch 'v5' into features/v5/road-respect-flags 2020-07-07 17:48:46 +01:00
Alexander Söderberg
196df855ac
Clean up PlotAreaManager and move a bunch of plot area related logic out of PlotSquared 2020-07-07 13:37:03 +02:00
Alexander Söderberg
d76c9dad52
Remove access to PlotSquared#IMP and rename IPlotMain to PlotPlatform, then rename PlotSquared#imp() to PlotSquared#platform() 2020-07-07 12:56:43 +02:00
Alexander Söderberg
298e65a394
Replace remaining references to PlotSquared#log 2020-07-06 17:17:46 +02:00
Alexander Söderberg
078b776f60
Implement console messages 2020-07-05 18:14:29 +02:00
Alexander Söderberg
4d61a345c6
Small documentation fixes 2020-07-05 18:06:10 +02:00
Alexander Söderberg
dc0358957e
Add prefix replacement to messages and skip sending empty messages 2020-07-05 18:02:43 +02:00
Alexander Söderberg
42d648e338
Use adventure for titles 2020-07-05 17:57:58 +02:00
Alexander Söderberg
1c254984c1
Replace logging references in Bukkitmain 2020-07-05 13:56:54 +02:00
Alexander Söderberg
f287cc34e7
Remove json message stuff 2020-07-05 13:46:25 +02:00
Alexander Söderberg
c8a8806e7d
Component progress. The plugin is **very** broken right now. 2020-07-05 13:41:40 +02:00
Alexander Söderberg
d061f728bd
Merge remote-tracking branch 'origin/feature/v5/json' into feature/v5/json 2020-07-05 12:44:25 +02:00
Hannes Greule
b5818bfefc Lazy fix for FancyMessage 1.16 2020-07-04 20:25:49 +02:00
Hannes Greule
6bf5bc60d1 Update messages_en.json with new placeholders 2020-07-04 18:57:56 +02:00
Alexander Söderberg
c784c69eb3
progress 2020-07-04 18:53:03 +02:00
Alexander Söderberg
e3759d059a
Fixing missing license headers. 2020-07-04 18:03:47 +02:00
Alexander Söderberg
429f5e55c3
Add option to disable background caching 2020-07-03 13:50:12 +02:00
Alexander Söderberg
0e7a6d7a62
Fix typo 2020-07-03 13:47:50 +02:00
dordsor21
ad1ec42b12
Add new clear pipeline to hpw and make some stuff read access as required. 2020-07-02 14:33:22 +01:00
dordsor21
580212d66d fix build 2020-07-01 21:49:53 +01:00
dordsor21
b71de856a8 allow plugins extending and replacing RegionManager to be notified of, and "accept" plot clear "requests".
.
.
.
.
.
FAWE
2020-07-01 21:49:53 +01:00
Hannes Greule
35cff29917 Add license header 2020-07-01 17:24:47 +02:00
dordsor21
2910176b97
Add road flag container 2020-07-01 14:53:57 +01:00
dordsor21
c5ec8e1931
actually fix all conflicts 2020-07-01 14:21:18 +01:00
dordsor21
82a887fd3b
Merge branch 'v5' into features/v5/road-respect-flags
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java
2020-07-01 14:12:16 +01:00
NotMyFault
eff410d1da
Merge pull request #2862 from IntellectualSites/bukkit/1.16.1
Update to 1.16.1
2020-07-01 12:02:57 +02:00
N0tMyFaultOG
cbe8875b94 Bump gradle version 2020-07-01 11:59:28 +02:00
MattBDev
49c35ec084 Resolve NMF's concerns 2020-06-29 22:05:32 -04:00
Hannes Greule
f80cadcd7f Draft of Caption resolving 2020-06-29 21:33:57 +02:00
Hannes Greule
fa2ad8ab22 Improve plot alias command (tab complete, admin permission) fixes PS-63 2020-06-29 13:48:37 +02:00
N0tMyFaultOG
600f757046 Finish messages 2020-06-29 12:34:09 +02:00
MattBDev
3a2e932d17 Add missing mobs from 1.13.2+ 2020-06-28 18:45:40 -04:00
N0tMyFaultOG
a2aaa3633a More work 2020-06-28 16:56:42 +02:00
MeFisto94
bd9bdc9e03 Separate the Vault Permission Handling from the Economy Handling 2020-06-28 14:28:11 +02:00
N0tMyFaultOG
3b793929d8 Initialize messages_en.json 2020-06-28 13:51:57 +02:00
Hannes Greule
e139550949 Make cache expiration configurable 2020-06-27 23:07:20 +02:00
NotMyFault
181c5b134f
Update old links 2020-06-27 21:48:15 +02:00
Carter
74876f9e64 Get biome data from correct schematic for intersections (Fixes PS-50) 2020-06-27 20:44:46 +01:00
dordsor21
02f3c3ef50
Fix my stupid mistake of using lamdas not creating nested classes when creating schematics. "this" doesn't work like that. Cheers Java. 2020-06-27 20:38:55 +01:00
MeFisto94
9c3d2cfb02 Move the caching and static accessors from EconHandler to PlotMain 2020-06-27 06:26:00 +02:00
MattBDev
9d609c2dfe Merge remote-tracking branch 'remotes/origin/v5' into bukkit/1.16.1 2020-06-26 20:40:50 -04:00
MattBDev
cb04c183a8 Update to 1.16.1 2020-06-26 20:38:30 -04:00
Hannes Greule
38425a1eae Update world border on Plot#claim (Fixes PS-13) 2020-06-26 13:49:17 +02:00
Alexander Söderberg
4b997d42df
Some slf4j progress 2020-06-26 11:03:42 +02:00
Hannes Greule
d1ecf9232e
Merge pull request #2859 from FreebuildFR/feature/flag_placeholder
Add placeholders to get the value of a plot flag
2020-06-26 02:22:59 +02:00
EpiCanard
e833403e3c Replace split with substring for placeholders 2020-06-25 14:08:44 +02:00
Alexander Söderberg
f64026af1a Only initialise EconHandler when economy is enabled and stop accessing the static instance directly. 2020-06-24 15:26:06 +02:00
Alexander Söderberg
efab6e92f7
Lower tab completion cache time and fix "Invalid player" message for /plot kick 2020-06-24 13:44:06 +02:00
Alexander Söderberg
f69cc5cc98
Merge remote-tracking branch 'origin/v5' into v5 2020-06-24 08:32:14 +02:00
Alexander Söderberg
f6f26c6102
Fix issue where numbers were sometimes parsed as usernames when they shouldn't be. This commit also fixes an issue where "Not a valid plot ID" was sent twice. 2020-06-24 08:31:23 +02:00
Alexander Söderberg
159b35c717
Fix OfflinePlayerUUIDService breaking when no worlds have been loaded. 2020-06-24 08:05:06 +02:00
EpiCanard
7fbac4f286 Add a second placeholder to support only local flag of current plot 2020-06-24 00:51:27 +02:00
NotMyFault
29080de860
5.12.2 2020-06-23 23:57:27 +02:00
Alexander Söderberg
e17222dd19
Merge remote-tracking branch 'origin/v5' into v5 2020-06-23 18:37:00 +02:00
Alexander Söderberg
55cf34508a
Fix issue where old player objects were not cleaned up properly.
This is caused by an issue with the event order in Spigot (and Spigot derivatives), so the fix is rather hacky.
2020-06-23 18:36:53 +02:00
NotMyFault
c52603921d
Bump version 2020-06-23 13:13:01 +02:00
Alexander Söderberg
f4724a3c87
Fix expiration flag commands 2020-06-23 11:45:04 +02:00
Alexander Söderberg
2b4e2fc793
Add plot debugging and make tab completable aliases configurable 2020-06-23 11:39:45 +02:00
EpiCanard
14baead342 Add placeholder to get the value of a plot flag 2020-06-23 01:20:17 +02:00
Alexander Söderberg
2d6e6ceaeb
Improve documentation of BukkitMain#wrapPlayer and improve generic types 2020-06-22 15:45:57 +02:00
Alexander Söderberg
1dcf8d3995
Progress on the debug logging API 2020-06-21 15:50:49 +02:00
Hannes Greule
d07d32e28b Generate plot blocks on correct height when removing intersection
Fixes PS-46
2020-06-20 00:14:04 +02:00
PureGero
cb969e37a6 Don't teleport players; Fixes PS-14 2020-06-19 11:36:35 +02:00
Hannes Greule
6259287dff Add tab completion for /plot <deny|kick|remove> 2020-06-13 15:54:38 +02:00
Hannes Greule
3e2e61d2be Re-introduce online mode 2020-06-13 15:53:03 +02:00
Hannes Greule
a3586791b5 Remove unused code and use less aggressive colors 2020-06-11 01:01:00 +02:00
Hannes Greule
bb298ab660 Remove leftover TODO 2020-06-11 01:01:00 +02:00
Hannes Greule
8c0f581ff0 Add missing license headers to new files 2020-06-11 01:01:00 +02:00
Hannes Greule
033b87deb5 Resolve TODOs 2020-06-11 01:01:00 +02:00
Hannes Greule
b6f1610a7e Provide no suggestions instead of player names for commands 2020-06-11 01:01:00 +02:00
Hannes Greule
e3fbb32399 Formatting and documentation 2020-06-11 01:01:00 +02:00
Hannes Greule
67b80bb8e8 Fix /plot setup back 2020-06-11 01:01:00 +02:00
Hannes Greule
ae1427b189 Remove usage of SetupObject 2020-06-11 01:01:00 +02:00
Hannes Greule
5165c439fc Add tab completion and fix minor bugs 2020-06-11 01:01:00 +02:00
Hannes Greule
b15c48e074 Implement setup steps 2020-06-11 01:01:00 +02:00
Hannes Greule
c5bfde330f First draft of redesigned setup processing 2020-06-11 01:01:00 +02:00
N0tMyFaultOG
d12ecc8616 Softdepend on new complementary UUID services 2020-06-04 11:41:20 +02:00
N0tMyFaultOG
950640a557 Revert "Don't send chat spy to message sender"
This reverts commit a37ab10414e529d79d213d5adb66c49fe91abb71.
Let's not break plotchat when plotspy is enabled
2020-06-04 11:29:02 +02:00
N0tMyFaultOG
86746e7843 Fixed https://issues.intellectualsites.com/issue/PS-26 2020-06-03 21:18:46 +02:00
NotMyFault
2c74d2479f
Exchange website url 2020-06-02 17:06:33 +02:00
N0tMyFaultOG
f1b79a3b0d Add more documentation to the settings.yml
Apparently gradle wants to update the poms so here we go
2020-05-27 22:20:13 +02:00
Alexander Söderberg
6442922d86 Implement some more generic types to make the player objects easier to work with and also create wrapper objects for fake players (NPCs). Potentially fixes PS-27 2020-05-27 14:08:48 +02:00
Alexander Söderberg
edbacb8e47
Bump dependency version 2020-05-25 20:11:57 +02:00
dependabot-preview[bot]
71e22f41b1 Bump json from 20190722 to 20200518
Bumps [json](https://github.com/douglascrockford/JSON-java) from 20190722 to 20200518.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-25 17:29:36 +02:00
Alexander Söderberg
b9b0d89b5f
Replace the R-tree library with PRTree. Fix SquirrelID shading issues. Bump the version to 5.12.0 2020-05-25 15:13:31 +02:00
NotMyFault
fdf82d0d1e
Merge pull request #2852 from aurorasmiles/features/v5/uuid
Add BungeePerms UUID service
2020-05-25 13:15:41 +02:00
NotMyFault
09327b0128
Merge branch 'v5' into features/v5/uuid 2020-05-25 13:13:29 +02:00
NotMyFault
8a3ee4cdc2
Merge pull request #2853 from darbyjack/v5
Updated PAPI & EssX dependency to ensure compatibility
2020-05-25 13:02:10 +02:00
NotMyFault
8d1033f725
Merge branch 'v5' into v5 2020-05-25 12:58:32 +02:00
NotMyFault
1d8bad3a80
Merge pull request #2855 from IntellectualSites/dependabot/gradle/v5/net.luckperms-api-5.1
Bump luckperms from 5.0 to 5.1
2020-05-25 12:51:01 +02:00
dependabot-preview[bot]
67fbfb0f2d
Bump api from 5.0 to 5.1
Bumps [api](https://github.com/lucko/LuckPerms) from 5.0 to 5.1.
- [Release notes](https://github.com/lucko/LuckPerms/releases)
- [Commits](https://github.com/lucko/LuckPerms/compare/v5.0...v5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-25 09:13:10 +00:00
darbyjack
4b0df80878
Updated PAPI & EssX dependency to ensure compatibility 2020-05-25 00:09:28 -05:00
Alexander Söderberg
52b90b6757
Merge pull request #2841 from IntellectualSites/features/v5/uuid 2020-05-25 01:40:35 +02:00
dordsor21
31b71ade69 * :D 2020-05-24 23:43:15 +01:00
dordsor21
0021b114de Revert "Slow down queue a bit because 1.13+ performance is bad"
This reverts commit bbde2f5e069379a6bb09cca70747dcc7d3c88c4f.
2020-05-24 23:24:27 +01:00
Alexander Söderberg
28a7d027f6
Merge branch 'v5' into features/v5/uuid 2020-05-24 21:14:56 +02:00
Alexander Söderberg
e32a2e2723
Merge pull request #2847 from IntellectualSites/features/v5/single-area 2020-05-24 21:13:51 +02:00
Alexander Söderberg
46b68e489d
Tab complete /p list 2020-05-24 21:08:11 +02:00
Alexander Söderberg
2436a6a402
remove debug, whoops 2020-05-24 20:54:10 +02:00
Alexander Söderberg
862467c0fa
Tab complete /plot visit 2020-05-24 20:53:16 +02:00
Alexander Söderberg
69cfb431b1
Unstupidify Visit 2020-05-24 20:18:02 +02:00
Alexander Söderberg
172bd6f0f2
This should hopefully fix that broken merge. Maybe. Possibly. Idk. 2020-05-24 19:05:09 +02:00
Alexander Söderberg
a882555d1b
Merge branch 'v5' into features/v5/uuid
# Conflicts:
#	Bukkit/build.gradle
#	Core/src/main/java/com/plotsquared/core/PlotSquared.java
#	Core/src/main/java/com/plotsquared/core/command/ListCmd.java
#	Core/src/main/java/com/plotsquared/core/command/Visit.java
2020-05-24 19:00:21 +02:00
NotMyFault
0b12c4e5b2
Update issue link 2020-05-24 18:48:15 +02:00
Alexander Söderberg
0ac6383c2c Use PlotQuery in Visit 2020-05-24 18:35:32 +02:00
Alexander Söderberg
76913d4a78 immutable -> mutable 2020-05-24 18:35:32 +02:00
Alexander Söderberg
a0d1da3274 fix dum typo 2020-05-24 18:35:32 +02:00
Alexander Söderberg
1aa144e47d Deprecate old PlotFilter class 2020-05-24 18:35:32 +02:00
Alexander Söderberg
6b31743fb3 add missing javadoc 2020-05-24 18:35:32 +02:00
Alexander Söderberg
508fdce704 Add missing methods to PlotQuery and use PlotQuery in ListCmd 2020-05-24 18:35:32 +02:00
Alexander Söderberg
e912909aad Add plot query system 2020-05-24 18:35:32 +02:00
Aurora
98322d5d11 Add BungeePerms UUID service. This should probably work. 2020-05-24 14:32:34 +02:00
Alexander Söderberg
7b97130af7
Add option to disable legacy cache, also add an option to return "Unknown" when a request cannot be fulfilled (old behaviour)
This should fix issues where lowercase offline mode UUIDs don't have access to their old cache.
2020-05-24 05:00:36 +02:00
Alexander Söderberg
cc168d5ae9
Fix SQLite table creation statement and add legacy SQLite uuids as a provider 2020-05-24 04:48:19 +02:00
Alexander Söderberg
d19df3b6eb
Fix offline mode UUIDs 2020-05-24 04:28:29 +02:00
Alexander Söderberg
75dbc2db98
Fix offline mode UUIDs 2020-05-24 04:27:20 +02:00
Alexander Söderberg
2875b050c5
Add plugin UUID services. They probably work. 2020-05-23 19:43:32 +02:00
Alexander Söderberg
6c6c2b57a1
Add options to disable tab completion and extend username completion, also limit the total number of username suggestions to 200 per request 2020-05-23 17:20:09 +02:00
Alexander Söderberg
113da81f29
Actually save the schematic 2020-05-23 16:15:48 +02:00
Alexander Söderberg
4dd2613f2f
Add missing caption 2020-05-23 15:02:53 +02:00
Alexander Söderberg
8c37cc5340
Fix minor issues 2020-05-23 15:02:31 +02:00
Alexander Söderberg
47c74cfa6d
Set correct region height 2020-05-23 14:39:28 +02:00
Alexander Söderberg
32a55127f1
Fix partial area regeneration when using PlotSquared generation.
Also fix issues with region height and road width.
2020-05-23 14:32:02 +02:00
Alexander Söderberg
6d0458281b Merge remote-tracking branch 'origin/v5' into features/v5/single-area 2020-05-23 02:30:45 +02:00
N0tMyFaultOG
6090c7ccac Link issues to new issue tracker for legacy reasons 2020-05-23 01:25:18 +02:00
Alexander Söderberg
5e6b27e21f
Update README.md 2020-05-23 00:33:30 +02:00
Alexander Söderberg
eee04ab87d Shade guava-mini into the bukkot module 2020-05-22 22:04:46 +02:00
Alexander Söderberg
a833803bdf Shade rx into the bukkot module 2020-05-22 22:04:46 +02:00
Alexander Söderberg
d2af342a5d Shade r-tree into the bukkit module 2020-05-22 22:04:46 +02:00
Alexander Söderberg
93619b3988 Don't access tree until it has been created 2020-05-22 22:04:46 +02:00
Alexander Söderberg
dd4c5014fc Get rid of unused field 2020-05-22 22:04:46 +02:00
Alexander Söderberg
1e3379b00a Fix up the plot area nightmare 2020-05-22 22:04:46 +02:00
dordsor21
bbde2f5e06 Slow down queue a bit because 1.13+ performance is bad 2020-05-22 10:44:51 +01:00
Alexander Söderberg
b61dfd6f97
Single plot area progress 2020-05-22 03:20:11 +02:00
Alexander Söderberg
f16fa0a3ed
Merge branch 'features/v5/worlds' into features/v5/single-area 2020-05-22 02:56:36 +02:00
Alexander Söderberg
d4bd08415a
Shade guava-mini into the bukkot module 2020-05-22 02:56:23 +02:00
Alexander Söderberg
9ad276eeae
Merge branch 'features/v5/worlds' into features/v5/single-area 2020-05-22 02:54:24 +02:00
Alexander Söderberg
a3179bf114
Shade rx into the bukkot module 2020-05-22 02:54:10 +02:00
Alexander Söderberg
0d20dad2a3
Merge branch 'features/v5/worlds' into features/v5/single-area 2020-05-22 02:52:05 +02:00
Alexander Söderberg
7c080770f0
Shade r-tree into the bukkit module 2020-05-22 02:51:40 +02:00
Alexander Söderberg
9752e5f62b
Start working on single plot areas 2020-05-22 02:48:32 +02:00
Alexander Söderberg
3b7057ad4f
do a second attempt at fetching uuid batches even if it errors 2020-05-21 21:24:55 +02:00
Alexander Söderberg
38a7c771be
Don't access tree until it has been created 2020-05-21 20:23:36 +02:00
Alexander Söderberg
1c6075df2b
Get rid of unused field 2020-05-21 20:06:37 +02:00
Alexander Söderberg
3ede0447b0
Fix up the plot area nightmare 2020-05-21 20:06:04 +02:00
Alexander Söderberg
f01b242e4a
For sign updating to be scheduled asynchronously.
It then forces it back on the main thread, so it's fine, but this way we can safely wait for the UUID mapping to be fetched.
2020-05-20 15:26:20 +02:00
Alexander Söderberg
2417dace2d
Add UUID caching 2020-05-20 15:12:09 +02:00
Alexander Söderberg
f82a111518
Merge branch 'v5' into features/v5/uuid
# Conflicts:
#	Bukkit/pom.xml
#	Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java
2020-05-20 11:27:11 +02:00
dordsor21
525ba648ae ignore build/ and update bukkit pom.xml apparently 2020-05-20 09:44:45 +01:00
dordsor21
0160c2bb55 Add setCuboids method to RegionManager
- Allow FAWE to take charge of big operations like /plot set all
2020-05-20 08:43:58 +01:00
Alexander Söderberg
ea41c842bc
Fix a bunch of minor issues 2020-05-20 00:31:59 +02:00
Alexander Söderberg
8efc78e1c9
IT COMPILES! 2020-05-19 23:05:36 +02:00
Alexander Söderberg
973c18623f
Port more commands and add more tab completion utilities 2020-05-19 19:34:33 +02:00
dordsor21
7aba70ea65 Make plot clears/sets less crashy.
There's still the issue of Spigot's (or paper's) terrible GC that does nothing and stores everything in PS old gen memory so the server just numpties itself though.
2020-05-19 16:54:12 +01:00
Alexander Söderberg
123ca8efe9
Update more commands and add proper request timeouts 2020-05-19 17:33:59 +02:00
dordsor21
22c26fe962 Add PlotArea#getFlag 2020-05-19 13:07:50 +01:00
dordsor21
761803f777 Add option for roads to respect a plot area's flags and implement to PlayerEvents 2020-05-19 12:41:51 +01:00
dordsor21
d5d18a60fb Fix #2836
getCompoundTag can also be in Core since we're using WorldEdit.
2020-05-19 11:53:18 +01:00
Alexander Söderberg
37b065a097
Progress. 2020-05-19 00:28:52 +02:00
Alexander Söderberg
fdfc61cf97
Update username on async pre login event 2020-05-18 20:45:51 +02:00
Alexander Söderberg
31c84ab18f Basic pipeline setup 2020-05-18 00:22:34 +02:00
Alexander Söderberg
a47527857c Fix wonky annotation placement in SQLiteUUIDService 2020-05-17 23:58:39 +02:00
Alexander Söderberg
12f2cb0d58 Add a cache uuid service 2020-05-17 23:57:40 +02:00
Alexander Söderberg
67bf90e92f Create the SQLite UUID service and cache 2020-05-17 23:41:59 +02:00
Alexander Söderberg
b5f92f5003 Add sync catcher to the blocking pipeline methods 2020-05-17 23:26:19 +02:00
Alexander Söderberg
58989c9311 Add some missing methods to the pipeline 2020-05-17 23:20:36 +02:00
Alexander Söderberg
736004d88b
Don't fill in stacktrace for ServiceError 2020-05-17 18:03:04 +02:00
Alexander Söderberg
49f51f24f7
Don't loop services when all mappings have been found 2020-05-17 18:02:26 +02:00
Alexander Söderberg
95df62e59b
Add missing consumer API methods 2020-05-17 17:48:42 +02:00
Alexander Söderberg
64cfe240f9
Port OfflinePlayerUUIDService to the new system 2020-05-17 17:36:12 +02:00
Alexander Söderberg
29f2863cf4
Progress 2020-05-17 17:26:48 +02:00
Alexander Söderberg
792fa1f11d Improve design 2020-05-17 12:55:07 +02:00
Alexander Söderberg
7591c440c2 Begin working on the new UUID service API 2020-05-17 12:40:25 +02:00
Alexander Söderberg
c58309b385 Add { transitive = false } to HV 2020-05-16 21:37:14 +02:00
Alexander Söderberg
5ae70743b1 Always set the generator 2020-05-16 21:37:14 +02:00
Alexander Söderberg
29e0479081 Fix preset initialization 2020-05-16 21:37:14 +02:00
Alexander Söderberg
441a73839e Add /plot components 2020-05-16 21:37:14 +02:00
Alexander Söderberg
ff8f7a0867 Actually create the world managers 2020-05-16 21:37:14 +02:00
Alexander Söderberg
31edffcb63 Begin working on a platform specific world management system
This should make world management a fair bit cleaner
2020-05-16 21:37:14 +02:00
NotMyFault
5442d43918
Update bug-issue-report-for-plotsquared.md 2020-05-15 16:46:47 +02:00
NotMyFault
25d4d23958
5.11.2 2020-05-14 23:15:08 +02:00
Alexander Söderberg
86edb20c15
Add a FAWE/WE chart 2020-05-14 16:33:26 +02:00
Alexander Söderberg
3d30885daf
No PlotSquared-Core-Core 2020-05-14 15:47:25 +02:00
dordsor21
194c5aa27b Merge branch 'v5' of https://github.com/IntellectualSites/PlotSquared into v5 2020-05-14 14:45:33 +01:00
dordsor21
20c487238a PlotSquared-Core please 2020-05-14 14:45:27 +01:00
Alexander Söderberg
6814b4bef2
Fix Core archive name 2020-05-14 15:24:43 +02:00
dordsor21
e1a25907f2 Merge branch 'v5' of https://github.com/IntellectualSites/PlotSquared into v5 2020-05-14 14:19:37 +01:00
dordsor21
5f896dd39a Properly copy NBT data in containers 2020-05-14 14:19:33 +01:00
Alexander Söderberg
f4729310fa
Include the core dependency in the Bukkit module 2020-05-14 14:52:43 +02:00
Alexander Söderberg
2f02f4392a
Fix names of shaded jars 2020-05-14 14:51:23 +02:00
Alexander Söderberg
b7f708dcd6
Fix gradle config 2020-05-14 14:32:20 +02:00
Alexander Söderberg
501fd9c8e6
Merge remote-tracking branch 'origin/v5' into v5 2020-05-14 14:16:17 +02:00
Alexander Söderberg
7ba7df5cb2
Make the upload task work 2020-05-14 14:16:10 +02:00
dordsor21
9dd9201b67 Allow plot auto from non-plot areas if the server has only one plot area 2020-05-14 13:10:53 +01:00
dordsor21
8fb9f29ab7 Fixes #2827
If existing blocks are an instance of container, clear the inventory.
2020-05-14 12:57:26 +01:00
Alexander Söderberg
dd852801cc
Merge pull request #2825 from IntellectualSites/tile-entity-cap
Fix chunk processing
2020-05-14 13:18:19 +02:00
Alexander Söderberg
1fa41e6209
Merge branch 'v5' into tile-entity-cap 2020-05-14 13:17:41 +02:00
dordsor21
a2db2e8268 Add return 2020-05-14 11:27:35 +01:00
dordsor21
617abf89e6 Split ChunkManager to Chunk and Region Managers
- Having not chunk-specific code in ChunkManager felt wrong.
- Also allow FAWE to replace setbiome code
- Also improve performance (proper usage of chunk loading) for setbiome
2020-05-14 11:27:35 +01:00
dordsor21
98b4ceab7d Fix style.yml 2020-05-13 16:29:10 +01:00
Alexander Söderberg
86a996b2ff
Make the tile entity check true by default, as it only applies when the chunk processor is enabled (and it's disabled by default) 2020-05-13 15:09:00 +02:00
Alexander Söderberg
e6a9daf31a
Make the tile entity limit in ProcessedWEExtent apply per chunk rather than per edit 2020-05-13 14:54:54 +02:00
Alexander Söderberg
8c0f7b207e
Make the chunk listener NOT delete all tile entities in the chunk 2020-05-13 14:39:58 +02:00
Alexander Söderberg
ec347f8738
Add missing blocks and block tile entities from /plot set if the chunk processor is enabled 2020-05-13 14:24:04 +02:00
Alexander Söderberg
19fe2efb6e
Fix the WE extent and add our own tile entity list 2020-05-13 14:11:17 +02:00
Alexander Söderberg
e6878d7804
clean up ProcessedWEExtent 2020-05-13 12:47:52 +02:00
Alexander Söderberg
435d877262
Make the tile entity check respect the chunk processor status 2020-05-13 12:25:48 +02:00
Alexander Söderberg
3deff629b0
Add paper specific listener for limiting the amount of tile entities in a chunk during build, instead of just doing it during chunk unloading 2020-05-12 23:01:14 +02:00
dordsor21
a038cb6d1b Merge branch 'v5' of https://github.com/IntellectualSites/PlotSquared into v5 2020-05-12 18:53:57 +01:00
dordsor21
637dd7d0c2 correct update messaging 2020-05-12 18:53:26 +01:00
Alexander Söderberg
d20fa39cf5
Add flag that prevents people from copying NBT data in the plot unless they're added as members 2020-05-12 19:25:06 +02:00
Aurélien
be6910d5d9 Reformated and update French translation
Some of my translations used '' to represent ' but it's not needed. Also splited some long lines and translated new backup system and keep-inventory flag.
2020-05-12 17:29:32 +02:00
Hannes Greule
2d6a5a3804
Update download link 2020-05-12 15:16:51 +02:00
NotMyFault
630e81fbfb
5.11.1 2020-05-12 13:42:24 +02:00
Alexander Söderberg
6488aafd9d
Version bump 2020-05-12 12:56:18 +02:00
Alexander Söderberg
4ad90d423d
Fix timeout comment 2020-05-12 12:52:45 +02:00
Alexander Söderberg
d2dae45082
Add leaves to the blacklist 2020-05-12 12:49:39 +02:00
Alexander Söderberg
85c9bd7ceb
Add all sign type to blacklist 2020-05-12 12:24:36 +02:00
dordsor21
d0ee579069 Move backup config section to a more appropriate place 2020-05-12 10:44:34 +01:00
Alexander Söderberg
10dbcbcdbd Prevent NPE in entityDamage
This is done by creating a fake (WE) entity type in the case that the entity type name is null. In these cases, WE has no equivalent.

By doing this, all entity category contains check will fail, and it will default to the PVE check at the bottom of the if-else if chain.
2020-05-12 10:05:47 +02:00
Alexander Söderberg
e8dd5fe903
Merge pull request #2816 from IntellectualSites/backups
Plot backup system
2020-05-12 09:40:25 +02:00
Alexander Söderberg
32c23e6ced
Merge branch 'v5' into backups 2020-05-11 22:27:16 +02:00
Alexander Söderberg
81aaba328a
ENGLISH > ROOT 2020-05-11 22:21:37 +02:00
Alexander Söderberg
3c5dd3d0d2
Merge remote-tracking branch 'origin/v5' into v5 2020-05-11 22:11:29 +02:00
Alexander Söderberg
2dc07d9321
Add a looooot of default disallowed blocks 2020-05-11 22:11:21 +02:00
N0tMyFaultOG
841dd5e189 Update wiki links 2020-05-11 20:27:06 +02:00
Alexander Söderberg
b2bc2887d2
Fix dumdum merge 2020-05-11 20:17:41 +02:00
Alexander Söderberg
e20319f4e1
Merge branch 'v5' into backups
# Conflicts:
#	Core/src/main/java/com/plotsquared/core/configuration/Captions.java
2020-05-11 20:15:48 +02:00
Alexander Söderberg
d40160d205
Fix javadoc 2020-05-11 20:04:22 +02:00
Alexander Söderberg
f7167d5e83
Fix typo 2020-05-11 20:03:26 +02:00
Alexander Söderberg
282773a43f
Replace Guava methods with stdlib equivalents 2020-05-11 20:02:33 +02:00
Alexander Söderberg
8944be5319
(Complex) command suggestions for /plot set 2020-05-11 19:37:25 +02:00
Alexander Söderberg
df01f9bea7
Add a list of blocks that cannot be used in /plot set <component> 2020-05-11 18:35:06 +02:00
Alexander Söderberg
3c17b76b1c
Remove dum-dum line break 2020-05-11 11:21:32 +02:00
Alexander Söderberg
7a6909dab1
Merge branch 'v5' into backups 2020-05-11 11:19:59 +02:00
Alexander Söderberg
3064ae80d1
Add a keep-inventory flag 2020-05-11 11:19:36 +02:00
dordsor21
06bb6856a8 Fix bad getApplicablePlotArea(Location) code
- Fixes #2815 alongside 667098268f2ce78e79c9f0dd3c7f27c41e8bf462
2020-05-11 09:48:18 +01:00
Alexander Söderberg
702caa6feb
Remove rogue line break 2020-05-10 22:09:56 +02:00
Alexander Söderberg
fc74c582bf
Add option to disable deletion of plot backups when the plot is unclaimed 2020-05-10 21:52:57 +02:00
Alexander Söderberg
658361f825
Destroy backups when the plot is uncalimed 2020-05-10 21:31:16 +02:00
Alexander Söderberg
e0c9a802d8
Add automatic backups and implement them /plot clear and /plot set <component>. 2020-05-10 20:31:07 +02:00
Alexander Söderberg
c4a70c0945
Fix tab completion for the backup command 2020-05-10 19:42:42 +02:00
Alexander Söderberg
f7d6ac00e4
Make the backup commands work 2020-05-10 19:20:11 +02:00
Alexander Söderberg
8ed5a21b36
Merge branch 'v5' into backups 2020-05-10 17:03:36 +02:00
N0tMyFaultOG
773a993ee1 Merge branch 'remove-eol-translation-strings' into v5 2020-05-10 17:02:13 +02:00
Alexander Söderberg
6fb63c9609
Implement backup restoration command. This might work, idk, we'll see. 2020-05-10 16:53:19 +02:00
Alexander Söderberg
079289eb74
Use #getTranslated on GENERIC_UNOWNED 2020-05-10 16:40:12 +02:00
Alexander Söderberg
59f96d4455
Translate all backup failure reasons 2020-05-10 16:39:14 +02:00
Alexander Söderberg
cdab52fcbe
dumdum space go bye bye 2020-05-10 16:04:33 +02:00
Alexander Söderberg
63c9037b10
Fix typo 2020-05-10 16:00:20 +02:00
Alexander Söderberg
bbc86eba39
/plot debug progress 2020-05-10 15:51:27 +02:00
Alexander Söderberg
e0fb6f5440
/plot debug structure 2020-05-10 15:36:20 +02:00
Alexander Söderberg
2bd30af361
Cache both backup profiles and backup objects 2020-05-10 15:12:17 +02:00
NotMyFault
b136f44f12
Merge branch 'v5' into remove-eol-translation-strings 2020-05-10 15:05:58 +02:00
Alexander Söderberg
d0dbb495b0
Add BackupProfile#restoreBackup 2020-05-10 14:58:45 +02:00
Alexander Söderberg
8715a27a93
No backups for merged plots 🐮 2020-05-10 14:41:02 +02:00
Aurélien
503fc44208 Updated according to new translations and old removed 2020-05-10 14:12:56 +02:00
Aurélien
d3bfaeb5a4 Ready for merging !
Removed useless space at the end of the file + precision of the date (latest edition)
2020-05-10 14:12:56 +02:00
Aurélien
7adecd0808 Last fix (removed unused translation + added the missing) 2020-05-10 14:12:56 +02:00
Aurélien
c99e081ae0 Fiexed issues reported by CodeFactor 2020-05-10 14:12:56 +02:00
Aurélien
285b6bf62d Updated and corrected French translation
Old translation has been reviewed and new v5 flags' translations has been added.
Some mistakes could now remain, I will fix them if needed ;)
Enjoy !
2020-05-10 14:12:56 +02:00
Alexander Söderberg
723e29cdd0
Continue working on the backup system 2020-05-10 14:02:25 +02:00
dordsor21
667098268f Almost fix slime pathing?
This almost works, there's no real way to do it gracefully because you can't set where the slime should be travelling to nicely, nor can you set rotation etc. Seems to be a fairly large part of the event capability missing from paper.
2020-05-10 12:18:55 +01:00
dordsor21
e6408b35a2 fix merge auto 2020-05-10 10:44:14 +01:00
Alexander Söderberg
3eb0de68c4
Begin working on the structure for the backup system 2020-05-09 20:05:39 +02:00
N0tMyFaultOG
dd1b944205 Update gradle and remove license header from gradle 2020-05-09 16:47:49 +02:00
N0tMyFaultOG
ae11f0610e Add a few more translation strings for setup wizard 2020-05-09 16:45:32 +02:00
dordsor21
55fc963673 5.10.6 2020-05-09 13:19:29 +01:00
N0tMyFaultOG
198c7ca58d Remove dead translations 2020-05-09 14:04:08 +02:00
Hannes Greule
5a2f70238a Typo 2020-05-06 12:53:27 +01:00
Hannes Greule
8257b0b563 No lazy init when calling toString,equals or hashCode
That prevents premature initialization as NullBlockCategory
2020-05-06 12:53:27 +01:00
Hannes Greule
9b997d2195 Make constructor private 2020-05-06 12:53:27 +01:00
Hannes Greule
a19fa1b92c Send a debug message if category not found 2020-05-06 12:53:27 +01:00
Hannes Greule
2c060db9c0 Lazily initialize block tags 2020-05-06 12:53:27 +01:00
dordsor21
a8621a15ad Override setblock setting Pattern in ChunkBlockQueue
> Should stop NPE during plot analysis
> Without overriding this method, DelegateLocalBlockQueue setblock Pattern is called
> DelegateLocalBlockQueue's setblocks use parent.setBlock, but we set that to null in ChunkBlockQueue
> ChunkBlockQueue is simply just to cache the values from generation to use in analysis
> Therefore there is no need to setblocks in any other Queue implementation
2020-05-06 12:53:16 +01:00
dordsor21
179e9e1e74 Clean up plot grants and plot auto
- Correct maths for calculating granted plots, etc etc
- Don't check if the player has the correct number of plots AGAIN on AutoClaimFinishTask. That's dumb.
2020-05-06 11:39:34 +01:00
dordsor21
df5feff9ec Display the correct number of grants used in auto 2020-05-05 13:50:29 +01:00
dordsor21
9226aaff1f In the interest of debug should show everything, add debug when registering an unknown flag. 2020-05-05 12:57:14 +01:00
dordsor21
afe874a59b try-catch for NPE in purge and fail gracefully if the world is null
Plausible scenario since purge is often run to remove plots in the DB from removed worlds
Shouls fix #2806
2020-05-05 11:12:39 +01:00
N0tMyFaultOG
4ad9f12d5d Move plot version to debugpaste top 2020-05-04 23:58:01 +02:00
dordsor21
228c37815a Fix merge all
Fixes #2804
2020-05-04 17:15:53 +01:00
Alexander Söderberg
a37ab10414
Don't send chat spy to message sender 2020-05-03 18:13:54 +02:00
dordsor21
d73dbf0c81 5.10.5 2020-05-02 13:34:04 +01:00
dordsor21
daee26681a use strings for spawn reasons to be safe 2020-05-02 12:13:00 +01:00
dordsor21
729469e030 Add config options for all paper events. 2020-05-02 11:58:32 +01:00
dordsor21
c6dc9ee189 Add some more listeners
- Also use setShouldAbortSpawn so it doesn't just try forever
 - Add config to enable or disable all paper listeners
2020-05-02 11:58:32 +01:00
dordsor21
85a75ad868 Yeet that PaperSPiGoT out of here 2020-05-02 11:58:32 +01:00
dordsor21
8ec8b8d803 Add some paper-specific listeners 2020-05-02 11:58:32 +01:00
MeFisto94
d864792d09 Fixes #2800 Allow to wrap OfflinePlayers in 1.15.2 2020-05-02 11:28:06 +01:00
dordsor21
ed2e9a80ed Fix rare bug where if the plot size was less than 15 and the chunk contained an entire plot, it would generate incorrectly 2020-05-01 20:30:59 +01:00
dordsor21
36948ed351 Move world settings dump to a better location (where all of the fields will actually have been set) 2020-05-01 20:29:35 +01:00
dordsor21
e06429f3b0 Correct world types given to player 2020-05-01 19:18:11 +01:00
MattBDev
fd4a9a16de Execute commands when clicked for expire messages 2020-05-01 13:34:43 -04:00
NotMyFault
acba10ac09
Fix broken url 2020-05-01 17:00:55 +02:00
dordsor21
d6d49e0912 Show suffix in versionString() too 2020-05-01 15:56:35 +01:00
dordsor21
b5de5f30ac Allow suffixes to the version
- Useful for "PlotSquared-5.10.4-SNAPSHOT" etc
2020-05-01 15:53:40 +01:00
dordsor21
17698065a0 Add extra SpawnReasons to spawn listener 2020-04-30 17:00:35 +01:00
Alexander Söderberg
135c6f2c15 Send a less obnoxious message if the flag name length exceeds the maximum allowed length 2020-04-30 13:36:03 +02:00
dordsor21
a263fe2f2d Apparently we need to recover from bad flags 2020-04-30 12:15:42 +01:00
dordsor21
cbe46539ca Pick up the rest of the reformating 2020-04-30 11:53:07 +01:00
dordsor21
5e842f1572 Force flag names to be 64 characters or less
- A few people seem to be on interesting SQL installs. This should fix the issues they have with 767 bytes,
2020-04-30 11:52:39 +01:00
dordsor21
b56d4d0fea Merge branch 'reformat' into v5 2020-04-30 11:39:02 +01:00
dordsor21
42106bb97a I didn't get everything first time 2020-04-30 11:33:59 +01:00
dordsor21
e7216d4aef Merge branch 'v5' into reformat 2020-04-30 11:33:31 +01:00
dordsor21
0751e9cea3 Make LiquidFlowFlag an enum 2020-04-30 11:18:28 +01:00
dordsor21
0091580ae0 Reformat it all. 2020-04-30 11:01:52 +01:00
dordsor21
4a16f9c1a7 LiquidFlow true will override BlockPhysics false 2020-04-30 10:59:43 +01:00
N0tMyFaultOG
894d673c90 Fix tests 2020-04-30 11:32:50 +02:00
dordsor21
577fe3037f Update checker improvements and 5.10.4
- Add config option to disable poll once it's found an update (true by default)
 - Better PlotVersion stuff can now detect if you're using a later version than the spigot API, and not tell you about it
2020-04-30 10:17:19 +01:00
NotMyFault
53ca62e8fc
Bump version 2020-04-29 22:06:23 +02:00
NotMyFault
670f6d9f8b
Fix coral-dry flag not respecting horn coral blocks 2020-04-29 21:55:55 +02:00
dordsor21
8a21334e66 Merge branch 'v5' of https://github.com/IntellectualSites/PlotSquared into v5 2020-04-28 11:21:51 +01:00
dordsor21
a130d801d5 schem.intellectualsites.com (just forwards to athion.net but cnamed) 2020-04-28 11:21:30 +01:00
N0tMyFaultOG
51b6f41eff Update papi hook message 2020-04-25 23:54:30 +02:00
N0tMyFaultOG
a829799b36 Update scripting message 2020-04-25 23:53:46 +02:00
dordsor21
ccb43d0661 Do placeholders better.
- Still allow parsing of placeholder if no plot is required and plot is null.
- Properly check if the player is null before getting the plot, and if the plot is null
- These were still issues before my initial "fix" city
2020-04-23 14:16:06 +01:00
Hannes Greule
5bd53436df Prevent NPE for report comments 2020-04-23 13:44:34 +01:00
dordsor21
caa4a08b26 getOfflinePlayer once 2020-04-23 09:21:52 +01:00
dordsor21
0fa99d7940 Never return null in Placeholder. Also slight cleanup. 2020-04-23 09:06:37 +01:00
dordsor21
73dae7842d Only poll for updates every 30 mins.
- Don't do GET requests on player join (bad idea, it was sync...)
 - If there's an update it will notify the player still, it just caches the update status
2020-04-22 12:09:00 +01:00
dordsor21
92a18d810c Correct usage of Json.
I'm dumb and forgot toString doesn't work. Repalce with getAsString
2020-04-22 09:57:46 +01:00
dordsor21
591eb60a71 5.10.2
*bump version after resource update
2020-04-22 08:24:55 +01:00
dordsor21
9081a5aff6 Fix incorrectly formatted biomes in worlds.yml automagically 2020-04-22 08:22:14 +01:00
NotMyFault
8ff4566905
Change misleading information 2020-04-21 23:42:31 +02:00
N0tMyFaultOG
c8d8fb6aff Reformat premium information 2020-04-21 23:38:56 +02:00
N0tMyFaultOG
6da4994955 Enhance premium verification 2020-04-21 23:06:11 +02:00
N0tMyFaultOG
4780fcd534 Fixes #2782
Thanks for the contribution :)
2020-04-21 15:53:38 +02:00
dordsor21
5b30711470 Cant use bar chart 2020-04-21 12:39:48 +01:00
dordsor21
336f27f078 Only check update if premium. Add bstats bars for premium vs not. 2020-04-21 12:39:48 +01:00
dordsor21
92ef0d723b 5.10.1 2020-04-21 11:59:10 +01:00
dordsor21
ffee7a518e update default biome to match format WorldEdit accepts. 2020-04-21 09:16:02 +01:00
dordsor21
8d61e6f111 Fix update checker
- No more NPEs
 - Use the better spigot API
 - No obnoxious tooltip displaying the link without being clickable
2020-04-21 08:56:23 +01:00
dordsor21
67736bfbca git object is actually needed in Core build 2020-04-21 08:28:22 +01:00
dordsor21
84108b60c2 force version 2020-04-21 08:16:06 +01:00
Alexander Söderberg
59f8f2fdff
Fix biome setting in 1.13 and 1.14 2020-04-20 23:40:04 +02:00
Alexander Söderberg
5c6175badb
Merge remote-tracking branch 'origin/v5' into v5 2020-04-20 23:37:02 +02:00
Alexander Söderberg
8db8a30455
Fix biome setting 2020-04-20 23:36:56 +02:00
NotMyFault
cbe8fda1df
Fix update notification 2020-04-20 23:24:28 +02:00
N0tMyFaultOG
558df450b5 Update spigot updater 2020-04-20 21:04:30 +02:00
Cheezybo99
f1d10c96bc Added PERMISSIONS_ADMIN_CHAT_BYPASS enum for the permission plots.admin.chat.bypass allowing users to bypass the plot chat security feature. 2020-04-20 18:55:28 +02:00
Cheezybo99
4d1b08a628 Updated to properly use the permissions system from com.plotsquared.core.util.Permissions and com.plotsquared.core.configuration.Captions 2020-04-20 18:55:28 +02:00
Cheezybo99
2eda56bc1f If all players are denied from a plot, this will allow administrators with permission to see chatspy, talk in plots they have been denied from. 2020-04-20 18:55:28 +02:00
Alexander Söderberg
c391fee100
Merge pull request #2779 from lenis0012/v5
Use primite int type for setBiome 1.13 workaround
2020-04-20 18:53:55 +02:00
Alexander Söderberg
06d255ccc2
Create FUNDING.yml 2020-04-20 18:48:22 +02:00
Lennart ten Wolde
bb291b947f Use primite int type for setBiome 1.13 workaround 2020-04-20 17:27:46 +02:00
Alexander Söderberg
3c8b22688a
I'm dumb. 2020-04-19 21:24:45 +02:00
Alexander Söderberg
cdd1fad85c
Fix github link in debugpaste 2020-04-19 21:22:45 +02:00
Alexander Söderberg
ab6fd06657
Link to bStats 2020-04-18 23:22:05 +02:00
Alexander Söderberg
3bb32a5630
Add bStats stats to README 2020-04-18 23:21:01 +02:00
Alexander Söderberg
bf5862942a
Disable prefixes for flag info headers and footers and suppress NPE in the update utility 2020-04-18 22:26:13 +02:00
Alexander Söderberg
cbea595fa0
Don't relocate json-simple. 2020-04-18 21:14:44 +02:00
dordsor21
952ea0b090 Fix setowner none (unclaim) 2020-04-18 17:59:45 +01:00
dordsor21
af951ac11c Update upload to debug the content if incorrect properly. 2020-04-18 17:53:45 +01:00
dordsor21
165614efe9 make sure never to have unclaim be an alias of delete. Even if it doesn't work. 2020-04-18 17:44:01 +01:00
dordsor21
95335df84d Merge branch 'v5' of https://github.com/IntellectualSites/PlotSquared into v5 2020-04-18 17:22:58 +01:00
dordsor21
100861484a Fix plot claim. 2020-04-18 17:22:51 +01:00
N0tMyFaultOG
70eb588f1f Update issue template for v5/v3 support 2020-04-18 17:04:16 +02:00
Alexander Söderberg
c206de263b
Merge remote-tracking branch 'origin/v5' into v5 2020-04-18 02:28:29 +02:00
Alexander Söderberg
0c12972c03
Register misc-flags. 2020-04-18 02:28:11 +02:00
N0tMyFaultOG
546c4defb7 Add SirYwell to authors list
Thanks for all your hard work regarding v5 ❤️
2020-04-16 23:49:08 +02:00
N0tMyFaultOG
814fca3832 Update flag description 2020-04-16 19:15:40 +02:00
dordsor21
3ee29297e0 Add option to force plot chat in plot areas. 2020-04-16 16:55:14 +01:00
dordsor21
6d9d0fff10 Add description caption for chat flag 2020-04-16 12:49:00 +01:00
dordsor21
714b8dad87 Implement IntellectualSites/PlotSquaredSuggestions/96
Also make Plot Chat work properly. Not sure what was going on there before...
2020-04-16 11:54:32 +01:00
dordsor21
a44807d47b Don't dump biome array on /ps reload. Gradle also seems to want to change the Core pom. 2020-04-16 11:43:13 +01:00
Alexander Söderberg
4aac3bf7e4
Merge pull request #2757 from IntellectualSites/api/v5/packages
Package Restructure
2020-04-16 10:58:13 +02:00
Alexander Söderberg
ee2ed8222d
Merge config packages 2020-04-16 06:14:33 +02:00
Alexander Söderberg
edaf396894
Merge features/v5/internal-updates into api/v5/packages 2020-04-16 06:11:03 +02:00
Alexander Söderberg
6f052f0001
Remove extra line from HEADER 2020-04-16 05:05:58 +02:00
Alexander Söderberg
ba40a56c32
Add GPLv3 License headers to all source files. 2020-04-16 04:52:39 +02:00
MattBDev
780be3776a Addressed some comments 2020-04-15 15:26:54 -04:00
NotMyFault
98235b3fdc Merge remote-tracking branch 'origin/dependabot/gradle/features/v5/internal-updates/org.jetbrains.kotlin-kotlin-stdlib-1.3.72' into features/v5/internal-updates 2020-04-14 20:25:22 +02:00
dependabot-preview[bot]
f5a9abfc8d
Bump kotlin-stdlib from 1.3.61 to 1.3.72
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.3.61 to 1.3.72.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 18:25:00 +00:00
dependabot-preview[bot]
a8619fe2ad
Bump asm from 7.3.1 to 8.0.1
Bumps asm from 7.3.1 to 8.0.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 18:23:48 +00:00
dependabot-preview[bot]
c812bb1295
Bump annotations from 18.0.0 to 19.0.0
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 18.0.0 to 19.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/18.0.0...19.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 17:50:27 +00:00
Alexander Söderberg
4e7bcc788b
Merge pull request #2764 from IntellectualSites/features/v5/event-entity-categories
Features/v5/event entity categories
2020-04-12 23:21:47 +02:00
Alexander Söderberg
79bd69e599 Make the entity counting code use the new entity categories, remove usage of magic numbers and add /plot caps 2020-04-12 19:30:50 +02:00
Alexander Söderberg
5772af37fe Reclassify shulker as a hostile mob 2020-04-12 04:46:51 +02:00
Alexander Söderberg
6324bb1134 Use entity categories in events 2020-04-12 01:47:56 +02:00
Alexander Söderberg
658f2a3fc3 Finalize entity type categorisation 2020-04-12 01:23:13 +02:00
Hannes Greule
6e536f81ac Add more entity categories 2020-04-12 00:57:50 +02:00
Alexander Söderberg
dd9450d36a Add entity category loading code to WorldUtil (implemented in BukkitUtil) 2020-04-11 22:26:31 +02:00
Alexander Söderberg
8ef3a90ce0 Merge remote-tracking branch 'origin/features/v5/internal-updates' into features/v5/internal-updates 2020-04-11 21:49:15 +02:00
Alexander Söderberg
e6c76ad3f3 Entity categories implementation 2020-04-11 21:49:08 +02:00
Hannes Greule
4a249843eb Workaround to accept Slimes and EnderDragons as Monsters 2020-04-11 21:42:52 +02:00
Alexander Söderberg
5c1f0f51df Add a custom bStats chart tracking terrain types 2020-04-11 20:56:34 +02:00
Alexander Söderberg
2377ce1123 Relocate metrics properly 2020-04-11 19:52:45 +02:00
Hannes Greule
6f2b31f4a3 Add missing default flag values to GlobalFlagContainer (fixes #2748) 2020-04-11 18:49:04 +02:00
Alexander Söderberg
c5590440d6 Merge remote-tracking branch 'origin/features/v5/internal-updates' into features/v5/internal-updates 2020-04-11 17:58:27 +02:00
Alexander Söderberg
7931390ae4 Fix json relocation issue. Make plot areas dump their default flags and add progress output for flag conversion. 2020-04-11 17:58:08 +02:00
Alexander Söderberg
546b857b9d Fail default flag parsing gracefully 2020-04-11 17:19:43 +02:00
Alexander Söderberg
ce10d54a9c Don't use legacy IDs to get block types in the hybrid plot manager 2020-04-11 13:28:58 +02:00
Alexander Söderberg
965bbb9f3b Extract block queues from AugmentedUtils 2020-04-11 13:23:57 +02:00
Alexander Söderberg
e88b331155 Clean up AugmentedUtils and make the code readable by humans 2020-04-11 12:08:46 +02:00
Alexander Söderberg
ce177c3c46 Clean up HybridGen and make the code readable by humans
Previously it was only readable by androids, and Jesse.
2020-04-11 12:00:42 +02:00
Alexander Söderberg
5a6dbfda36 Fix javadoc generation issues 2020-04-11 03:23:48 +02:00
Alexander Söderberg
6c1caac731 Rename jar from BukkitAPI to Bukkit 2020-04-11 02:57:00 +02:00
Alexander Söderberg
9c3c42c3e6 Rename published maven artifacts
# Conflicts:
#	Bukkit/build.gradle
#	Core/build.gradle
2020-04-11 02:54:34 +02:00
Alexander Söderberg
5fc33dcc06 Rename published maven artifacts 2020-04-11 02:39:02 +02:00
Alexander Söderberg
c196ced0e2 Move org.json into core 2020-04-11 02:28:15 +02:00
MattBDev
dfa977a020 Moved more packaged based on feedback 2020-04-10 20:19:18 -04:00
MattBDev
5be2dfa747 Package Changes 2020-04-10 19:26:07 -04:00
Alexander Söderberg
f9ea99fa1d
Merge pull request #2754 from IntellectualSites/features/v5/owners
Remove all direct access to Plot.owner
2020-04-10 19:52:41 +02:00
Alexander Söderberg
79583c011f Replace getOwnerAbs() == null with !hasOwner() 2020-04-10 19:28:10 +02:00
Alexander Söderberg
172bcc7677 Revert "Replace getOwnerAbs() == null with hasOwner()"
This reverts commit 79620042
2020-04-10 19:22:12 +02:00
Alexander Söderberg
fa51cb94a3
Merge pull request #2755 from IntellectualSites/features/v5/licenses
Add GPLv3 License headers to all source files.
2020-04-10 19:14:14 +02:00
Alexander Söderberg
c2060ea1a7 Remove deprecation of getOwner() 2020-04-10 19:11:53 +02:00
Alexander Söderberg
7962004215 Replace getOwnerAbs() == null with hasOwner() 2020-04-10 19:10:43 +02:00
Alexander Söderberg
45476f2867 I missed AbstractDB somehow... 2020-04-10 18:15:35 +02:00
Alexander Söderberg
280ced7904 Add GPLv3 License headers to all source files.
Reason: "            How to Apply These Terms to Your New Programs

           If you develop a new program, and you want it to be of the greatest
         possible use to the public, the best way to achieve this is to make it
         free software which everyone can redistribute and change under these terms.

           To do so, attach the following notices to the program.  It is safest
         to attach them to the start of each source file to most effectively
         state the exclusion of warranty; and each file should have at least
         the "copyright" line and a pointer to where the full notice is found."
2020-04-10 18:09:01 +02:00
Alexander Söderberg
474795367e Reformat Plot after the owner changes. It was a bit too messy. 2020-04-10 14:07:52 +02:00
Alexander Söderberg
ce756411cf Remove all direct access to Plot.owner
New methods were added for access to the absolute owner of a plot, and the documentation of the owner getters to clarify the purpose of the methods.
2020-04-10 14:05:01 +02:00
MattBDev
bdba2b33fb Remove Nukkit and Sponge files from v5
We don't need these because they already exist in our git history and in the legacy branch.
2020-04-09 19:38:10 -04:00
Alexander Söderberg
0d26111fa7 Include golems (snowmen, iron golems and shulkers) in the animal-interact flag. 2020-04-09 21:38:24 +02:00
Alexander Söderberg
dada7dbb86 Use relocated org.json instead of including the source files 2020-04-09 17:41:55 +02:00
Alexander Söderberg
cb05d34d20 Fixes #2751 2020-04-09 17:07:14 +02:00
Alexander Söderberg
7c25c60252
Merge pull request #2743 from IntellectualSites/features/v5/async-load
Prevent synchronous chunk loading whenever possible
2020-04-09 15:09:18 +02:00
Alexander Söderberg
86149224d1 Don't set walls, wall filling or outline in plots using full vanilla terrain generation 2020-04-09 13:06:45 +02:00
Alexander Söderberg
f717589074 Fix typo in MainUtil and switch out Consumer<Integer> to IntConsumer 2020-04-09 11:23:39 +02:00
Alexander Söderberg
254a0541cc Fix OfflinePlayerUtil runtime exception 2020-04-08 22:52:13 +02:00
Alexander Söderberg
271109a726 Fix dumdum async getLoadedChunks call, but only because Aikar broke everything. 2020-04-08 21:49:41 +02:00
Alexander Söderberg
38de74c4ff Make sure PlayerEvents#logout is called 2020-04-08 17:53:11 +02:00
Alexander Söderberg
865d11e844 Register vehicle-place and make it disabled by default 2020-04-08 17:28:16 +02:00
Alexander Söderberg
ebba9a2290 Fix interval flags 2020-04-08 17:22:53 +02:00
Alexander Söderberg
bc45b8b695 Merge branch 'features/v5/internal-updates' into features/v5/async-load 2020-04-08 17:17:17 +02:00
Alexander Söderberg
7ac389b698 Fix block ignition location check 2020-04-08 17:15:17 +02:00
Alexander Söderberg
616d22ceac Fix liquid-flow 2020-04-08 17:01:41 +02:00
Alexander Söderberg
f6332d2cd9 Add tab completions to flyflag 2020-04-08 16:53:39 +02:00
Alexander Söderberg
4ca7a81e96 Fix untrusted-visit. 2020-04-08 16:52:10 +02:00
Alexander Söderberg
ae2867136a Make the fly flag an enum flag instead. It now accepts: true, false and default, where default is the default value, and does not change the flight status at all. 2020-04-08 16:39:19 +02:00
Alexander Söderberg
ef04ed9151 Fix augmented generation 2020-04-08 04:10:22 +02:00
Alexander Söderberg
1522632f5a Don't replace blocks if they have identical states already 2020-04-08 02:02:20 +02:00
Alexander Söderberg
be6bcafccc Make sure augmented generation doesn't crash the server 2020-04-08 01:23:22 +02:00
Alexander Söderberg
5d332e7d58 Fix plot clearing in normal plot worlds 2020-04-08 00:01:58 +02:00
Alexander Söderberg
283ff945f3 Fix /plot auto performance and remove sign-guessing 2020-04-07 23:39:56 +02:00
Alexander Söderberg
0d4af3023d Extract TaskManager lambdas for better debugging 2020-04-07 23:18:36 +02:00
Alexander Söderberg
7fdb7961ce Merge branch 'features/v5/internal-updates' into features/v5/async-load 2020-04-07 22:13:42 +02:00
Alexander Söderberg
e161209a46 Fix plot claiming 2020-04-07 22:12:52 +02:00
Alexander Söderberg
5e2e4a8631 Revert testCreate change 2020-04-07 21:43:32 +02:00
Alexander Söderberg
e4a6bd0ca5 Don't try to remove players. Fixes #2742. 2020-04-07 20:56:43 +02:00
Alexander Söderberg
5547185b3f Prevent synchronous chunk loading whenever possible 2020-04-07 20:19:39 +02:00
dordsor21
7841ee3dcc Fix a few encapsulate merge issues 2020-04-02 13:40:11 +01:00
Hannes Greule
099a680c85
Encapsulation and Magic Values (#2711)
* Encapsulate attributes of PlotArea using lombok Getters/Setters

* Limit access to collections, don't expose implementation details

* Better naming for some boolean attributes

* Replace magic type value with PlotAreaType enum

* Replace magic terrain value with PlotAreaTerrainType enum

* Fix remaining rebase conflicts

* Reduce code duplication

Co-authored-by: Alexander Söderberg <Sauilitired@users.noreply.github.com>
2020-04-02 13:34:38 +01:00
dordsor21
9764d4d226 Actually add biomes to road schematics 2020-03-28 10:43:24 +00:00
NotMyFault
37336fffe2 Merge branch 'features/v5/internal-updates' of https://github.com/IntellectualSites/PlotSquared into features/v5/internal-updates 2020-03-28 02:26:25 +01:00
NotMyFault
a285404847 Update gradle, actions and fix typo in branch 2020-03-27 23:44:17 +01:00
dordsor21
2994b2c158 Use try with resource to close ClipboardReader and stop adding "atic" to schematic files or not reason 2020-03-26 20:55:27 +00:00
NotMyFault
3a3a06631d Add coral-dry flag 2020-03-25 21:14:58 +01:00
dordsor21
f9bf576d2e Actually initialise the biome array in HybridPlotWorlds.
Fixes generation using schematics (and allows generation using biomes in schematics for roads and plots....)
2020-03-25 17:46:08 +00:00
dordsor21
f2f7fbce09 Allow trusted users to use /plot set 2020-03-25 11:01:19 +00:00
dordsor21
412a3ee344
Support v2 schematics properly. No 3D biomes are supported by it as yet. (#2716) 2020-03-24 09:08:56 +01:00
dordsor21
2f4eea118a
add clear option to /ps purge (#2714) 2020-03-24 09:08:32 +01:00
dordsor21
7310506ed4
Add option to have road regeneration be persistent across restarts. (#2715)
* Add option to have road regeneration be persistent across restarts.

* Use int[] not Integer[]. There's the possibility of large arrays given the size of some worlds.

* Correctly close Input/Output streams with try-with-resource.
Also don't try to ObjectOutputStream if an existing file hasn't actually been deleted.
2020-03-22 19:23:35 +00:00
dordsor21
26b5ee7482 Merge branch 'features/v5/internal-updates' of https://github.com/IntellectualSites/PlotSquared into features/v5/internal-updates 2020-03-20 12:12:30 +00:00
dordsor21
58280a20a8 Log don't debug on regenallroad completion 2020-03-20 12:11:39 +00:00
dordsor21
3d47d7e73f
Use worldedit to regenerate chunks. (#2708)
* Use worldedit to regeneration chunks. It's very slow, but it works.

* Use the AutoClose-ness of EditSession
2020-03-20 13:05:13 +01:00
Alexander Söderberg
d9f9d7dc34
Features/v5/event results (#2706)
* Begin events rewrite using Guava EventBus:
- moved events to within core
- removed BukkitEventUtil
- EventUtil in core is now the implementation
- Refactor any event calls

TODO:
- Test :)
- Implement changes to PlotSquared's own listeners
- Other

* Correct code style for annotations and refactor EventUtil to EventDispatcher

* Make getEventResultRaw default method and remove empty PlotEventListener file

* not raw map

* Remove PlotPlusListener

* Add listener registration to PlotAPI. Add documentation and refactor Result enum

* Add reason for the Event Result. Change how the claim event is called
TODO: better auto event somehow. Possible re-write of auto required..?

* Implement changes to events properly
Add PlayerAutoPlotEvent
Add PlotDoneEvent
Add schematic variable to Claim event and allow it to be changed
Add reason for plot unlink to unlink event
Add pattern to component set event and allow it to be changed
Allow component of component set event to be changed
Add player to plot merge event

* Fix compile

* Correct formating

* Various cleanup
 - Correct formatting in places
 - Add feedback to Desc command cancellation
 - Correct use of flag API
 - Add FlagRemove event to flagcommand where required

* Replace reason with caption

* Switch colours in Event Deny caption

Co-authored-by: dordsor21 <dordsor21@gmail.com>
2020-03-15 12:22:49 +01:00
NotMyFault
4bcd926543 Update discord links 2020-03-09 23:50:22 +01:00
Alexander Söderberg
05626c2c8f
Features/v5/move swap fixes + some other important commits (comments, etc) (#2699)
* Use generics instead of the raw class

* Add Gradle wrapper verification

* Fix biome setting in versions prior to 1.15

* Fixes #2654

* Document area getters in PlotAreaManager, and replace y-value with z in the area contains check.

* Remove update notifications

* Remove unused dependencies

* Do not kick plot owners on "/p deny *"

* Do not kick any added players on /p deny *

* Allow redstone to be used in server plot with `redstone.disable-offline` enabled.

Potentially fixes #2613

* Disallow swapping ,erged plots

* Fix legacy converter.

* Fix blockbucket pattern generation

* Prevent pasting schematics onto merged plots.

* Cancel claim event correctly

* Revert "Cancel claim event correctly"

This reverts commit 0f786155
Further investigation required

* Fix plot swapping messing up owners. Fixes #2282

* Fix plot move

* Prevent plot swapping form changing the database unless the swap was successful.

* Update signs after swap.

* Only send move success message if the move was successful.

Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>
Co-authored-by: NotMyFault <mc.cache@web.de>
Co-authored-by: Daniel <admin@hywse.eu>
Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
2020-02-28 22:15:04 +01:00
NotMyFault
30b83faab6
Fix plot downloading 2020-02-28 00:31:53 +01:00
Alexander Söderberg
9868648fcb
Pull/2693 (#2694)
* Commit WIP flag work.

* More ported flag types, and additions to the flag API.

* Make PlotFlag more generic to allow generic flag creation

* Pull Captions methods into a Caption interface.

* Port MusicFlag

* Port flight flag

* Port UntrustedVisitFlag

* Port DenyExitFlag

* Remove paper suggestion

* Make ListFlag lists immutable

* Update Flag containers. Add javadocs. Add missing methods.

* Port description flag

* Port greeting and farewell flags

* Port weather flag

* Move getExample implementation to BooleanFlag

* Port reserved flags

* Port all boolean flags.

* Remove unused flag types

* Invert liquid-flow flag

* Find the real (legacy) flag name

* Change NOITFY -> NOTIFY in Captions

* Make IntegerFlag extendable

* Port integer flags

* Update Flag command to current API state

* Begin remaking flag command

* Create DoubleFlag + extract common parsing stuff

* Supply arguments in flag parse exceptions

* Implement missing flag subcommands

* Update Flag command to current API state

* Implement PriceFlag

* Port deny-teleport

* Port gamemode flags

* Port BreakFlag

* Port PlaceFlag

* Port UseFlag

* Remove old unused flag constants

* Port blocked-cmds flag

* Fix entity util

* Port TimeFlag

* Use CaptionUtility for formatting

* Port keep flag

* Fix imports

* Reformat code

* Remove unused classes

* Fix MainUtil.java

* Remove FlagCmd

* Add flag info header and footer

* Comment out flag related stuff in SchematicHandler

* Remove FlagManager

* Finalize Plot.java

* Finalize PlotArea.java

* Finalize PlotListener

* Fix API issues

* Fix a bunch of compile errors

* Fix `/plot flag remove`

* Fix initialization of GlobalFlagContainer

* Apply API changes to events

* Update SQLManager to new API

* Invert default value for DenyExitFlag

* Replace flag.getValue().toString() with flag.toString()

* Make FlagContainer instance in Plot final

* Fix various command issues

* Clean up PlotSettings

* Don't show internal flags in flag list

* Fix `/plot flag add`

* Remove the info inventory as it's 100% broken

* Add plot info entries and fix up the default format

* Fix default flag state in Captions

* 781c200 part 2

* Fix odd grammar in captions

* Fix odd grammar in captions v2

* Add create table statements for plot_flags

* Remove old flag references in SQLManager

* Use the new plot_flags table

* Add tab completion to `/plot flag`

* Improve parse error handling

* Make flag permission check recognize parse exceptions

* Initial progress towards flag conversion

* Fix minor issues

* Don't validate flags during flag conversion

* Allow unrecognized flags to be parsed

* Filter out internal flags from command sugguestions

* Use the wrong caption when there's no plot description set

* Limit command suggestions for boolean flags

* Make blocktypelistflags accept blockcategories

* Require categories to be prefixed with '#' and fix some minor display issues

* Fix plot database conversion

* Update PlotFlagEvent.java

Updated return description

* Fix command annotation wrapping

* Add FLAG_UPDATE event for FlagContainer listeners

* Make getParentContainer nullable

* Document castUnsafe in FlagContainer

* Document FlagContainer constructors

* Add missing documentation to FlagContainer

* Document FlagParseException

* Fix wording in FlagContainer javadoc

* Document InternalFlag

* Document PlotFlag

* Minor changes

* Remove revisit comments

Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
Co-authored-by: NotMyFault <mc.cache@web.de>
Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>
2020-02-24 18:42:02 +01:00
Alexander Söderberg
b99631f1bd Fix regen. Fixes #2692 2020-02-24 14:00:45 +01:00
Alexander Söderberg
6be26e8047 Also consider negative locations when cancelling liquid flow 2020-02-24 12:11:22 +01:00
Alexander Söderberg
c7de9379ad Prevent liquids from flowing out of block walls. Fixes #2598. 2020-02-24 11:47:52 +01:00
NotMyFault
86ea69b65e
Update README.md 2020-02-21 00:53:52 +01:00
NotMyFault
f2aa9dccd1 Revert "Remove unused code"
This reverts commit 6d779dad050cea295a3828985da26e7014460079.
2020-02-20 20:08:25 +01:00
Alexander Söderberg
464f5e09ae Allow all messages to be formatted by external formatters and add PAPI support 2020-02-20 16:03:17 +01:00
NotMyFault
17e4bde720 Update gradle version 2020-02-20 00:41:19 +01:00
NotMyFault
6d779dad05 Remove unused code
Or at least I made it unused lul
2020-02-20 00:39:32 +01:00
Alexander Söderberg
38d0cc1b29 Fix isPremium method 2020-02-20 00:05:55 +01:00
Alexander Söderberg
fc9a221127
Update BukkitMain.java
wiz is quick
2020-02-20 00:02:06 +01:00
NotMyFault
95394ec54f Add Premium verification 2020-02-19 23:55:43 +01:00
NotMyFault
a3759f93a2 Add placeholders 2020-02-16 20:33:24 +01:00
NotMyFault
2632283431 Move recent changes into 1 branch 2020-02-16 15:17:06 +01:00
NotMyFault
8a014e3ad5 Remove wiki generator and unnencessary comments from the settings 2020-02-16 15:08:02 +01:00
NotMyFault
1b3427837e Rename maven artifacts
Renaming the Core module artifact matchin its module name on GitHub, like the bukkit or nukkit module does.
Given that, it's more clear which maven artifact belongs to which module.
2020-02-16 14:42:27 +01:00
NotMyFault
b3c91d866b Lazy cherry-pick 5db1e73eae4b0d4628df8bbbc172670c42d96435 without merge conflics 2020-02-16 14:41:51 +01:00
Alexander Söderberg
10dd531cdb Remove paper suggestion 2020-02-16 14:38:33 +01:00
NotMyFault
6953187cac Add current + new version to update notification
And fix a little typo alongside bumping versioning to v5
2020-02-16 14:37:07 +01:00
NotMyFault
7b83f0146e Readd update notification permission implementation 2020-02-16 02:34:51 +01:00
NotMyFault
4ed108b5c0 Remove legacy auto updater (v3) 2020-02-16 01:36:24 +01:00
NotMyFault
24b6b23d25 Bind update notifications to spigot resource updates
The notification permission could be moved back into the other class, but well
2020-02-16 01:33:43 +01:00
NotMyFault
5ea03f12fb
Update issue template 2020-02-14 17:54:45 +01:00
MattBDev
99a53cb005 DoogiePC doesn't like trees 2020-02-12 18:57:42 -05:00
MattBDev
d7af409d01 Test another workaround 2020-02-12 18:21:23 -05:00
MattBDev
0304e98b00 Workaround for SPIGOT-5574 2020-02-12 15:42:31 -05:00
MattBDev
b16db904cc Removed unused class which should be unbreaking. 2020-02-11 17:09:36 -05:00
MattBDev
4b306d454b Fixed an error with the debug command and added @NotNull to generator methods 2020-02-11 17:06:58 -05:00
MattBDev
e53ea2377c Fixed #2671
Sort of fixed. I added an if statement to log and return if a certain condition is met. It is unclear if there will be more generation issues as a result.
2020-02-11 16:52:16 -05:00
MattBDev
f79f2ac29e Tweaks to the world generator 2020-02-11 16:16:56 -05:00
MattBDev
1516edbeca Update dependencies
Changed gradle to new group id and repository. Updated paper-api to 1.15.2
2020-02-11 15:25:42 -05:00
NotMyFault
54348d824c Update authors 2020-02-10 17:36:54 +01:00
NotMyFault
f32cb0c16e Merge remote-tracking branch 'origin/dependabot/gradle/v4/org.projectlombok-lombok-1.18.12' into v4 2020-02-10 17:18:02 +01:00
NotMyFault
4a03cb0701 Merge remote-tracking branch 'origin/dependabot/gradle/v4/org.ow2.asm-asm-7.3.1' into v4 2020-02-10 17:17:39 +01:00
dependabot-preview[bot]
76e25953b1 Bump lombok from 1.18.10 to 1.18.12
Bumps [lombok](https://github.com/rzwitserloot/lombok) from 1.18.10 to 1.18.12.
- [Release notes](https://github.com/rzwitserloot/lombok/releases)
- [Changelog](https://github.com/rzwitserloot/lombok/blob/master/doc/changelog.markdown)
- [Commits](https://github.com/rzwitserloot/lombok/compare/v1.18.10...v1.18.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 08:03:18 +00:00
NotMyFault
2f0bf97162 Fix displaying 1 player remove as players 2020-02-09 01:12:32 +01:00
Hannes Greule
d0b6badf09
Fix DebugClaimTest (#2667)
* Fix DebugClaimTest

* Remove code causing 3 database updates per plot + errors when using MySQL
2020-01-31 17:12:06 +00:00
NotMyFault
30f37e1e8b Update /plot info placeholders 2020-01-27 23:39:29 +01:00
NotMyFault
4e1c90bbcc Fixes space between names in plot info (Fixes #2675) 2020-01-27 23:06:42 +01:00
NotMyFault
c31c855952 Update gradle version to 6.1 2020-01-24 18:47:32 +01:00
NotMyFault
312b2ad1a8 Send the bStats ID 2020-01-24 18:10:19 +01:00
NotMyFault
0953b5627e Add bStats plugin version
bStats 1.7 requires plugins to have an ID to submit data.
2020-01-24 16:08:48 +01:00
Matt
57af89f1d0
Merge pull request #2652 from SynergyMC/breaking
Revert teleportation behavior to pre-4.400
2020-01-22 21:23:25 -05:00
NotMyFault
f71f481ff3
Compile against 1.15.2 2020-01-22 23:54:37 +01:00
NotMyFault
0ba31ed56b
Update dependencies fitting https pattern 2020-01-21 18:25:46 +01:00
NotMyFault
edc81bc668
Updated branch names for gh actions testing 2020-01-21 15:52:57 +01:00
NotMyFault
7797e33ec5
Update sponsors 2020-01-20 01:24:08 +01:00
NotMyFault
118adb42b9 add hungarian translation 2020-01-14 12:27:23 +01:00
dependabot-preview[bot]
2efe604b9b
Bump asm from 7.2 to 7.3.1
Bumps asm from 7.2 to 7.3.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 08:01:49 +00:00
NotMyFault
cadd0cd9b4
Merge pull request #2660 from IntellectualSites/feature/v4/wildcards-player-args
Improve "everyone" args and update a few command messages
2020-01-10 19:40:01 +01:00
NotMyFault
f3187a465c Oops 2020-01-10 19:38:38 +01:00
NotMyFault
6fe856c002 Merge remote-tracking branch 'origin/dependabot/gradle/v4/junit-junit-4.13' into v4 2020-01-10 19:06:22 +01:00
NotMyFault
9a626ea1de Deprecate metrics methods
Metrics are controlled via bstats config for some time now. The config option in settings.yml has already been deprecated in the past.
2020-01-10 14:18:38 +01:00
NotMyFault
026233b7e7 Update gradlew 2020-01-10 14:07:33 +01:00
NotMyFault
6ee9d91aef Update requriedTypes 2020-01-10 14:01:28 +01:00
NotMyFault
808a1ed703 Add wildcards to command args 2020-01-10 13:35:59 +01:00
NotMyFault
7142e9e0e3
deprecate metrics settings 2020-01-07 22:45:53 +01:00
dependabot-preview[bot]
66a2e5427e
Bump junit from 4.12 to 4.13
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/master/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 07:40:34 +00:00
zombachu
3aa554c52b Implemented optional specification of teleport causes
This should have backwards-compatibility for any users of the API but would require an update from anything reimplementing (for whatever reason) the interfaces amended by this commit.
2020-01-02 18:29:12 -10:00
NotMyFault
4322f4c31d
Merge pull request #2649 from IntellectualSites/dependabot/gradle/v4/org.ajoberstar.grgit-4.0.1
Bump org.ajoberstar.grgit from 4.0.0 to 4.0.1
2020-01-03 01:24:18 +01:00
NotMyFault
33f8df3afe
Add teleport cooldown bypass permission to plugin.yml 2020-01-03 01:12:48 +01:00
NotMyFault
42a83b56c3
Add clarification of tp bypass permission node to settings.yml 2020-01-03 01:10:32 +01:00
zombachu
0f39df0e0b
Revert teleportation behavior to pre-4.400 2019-12-31 16:05:53 -10:00
zombachu
a17588199f
Merge pull request #1 from IntellectualSites/v4
Merge from upstream
2019-12-31 15:24:42 -10:00
dependabot-preview[bot]
fad835c029
Bump org.ajoberstar.grgit from 4.0.0 to 4.0.1
Bumps org.ajoberstar.grgit from 4.0.0 to 4.0.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-30 14:32:48 +00:00
NotMyFault
568e9537ec Bump WorldEdit version to 7.0.1 2019-12-27 17:33:52 +01:00
NotMyFault
58bb0509f7 Bump gradle version to 6.0.1 2019-12-27 17:01:17 +01:00
NotMyFault
0ad2682210 Add update and jvm flags to debugpaste 2019-12-27 16:53:38 +01:00
NotMyFault
f97e52ea0b
Fixes building against 1.15 2019-12-25 10:40:54 +01:00
Jesse Boyd
4c90523121
use 1.15 spigot 2019-12-25 02:39:41 +00:00
Traks
519d3ee2d6 Fix 'Unable to find method createTag' on 1.15 servers (#2642)
* Fix 'Unable to find method createTag' on 1.15 servers (#2629)

Mojang apparently refactored their NBT code in 1.15, so the NBT
parsing code in NbtFactory that used Mojang's NBT code via Reflection
broke. Since PlotSquared now depends on WorldEdit, it is much easier
to use their NBT parsing library than to update the Reflection-based
code.

* Clean up NBT streams properly
2019-12-23 20:35:37 +00:00
Alexander Söderberg
3abb35e506 Prevent NPE when trying to set statement = null in SQLManager
If the statement is null, the `isClosed` check will lead to a NPE. As it's going to be null either way, just ignoring the NPE has no side effects.
2019-12-20 18:01:36 +01:00
Alexander Söderberg
c6e36fd70e Fix plot biomes.
When migrating to the WorldEdit Biome types, code was not altered to account for these changes. This lead to configuration parsing breaking, and the `/plot setbiome` command no longer functioning. This fixes #2599.
2019-12-20 17:37:48 +01:00
Jesse Boyd
ccc7b0ec65
Fix #2634 no such method error 2019-12-20 06:03:23 +00:00
Matt
4d1d3a165c
Merge pull request #2635 from traksag/interact-fix
Fix interact handling for sneaking players
2019-12-18 22:23:42 -05:00
Traks
e54cf24248 Fix interact handling for sneaking players 2019-12-18 19:42:57 +01:00
Matt
7103969bba
Merge pull request #2634 from traksag/hanging-fix
Fix that players cannot place hanging entities
2019-12-18 12:37:47 -05:00
Traks
3bb40a8fff Fix that players cannot place hanging entities 2019-12-17 21:04:44 +01:00
MattBDev
f4dcc9e786 Merge remote-tracking branch 'origin/breaking' into breaking 2019-12-15 13:08:27 -05:00
MattBDev
9fd29b264e Some logging operations to check for tps loss. 2019-12-15 13:08:02 -05:00
MattBDev
478c761750 More PlayerEvent fixes. 2019-12-15 12:53:16 -05:00
NotMyFault
dbd6feed4e Update issue template and add link to suggestion repo on issue tab 2019-12-14 18:05:15 +01:00
NotMyFault
480c9f11b8
Add 1.15 to templates 2019-12-14 17:46:07 +01:00
MattBDev
ed8fa0a2a5 Revert changes to BlockPlaceEvent 2019-12-10 17:53:55 -05:00
MattBDev
3af05e7960 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-12-09 14:44:16 -05:00
MattBDev
07b6942690 Minor code tweaks 2019-12-09 14:43:53 -05:00
dependabot-preview[bot]
7d8a5213dd Bump okio from 2.2.2 to 2.4.1
Bumps [okio](https://github.com/square/okio) from 2.2.2 to 2.4.1.
- [Release notes](https://github.com/square/okio/releases)
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okio/compare/2.2.2...2.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 19:34:28 +01:00
NotMyFault
241589fdb0 Revert "Bump retrofit from 2.4.0 to 2.6.2"
This reverts commit 1097f44febe5ce82e85e96a9e11fda4a74e3057e.
2019-12-07 18:56:43 +01:00
dependabot-preview[bot]
eb09e0a633 Bump okhttp from 3.12.0 to 4.2.2
Bumps [okhttp](https://github.com/square/okhttp) from 3.12.0 to 4.2.2.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-3.12.0...parent-4.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 18:49:39 +01:00
dependabot-preview[bot]
4e2c90e399 Bump gson from 2.8.0 to 2.8.6
Bumps [gson](https://github.com/google/gson) from 2.8.0 to 2.8.6.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.0...gson-parent-2.8.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 18:48:37 +01:00
dependabot-preview[bot]
1097f44feb Bump retrofit from 2.4.0 to 2.6.2
Bumps [retrofit](https://github.com/square/retrofit) from 2.4.0 to 2.6.2.
- [Release notes](https://github.com/square/retrofit/releases)
- [Changelog](https://github.com/square/retrofit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/retrofit/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 18:47:38 +01:00
dependabot-preview[bot]
e5423b5e08 Bump kotlin-stdlib from 1.3.50 to 1.3.61
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.3.50 to 1.3.61.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.3.61/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.3.50...v1.3.61)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 18:41:32 +01:00
dependabot-preview[bot]
4ba5b6da1d Bump annotations from 17.0.0 to 18.0.0
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 17.0.0 to 18.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Commits](https://github.com/JetBrains/java-annotations/compare/17.0.0...18.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 18:37:56 +01:00
dependabot-preview[bot]
c1a7844f4a Bump lombok from 1.18.8 to 1.18.10
Bumps [lombok](https://github.com/rzwitserloot/lombok) from 1.18.8 to 1.18.10.
- [Release notes](https://github.com/rzwitserloot/lombok/releases)
- [Changelog](https://github.com/rzwitserloot/lombok/blob/master/doc/changelog.markdown)
- [Commits](https://github.com/rzwitserloot/lombok/compare/v1.18.8...v1.18.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 18:36:45 +01:00
dependabot-preview[bot]
781a4d8d78 Bump org.ajoberstar.grgit from 3.1.1 to 4.0.0
Bumps org.ajoberstar.grgit from 3.1.1 to 4.0.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 18:35:23 +01:00
NotMyFault
3ba29583fc Add all colors to style.yml
For further releases , we should aim to get a rid of the styles.yml and $ codes. I've seen a lot of people struggling with them, and if you want to use other formatting codes, you need to yamlize the non yamlized messages, otherwise it won't work properly.
2019-12-07 17:40:15 +01:00
MattBDev
7760631751 Remove deprecated method from Captions.java 2019-12-06 21:18:56 -05:00
MattBDev
05d6d557b8 Merge remote-tracking branch 'origin/breaking' into breaking 2019-12-06 21:16:19 -05:00
MattBDev
9925a320f5 Fix event listeners 2019-12-06 21:16:09 -05:00
NotMyFault
dca5d84d29 Fixes #2620 2019-12-06 00:28:07 +01:00
NotMyFault
0b470f8e01
Update links 2019-12-04 20:11:05 +01:00
MattBDev
7e58f4341e Minor fixes and performance improvement 2019-12-02 17:07:57 -05:00
MattBDev
d8933afb50 Merge remote-tracking branch 'origin/breaking' into breaking 2019-11-28 21:50:31 -05:00
MattBDev
4bb45fc220 Replace ByteArrayUtilities code with Guava and Replace PlotGameMode with WorldEdit equivalent. 2019-11-28 21:50:21 -05:00
NotMyFault
09f913cba4 Enhanced Fixes #2595
Updating messages and adding new strings that fit better.
2019-11-28 19:02:58 +01:00
MattBDev
006d730185 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-11-26 18:00:44 -05:00
Jesse Boyd
cf558d8f62
Update DebugPaste.java 2019-11-25 22:40:50 +00:00
Jesse Boyd
a65d546f3b
Fix debugpaste split 2019-11-25 22:38:03 +00:00
Jesse Boyd
bf02c9fe5f
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-11-25 22:37:39 +00:00
NotMyFault
6908b9f29b
Update bug-issue-report-for-plotsquared.md 2019-11-24 19:30:37 +01:00
Jesse Boyd
cd06dbc915
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-11-22 16:12:01 +00:00
Jesse Boyd
977dfa807f
potentially fix partial world auto 2019-11-22 16:11:48 +00:00
NotMyFault
8b7e8ec635
Update bug-issue-report-for-plotsquared.md 2019-11-22 15:52:25 +01:00
NotMyFault
c14e1d7add Update Settings.java 2019-11-22 12:40:27 +01:00
NotMyFault
7377366372 Updating some debug colors 2019-11-22 12:28:34 +01:00
Jesse Boyd
9c9841663a
Fixes #2595 (leave error) 2019-11-19 01:39:51 +00:00
MattBDev
612e96201c Fixed ItemTypeListFlag issue 2019-11-18 13:43:16 -05:00
MattBDev
d7aa4a0e1f Revert "Fix some flag issues"
This reverts commit 8b741477
2019-11-18 13:41:46 -05:00
MattBDev
8b7414770f Fix some flag issues 2019-11-18 11:09:32 -05:00
Jesse Boyd
a26ede4dae
Typo 2019-11-14 12:54:02 -08:00
Jesse Boyd
7591770c40
Update README.md 2019-11-14 12:48:41 -08:00
Jesse Boyd
7623698a00
don't use legacy ids here 2019-11-12 22:31:02 +00:00
Jesse Boyd
f518c47e09
Fixes #1922 Banned people can still "talk" in plot 2019-11-12 20:52:14 +00:00
Jesse Boyd
c23086259d
Potentially fixes rename issues
#2450
2019-11-12 20:48:33 +00:00
Jesse Boyd
765a021ecd
Some flag fixes
Use ItemType for the flags, since they accept items, not blocks.
Fixes #2571
2019-11-12 20:38:18 +00:00
Alexander Söderberg
7e21107120
Update README.md
Include information about what the project is. The previous README assumed that the reader would already be familiar with the concept, which isn't really ideal for a project description. The added text is taken from the Spigot resource page.
2019-11-12 10:20:46 +01:00
Jesse Boyd
322e186c4b
Ignore invalid blocks 2019-11-12 07:32:05 +00:00
Jesse Boyd
59b8776814
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-11-11 20:39:44 +00:00
Jesse Boyd
5bb7069c7f
Fixes #2571 2019-11-11 20:39:28 +00:00
NotMyFault
1a2c15684e
Fixed typo 2019-11-11 21:39:27 +01:00
NotMyFault
b02565532f
Update template checkbox 2019-11-11 21:38:44 +01:00
Jesse Boyd
7d7414ebb9
Fix for single chance parsing 2019-11-11 19:47:26 +00:00
Jesse Boyd
55d6217c32
Check if WORLDEDIT_RESTRICTIONS is enabled
Unregister if disabled.
2019-11-11 19:44:51 +00:00
Jesse Boyd
10e5760ba8
Merge pull request #2564 from IntellectualSites/we
Use patterns instead of BlockBucket
2019-11-10 14:08:47 -08:00
Jesse Boyd
f797141a29
Update Plot.java 2019-11-10 22:08:03 +00:00
Jesse Boyd
968c23113c
Fixes #2412 2019-11-10 21:51:29 +00:00
Jesse Boyd
bf4d953f3c
No need to convert to a BlockState here 2019-11-10 18:49:31 +00:00
Jesse Boyd
d34f5cc97e
Config reading/writing 2019-11-10 18:32:32 +00:00
Jesse Boyd
d254633b77
Use patterns instead of BlockBucket
Still use BlockBucket for loading/saving from config
2019-11-10 17:47:37 +00:00
Alexander Söderberg
be93e6efdf
Merge pull request #2560 from IntellectualSites/we
"Use WorldEdit classes" because actually descriptive commitmessages are dumb, right?
2019-11-10 15:56:41 +01:00
Jesse Boyd
1d9ad94822
Fix plot getRegions off by 1 2019-11-10 14:01:12 +00:00
Jesse Boyd
fe438fd62a
swallow stacktrace 2019-11-10 13:29:58 +00:00
Jesse Boyd
93894aca96
Force lowercase 2019-11-10 13:27:37 +00:00
Jesse Boyd
f1b8510708
forgot to find 2019-11-10 13:24:04 +00:00
Jesse Boyd
7dcecf486d
Use regex for block bucket, yay 2019-11-10 13:18:15 +00:00
Jesse Boyd
8c1985f9c0
Split by regex 2019-11-10 13:08:34 +00:00
Jesse Boyd
34eb7d05dc
Print actual value for setup? 2019-11-10 12:45:51 +00:00
Jesse Boyd
729452038b
Check if integer 2019-11-10 12:43:47 +00:00
Alexander Söderberg
3e30e9554f Add missing RunnableVal import. 2019-11-10 13:26:59 +01:00
Alexander Söderberg
009bcaf6d4 Merge remote-tracking branch 'origin/we' into we 2019-11-10 13:26:27 +01:00
Alexander Söderberg
baca8808ee Add missing Location import. 2019-11-10 13:26:15 +01:00
Alexander Söderberg
1a923063b5
Merge branch 'breaking' into we 2019-11-10 13:18:16 +01:00
Jesse Boyd
c512189478
fix import 2019-11-10 11:31:47 +00:00
Jesse Boyd
c155c65a8f
Remove modifier reflection
Fixes #2484
2019-11-10 11:23:25 +00:00
Alexander Söderberg
a221d6fd07 Run tasks synchronously on Bukkit when the plugin is disabled.
Previously, the tasks would fail to run, as the scheduler prevents disabled plugins from running tasks. This would cause problems on server shutdown, especially when the SQLManager attempts to perform database queries.

This fixes #2446.
2019-11-10 12:10:38 +01:00
Alexander Söderberg
37280779b0 Make /plot setowner require an argument. Fixes #2501. 2019-11-10 12:06:33 +01:00
Jesse Boyd
ed588476e0
Fix single plot areas 2019-11-08 22:31:01 +00:00
Jesse Boyd
19fe39ce2e
Merge branch 'we' of https://github.com/IntellectualSites/PlotSquared into we 2019-11-08 05:18:07 +00:00
Jesse Boyd
07fcd53bf8
Fixes IntellectualSites/PlotSquaredSuggestions#58 2019-11-08 05:17:51 +00:00
NotMyFault
834d786037
Fix okio 2019-11-07 17:02:34 +01:00
NotMyFault
72c6f1165a
Fix okio 2019-11-07 17:02:08 +01:00
Matt
1570c4d08a
Add missing import 2019-11-06 14:20:32 -05:00
Jesse Boyd
252fdefef3
bad regex replace 2019-11-06 11:39:55 +00:00
Jesse Boyd
fed5169724
Get sign lines sync 2019-11-05 15:23:48 +00:00
Jesse Boyd
2cb734bba2
editsession util 2019-11-04 21:55:40 +00:00
MattBDev
46926a4d99 Merge remote-tracking branch 'origin/breaking' into breaking 2019-11-04 16:20:03 -05:00
Jesse Boyd
88732bb88c
Use CuboidRegion instead of RegionWrapper 2019-11-04 21:08:33 +00:00
Jesse Boyd
ba3ff08d6c
Update BlockStateListFlag.java 2019-11-04 20:17:29 +00:00
Jesse Boyd
8f7f6a4f40
Merge branch 'breaking' into we 2019-11-04 20:17:15 +00:00
NotMyFault
e8bf3f0d2c
Merge pull request #2558 from IntellectualSites/more-translation-strings
Add translation messages for flag errors
2019-11-04 21:12:39 +01:00
Jesse Boyd
7e6dc48d69
imports 2019-11-04 19:58:24 +00:00
Jesse Boyd
37f608258f
Remove PlotBlock 2019-11-04 19:55:55 +00:00
NotMyFault
a25511c849 Add custom translations for special flags 2019-11-04 19:22:54 +01:00
Jesse Boyd
930dee9326
Refactor BlockVector2 2019-11-04 17:44:23 +00:00
NotMyFault
315f26fb82 Add missing color 2019-11-04 00:46:08 +01:00
NotMyFault
e972cb4c1a Make flag error messages translatable 2019-11-04 00:33:04 +01:00
NotMyFault
7309e61221 AeSix' template improvements 2019-11-02 12:48:41 +01:00
MattBDev
17e784c283 Revert dependency upgrades 2019-11-01 21:45:06 -04:00
Matt
627ecd2b71
Merge pull request #2542 from mindw0rm/UntrustedVisit
New plot flag untrusted-visit
2019-10-31 17:02:48 -04:00
Matt
1c5bd55c96
Merge pull request #2553 from IntellectualSites/bukkit-api
Providing bukkit module on maven
2019-10-31 17:02:00 -04:00
NotMyFault
6ec3951e4e
Add Bukkit module to maven 2019-10-30 15:05:52 +01:00
Alexander Söderberg
d1115d62a7
Merge pull request #2548 from IntellectualSites/flag_fix
Flag fixes and others 🐮
2019-10-27 16:13:22 +01:00
NotMyFault
e29727827d Fix missing word 2019-10-27 16:02:34 +01:00
NotMyFault
1f89948948 Remove unused flags 2019-10-27 16:01:57 +01:00
NotMyFault
1067e5f2c2
Remove redundant empty line 2019-10-27 15:19:49 +01:00
NotMyFault
25ca011bfe
Fixes #2550 2019-10-27 15:10:15 +01:00
Alexander Söderberg
3be0be1b60 Make sure DENY_EXIT checks for the admin override permission. Fixes #2411. 2019-10-27 12:11:48 +01:00
Alexander Söderberg
2e15934666 Fix /plot flag set allowing for invalid flag values. (Fixes #2519) 2019-10-27 12:01:04 +01:00
Alexander Söderberg
cb52ee8cfb Make the flag list output message configurable. 2019-10-27 11:55:15 +01:00
Alexander Söderberg
01eee306f1 Fixes #2462 by making flag categories translatable. This reflects (somewhat) recent changes to command categories. 2019-10-27 11:45:18 +01:00
Alexander Söderberg
a601739fbd Improve handling of list flags, which in turn resolves issues where add and remove would allow players to add flags with unrecognized values. 2019-10-27 11:25:33 +01:00
mindw0rm
cb1767347b
Merge branch 'breaking' into UntrustedVisit 2019-10-23 20:51:59 +02:00
Matt
32654e1f25
Merge pull request #2506 from mindw0rm/DenyTeleportBugfix
Bugfixes for deny-teleport
2019-10-23 14:37:20 -04:00
mindw0rm
91108a5df9 Merge branch 'breaking' into UntrustedVisit 2019-10-22 17:21:24 +02:00
mindw0rm
e5e522bc31 Merge branch 'breaking' into DenyTeleportBugfix 2019-10-22 17:20:43 +02:00
Matt
5741d5f6a0
Merge pull request #2533 from mindw0rm/PlaceFlagBugfix
Place flag bugfix (fixxes issue #2524)
2019-10-21 21:27:48 -04:00
Matt
8b30d6a7ff
Merge pull request #2537 from IntellectualSites/dependabot/gradle/com.google.code.gson-gson-2.8.6
Bump gson from 2.8.0 to 2.8.6
2019-10-19 17:45:28 -04:00
Matt
108b84d8b1
Merge pull request #2527 from IntellectualSites/dependabot/gradle/com.squareup.retrofit2-retrofit-2.6.2
Bump retrofit from 2.4.0 to 2.6.2
2019-10-19 17:44:37 -04:00
Matt
469a4f25e5
Merge branch 'breaking' into dependabot/gradle/com.squareup.retrofit2-retrofit-2.6.2 2019-10-19 17:44:27 -04:00
Matt
c49369bc7e
Merge pull request #2538 from IntellectualSites/dependabot/gradle/org.ow2.asm-asm-7.2
Bump asm from 7.1 to 7.2
2019-10-19 17:43:25 -04:00
Matt
46b5f01bbc
Merge pull request #2536 from IntellectualSites/dependabot/gradle/com.squareup.okhttp3-okhttp-4.2.2
Bump okhttp from 3.14.0 to 4.2.2
2019-10-19 17:43:13 -04:00
dependabot-preview[bot]
d7d9b1793f
Bump okhttp from 3.14.0 to 4.2.2
Bumps [okhttp](https://github.com/square/okhttp) from 3.14.0 to 4.2.2.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-3.14.0...parent-4.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 21:40:45 +00:00
dependabot-preview[bot]
e029cc3fa1
Bump retrofit from 2.4.0 to 2.6.2
Bumps [retrofit](https://github.com/square/retrofit) from 2.4.0 to 2.6.2.
- [Release notes](https://github.com/square/retrofit/releases)
- [Changelog](https://github.com/square/retrofit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/retrofit/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 21:40:43 +00:00
Matt
53e80e4359
Merge pull request #2535 from IntellectualSites/dependabot/gradle/com.squareup.okio-okio-2.4.1
Bump okio from 2.2.2 to 2.4.1
2019-10-19 17:39:38 -04:00
dependabot-preview[bot]
427cf081e3
Bump okio from 2.2.2 to 2.4.1
Bumps [okio](https://github.com/square/okio) from 2.2.2 to 2.4.1.
- [Release notes](https://github.com/square/okio/releases)
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okio/compare/2.2.2...2.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 21:37:55 +00:00
Matt
c103504fc8
Merge pull request #2529 from IntellectualSites/dependabot/gradle/org.jetbrains.kotlin-kotlin-stdlib-1.3.50
Bump kotlin-stdlib from 1.3.30 to 1.3.50
2019-10-19 17:36:40 -04:00
mindw0rm
20957a75d5 use a new Location convert function to ensure that there will be no side effects 2019-10-18 08:02:44 +02:00
mindw0rm
dd715a9c8a Revert "copy yaw and pitch when converting between Bukkit Location and PlotSquared Location"
Undo this since I can't guarantee that there aren't side effects.
2019-10-18 07:51:01 +02:00
mindw0rm
24d82e562a merge upstream changes 2019-10-18 07:44:04 +02:00
NotMyFault
9ad2537ca2
Merge pull request #2517 from IntellectualSites/debugpaste-update
Improve world generator diagnosis
2019-10-17 12:23:47 +02:00
dependabot-preview[bot]
4a3c015524
Bump asm from 7.1 to 7.2
Bumps asm from 7.1 to 7.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 15:17:55 +00:00
dependabot-preview[bot]
53e94cc001
Bump gson from 2.8.0 to 2.8.6
Bumps [gson](https://github.com/google/gson) from 2.8.0 to 2.8.6.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.0...gson-parent-2.8.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 15:17:37 +00:00
mindw0rm
039b7aee9e Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into UntrustedVisit 2019-10-10 20:34:41 +02:00
mindw0rm
0bcaaf3c0b copy yaw and pitch when converting between Bukkit Location and PlotSquared Location 2019-10-10 20:33:25 +02:00
mindw0rm
5315e1e337 let untrusted-visit override deny-teleport 2019-10-10 20:32:48 +02:00
mindw0rm
1f4f78a179 this can be done more elegantly 2019-10-10 01:53:27 +02:00
mindw0rm
599ef8aa44 Bugfix for #2524 (place flag) 2019-10-10 01:36:40 +02:00
Matt
e445f96e0c
Merge pull request #2528 from IntellectualSites/dependabot/gradle/org.yaml-snakeyaml-1.25
Bump snakeyaml from 1.23 to 1.25
2019-10-07 13:49:52 -04:00
Matt
9a8aa7a4e5
Merge pull request #2530 from IntellectualSites/dependabot/gradle/org.projectlombok-lombok-1.18.10
Bump lombok from 1.18.8 to 1.18.10
2019-10-07 13:47:28 -04:00
NotMyFault
a3905c68cf
Fix links 2019-10-07 19:20:48 +02:00
NotMyFault
3d1cd46053
Update Sponsors 2019-10-07 19:09:41 +02:00
dependabot-preview[bot]
ec6c9dac49
Bump lombok from 1.18.8 to 1.18.10
Bumps [lombok](https://github.com/rzwitserloot/lombok) from 1.18.8 to 1.18.10.
- [Release notes](https://github.com/rzwitserloot/lombok/releases)
- [Changelog](https://github.com/rzwitserloot/lombok/blob/master/doc/changelog.markdown)
- [Commits](https://github.com/rzwitserloot/lombok/compare/v1.18.8...v1.18.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-07 15:16:57 +00:00
dependabot-preview[bot]
8068671200
Bump kotlin-stdlib from 1.3.30 to 1.3.50
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.3.30 to 1.3.50.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.3.50/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.3.30...v1.3.50)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-07 15:16:54 +00:00
dependabot-preview[bot]
8927f50cc6
Bump snakeyaml from 1.23 to 1.25
Bumps [snakeyaml](https://bitbucket.org/asomov/snakeyaml) from 1.23 to 1.25.
- [Commits](https://bitbucket.org/asomov/snakeyaml/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-07 15:16:31 +00:00
NotMyFault
b806a30639 Setting debug value default to false
If the user is interested in the information or needs it for debugging, they can enable them, but we don't need to spam them unnecessarily with stats about his plot worlds on each startup, /plot reload, etc.
The same information can be obtained from a debugpaste as well, so it's not a loss of information to offer assistance.
2019-10-03 01:32:19 +02:00
NotMyFault
ae0f1d2a15 Adding "website" to plugin.yml 2019-10-03 01:26:31 +02:00
NotMyFault
120d36e413 Add a confirmation to the debugpaste
That should prevent people from accidentally pressing buttons (whyever you would do that)
2019-10-03 01:12:08 +02:00
NotMyFault
c8c5d777a1 Make paths... idk what to say here 2019-10-03 00:40:41 +02:00
NotMyFault
b92d42e7cc Add clarification to what files are pasted 2019-10-01 14:46:19 +02:00
NotMyFault
59bc6f19e5 General clarification of the config
Certain values were rather vague and caused some confusion in the past, hopefully things are more clear now.
2019-10-01 14:01:50 +02:00
NotMyFault
ca25b7b3c8 Fix odd space 2019-10-01 13:02:32 +02:00
NotMyFault
b074e6e198
Update auto-comment.yml
I created templates and setup Actions to ensure functionality.
2019-10-01 12:54:20 +02:00
NotMyFault
267bebd0e8 Improve world generator diagnosis 2019-10-01 12:12:42 +02:00
mindw0rm
58dbe96bd8 Added a plot flag 'untrusted visit', that allows /plot visit for untrusted players without the permission plot.visit.other. 2019-09-19 10:40:47 +02:00
NotMyFault
becac84e6e
Setup Actions test 2019-09-18 02:06:28 +02:00
mindw0rm
ae1273a7f3 Bugfixes for deny-teleport 2019-09-14 12:58:22 +02:00
NotMyFault
05ef076ef0 Remove unnecessary spaces 2019-09-12 04:01:47 +02:00
NotMyFault
d20d95d29b Remove schematic test command 2019-09-12 03:53:29 +02:00
NotMyFault
6e387f3321 Do not remove the schematic file extension 2019-09-12 03:44:31 +02:00
MattBDev
68a5166d2f Fixes the major lag source from GlobalBlockQueue 2019-09-11 19:04:29 -04:00
MattBDev
2bf47478b2 Merge remote-tracking branch 'origin/breaking' into breaking 2019-09-09 15:15:53 -04:00
MattBDev
07b88e3147 Minor changes to the block queue classes to match FAWE more closely. 2019-09-09 15:15:44 -04:00
Matt
26e851fcf1
Merge pull request #2500 from 56738/remove-everyone
Make removing * remove the Everyone node before removing all members
2019-09-09 14:34:39 -04:00
56738
5b3426f4ac Make removing * remove the Everyone node before removing all members 2019-09-09 18:44:36 +02:00
MattBDev
ecfb71b08f Changes made to GlobalBlockQueue to help diagnose lag. 2019-09-08 19:36:02 -04:00
MattBDev
fd6fbebd69 Fixed #2496 2019-09-08 18:43:47 -04:00
NotMyFault
758c343e52
Update bug-issue-report-for-plotsquared.md 2019-09-08 20:25:12 +02:00
NotMyFault
04f789d404 Fix merging 2019-09-08 20:02:45 +02:00
NotMyFault
fe730574c9
Fixes #2490 2019-09-08 01:06:27 +02:00
NotMyFault
20b0fa31d0 Update gradle and deprecated methods 2019-09-07 22:46:13 +02:00
NotMyFault
ec0281768d
Update README.md 2019-09-07 12:50:12 +02:00
NotMyFault
3bec76e27a
Create CONTRIBUTING.md 2019-09-07 12:46:40 +02:00
MattBDev
462c113ce8 Fixed accidental code reversion 2019-09-06 21:20:54 -04:00
Matt
12538c7c27
Merge pull request #2461 from IntellectualSites/midnight-ideas
@N0tMyFaultOG has some random ideas sometimes
2019-09-06 21:16:30 -04:00
NotMyFault
e01b470493 Resolve merge conflicts 2019-09-07 03:06:05 +02:00
MattBDev
f7b78595a9 Merge remote-tracking branch 'origin/breaking' into breaking 2019-09-06 20:40:38 -04:00
MattBDev
b3136b4ebe Version number fixes, fixed documentation, new caption added, and tweaks to API functionality. 2019-09-06 20:40:28 -04:00
NotMyFault
4d0bd8a3a3 Upgrade build files 2019-09-04 03:04:51 +02:00
NotMyFault
e1db27010c Updating command usage formats 2019-09-04 03:01:25 +02:00
NotMyFault
40e3b7fa06 Revert "Add new switch conditions to entity listeners"
This reverts commit a0d666ae14ee89e918f1403bf1ac14f2679b8bb7.
It seems to break armor stand placing in some cases.
2019-09-03 23:56:08 +02:00
MattBDev
a7012814ab Deprecated a poorly named method 2019-09-01 19:40:16 -04:00
MattBDev
213fd80894 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-09-01 16:55:49 -04:00
MattBDev
5e8909883d Modified internal configuration classes, Updated Mojang UUID fetcher, other various method and documentation tweaks 2019-09-01 16:54:43 -04:00
NotMyFault
08cd39749b Create PULL_REQUEST_TEMPLATE.md 2019-08-27 14:44:56 +02:00
MattBDev
a0d666ae14 Add new switch conditions to entity listeners 2019-08-23 23:58:52 -04:00
MattBDev
fa8b18f3d5 Add new switch conditions to entity spawning 2019-08-23 15:57:57 -04:00
dordsor21
267dea4693 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-08-23 17:18:43 +01:00
dordsor21
434d219f41 Add plots.admin.area.sudo for permission to commands of the form "/plot <area> <command...>" as well as plots.admin 2019-08-23 17:18:25 +01:00
Matt
589a69ac6d
Update ISSUE_TEMPLATE.md 2019-08-20 15:36:13 -04:00
dordsor21
dc0126b53c Revert PaperLib from later commits too 2019-08-19 20:47:36 +01:00
dordsor21
0ca69d4f03 Don't use PaperLib I guess 2019-08-19 20:39:03 +01:00
MattBDev
ec84b91f84 added a stupid check because of a spigot issue. 2019-08-19 14:51:14 -04:00
Matt
a63f8650e5
Create CONTRIBUTING.md 2019-08-18 13:25:11 -04:00
NotMyFault
59a1d619d3 Add sponsors 2019-08-18 14:29:37 +02:00
MattBDev
76dc60194d Added an invalid world name check. 2019-08-17 19:17:01 -04:00
MattBDev
cc9c1f63d8 When an exception is actually being used it shouldn't be named ignored 2019-08-17 18:45:07 -04:00
MattBDev
e5da93f359 Added a null check for the very unlikely chance that the command isn't found. 2019-08-17 18:42:31 -04:00
MattBDev
008237b2a4 Fixed #2469 2019-08-17 18:40:39 -04:00
MattBDev
920796d8ec Fixed #2468 2019-08-17 16:28:53 -04:00
NotMyFault
c6a4206266 Fix Typo 2019-08-17 17:06:17 +02:00
NotMyFault
1cf85ff2c6 Removed unused translation strings
And added a new alias
2019-08-17 02:19:29 +02:00
NotMyFault
be20b2404b OCD
- Typo Fixes
- Small amendments (Spelling)
- Reformatting
2019-08-17 01:48:43 +02:00
NotMyFault
011baba140
Update PlotSquared.java 2019-08-16 02:05:51 +02:00
NotMyFault
b22919a278 Variable renames and fixes 2019-08-16 01:47:22 +02:00
NotMyFault
49b7c71fbb Adding some more translation strings 2019-08-16 01:22:24 +02:00
NotMyFault
31c81fc9fe Update command aliases format 2019-08-15 17:35:40 +02:00
NotMyFault
8653b9b0a2 Update unfitting messages 2019-08-15 16:37:57 +02:00
NotMyFault
b3e53e34b6 Simplify help string 2019-08-15 16:20:30 +02:00
NotMyFault
fbaef13553 Unify player string
<> args are used in a lot of commands, PlayerName is used in only 3 commands and I don'T want to remove methods if not really necessary, so let's just change it here.
2019-08-15 15:39:37 +02:00
MattBDev
3473f5dc85 Fixed compatibility with FAWE and compile issue. 2019-08-14 20:47:01 -04:00
MattBDev
b4c33aaa18 Midnight work
Also fixes #2463
2019-08-14 14:36:20 -04:00
MattBDev
a910b542a0 Replace annotations with JetBrains annotations 2019-08-13 23:43:11 -04:00
MattBDev
705d0294b5 Merge remote-tracking branch 'origin/breaking' into breaking 2019-08-13 23:37:22 -04:00
MattBDev
403916748c Variable renaming 2019-08-13 23:37:15 -04:00
MattBDev
fd9e716ec4 Variable renaming 2019-08-13 22:42:01 -04:00
MattBDev
3e6b0b8394 Work on directions and merging 2019-08-13 22:01:23 -04:00
MattBDev
56e055c671 Second attempt at a sign fix. 2019-08-13 18:39:38 -04:00
MattBDev
1341100f03 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-08-13 18:28:54 -04:00
MattBDev
d7c72d5f75 Variable renames 2019-08-13 18:26:55 -04:00
MattBDev
265f0c6615 Potential fix for #1930 2019-08-13 18:06:10 -04:00
MattBDev
9642777750 If NMF can have midnight work, so can I 2019-08-13 17:33:32 -04:00
NotMyFault
41052b27a0 I have some random ideas sometimes
- Adjusting some RequiredTypes fitting their partners/default behavior
- A plot doesn't need to be claimed to get the center
- Adapting another gamemode acronym
- Fix copyFile to adapt the latest changes
- Removing HastebinUtility, we have our own paste service
2019-08-13 21:57:49 +02:00
NotMyFault
0ac4b7728f
Merge pull request #2460 from jewome62/feature/toggle-time
Add toggle for time
2019-08-13 18:44:32 +02:00
NotMyFault
bb97fb8e19 Update Templates to sponge schematic format
Skyblock has been removed as it was simply the default island if ASkyBlock
2019-08-13 04:08:17 +02:00
NotMyFault
b1391bd6d7 Fix template export 2019-08-13 03:13:03 +02:00
NotMyFault
f1c190028e Fixes #2013
Tested with LuckPerms, result successful.
2019-08-12 23:59:14 +02:00
MattBDev
ad7bcd19d4 Added a debug command to diagnose the issues in #2411 2019-08-12 13:40:22 -04:00
jewome62
ca954ccc97 Add toggle for time 2019-08-11 21:15:02 +02:00
Sauilitired
8ab10de4ad
Fix plot title toggling (fixes #2456) 2019-08-10 17:54:44 +02:00
MattBDev
df9d5ae2ac Merge remote-tracking branch 'origin/breaking' into breaking 2019-08-07 19:16:55 -04:00
MattBDev
5ddbf3def4 Update gradle 2019-08-07 19:16:44 -04:00
MattBDev
289f01f7a2 Import changes and variable renames 2019-08-06 21:46:38 -04:00
MattBDev
f3aa9c43ef Fixed a potential NPE 2019-08-06 21:44:39 -04:00
NotMyFault
165cf26818
Fix typo 2019-08-07 03:43:49 +02:00
MattBDev
e6a7f4e5a7 Add null checks to validation task
Fixes #2407
2019-08-06 20:45:01 -04:00
MattBDev
8f685b754a Modifications to formatting and UUID Handler
Fixes #2423
2019-08-06 20:35:36 -04:00
MattBDev
539ad9f05c Small changes 2019-08-06 16:08:56 -04:00
MattBDev
5b8f6e466a Minor gradle edit 2019-08-06 15:05:04 -04:00
Leomixer17
520be48198 Create fixborders.js 2019-08-05 14:47:19 -04:00
Leomixer17
e4a345880e Update addsigns.js 2019-08-05 14:46:54 -04:00
MattBDev
392ef51a6f Revert broken async chunk change 2019-08-05 14:37:56 -04:00
MattBDev
f06903f1b8 Merge remote-tracking branch 'origin/paperstuff' into paperstuff
# Conflicts:
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Help.java
2019-08-05 14:07:09 -04:00
MattBDev
fe83ef0975 Get chunks asynchronously 2019-08-05 14:03:09 -04:00
NotMyFault
9e8a6c702d Fix gradle script 2019-08-05 14:03:08 -04:00
NotMyFault
3e8b8a7575 Remove old files 2019-08-05 14:03:08 -04:00
NotMyFault
d3e37e5eab Migrate Templates to new format 2019-08-05 14:03:08 -04:00
NotMyFault
0c8b11cedd Update DebugUUID.java 2019-08-05 14:03:07 -04:00
NotMyFault
cd26b1647d Add kelp-grow flag
Simply as the name says, add a controlled way to let kelp grow.
2019-08-05 14:03:07 -04:00
NotMyFault
cdc01a5bc4 Reformat debugpaste
And upgrade from IC -> IS
2019-08-05 14:03:07 -04:00
MattBDev
1295f7c4bf Merge with breaking 2019-08-05 14:03:06 -04:00
Sauilitired
20dd98d3b9 Use PaperLib and make command task return completable futures 2019-08-05 14:02:30 -04:00
MattBDev
bd51292f4c Get chunks asynchronously 2019-08-05 13:33:27 -04:00
MattBDev
cc45208605 Merge remote-tracking branch 'origin/breaking' into paperstuff 2019-08-05 13:32:19 -04:00
NotMyFault
7542dbeab8
Fix gradle script 2019-08-04 18:40:39 +02:00
MattBDev
01dfdbe2ef Merge with breaking 2019-08-03 23:26:16 -04:00
MattBDev
bb21abb110 Merge branch 'breaking' into paperstuff
# Conflicts:
#	Bukkit/build.gradle
#	Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java
#	Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/events/PlayerPlotTrustedEvent.java
#	Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/object/BukkitPlayer.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/commands/Command.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Add.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Buy.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Clear.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugExec.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Grant.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Help.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Near.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Relight.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SubCommand.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trust.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Visit.java
2019-08-03 23:11:02 -04:00
NotMyFault
59517647b5 Remove old files 2019-08-03 23:20:21 +02:00
NotMyFault
1eba425087 Migrate Templates to new format 2019-08-03 23:18:50 +02:00
NotMyFault
16fcb2f505
Update DebugUUID.java 2019-07-30 23:58:48 +02:00
NotMyFault
6d0849eb66
Merge pull request #2431 from IntellectualSites/kelp-grow
Add kelp-grow flag
2019-07-27 21:55:39 +02:00
NotMyFault
dbf5084fa1 Reformat debugpaste
And upgrade from IC -> IS
2019-07-25 20:02:39 +02:00
MattBDev
d6779d977a Fixes #2423 2019-07-21 20:43:36 -04:00
MattBDev
e8df39d3c4 Fixes #2435 2019-07-21 20:40:04 -04:00
NotMyFault
feda094273 Add kelp-grow flag
Simply as the name says, add a controlled way to let kelp grow.
2019-07-20 01:29:30 +02:00
Jesse Boyd
23b88a375d
player interact ignore cancel 2019-07-12 02:18:08 +10:00
dordsor21
095dccd30f Revert changes to intersection generation 2019-06-28 13:59:57 +01:00
dordsor21
246845607f Let's first test against Material.matchMaterial for material matching (:
Also update some dependencies
2019-06-27 15:18:54 +01:00
NotMyFault
3074e45d2c
Fixed #2325
The permission node does not exist on PlotMe anymore
2019-06-25 11:43:28 +02:00
dordsor21
83d1f1d629
1.14 id support (#2404)
* Plausible fix for 1.14 support.
- Allow 1.14 blocks to be specified in LegacyBlocks, but only saved if the server version is 1.14.
- No snazzy config conversion, but it seems most people managed to figure it out on their own anyway

* Ignore the "severe" output because of new 1.13/14 blocks

* fix oak_wall_sign for 1.14
2019-06-24 13:37:59 +01:00
dordsor21
485415c551
1.14 id support (#2403)
* Plausible fix for 1.14 support.
- Allow 1.14 blocks to be specified in LegacyBlocks, but only saved if the server version is 1.14.
- No snazzy config conversion, but it seems most people managed to figure it out on their own anyway

* Ignore the "severe" output because of new 1.13/14 blocks
2019-06-23 14:17:44 +01:00
Alexander Krivács Schrøder
d6401d1638 Allow running the road regeneration on a single region
The plot-based road regeneration from before does not have the same behavior as the real road regeneration code. This new debug operation will regenerate the roads within the region the player is standing using the same code that regenerates all roads. This makes it much easier to tell if things are working correctly and as expected.
2019-06-16 11:57:35 -04:00
Alexander Krivács Schrøder
7f404e1cf5 Fix plot walls after running regenallroads
Also clears whatever was above the plot wall, such as pieces of the road.
2019-06-16 11:57:35 -04:00
Alexander Krivács Schrøder
a94c588a17 Check if location has PlotArea to avoid NPE 2019-06-03 16:26:20 -04:00
Alexander Krivács Schrøder
d106262454 Have PlotAreas create their own PlotManager
Leads to cleaner code, less need for instanceof and casting, as a PlotArea knows which kind of PlotManager it needs to make
2019-06-03 16:26:20 -04:00
Alexander Krivács Schrøder
c5bca66618 Remove PlotArea parameter from PlotManager method calls
As per the previous commit, all PlotManagers now have a reference to their managed PlotArea.
2019-06-03 16:26:20 -04:00
Alexander Krivács Schrøder
6b3960fc3f Pass the PlotArea into the PlotManager 2019-06-03 16:26:20 -04:00
Alexander Krivács Schrøder
908a5784a1 Cache conversions to BaseBlock and fix leaky abstraction 2019-06-03 16:24:59 -04:00
Alexander Krivács Schrøder
bbff898073 Extract air block into variable to reduce unnecessary function calls 2019-06-03 16:24:59 -04:00
Alexander Krivács Schrøder
19f8704cb4 Remove leftovers from getting rid of PlotBlocks in LocalChunk 2019-06-03 16:24:59 -04:00
Alexander Krivács Schrøder
b366b0d261 Set unspecified blocks from the schematic to air
If this isn't done, any blocks not specified in the schematic will remain after a clear, which is obviously undesirable.
2019-06-03 16:24:59 -04:00
Alexander Krivács Schrøder
941821e453 Convert all PlotBlocks to BaseBlocks in the BasicLocalBlockQueue
The `BukkitLocalQueue` only supports using one of the sets (the removed `baseBlocks` variable in `BasicLocalBlockQueue` was the deciding factor for which one won out) which led to issues with missing blocks when trying to use both types at the same time, such as in the `HybridPlotManager`s `clearPlot` method, where `PlotBlock` is used to fill in the various layers, while the`createSchemAbs` method uses `BaseBlock` for its data.
2019-06-03 16:24:59 -04:00
MattBDev
427523644c Removed unused imports 2019-05-31 12:04:38 -04:00
MattBDev
475e9b50e1 Fixes #2380 2019-05-31 12:00:44 -04:00
MattBDev
812d41092e Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-05-31 11:57:18 -04:00
Alexander Krivács Schrøder
41299e6851 Fix issue with plot border during merge
* `getExtendedTopAbs()` used wrong relative plot for calculating X position.
* Not running `finishPlotMerge()` after every merge led to broken roads during a `merge all`
2019-05-29 23:28:16 -04:00
Alexander Krivács Schrøder
95cb0d84f0 Fix issue with road generation during unlink
Roads should always be created with respect to `current`.
2019-05-29 23:28:16 -04:00
zombachu
fb478de164 Update outdated list of files to check on failed world load (#2365) 2019-05-22 12:09:31 -04:00
MattBDev
1bd7c8ca5f Variable renames 2019-05-21 18:50:52 -04:00
MattBDev
fe471c3571 new library in gradle and another change I can't remember. 2019-05-21 18:32:26 -04:00
MattBDev
8ff833de36 Added Paper to Platform 2019-05-17 18:50:24 -04:00
MattBDev
5dd2610b5e Misc. changes and removal of title manager 2019-05-17 18:49:09 -04:00
MattBDev
4e3a927323 Modifications to the generator code 2019-05-17 16:21:03 -04:00
MattBDev
595a68ecba variable renames 2019-05-17 15:32:05 -04:00
MattBDev
6f5cb30734 Minor message changes and variable changes 2019-05-17 14:38:57 -04:00
MattBDev
427504fd7c Commented out Multiverse-Core and Bump to 1.14.1 2019-05-17 14:26:47 -04:00
MattBDev
b66734a472 Misc. code changes
A lot of renaming
Some formatting
Narrowed scope of variables
Added annotations
2019-05-13 21:57:41 -04:00
MattBDev
84911c1a8c Remove unused title classes 2019-05-13 18:22:17 -04:00
MattBDev
adefe2eeef Titles can be used on Spigot and Paper now 2019-05-13 18:20:58 -04:00
MattBDev
549a4df834 Merge remote-tracking branch 'origin/breaking' into breaking 2019-05-13 15:56:41 -04:00
MattBDev
4daf1c7721 Fixes #2355 2019-05-13 15:56:28 -04:00
dordsor21
728082723c Revert "Don't force metrics. Forcing metrics is against the precedent for all major Spigot plugins"
This reverts commit 4522d98934ccd9481bbf57ed1430c6ddd4d1bbaf.
2019-05-12 12:53:25 +01:00
dordsor21
4522d98934 Don't force metrics. Forcing metrics is against the precedent for all major Spigot plugins 2019-05-11 14:31:13 +01:00
MattBDev
0d67c174aa Fix compatibility with 1.13 and 1.14 2019-05-10 23:00:11 -04:00
MattBDev
a841b4ea86 Titles are now exclusive to paper servers 2019-05-10 22:42:07 -04:00
MattBDev
f232334bcc Various formatting tweaks as well as metrics changes. 2019-05-10 21:18:28 -04:00
MattBDev
d8ac6115c7 I never thought it would come to this 2019-05-10 17:16:48 -04:00
dordsor21
885d1b9d7e Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-05-05 16:56:14 +01:00
dordsor21
f6e492638d Bad temporary fix for #2345 - just don't use BukkitLocalQueue#regenChunkSafe and that on 1.14 :) (: 2019-05-05 16:56:00 +01:00
dordsor21
46beb90112
Correcter versioning 2019-05-05 11:58:45 +01:00
dordsor21
0a6fad73c3 Correct versioning 2019-05-05 11:56:08 +01:00
NotMyFault
5796db51a7 Update links 2019-05-02 20:51:52 +02:00
dordsor21
2998f45b27
Update JavaDoc link 2019-05-02 16:14:53 +01:00
dordsor21
e156d58769 Generate javadoc with aggregatedJavadocs option 2019-05-02 15:54:14 +01:00
dordsor21
eb9d98d289 Use https://www.athion.net/ISPaster/paste 2019-05-01 19:52:26 +01:00
MattBDev
2ec13e4e76 Replace code with hasFlag() where appropriate. 2019-05-01 12:31:50 -04:00
MattBDev
f72d39ed85 Fixes #1318 2019-05-01 12:11:35 -04:00
MattBDev
72291b09f2 Fix the actual issue and remove whatever junk from the previous commit 2019-04-30 15:11:43 -04:00
MattBDev
ac5cdfae64 Fix for ItemFrames 2019-04-30 14:44:33 -04:00
MattBDev
db6115eae5 Documentation and formatting changes 2019-04-29 15:20:52 -04:00
MattBDev
9e324762b6 Move the update utility setup to it's own method 2019-04-29 15:18:38 -04:00
MattBDev
299fac95fb Add a stupidity fail-safe. 2019-04-29 11:02:47 -04:00
MattBDev
906c1081fa Merge remote-tracking branch 'origin/breaking' into breaking 2019-04-29 10:50:10 -04:00
MattBDev
237b10a2a2 Tidying up the code 2019-04-29 10:49:58 -04:00
NotMyFault
b7909cc6e5
Fix typo 2019-04-27 16:16:13 +02:00
Matt
dca8594542
Update ISSUE_TEMPLATE.md 2019-04-25 13:06:26 -04:00
MattBDev
0b7e63bafb Added new 1.14 blocks 2019-04-24 22:04:30 -04:00
MattBDev
9f792fa54b Fixes #2328
I hope this doesn't cause more issues than it solves
2019-04-24 21:23:57 -04:00
MattBDev
d0be0780fd Reformatting and cleaning. 2019-04-24 16:11:24 -04:00
dordsor21
bef3dbc6f4 Reformat code 2019-04-23 23:48:22 +01:00
dordsor21
d352804b5d Update gradle lombok version for core 2019-04-23 23:47:00 +01:00
dordsor21
9485f82ea9 Fix signs between 1.13 and 1.14 2019-04-23 23:46:10 +01:00
dordsor21
c7ba94f959 Fix legacy material loading error and Jenkins4J dependencies 2019-04-23 23:03:52 +01:00
dordsor21
5ac00c4920 downgrade Jenkins4J 2019-04-23 22:41:06 +01:00
dordsor21
bd1217810f Should fix the sign issue 2019-04-23 22:30:31 +01:00
dordsor21
1e97392244 Update to gradle 5.4 2019-04-23 22:27:32 +01:00
MattBDev
9b3ca4468c Temporary fix for a working 1.14 build 2019-04-23 14:41:20 -04:00
MattBDev
b2b2f3cd05 attempt to fix signs 2019-04-23 14:24:55 -04:00
MattBDev
bae3774eb6 Merge remote-tracking branch 'origin/breaking' into breaking 2019-04-23 13:45:35 -04:00
MattBDev
1118901ca2 Initial 1.14 Update 2019-04-23 13:45:24 -04:00
Jesse Boyd
0c0a696d36
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-23 12:57:46 +10:00
Jesse Boyd
21a5b04b7b
remove debug 2019-04-23 12:57:39 +10:00
MattBDev
6fa41efbf5 Merge remote-tracking branch 'origin/breaking' into breaking 2019-04-22 11:55:11 -04:00
MattBDev
ef8d33db41 Minor command changes
Changed RequiredType in some classes and formatting changed in others.
2019-04-22 11:55:05 -04:00
Jesse Boyd
1abe444205
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-23 01:53:35 +10:00
Jesse Boyd
145af1e091
fix workaround 2019-04-23 01:53:24 +10:00
MattBDev
f5fa15080c Minor javadoc updates 2019-04-22 11:45:23 -04:00
Jesse Boyd
0c0d0104d7
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-23 01:06:52 +10:00
Jesse Boyd
406dd22703
Workaround for effective permission check 2019-04-23 01:06:41 +10:00
dordsor21
bb44c2ea92 parsable build number 2019-04-20 16:26:31 +01:00
Jesse Boyd
ea26ec628d
Use Settings.Teleport.ON_LOGIN 2019-04-19 13:02:50 +10:00
Jesse Boyd
815e513093
Fix teleportOnLogin error 2019-04-19 12:53:48 +10:00
Jesse Boyd
8ac23b92d8
Use UUID, not just name 2019-04-17 22:18:03 +10:00
Jesse Boyd
d31dbc7c7c
Fix debugimportworlds 1.13
because someone changed PlotId.fromString to throw an exception without updating things that call it
2019-04-17 22:07:33 +10:00
Jesse Boyd
000e3de35d
Don't allow importing using base directory 2019-04-17 14:36:31 +10:00
Jesse Boyd
7e63ffe745
Optimize vanilla world generation*
*For single plot worlds

Reuse base world data. Instead of taking several seconds, it should now take tens of milliseconds.
2019-04-17 14:30:05 +10:00
Jesse Boyd
27eda9eb7c
Don't setup single plot worlds 2019-04-17 14:00:01 +10:00
Jesse Boyd
0fdc5eafbd
Allow single plot areas to load survival worlds 2019-04-17 13:46:33 +10:00
Jesse Boyd
59f89980a3
Don't need ratio out of 100 anymore 2019-04-17 13:13:56 +10:00
Jesse Boyd
50acf4f51f
Print exception on failed schematic setup 2019-04-13 13:06:21 +10:00
Jesse Boyd
04779d28fb
Don't fail on metrics error 2019-04-13 12:26:19 +10:00
Jesse Boyd
1e78368115
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-13 12:23:24 +10:00
dordsor21
0c46df65e6
Not sure why that last commit was a thing locally 2019-04-12 17:42:35 +01:00
dordsor21
4c788cb51e Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-12 17:40:16 +01:00
MattBDev
1c915905c6 Fixes #2275 2019-04-11 23:27:47 -04:00
Jesse Boyd
9f3e3c83e0
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-12 12:11:16 +10:00
Jesse Boyd
6916752434
Fixes #2322 2019-04-12 12:11:03 +10:00
dordsor21
b0b328e50b
Update offset to match CI 2019-04-11 12:43:16 +01:00
Jesse Boyd
6cea26f436
Add random collection 2019-04-10 17:10:44 +10:00
Jesse Boyd
533edc5f40
Change default threshold to -1 2019-04-10 17:10:17 +10:00
Jesse Boyd
97903f3870
Fix you are not in a plot area for single plot worlds 2019-04-10 11:34:21 +10:00
dordsor21
d571f54c65
Update offset to match ci 2019-04-09 15:48:25 +01:00
Jesse Boyd
e0bd8e3f9d
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-09 00:29:30 +10:00
Jesse Boyd
9225a13808
sorry for breaking roads 2019-04-09 00:29:13 +10:00
Jesse Boyd
3f712ed5f0
should check both end/nether 2019-04-08 18:03:38 +10:00
Jesse Boyd
259fe94f83
Potential fix to skip chunks being kept loaded 2019-04-08 01:43:38 +10:00
Jesse Boyd
3651b3ac8d
I don't know about coffee, but how about Java? @sauilitired 2019-04-06 23:14:39 +11:00
Jesse Boyd
b32b8a98e2
Fixes #1936 2019-04-06 17:19:48 +11:00
Jesse Boyd
5d515b3863
This shouldn't have been made private 2019-04-06 12:55:45 +11:00
Jesse Boyd
a3cb4e5ffb
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-06 03:54:42 +11:00
Jesse Boyd
676ef0159a
only change plotY if height not 256 2019-04-06 03:54:27 +11:00
dordsor21
34d11bf23d Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-05 17:39:33 +01:00
dordsor21
0c00eb2061 Add clean task back properly 2019-04-05 17:39:16 +01:00
Jesse Boyd
3e3951a3e7
*negate 2019-04-06 02:07:39 +11:00
Jesse Boyd
c71fe00741
Missed this as well 2019-04-06 02:07:14 +11:00
Jesse Boyd
69a029a555
Fix plot schematic y 2019-04-06 01:54:02 +11:00
Sauilitired
3f194f90ce
Unbreakify things 2019-04-04 18:31:47 +02:00
Sauilitired
7e401a83cf
Make PlotLoc's immutable 2019-04-04 18:26:10 +02:00
dordsor21
69b05932eb Update to gradle 5. gradlew clean assemble build actually WORKS 2019-04-03 17:15:09 +01:00
dordsor21
ac2d43db68
Update offset to match CI 2019-04-03 14:41:54 +01:00
Jesse Boyd
b5418e4dce
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-04-04 00:20:13 +11:00
Jesse Boyd
6b422582a6
Load WorldEdit onEnable
as otherwise it doesn't work
2019-04-04 00:19:59 +11:00
Sauilitired
f5388b9737
Merge remote-tracking branch 'origin/breaking' into breaking 2019-04-01 17:40:10 +02:00
Sauilitired
6323fb0041
Add plot like/dislikes 2019-04-01 17:39:28 +02:00
Jesse Boyd
b1835f0998
whoops, wrong schematic 2019-04-01 21:45:55 +11:00
Jesse Boyd
1c9c0d0207
Schematic fixes
The 1.13 schematic format uses the `.schem` extension, use that instead
Support loading both legacy `.schematic` and `.schem` files for road
schematics
Fix reading road schematics with an offset
2019-04-01 21:39:10 +11:00
Sauilitired
0f8b7cd588
fixes #2211 2019-04-01 11:14:47 +02:00
Sauilitired
c450e4aed3
Fix interval flags (fixes #2302) 2019-04-01 10:17:50 +02:00
Sauilitired
14badf8cfc
remove rogue debug message 2019-04-01 09:43:29 +02:00
Sauilitired
df3e78ee40
Make the "Display all commands" message configurable too 2019-04-01 09:04:19 +02:00
Sauilitired
11689bf855
Configurable help categories 2019-04-01 09:00:08 +02:00
Sauilitired
4152582ae0
Fix UUID related NPE 2019-04-01 08:35:06 +02:00
Jesse Boyd
3be7511b7c
Fix genChunk setCuboid 2019-04-01 05:01:32 +11:00
Jesse Boyd
f3adeeac0e
Fix single plot area NPEs & generator stackoverflow 2019-04-01 04:44:18 +11:00
Jesse Boyd
67cf1b45ed
Fix another legacy converter NPE 2019-04-01 04:43:44 +11:00
Jesse Boyd
e396da8ee5
fix converter NPE 2019-04-01 03:19:53 +11:00
Jesse Boyd
04b9b67c9d
Fixes #2288 2019-03-31 18:31:16 +11:00
Sauilitired
45360f0979
Make sure /plot home ignores server owned plots 2019-03-30 13:32:45 +01:00
Sauilitired
ae57264487
Add server-plot flag, and option to disable on-claim teleportation 2019-03-30 13:27:18 +01:00
Sauilitired
08ebf57c90
Add hide-info flag 2019-03-30 12:50:32 +01:00
Alexander Söderberg
d9407d6329
Merge pull request #2312 from IntellectualSites/async-gen
Add support for Paper async chunk generation
2019-03-29 19:31:02 +01:00
Sauilitired
c6ae2456f2
Add support for Paper async chunk generation 2019-03-26 09:27:20 +01:00
dordsor21
c9f38430c6 Clean and fix up the fromAny method in Legacy Mappings
it never checked for an id data pair or singular id (5, 5:2 etc) which is sort of the whole point. Fixes #2296
2019-03-20 17:17:45 +00:00
dordsor21
3a761b3b5f
Update offset to match CI 2019-03-20 12:20:09 +00:00
Sauilitired
c48116b723
Merge remote-tracking branch 'origin/breaking' into breaking 2019-03-18 19:49:31 +01:00
Sauilitired
0b77b863ba
Update notifications. 2019-03-18 19:49:22 +01:00
Alexander Söderberg
832d60ce87
Update README.md 2019-03-17 12:34:33 +01:00
Alexander Söderberg
f863dfee42
Update README.md 2019-03-17 12:32:09 +01:00
Alexander Söderberg
c44d180352
Update README.md 2019-03-17 12:31:23 +01:00
Alexander Söderberg
a17cb735b7
Update README.md 2019-03-17 12:30:14 +01:00
matt
806124b047 Merge remote-tracking branch 'origin/breaking' into breaking 2019-03-15 13:40:04 -04:00
matt
61cb288382 oops sorry.
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-03-15 13:39:51 -04:00
Matt
3956adf291
Update ISSUE_TEMPLATE.md
Added a warning about future legacy version support.
2019-03-15 01:00:55 -04:00
matt
672fb0f829 Merge remote-tracking branch 'origin/breaking' into breaking 2019-03-14 21:49:52 -04:00
matt
7f14e88c4c last commit before 4.0.0
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-03-14 21:49:33 -04:00
dordsor21
e146b6a88d
Update offset to match CI 2019-03-13 13:21:09 +00:00
matt
cf1764723f Fixes #2291
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-03-12 16:56:51 -04:00
matt
7b788c07b8 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-03-09 00:05:49 -05:00
dordsor21
dffbaf89a3 Fix for offhandedness 2019-03-09 00:28:21 +00:00
matt
578069b3c9 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-03-08 19:26:06 -05:00
matt
ed3cadd439 Formatting fixes and minor performance improvement
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-03-08 19:25:59 -05:00
dordsor21
aa894b8ad9 Fixes #2245
Also some minor fixes to PlayerInteractEvent main/off hand logic
2019-03-09 00:12:21 +00:00
dordsor21
ed10877431 Should fix IndexOutOfBoundsException when copying
fixes#2290
2019-03-08 23:04:38 +00:00
matt
1d327ec346 Fixes an issue with boats
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-03-07 18:38:21 -05:00
matt
56c24a6a56 Type weakening and Direction changes
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-03-06 12:47:38 -05:00
matt
4c8457ad14 OCD
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-22 11:54:13 -05:00
dordsor21
f93cfb9f8b
Update build offset 2019-02-22 16:53:11 +00:00
matt
1755272f81 Merge remote-tracking branch 'origin/breaking' into breaking 2019-02-22 11:51:22 -05:00
matt
25530ed7f0 Doc Updates, Renaming, Reformatting, and a Test
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-22 11:51:06 -05:00
dordsor21
53e732b4fe Make replacing wall on merge configurable
In case people are doing fun things with road schematics etc :)
2019-02-22 15:21:44 +00:00
dordsor21
7aebd9b74b Set wall filling on merge 2019-02-22 15:11:35 +00:00
dordsor21
be51d8e159 Correct artifact id for maven 2019-02-22 14:38:18 +00:00
matt
bfc6b62213 Stupid docs
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-21 21:31:12 -05:00
matt
a9bebb10da Merge remote-tracking branch 'origin/breaking' into breaking
# Conflicts:
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WEExtent.java
2019-02-21 21:18:03 -05:00
matt
2f18ef6828 Critical bug fixes, reformatting, and cleaning
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-21 21:14:48 -05:00
dordsor21
f2d68642f9 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-02-20 14:51:01 +00:00
dordsor21
350e151214 Don't use streams as they're lower performance for our use cases.
Some minor reformating too.
2019-02-20 14:50:49 +00:00
dordsor21
72b031e3e5
Update offset to match CI 2019-02-20 11:59:39 +00:00
dordsor21
d0a4465985 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-02-20 11:55:50 +00:00
dordsor21
0ef8b4ad14 Update to WorldEdit's *breaking* Biome handling changes 2019-02-20 11:55:39 +00:00
matt
c5d9412c6c Cleaning and API Addition
Begins the process of removing "magic values" for directions in the plugin.

Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-19 22:57:35 -05:00
matt
92718a5ec8 Merge branch 'consumers' into breaking 2019-02-19 22:29:59 -05:00
matt
099a807ce0 CLeaning of code
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-19 22:29:27 -05:00
matt
df47697ca6 CLeaning of code
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-19 19:00:37 -05:00
matt
b7aeeb151d Replace RunnableVal with java Consumer
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-19 18:39:43 -05:00
dordsor21
2e22dfe056
Update offset to match CI 2019-02-16 22:06:31 +00:00
matt
a64d764cc1 New API method, more 1.13 entity support, and cleanup.
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-15 12:50:43 -05:00
dordsor21
4f27abb4a0 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-02-14 17:39:01 +00:00
dordsor21
b999cb4195 Fix players being able to place boats, armorstands etc using offhand 2019-02-14 17:38:36 +00:00
dordsor21
745fd58e2e
* 2019-02-13 21:54:13 +00:00
dordsor21
57981a870e
Update version offset to match ci 2019-02-13 21:53:11 +00:00
dordsor21
130e1b6300 Fix armorstands, boats etc being placeable on players plots with "use 0" flag 2019-02-13 21:47:54 +00:00
dordsor21
477e698f7e Reformat 2019-02-13 17:13:57 +00:00
matt
11c4a90cc9 Merge remote-tracking branch 'origin/breaking' into breaking 2019-02-13 12:05:42 -05:00
matt
35493662da Cleanup
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-13 12:05:28 -05:00
dordsor21
8710f2f83b Fix NPE when right-clicking a >1.13 block 2019-02-13 13:43:22 +00:00
dordsor21
3e8308ecd7 Catch statement already being null 2019-02-13 13:35:19 +00:00
dordsor21
dae7bbdf9d Fix dropped items being removed from plots 2019-02-13 13:26:19 +00:00
dordsor21
d0994f1b4b Fixes to EntityTask 2019-02-10 23:03:14 +00:00
dordsor21
cae95343ca
Update build offset 2019-02-10 22:51:21 +00:00
matt
17027e6292 Javadoc changes and cleaning of old unused code
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-08 14:49:37 -05:00
matt
e891873d28 Cleaning and scope changes
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-08 11:21:53 -05:00
matt
b39ea1b68b Cleaning and API clarifications
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-06 21:29:51 -05:00
matt
3d8179a4e6 Small tweaks
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-06 17:30:25 -05:00
matt
9101cb9218 PlotComment API tweaks.
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-06 12:33:14 -05:00
matt
6ec6c26a10 Guava needs to be in sync with Minecraft
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-06 12:02:20 -05:00
dordsor21
d6a801d854 Reformat 2019-02-06 16:42:27 +00:00
dordsor21
6711788dd0 Fix ClassCastException in runEntityTask 2019-02-06 16:38:01 +00:00
dordsor21
e41060ad65
And again
Because the ci built, but using a specific commit (to split Matt's previous commits into separate builds)
2019-02-06 14:12:50 +00:00
dordsor21
7e7f14a66b
Update build ci offset 2019-02-06 14:10:34 +00:00
matt
0c780166e0 Documentation and PlotId updates
minor code tweaks in the plot class too

Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-06 00:10:05 -05:00
matt
87547834ef Minor changes to variable names and castings
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-05 23:12:01 -05:00
matt
ccc53278a1 Fix the world border issue
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-05 20:36:42 -05:00
matt
9a23b718f3 Cleanup of various methods
mainly just more lambda's

Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-05 19:41:03 -05:00
matt
e3d43509cf Cleanup of some database methods
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-04 18:00:05 -05:00
matt
dfbcecb081 Removes Cluster Flags
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-02-04 12:46:27 -05:00
dordsor21
cf82bc5efb Revert 8ac9b86 2019-02-04 15:18:50 +00:00
dordsor21
14e1296e13 Only thing I can think of in 8ac9b86that would be causing the lack of plot owners (before reverting the commit) 2019-02-04 14:24:17 +00:00
dordsor21
6d6087b1e3 And don't add the Core/ code into Bukkit/ code 2019-02-04 14:02:21 +00:00
dordsor21
51afbdfcdc Apply correct codestyle 2019-02-04 13:59:11 +00:00
dordsor21
9c90928d07 Remove the debug and don't created a new BloxkBucket for every air block. 2019-02-02 16:13:55 +00:00
matt
8ac9b862f8 Major cleanup.
Added todo comments to many 1.13 issues still lingering. Changed access to some methods to be weaker. Removed cluster flags (most of it). Java 8 stuff added. Hid more PlotSetting methods. etc.

Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-01-31 14:20:48 -05:00
NotMyFault
cd8a1a0816
Fixed some translation mismatches 2019-01-27 00:48:03 +01:00
dordsor21
a4c3fb26c7 Check for road or unowned plot 2019-01-23 14:02:18 +00:00
dordsor21
fd4a5f2aaa Fix item despawning on plots 2019-01-23 13:34:23 +00:00
dordsor21
25ed9d2798 Fix road schematic pasting height 2019-01-23 12:23:05 +00:00
Sauilitired
c96a1afaed
Don't fuck up road schematics, I guess 2019-01-22 21:32:24 +01:00
Sauilitired
344a2afeff
Use StringBuilder, like a sane person 2019-01-22 19:54:31 +01:00
Sauilitired
e54f964eca
Fix #2009 2019-01-22 18:51:13 +01:00
Sauilitired
8733dc6dab
Fix deny-teleport flag: Fixes #2128 2019-01-22 10:43:29 +01:00
Sauilitired
7e56e47046
Fix block list flag permissions 2019-01-21 17:49:36 +01:00
Sauilitired
7edfc313d6
I did an oopsie 2019-01-21 12:24:34 +01:00
Sauilitired
d37f5b9aa8
Fix schematic pasting offsets 2019-01-21 09:53:04 +01:00
Sauilitired
1fbfc767c4
Use PaperLib and make command task return completable futures 2019-01-21 09:20:33 +01:00
dordsor21
bd797b59fe Allow disabling of scientific notation (disabled by default) for DoubleFlags 2019-01-20 15:56:49 +00:00
dordsor21
0609b3d7f6 Safer generation of the BlockBucketChunk 2019-01-19 16:28:49 +00:00
dordsor21
ca883c211a Add merge permission changes from master 2019-01-18 19:02:12 +00:00
dordsor21
330ab83ece possible NPE fix and add useful debug if it fails 2019-01-17 22:34:28 +00:00
dordsor21
d846bc7a2e Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2019-01-17 16:28:55 +00:00
dordsor21
db2e245b13 alphabetise PlayerEvents stuff and add Turtle Eggs 2019-01-17 16:28:42 +00:00
Sauilitired
4e79a3aa16
Fix broken group ID 2019-01-17 15:31:18 +01:00
dordsor21
ea422b5561 Fix NPE on world initialise 2019-01-17 13:19:24 +00:00
dordsor21
f366f5e406 Remove needless generateExtBlockSections method that just reduced performance for no reason 2019-01-17 01:06:32 +00:00
dordsor21
223064567f
Plot analysis (#2239)
* Start to fix (and may have fixed) plot analysis with block buxkets and 1.13

* Standard deviation ought also be multiplied by 100, and only obtain the BlockBucket array once

* Add schematics to Plot Analysis
Add generateBlockBucketChunk method to SingleWorldGenerator
2019-01-17 01:04:00 +00:00
matt
0817d7de5a Removed PlotMe converting features.
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
2019-01-15 22:19:29 -05:00
dordsor21
0e0a534620 Fix regenallroads extend (height) 2019-01-16 01:55:45 +00:00
dordsor21
61f8ceaaaa I'm an idiot and left one of my debug messages in 2019-01-16 01:28:07 +00:00
dordsor21
7e6b11a21b Fix plot swap and have a nicer static AIR block 2019-01-15 23:58:21 +00:00
dordsor21
28c219c694 /plot leave has a terrible description 2019-01-15 16:20:50 +00:00
dordsor21
f679d3f873 Debug not debug 2019-01-14 18:27:20 +00:00
dordsor21
232b7ccfc1 Don't allow debugroadregen on merged plots 2019-01-14 18:15:44 +00:00
dordsor21
44fc8a55ea Add "kick" meta check in PlotListener 2019-01-14 17:41:28 +00:00
dordsor21
b2d035cf69 Fix deny-exit flag causing plot kick to break 2019-01-14 17:31:22 +00:00
dordsor21
d81d3c72e4 Update scripts and code to work nicely with each other.
Fixes #2208
2019-01-12 19:56:11 +00:00
dordsor21
f62777bc1a Minor:
Fix BukkitLegacyMappings method map usage
Move obtaining legacy block to default clause
Task should be async
2019-01-12 18:05:20 +00:00
Logan Fick
8ba661aa35 Fixed plot owner UUIDs getting unnecessarily randomized. (#2233) 2019-01-12 17:48:53 +00:00
dordsor21
15ea0f3210 Fix BukkitLegacyMappings having maps the wrong way round & fix PlotBlockListFlag to use PlotBlocks.
Fixes #2229
2019-01-12 17:39:29 +00:00
dordsor21
0d76e46fa2 Fix requiring restart for /ps load after /ps save & make descriptions nicer 2019-01-11 12:50:38 +00:00
Alexander Söderberg
daf3e3dde5
Merge pull request #2230 from N0tMyFaultOG/breaking
Cleanup - Removing bo3
2019-01-10 22:33:20 +01:00
NotMyFault
222585bf01
Update C.java 2019-01-10 22:21:34 +01:00
NotMyFault
63af0de9f0
Update Settings.java 2019-01-10 22:20:30 +01:00
NotMyFault
5df6f2a13e
Update Download.java 2019-01-10 22:18:28 +01:00
NotMyFault
c5f1c60ad7
Delete base.yml 2019-01-10 22:16:22 +01:00
Sauilitired
3ac7785cc3
Skip empty files in DebugPaste 2019-01-10 21:34:52 +01:00
dordsor21
3bbd97e7e1 Fix PlotDeleteEvent and PlotMergeEvent not being called.
Replaced current PlotMergeEvent with PlotAutoMergeEvent (called when a plot is merged on /plot auto). And made PlotMergeEvent be called for /plot merge command.
2019-01-10 17:10:25 +00:00
Sauilitired
e47b4fef20
Remove update and changelog commands 2019-01-10 17:45:40 +01:00
matt
7302480728 Merge branch 'optional' into breaking 2019-01-09 20:01:32 -05:00
NotMyFault
457c520eb6
Fixing debugpaste description 2019-01-09 23:40:08 +01:00
Sauilitired
053edb823d
Use Incendo pasting instead of Hastebin 2019-01-09 23:12:36 +01:00
dordsor21
727d120e70 Regenallroads:
- remove the "estimated time" as it's just not remotely correct, nor would it be correct if it were based on actual chunk number
 - fix the air to be pasted above the road when using regenallroads
2019-01-09 16:15:34 +00:00
dordsor21
ea01a5171b Add missing admin unlink permission 2019-01-03 22:36:09 +00:00
dordsor21
77ddeabca2 Fix NPE with plot version (update to new versioning within code)
Also add date and commit to plugin.properties file.
2019-01-03 17:32:21 +00:00
matt
e12a7bb85f Migrated remaining Optionals 2019-01-02 23:15:42 -05:00
matt
c7b9bfeb4b Migrate from Guava Optionals to Java Optionals 2019-01-02 23:11:26 -05:00
dordsor21
ae9e52f093 Don't dump g_sch 2019-01-02 13:18:20 +00:00
dordsor21
00a5d5ff64 Nicer versioning and match CI build number 2019-01-02 13:01:37 +00:00
dordsor21
29868bdd29 Fix road generation for roads of even width 2019-01-01 14:43:41 +00:00
Sauilitired
38a382f8e5
Add missing argument to unlink 2019-01-01 00:55:25 +01:00
dordsor21
f8ce00c2df Also cancel picking water/lava up with a bucket. 2018-12-31 18:03:59 +00:00
dordsor21
6a9038c306 Fix #2205 2018-12-31 17:57:17 +00:00
dordsor21
7bcc4c4ce3 Fix plot move/swap block rotation issue (switch to BaseBlock). Also fix container inventory pasting.
Some cleanup.
Fixes #2209
2018-12-31 17:15:47 +00:00
dordsor21
8c52e20736 Use BaseBlocks in regenallroads and minor cleanup of HybridUtils.
Fixes #2210
2018-12-31 16:08:09 +00:00
dordsor21
3156741664 Fix plot redstone disabling (not sure why it was the way it was, but it was never going to work, so I fixed? it)
also minor reformat to PlayerEvents
2018-12-28 17:25:29 +00:00
dordsor21
750be6c5fe clean merge up 2018-12-28 17:03:00 +00:00
Rick Strafy
6292bff7c9 Fix rotation (#2200)
* Fix rotation

* Clean up some events and utility classes. Try to use as general type
declarations as possible. Add configurable override for the unsafe block checker.

* Treat tridents as a projectile

* Fix rotation and merged with current breaking branch
2018-12-28 09:42:03 +00:00
Sauilitired
f25581c3f1
Treat tridents as a projectile 2018-12-28 08:14:47 +01:00
Sauilitired
12b8ae3eed
Clean up some events and utility classes. Try to use as general type
declarations as possible. Add configurable override for the unsafe block checker.
2018-12-28 07:39:39 +01:00
dordsor21
660754511b Fix rotation of road schematics 2018-12-28 00:47:48 +00:00
dordsor21
2846363a2c Revert "Use our own schematic readers in only create one input stream, and allow for future customisation of schematics if required/wanted."
This reverts commit 3521b8aa22624dcd725175243c9105dfc034d7f2.
2018-12-27 20:06:02 +00:00
dordsor21
3521b8aa22 Use our own schematic readers in only create one input stream, and allow for future customisation of schematics if required/wanted. 2018-12-27 19:42:56 +00:00
Sauilitired
249b5d4068
Revert dors commit 2018-12-27 17:29:35 +01:00
Sauilitired
76113cb0ab
Allow specifying Y value for default plot home 2018-12-27 16:18:54 +01:00
matt
a529518b91 Minor changes, formatting, comments.
One notable thing added was the inclusion of more of the new mobs in one of the events.
2018-12-27 00:46:32 -05:00
Alexander Söderberg
75bcd1adec
Update StringMan.java 2018-12-27 01:31:48 +01:00
dordsor21
fba7eac6d8 Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2018-12-26 21:18:38 +00:00
dordsor21
6e127db982 Cleanup 2018-12-26 21:18:22 +00:00
Sauilitired
d12bdcfda4
Fix NPE on VehicleMoveEvent. Fixes #2195. 2018-12-26 19:25:20 +01:00
Sauilitired
f1cf541606
Merge remote-tracking branch 'origin/breaking' into breaking 2018-12-26 19:16:42 +01:00
Sauilitired
2b9fe5afda
Fix plot music (and plot inventories) 2018-12-26 19:16:34 +01:00
dordsor21
ba47a21971 - Update code style to format annotations nicely
- Reformat code
2018-12-26 17:21:06 +00:00
dordsor21
8cb2bdc846 Nice code to handle schematic loading and remove the ability to debugroadregen a specific chunk, as it uses a completely different method to actual road generation. 2018-12-26 16:44:39 +00:00
Sauilitired
5bdc5a0fcc
Fix road schematics but for real this time 2018-12-26 17:24:35 +01:00
Sauilitired
2ebb7d11a8
Fix road schematics 2018-12-26 17:05:37 +01:00
Sauilitired
1d08f4d4ff
Include a rationale like Spottedleaf was kind enough to suggest 2018-12-26 15:38:31 +01:00
Sauilitired
b05316c000
Recommend paper just like FAWE. I want to be like the cool kids.
Oh, and fix an issue with `/plot music`. Still broken. Just not
the same kind of broken.
2018-12-26 15:29:39 +01:00
Sauilitired
f1378013c1
Fix plot home 2018-12-26 01:39:49 +01:00
Sauilitired
edc758334c
Actually copy over the files as well... 2018-12-25 18:30:42 +01:00
Sauilitired
beb0f5708f
Whoops... 2018-12-25 18:28:07 +01:00
Sauilitired
71baee063c
Update maven info for Core 2018-12-25 18:27:07 +01:00
Sauilitired
1ca50cdbd2
Merge remote-tracking branch 'origin/breaking' into breaking 2018-12-25 12:05:12 +01:00
Sauilitired
afb0a9f17f
Forcefully load WorldEdit on startup 2018-12-25 12:05:01 +01:00
dordsor21
c14b76b324 Fix rotational blocks in road generation 2018-12-24 23:14:13 +00:00
dordsor21
af23d3d98e Fix schematic pasting to paste tile entities and blocks with BlockData (e.g. stairs) properly 2018-12-24 17:56:13 +00:00
Sauilitired
9fe9c2662b
Fix legacy conversion of block lists 2018-12-24 08:57:17 +01:00
Sauilitired
9e0c226632
Fix schematic pasting 2018-12-24 08:13:15 +01:00
Sauilitired
4f43788307
Merge remote-tracking branch 'origin/breaking' into breaking 2018-12-24 01:50:45 +01:00
Sauilitired
8dae2555db
Make mv create work again 2018-12-24 01:50:17 +01:00
dordsor21
1bf621fb4b Fix schematic saving (and improve performance slightly) 2018-12-23 22:49:43 +00:00
Sauilitired
2ede77318a
Add dordsor21 to author list 2018-12-23 20:32:48 +01:00
Sauilitired
5c678e86bb
Fix configuration loading issues 2018-12-23 20:31:29 +01:00
Sauilitired
02937cc543
Add configuration conversion and fix BukkitLegacyMappings 2018-12-23 19:43:36 +01:00
Sauilitired
165cac8b13
Fix bStats problem and commit Setup progress 2018-12-23 17:38:27 +01:00
MattBDev
25b34b419f Merge remote-tracking branch 'origin/breaking' into breaking 2018-12-21 23:48:18 -05:00
MattBDev
c1fa6c842d Removing old Metrics class
We don't need any fancy metrics at the moment. They can be added later if needed.
2018-12-21 23:38:01 -05:00
Sauilitired
7900a95b25
Implement LegacyConverter 2018-12-21 22:55:47 +01:00
Sauilitired
fe12d03916
Remove unused classes. 2018-12-21 21:28:33 +01:00
sauilitired
23b9eca4ab Add bStats support, seeing as mcstats has been down for ages 2018-12-21 21:10:37 +01:00
sauilitired
3c48488c61 Merge remote-tracking branch 'origin/breaking' into breaking 2018-12-21 17:49:15 +01:00
sauilitired
dff64c5c68 Add support for 1.13 blocks 2018-12-21 17:49:04 +01:00
dordsor21
886081e27f The local build was a fluke, and I couldn't work it out in the last 3 hours, so here are some basic updates/cleanup to a few things, and an updated bui;d command in README.md 2018-12-21 16:26:19 +00:00
dordsor21
e757c3e13c Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking 2018-12-21 13:39:27 +00:00
dordsor21
5fdb60f85d Default plot height is at sea level (62) 2018-12-21 13:39:20 +00:00
dordsor21
aaed3f622a Fix build for gradlew clean assemble build 2018-12-21 13:38:28 +00:00
sauilitired
130274de86 Fix multiverse setup and don't allow unsafe blocks in setup 2018-12-21 03:31:08 +01:00
dordsor21
8bc0bcd9e6 Update BukkitUtil#isBlockSolid to 1.13 2018-12-21 01:04:37 +00:00
dordsor21
28f3be56b3 Fix schematic creation
Seems fairly ugly, but only because the format requires the blocks be inputted in that exact order, and it prevents us from having to cache the blocks per chunk to then insert into the relevant tags.
2018-12-21 00:49:15 +00:00
dordsor21
c53cd1ec91 oops 2018-12-20 23:34:55 +00:00
dordsor21
90682e9f8b Various:
- Some minor cleanup
 - Test for null id, not for null PlotBlock
 - Small fixes to schematic saving (still broken)
2018-12-20 23:33:24 +00:00
sauilitired
341e386df8 Delete Collection getBlocks to Array getBlocks 2018-12-20 21:46:00 +01:00
sauilitired
f4140ae728 Add getBlockArray() method 2018-12-20 21:40:50 +01:00
dordsor21
1021c6f2b0 Use Math.min and Math.max 2018-12-20 20:25:21 +00:00
dordsor21
780d3d7703 *Don't set the the cuboid block by block if we've already technically done that 2018-12-20 20:23:11 +00:00
dordsor21
6ac7948f72 Pretty basic fix for chunk generation 2018-12-20 20:20:31 +00:00
dordsor21
4e10682748 A few minor fixes 2018-12-20 18:46:52 +00:00
sauilitired
096ad1febe Make sure that blocks are actually compiled. Whoopsie 🐮 2018-12-20 19:35:02 +01:00
dordsor21
1543ac50cd Various:
- Empty StringPlotBlocks are air
 - Update signs to 1.13
 - Fix getting material in BukktiLocalQueue#setMaterial
2018-12-20 17:20:13 +00:00
dordsor21
442473368d This slipped through 2018-12-20 12:26:51 +00:00
dordsor21
b35221bf4f Fix crashing on chunk load (chunks are still empty though) 2018-12-20 12:23:49 +00:00
sauilitired
568b4c8e85 Merge remote-tracking branch 'origin/breaking' into breaking
# Conflicts:
#	Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/generator/BukkitPlotGenerator.java
#	Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java
2018-12-20 02:25:55 +01:00
sauilitired
e939b8237e Changelist:
- Added aliases for custom configuration types
- Removed numerical ID based methods in Block Queues
- Fixed sign removal in Plot.java
- (Hopefully) fixed dividing by 0 errors in BlockBucket
- Removed random from some methods, as blockbucket has it's own random
- Temporarily removed chunk analysis
- Changed a lot in GenChunk and BukkitPlotGenerator
2018-12-20 02:23:48 +01:00
dordsor21
ffe5cddead 1.13.2 spigot dependancy 2018-12-20 01:05:10 +00:00
dordsor21
821e828f07
Merge pull request #2190 from IntellectualSites/master
Merge
2018-12-20 00:58:44 +00:00
dordsor21
2596f37f66
Merge branch 'breaking' into master 2018-12-20 00:58:28 +00:00
dordsor21
cbc2b70336 Merge commit 'be485075993f8dc807595c524f58c3bb58156a0c' into breaking
# Conflicts:
#	README.md
2018-12-20 00:55:44 +00:00
dordsor21
5aac7d07d2 Remove abstraction of BukkitSchematicHandler 2018-12-20 00:47:04 +00:00
dordsor21
ee6d52efa3 Update all legacy IDs 2018-12-20 00:43:47 +00:00
dordsor21
adc2d980f4 Clean up listeners for legacy versions 2018-12-19 23:49:35 +00:00
dordsor21
11ccfe7ac4 Reformat code 2018-12-19 23:26:20 +00:00
dordsor21
fa2dbb2b89 Update to WorldEdit 7 (and WE7-compatible schematics, *hopefully keeping legacy*) 2018-12-19 23:18:57 +00:00
dordsor21
e7b25d3fc8 Update BukkitLocalQueue to new LegacyMappings 2018-12-19 18:46:30 +00:00
sauilitired
444222c7f9 Improve PlotBlock name matching 2018-12-19 18:36:50 +01:00
sauilitired
e724aa8caf Fix PlotItem. 2018-12-19 18:24:35 +01:00
sauilitired
8f23299e7d Use BlockBuckets everywhere. 2018-12-19 17:19:54 +01:00
dordsor21
361cc9e9f7 Remove old LegacyMappings class from Bukkit
Add "fromAny" method
2018-12-19 15:08:49 +00:00
dordsor21
865de73a83
Merge pull request #2189 from dordsor21/breaking
Refactor legacy mappings to use PlotBlocks
2018-12-19 14:54:55 +00:00
dordsor21
531d8cc706
Merge branch 'breaking' into breaking 2018-12-19 14:54:32 +00:00
dordsor21
4b02bb1df8 Refactor legacy mappings to use PlotBlocks 2018-12-19 14:52:15 +00:00
sauilitired
1d3270d869 BlockBuckets r cool 🐮 2018-12-19 00:01:13 +01:00
NotMyFault
3be23a3d37 Switching from IRC to Discord
To offer us a better possibility to help you regarding issues or bugs, join us on discord https://discord.gg/ngZCzbU
2018-12-18 21:27:30 +01:00
sauilitired
af9418552a Whoops. 2018-12-18 20:58:52 +01:00
sauilitired
10b87f5728 Add mappings for pre initialized items 2018-12-18 20:56:55 +01:00
sauilitired
ccad0bced9 Progress. 2018-12-18 20:54:20 +01:00
sauilitired
fb7bcef05f 1.13 shizzle 2018-12-17 20:57:21 +01:00
dordsor21
b9482fe5b4 Possible fix for FAWE build failures 2018-12-17 13:16:53 +00:00
NotMyFault
be48507599
Merge pull request #2188 from N0tMyFaultOG/master
Adding French translation
2018-12-12 16:15:12 +01:00
NotMyFault
8ad75efa0e Adding French translation 2018-12-12 16:12:40 +01:00
sauilitired
820710721e Schematic list command 2018-12-06 18:01:33 +01:00
sauilitired
152e9e0e90 Make it build. 2018-12-06 16:59:10 +01:00
sauilitired
3fc7fb0a7a Bump version (PlotSquared 4 will be new release) 2018-12-06 16:53:21 +01:00
sauilitired
18e969227c Update lombok version build. Disable Sponge and Nukkit builds. 2018-12-06 16:49:49 +01:00
NotMyFault
0252cf724a
Adding JavaDocs, Maven Repo and API Documentation 2018-11-15 14:02:31 +01:00
sauilitired
4395ca06b4 Add @SuppressWarnings("unused") to listeners. 2018-11-15 00:12:12 +01:00
sauilitired
a4a923c23c Extract duplicated switch statement in EntityUtil 2018-11-15 00:08:32 +01:00
sauilitired
06f64aeff0 Extract duplicated method declaration 2018-11-15 00:06:20 +01:00
sauilitired
a8b4729845 Rename DBFunc#everyone to DBFunc#EVERYONE, and create two string constants 🐱 2018-11-14 23:51:56 +01:00
sauilitired
3c64376abe Fix guest gamemode flag. 2018-11-14 23:40:27 +01:00
dordsor21
8cd54929e7 Merge branch 'master' into breaking
# Conflicts:
#	Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/events/PlotRateEvent.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEventUtil.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Add.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Auto.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Delete.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Kick.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Load.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Music.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Owner.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Rate.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Reload.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/SchematicCmd.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Trust.java
#	Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java
#	Core/src/main/java/com/intellectualcrafters/plot/commands/Clear.java
#	Core/src/main/java/com/intellectualcrafters/plot/commands/PluginCmd.java
#	Core/src/main/java/com/intellectualcrafters/plot/commands/Relight.java
#	Core/src/main/java/com/intellectualcrafters/plot/commands/SetHome.java
#	Core/src/main/java/com/intellectualcrafters/plot/config/C.java
#	Core/src/main/java/com/intellectualcrafters/plot/config/Configuration.java
#	Core/src/main/java/com/intellectualcrafters/plot/config/Settings.java
#	Core/src/test/java/com/github/intellectualsites/plotsquared/plot/util/EventUtilTest.java
#	Nukkit/src/main/java/com/plotsquared/nukkit/util/NukkitEventUtil.java
#	README.md
#	Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/events/PlotRateEvent.java
#	Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/SpongeSchematicHandler.java
#	Sponge/src/main/java/com/github/intellectualsites/plotsquared/sponge/util/block/SpongeLocalQueue.java
#	Sponge/src/main/java/com/plotsquared/sponge/util/SpongeEventUtil.java
2018-11-14 14:44:07 +00:00
sauilitired
8df7f63931 Refactor PS (and rename to PlotSquared) 2018-11-14 14:19:57 +01:00
sauilitired
16dbbe5244 Refactoring of PS#getPlots:
Initialize to HashSet rather than ArrayList, because of add in HashSet
is O(1) vs. add in ArrayList which is O(n). Also make the wrapping
set immutable.
2018-11-14 13:52:09 +01:00
NotMyFault
ae2869a29b Translation update and fixing wrong lines 2018-11-05 16:00:44 +01:00
NotMyFault
40e7df8d69
Merge pull request #2142 from dordsor21/master
Cancel plot chat if message event is cancelled to allow for swear block/etc
2018-10-25 12:11:46 +02:00
dordsor21
ea5ffbeb77 Cancel plot chat if message event is cancelled to allow for swear block/etc 2018-10-25 10:51:18 +01:00
NotMyFault
302051a6ca Minor cleanup 2018-10-20 14:03:21 +02:00
Jesse Boyd
b6d4872ca4
Merge pull request #2102 from dordsor21/master
Add PlotChangeOwner Event
2018-10-13 15:11:45 +11:00
NotMyFault
4b7ca2ff37
Minor cleanup 2018-10-10 18:29:21 +02:00
NotMyFault
e4e4694a1c
Merge pull request #2127 from Leomixer17/patch-1
Delete chinese.yml
2018-10-10 18:07:07 +02:00
Leomixer17
ba6818a5bd
Delete chinese.yml 2018-10-10 17:27:29 +02:00
NotMyFault
1734c0e357
Rename ko_KR.yml to ko-KR.yml 2018-10-10 16:52:35 +02:00
NotMyFault
e2e34f24d6
Rename zh_CN.yml to zh-CN.yml 2018-10-10 16:51:43 +02:00
NotMyFault
765db2df0c
Added languages 'back' 2018-10-10 16:49:31 +02:00
NotMyFault
e1e6d95f75
Merge pull request #2049 from f0rb1d/master
Updated Simplified Chinese translation and formalized language codes.
2018-10-10 16:40:52 +02:00
NotMyFault
70584a338c
Update PS.java 2018-10-10 16:38:01 +02:00
NotMyFault
11e2777f60
Update PS.java 2018-10-10 16:36:14 +02:00
NotMyFault
b6303a7615
Update PS.java 2018-10-10 16:33:03 +02:00
NotMyFault
88e80f54f7
Updating locale names 2018-10-10 16:30:38 +02:00
NotMyFault
c6f8a6ddc1
Merge pull request #2088 from N0tMyFaultOG/master
Minor translation and template changes
2018-10-10 15:13:55 +02:00
dordsor21
9e9b21779c Add PlotChangeOwner Event 2018-09-19 16:57:33 +01:00
Jesse Boyd
eab918bcd4
minor sponge cleanup 2018-09-10 07:46:56 +10:00
Jesse Boyd
2e7d95f5a6
Fix sponge schem save 2018-09-10 07:45:00 +10:00
Jesse Boyd
906f16d075
Fixes #2092 2018-09-10 06:38:22 +10:00
NotMyFault
979b3c0408
Added bridge template and korean translation 2018-09-03 00:04:32 +02:00
NotMyFault
5b2428559a
Bridge template from the spigot page 2018-09-03 00:02:07 +02:00
NotMyFault
f001eebad4
Update Settings.java 2018-09-02 23:51:45 +02:00
Jesse Boyd
f5a981fda7
Fix plot visit sorting 2018-08-24 06:47:16 +10:00
sauilitired
032484b0f5 Pull out duplicated method sub in BukkitPlayer 2018-08-20 12:15:03 +02:00
sauilitired
587c942d88 Suppress PlotAPI warnings 2018-08-20 11:36:59 +02:00
sauilitired
e98c648244 Move PlotAPI to Core and move bukkit specific methods to BukkitUtil. 2018-08-20 11:35:41 +02:00
sauilitired
be9fb3bd3a Remove deprecated methods without internal use. 2018-08-20 11:05:00 +02:00
sauilitired
01a927ccad Allow PlotRateEvent to be cancelled. Fixes #2017 2018-08-19 23:12:59 +02:00
sauilitired
3c86531b58 * ;) 2018-08-19 22:21:42 +02:00
sauilitired
847ce7f20d (W.I.P) TeleportEntityWrapper as alternative to replicating entity wrapper 2018-08-19 22:18:58 +02:00
Jesse Boyd
4b8c434669
Fix compile (var must be final) 2018-08-12 21:36:04 +10:00
Alexander Söderberg
9105294965
Update auto-comment.yml 2018-08-11 15:48:33 +02:00
Alexander Söderberg
5378c9007c
Create auto-comment.yml 2018-08-11 15:43:36 +02:00
Alexander Söderberg
40e91de111
Create stale.yml 2018-08-11 15:38:22 +02:00
Alexander Söderberg
b1246adac2
Update README.md 2018-08-11 15:29:31 +02:00
Alexander Söderberg
86e7f4e2b3
Update ISSUE_TEMPLATE.md 2018-08-11 15:28:41 +02:00
sauilitired
af461e1fc2 Add alternative maven link and re-enable gradle daemon 2018-08-10 23:41:31 +02:00
sauilitired
d9bc1fcfe7 Disable daemon (temporarily) to allow for CI builds to not run out of memory. 2018-08-10 23:38:28 +02:00
sauilitired
369ccb7c8d Prettify BukkitUtil 2018-08-10 20:54:17 +02:00
sauilitired
724fb34b1f Prettify BukkitMain 2018-08-10 20:46:38 +02:00
sauilitired
2898e9ae2b Fix error from refactoring 2018-08-10 20:30:05 +02:00
sauilitired
b551424ced Update gradle 2018-08-10 20:29:50 +02:00
sauilitired
b0348cfc34 Update packages. This will not be appreciated 🐱 2018-08-10 17:53:15 +02:00
sauilitired
1646cd0f5a Reformat code 2018-08-10 17:01:11 +02:00
sauilitired
02ee1e8fa1 Update README.md and commit code style 2018-08-10 16:52:35 +02:00
Alexander Söderberg
a2813a2427
Merge pull request #2057 from IntellectualSites/Sauilitired-patch-1
Remove unnecessary lines in Configuration javadoc
2018-08-10 16:05:06 +02:00
Alexander Söderberg
bbcd508bc3
Remove unnecessary lines in Configuration javadoc 2018-08-10 16:04:43 +02:00
F0rb1d
a4f176fd07 Updated Simplified Chinese translation and formalized language codes. 2018-08-03 20:35:36 +08:00
Jesse Boyd
3d8d75170d
Check admin for setowner null 2018-07-31 14:28:22 +10:00
Jesse Boyd
2c11a292f4
Prevent multiple uses of plot auto 2018-07-29 21:43:07 +10:00
Jesse Boyd
cd9d22cb9b
Fix augmented generator not clearing column 2018-07-27 14:02:40 +10:00
Jesse Boyd
645c5fb529
Fix nukkit augmented generator 2018-07-27 13:25:46 +10:00
Jesse Boyd
2d98da47cf
Debug generator error 2018-07-27 10:57:34 +10:00
Jesse Boyd
1b08d54be0
Merge pull request #2029 from Speentie8081/master
Add support for spigot 1.13 and spigot 1.13-pre7
2018-07-27 10:37:51 +10:00
Speentie8081
be8172ce91 Assume spigot 1.13 if NumberFormatException is fired 2018-07-22 09:17:38 -05:00
Speentie8081
768e21d1b5 Update NBTFactory to support spigot 1.13 2018-07-22 09:09:39 -05:00
Speentie8081
bbee2debff Remove unneeded changes and add back support for 1.9 through 1.12 2018-07-21 10:32:38 -05:00
Speentie8081
d5b01aced2 Use MaterialData instead of block id and data for chunk generation 2018-07-21 00:15:13 -05:00
Speentie8081
f533efb2c8 Add support for spigot 1.13-pre7 2018-07-20 23:51:09 -05:00
Jesse Boyd
aaa70888bd
Merge pull request #2028 from PhanaticD/patch-3
fix dispensers
2018-07-21 12:40:54 +10:00
Josh
d673537026
fix dispensers
previously dispensers were not working at all, this change blocks lava and water and allows dispensers to function normally again on servers with plotsquared. if you were trying to block dispensers launching items into the road however that still is not blocked by this
2018-07-20 19:23:39 -04:00
Jesse Boyd
ae1e58c0ac
Add -f override for plot move 2018-07-07 09:22:24 +10:00
Jesse Boyd
5d04c64d48
Fix typo 2018-07-07 09:11:23 +10:00
Jesse Boyd
185fe39942
Fix check for UUID support 2018-07-07 08:50:43 +10:00
Jesse Boyd
18c92bea38
Allow specifying area for move command 2018-07-05 19:33:17 +10:00
Jesse Boyd
79e1ea9a8f
* 2018-06-23 14:13:06 +10:00
Jesse Boyd
1772fdab16
Fixes #1988 2018-06-23 14:12:21 +10:00
Jesse Boyd
9020d740d1
Revert "possible fix for mob damage"
This reverts commit df6914fb1e526c7433c3cfc8d2996214d1d6fbb5.
2018-06-23 11:46:19 +10:00
Jesse Boyd
df6914fb1e
possible fix for mob damage 2018-06-21 07:48:45 +10:00
Jesse Boyd
da5478f141
Only check int flag ranges 2018-06-20 07:48:51 +10:00
Jesse Boyd
d454602888
Fixes #1961 2018-06-19 03:44:45 +10:00
Jesse Boyd
3039331976
Add account age expiry filter 2018-06-19 03:29:14 +10:00
Jesse Boyd
6ed6f607b5
Sort flag list alphabetically 2018-06-13 09:28:32 +10:00
Jesse Boyd
37b0cdeace
Revert "Don't cancel chat event"
This reverts commit dc5fc5af4762ef0ee4a1b8658729e232b70207cc.
2018-06-10 19:35:34 +10:00
Jesse Boyd
9897890e6a
*Add console sender to nukkit chat 2018-06-09 15:49:54 +10:00
Jesse Boyd
ce3e3be59e
Tweak nukkit plot chat 2018-06-09 15:37:49 +10:00
Jesse Boyd
9ed5847c0a
Fixes #1768 2018-06-09 06:20:31 +10:00
Jesse Boyd
dc5fc5af47
Don't cancel chat event 2018-06-09 05:45:25 +10:00
Jesse Boyd
eca67c7d84
Merge pull request #1986 from dualspiral/bugfix/null-suggestions
Fix errors with tab completion on Sponge.
2018-06-09 05:11:27 +10:00
Daniel Naylor
c7a1526e12 Fix errors with tab completion on Sponge.
Fixes #1768
2018-06-08 11:17:02 +01:00
Jesse Boyd
740de4932b
Fix flag perm check 2018-06-07 12:30:39 +10:00
Jesse Boyd
442513b592
Fixes #1970 2018-06-07 08:15:28 +10:00
Jesse Boyd
40635255e3
Probably fixes #1953 2018-05-18 14:48:17 +10:00
Jesse Boyd
550df7f232
Fixes #1952 2018-05-17 17:46:54 +10:00
Jesse Boyd
4ffc4e67ab
Fixes #1822 2018-05-17 16:30:31 +10:00
Jesse Boyd
d6c472fcdf
Fixes #1484 2018-05-17 16:23:27 +10:00
Jesse Boyd
a83b51eb12
Fixes #1951 2018-05-17 15:21:53 +10:00
Jesse Boyd
67a70d4ade
Fixes #1928 2018-05-17 15:17:45 +10:00
Jesse Boyd
f479a70594
Fixes #1729 2018-05-17 15:11:44 +10:00
Jesse Boyd
9f9527d2e2
Fixes #1784 2018-05-17 14:53:34 +10:00
Jesse Boyd
98b7a84119
Fixes #1483 2018-05-17 14:50:47 +10:00
Jesse Boyd
5cb94f3e45
Fixes #1928 2018-05-17 14:43:51 +10:00
Jesse Boyd
ecf94b8706
minor web tweaks 2018-05-13 10:32:48 +10:00
Jesse Boyd
3006e941ba
Merge pull request #1943 from N0tMyFaultOG/patch-3
Update, rework and redesign of the german.yml
2018-05-12 09:25:42 +10:00
NotMyFault
244ccb71cf
Update of german.yml
german.yml design has been reworked to the up-to-date PlotSquared language file design. Many lines were added and adjusted.
2018-05-11 20:37:50 +02:00
Jesse Boyd
2d617fc05e
Merge pull request #1942 from N0tMyFaultOG/patch-2
Typo fixes
2018-05-11 11:36:49 +10:00
NotMyFault
e13785edfe
Typo fixes
Had to write some custom messages for a server and fixed the typos in here
2018-05-11 00:03:35 +02:00
Jesse Boyd
59e06c2319
Fixes #1929 2018-05-07 10:44:16 +10:00
Jesse Boyd
9a7ce84e1c
Potentially fixes #1769 2018-05-07 10:20:13 +10:00
Jesse Boyd
ef54775ca7
wtf, this has its own spawn reason, thanks spigot
Fixes #1803
2018-05-07 10:15:21 +10:00
Jesse Boyd
d49bfa612e
Merge pull request #1933 from Leomixer17/patch-1
Update italian.yml
2018-05-02 00:52:53 +10:00
Jesse Boyd
72f30d8aef
usernames can be 2 characters 2018-05-02 00:43:27 +10:00
Leomixer17
ef6b1cb932
Update italian.yml 2018-05-01 01:29:18 +02:00
Jesse Boyd
154bad6188
* 2018-04-28 21:53:39 +10:00
Jesse Boyd
613d79fb39
Fixes #1691 2018-04-28 21:51:26 +10:00
Jesse Boyd
5f9bd853ec
Fixes #1903 2018-04-28 09:41:09 +10:00
Jesse Boyd
ef83b5a1b7
Fixes #1931 2018-04-28 09:28:55 +10:00
Jesse Boyd
9fe1e53d9d
Fix single generator biomes 2018-04-15 10:47:00 +10:00
Jesse Boyd
4f63cdf560
Fixes #1920 2018-04-13 20:37:28 +10:00
Jesse Boyd
7f257e2bf3
* 2018-04-12 00:20:13 +10:00
Jesse Boyd
c5b332246e
Fix setblock npe 1.8 2018-04-11 23:41:09 +10:00
Alexander Söderberg
0c7be7e11d
Merge pull request #1915 from Foorack/master
Fix maven compilation
2018-04-09 17:05:27 +02:00
Foorack
c5a30bd708 Filter Core resources 2018-04-07 20:52:31 +02:00
Foorack
90c3fac4fa Fix PlotVersion when compiling with Maven 2018-04-07 20:52:19 +02:00
Foorack
e4f6c39bb7 Fix Maven compiling 2018-04-07 12:05:37 +02:00
Jesse Boyd
39084be791
Fix nukkit compile 2018-03-19 16:05:12 +11:00
Jesse Boyd
ded33aa9be
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2018-03-18 09:28:36 +11:00
Jesse Boyd
3565e67137
Prevent entity portal use from plotworld 2018-03-18 09:28:23 +11:00
Jesse Boyd
0e5483c050
Merge pull request #1901 from bibo38/nlfix
Fixed wrong newlines in german language file
2018-03-17 15:24:39 +11:00
bibo38
fb706e0d60 Fixed wrong newlines in german language file 2018-03-16 18:07:29 +01:00
Jesse Boyd
368b9a0168
Fixes #1786 2018-03-15 16:34:28 +11:00
Jesse Boyd
c208c530ff
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2018-03-12 17:27:00 +11:00
Jesse Boyd
b36d42811a
Fixes #1897 2018-03-12 17:26:40 +11:00
Jesse Boyd
5921e1865b
Merge pull request #1895 from BrainStone/master
using newer MySQL driver
2018-03-12 17:23:27 +11:00
BrainStone
515405aa9e using newer MySQL driver
- Newer driver doesn't need manual loading
- Fixes #1783
2018-03-10 21:34:11 +01:00
Jesse Boyd
8f5e2eb439
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2018-03-08 08:37:36 +11:00
Jesse Boyd
5b18b918a9
Ignore unsupported statement isClosed 2018-03-08 08:37:17 +11:00
dordsor whitwell
7dcb85d5d4
Fix typo in database update error message 2018-03-07 21:02:19 +00:00
Jesse Boyd
1cd30b84d5
check for closed connections 2018-02-15 23:12:42 +11:00
Jesse Boyd
eb1c3263ec
Fix deny-exit flag 2018-02-15 18:59:40 +11:00
Jesse Boyd
c98f2b4261
update to latest nukkit 2018-02-13 02:16:13 +11:00
Jesse Boyd
d9a17bd379
Fixes #1872 2018-02-08 19:48:40 +11:00
Jesse Boyd
c5d5b52df4
Tweak item drop check 2018-02-08 19:42:36 +11:00
Jesse Boyd
73d0068d07
Update to latest nukkit 2018-02-02 15:19:58 +11:00
Jesse Boyd
4b50276ba0
Fixes #1844 2018-01-31 13:05:11 +11:00
Jesse Boyd
8815c83ba1
Various minor
Teleport on login fixes
World unloading fixes
2018-01-27 16:26:09 +11:00
Jesse Boyd
c5778137f6
Update asm 2018-01-25 17:46:41 +11:00
Jesse Boyd
d22c0349f7
* 2018-01-25 15:32:25 +11:00
Jesse Boyd
785ba10ca1
Update to latest sponge 2018-01-25 14:51:39 +11:00
Jesse Boyd
0e183f5627
Fixes #1839 2018-01-13 12:47:02 +11:00
Jesse Boyd
b239cb4a18
Fixes #1828 2018-01-10 17:50:38 +11:00
Jesse Boyd
02b358133e
Better idea, send the packet. Closes #1837 2018-01-10 17:39:12 +11:00
Jesse Boyd
4f464439e5
* 2018-01-10 17:22:46 +11:00
Jesse Boyd
4716104951
Revert broken changes to visit 2018-01-10 17:15:05 +11:00
Jesse Boyd
bc8b2af164
Fixes #1774 (backwards compatibility) 2018-01-10 17:06:35 +11:00
Jesse Boyd
03337fe080
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2018-01-10 16:58:42 +11:00
Jesse Boyd
4ff02831f3
Fixes #1767 (performance issue) 2018-01-10 16:58:37 +11:00
Jesse Boyd
09e83bcbf8
Merge pull request #1793 from Leomixer17/patch-3
Update italian.yml
2018-01-10 16:50:17 +11:00
Jesse Boyd
57ae3945d7
Merge pull request #1836 from PhanaticD/patch-1
nukkit world height is 256
2018-01-10 16:45:52 +11:00
Jesse Boyd
17e4c1ec60
Update NukkitMain.java 2018-01-10 16:45:41 +11:00
Josh
b9a4f2256e
Update NukkitMain.java 2018-01-10 00:44:38 -05:00
Jesse Boyd
5ddefcea22
when PlayerQuitEvent is never called 2018-01-04 19:24:00 +11:00
Leomixer17
47314ce00d
Update italian.yml 2017-12-10 15:28:35 +01:00
Leomixer17
452bf593e0
Update italian.yml 2017-12-10 14:35:43 +01:00
Leomixer17
a9bd6566b7
Update italian.yml 2017-12-10 12:53:22 +01:00
Christian Langel
59557cf889 improvements: Message for visit Command to a players without plots (#1796)
We provide now a clear message if we are sure that the Visit command means a player but we dont found any claimed plots for this player.

This is helpful if we try teleport to  a numeric named player

See this related tickets: #1691, #1778
2017-12-09 11:08:15 +01:00
Leomixer17
48bdfd75e5
Update italian.yml 2017-12-07 19:50:02 +01:00
Alexander Söderberg
6c06e48a1f
Merge pull request #1792 from Opachl/PS-#1791
fix: p visit issue in latest builds
2017-12-07 08:54:36 +01:00
Opachl
70a82d9fc6 fix: p visit issue in latest builds
p visit issue in latest builds #1791
2017-12-06 21:40:26 +01:00
Leomixer17
61e045aa50 Update italian.yml (#1789) 2017-12-04 17:02:11 +01:00
Alexander Söderberg
d373a4dafa
Merge pull request #1787 from Leomixer17/patch-1
Improved the italian translation
2017-12-03 22:47:16 +01:00
Leomixer17
9daf13c897
Update italian.yml 2017-12-03 21:13:39 +01:00
Christian Langel
7d39d09317 fix: remove plot-alias with "/p alias" (#1779)
* fix: remove plot-alias with "/p alias"

remove plot-alias with "/p alias" #1718

* Apply requested Review Changes

Restored the original Permisson to keep backwards compatibility
Clean unused imports.

* added some improvements after testing

added some improvements after testing
2017-12-03 17:59:36 +01:00
Christian Langel
3779b17720 fix: shulker-teleport in a other plot (#1774)
- shulker-teleport in a other plot (Fixes #1762)
 - dropper can't drop lava_bucket and water_bucket  (Fixes #1775)
2017-12-03 17:21:15 +01:00
Christian Langel
06208696db fix: numeric Playernames thows NumberFormatException on Teleport (#1778)
* fix: numeric Playernames thows NumberFormatException on Teleport

Refactoring of the Teleport Handling

Supports now:
     * p h xPlotPlayerGuy [PAGE] = Player  [numeric] [alphanumeric]
     * p h MyPlantage      [PAGE] = Alias    [numeric] [alphanumeric]
     * p h PlotworldLarge [PAGE] = World  [numeric] [alphanumeric]
     * p h 1:1		       [PAGE] = plotId  [numeric (1,1|1;2) ]
     * p h 4		                   = 4 th Plot of the Player if available  [numeric (1,1|1;2) ]
Check order: Player, Alias, World, PlotId, Page [PAGE]
[PAGE] is optional

* Apply suggested Code Style

Changes:
Collections now empty instead of null.
Property renaming
2017-12-03 17:15:09 +01:00
Alexander Söderberg
f27b12a211
Merge pull request #1767 from Opachl/master
fix: no wether update after "/p flag remove weather"
2017-11-18 14:15:29 +01:00
Opachl
9413ce0880 fix: no wether update after "/p flag remove weather"
no wether update after "/p flag remove weather" #1723
2017-11-15 11:14:14 +01:00
Jesse Boyd
734c4bb5fe
Fix vehicle deletion 2017-11-14 17:24:02 +11:00
Jesse Boyd
6b7adcdf34
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2017-11-14 17:10:05 +11:00
Jesse Boyd
a752780eeb
Minor fixes
Update message color
CME on plot action
Creative middle click banner/head
2017-11-14 17:09:51 +11:00
Jesse Boyd
01fafc3be4
Merge pull request #1766 from Opachl/master
fix: Interaction flag with item_frame #1761
2017-11-13 16:13:19 +11:00
Opachl
c281620d75
Update PlayerEvents.java
added missing import
2017-11-12 17:49:14 +01:00
Opachl
c3f93a1960 fix: Interaction flag with item_frame
Interaction flag with item_frame #1761
2017-11-12 17:36:58 +01:00
Opachl
b4e8d782a1 Revert "fix: nteraction flag with item_frame"
This reverts commit a2eb727e257e09a5d7df6b440ca14f8a0d613709.
2017-11-12 17:35:59 +01:00
Opachl
a2eb727e25 fix: nteraction flag with item_frame
nteraction flag with item_frame #1761
2017-11-12 17:34:50 +01:00
Jesse Boyd
6e9c103b55
Fix typo 2017-11-12 13:32:09 +11:00
Jesse Boyd
cbf7956a32
Add gradle jar 2017-11-12 12:49:19 +11:00
Jesse Boyd
6e841543b8
Closes #1731 2017-11-09 10:57:17 +11:00
Jesse Boyd
585f1b75a1
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2017-11-09 10:18:58 +11:00
Jesse Boyd
534d627b05
Fixes #1732 2017-11-09 10:18:52 +11:00
Jesse Boyd
fe534bccbe
Merge pull request #1753 from Leomixer17/patch-1
Improved italian translation
2017-11-09 10:16:37 +11:00
Jesse Boyd
37f1da0715
Various minor
VehicleMoveEvent
- Move KillRoadVehicles code there
- Fix for pre-1.12
Fix auto merge being disabled
2017-11-09 10:15:16 +11:00
Jesse Boyd
515aca5f06
Merge pull request #1757 from IntellectualSites/FixVehicles
Implement VehicleMoveEvent for Bukkit.
2017-11-08 11:59:46 +11:00
Alexander Söderberg
530803c738 Implement VehicleMoveEvent for Bukkit. This fixes #1754. It also makes sure that you cannot use
vehicles to enter plots that you're denied from.
2017-11-06 22:01:18 +01:00
Leomixer17
faa24bbdf4
Update italian.yml 2017-11-04 21:36:03 +01:00
Jesse Boyd
5b6d5664e4
Fix fireworks being spawnable in other plots 2017-11-03 06:58:57 +11:00
Jesse Boyd
22429fc3e0
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2017-10-31 23:26:18 +11:00
Jesse Boyd
7e2a911530
Closes #1750 2017-10-31 23:26:08 +11:00
Jesse Boyd
7b04ec9ff3
Merge pull request #1746 from Gabscap/fix-location_equals
Fix Location.equals
2017-10-29 21:08:58 +11:00
Jesse Boyd
097159d606
Fix wrong sign height 2017-10-23 18:23:37 +11:00
Gabscap
04bfe73c29 Fix Location.equals 2017-10-20 14:23:35 +02:00
Jesse Boyd
d4614007ae
Fixes #1743 2017-10-14 20:52:35 +11:00
Jesse Boyd
9480c70655
Save world before download 2017-09-30 00:28:39 +10:00
Jesse Boyd
8b6cc7a193
* 2017-09-29 23:23:40 +10:00
Jesse Boyd
0d608245f5
Some tweaks / optimizations 2017-09-25 16:57:42 +10:00
Jesse Boyd
92f94ecedc
Tweaks
Use sign with plot schematic
Tweak world unloading
2017-09-24 00:13:05 +10:00
Jesse Boyd
2360782234
* 2017-09-23 20:09:34 +10:00
Jesse Boyd
1d20ae2777
allow air 2017-09-23 19:28:40 +10:00
Jesse Boyd
6b55b8cd67
Allow configuring a separate nonmember home position 2017-09-23 19:10:57 +10:00
Jesse Boyd
c645c4a6cb
* 2017-09-23 18:20:27 +10:00
Jesse Boyd
8e55860f77
Center plot schematic 2017-09-23 16:25:28 +10:00
Jesse Boyd
abfbeffbb0
Skip y=255, block when finding a free spot 2017-09-23 15:09:03 +10:00
Jesse Boyd
31908090b8
Buld height check 2017-09-23 14:07:52 +10:00
Jesse Boyd
d97ff94465
Various minor
Fix download world spawnpoint
Fix regenallroads on augmented world
Ensure all chunks have unloaded before unloading a world
2017-09-20 00:33:29 +10:00
Jesse Boyd
ce90b36d28
Wrap plot.schematic 2017-09-13 13:57:07 +10:00
Jesse Boyd
20d7a0eea2
Don't overwrite online player names from uuid cache 2017-09-06 19:49:57 +10:00
Jesse Boyd
24b3b60983
Might fix #1704 2017-09-01 23:11:37 +10:00
Jesse Boyd
17154ef1d5
idk why that wasn't working 2017-08-18 23:34:27 +10:00
Jesse Boyd
538e2a6002
Varios
Fixes #1697
Fixes #1689
2017-08-18 12:37:26 +10:00
Jesse Boyd
84a6a6daf4
Closes #1643 2017-08-10 17:24:59 +10:00
Jesse Boyd
a2324190bb
Fixes #1619 2017-08-10 17:18:35 +10:00
Jesse Boyd
af99c6a706
* 2017-08-10 17:15:03 +10:00
Jesse Boyd
c9cee8a4a8
Fixes #1504 2017-08-10 17:12:27 +10:00
Jesse Boyd
da51be20a3
Fix compile 2017-08-10 16:55:57 +10:00
Jesse Boyd
c808257b7c
Fixes #1668 2017-08-10 16:52:17 +10:00
Jesse Boyd
c3759f8963
Fixes #1672 2017-08-10 16:46:51 +10:00
Jesse Boyd
c36ef1d237
Fixes #1673
+ unrelated plotme conversion fix
2017-08-10 16:35:53 +10:00
Jesse Boyd
f49d43d6a3
Notify player when using an invalid purge argument 2017-08-10 16:11:50 +10:00
Jesse Boyd
cc1324f581
Fixes #1682 2017-08-09 15:45:27 +10:00
Jesse Boyd
ac9042bbe4
Various minor
New plugin updater and versioning
In game changelog
fix login teleporting
2017-08-09 15:05:13 +10:00
Jesse Boyd
b280644661 Delete build 2017-08-09 15:01:16 +10:00
Jesse Boyd
b924809c91
Fixes #1608 2017-08-03 23:13:04 +10:00
Jesse Boyd
a913983d99
Add plot leave 2017-07-25 06:39:59 +10:00
Jesse Boyd
3633576e03
Fix teleport for single plot worlds 2017-07-08 23:22:05 +10:00
Jesse Boyd
73318f23a1
Fixes #1660 2017-07-08 21:56:15 +10:00
Jesse Boyd
248751378b
Fixes #1661 2017-07-08 21:50:47 +10:00
Jesse Boyd
1918000668 Merge pull request #1645 from dordsor21/master
Lower TPS threshold please
2017-07-07 16:12:26 +10:00
Jesse Boyd
9037b74720
Closes #1659 2017-07-07 16:11:46 +10:00
Jesse Boyd
f6540bbfcb
bypass owner check for download 2017-06-29 15:38:37 +10:00
dordsor whitwell
507d0f19e4 Lower TPS threshold please 2017-06-24 16:11:52 +01:00
Jesse Boyd
355e16fe92
Ignore searching top block for teleportation 2017-06-09 17:43:46 +10:00
Jesse Boyd
2b1905889c
Minor sponge fix 2017-05-16 13:20:28 +10:00
Jesse Boyd
7ee67c8b41 Merge pull request #1599 from Gabscap/fix-min_height
Fix world.min_height setting
2017-05-03 14:58:16 +10:00
Gabscap
f8ab36b67c Fix world.min_height setting 2017-05-01 21:23:21 +02:00
Jesse Boyd
b5ef5df20d
* 2017-04-28 01:47:05 +10:00
Jesse Boyd
509b1f1c3d
Fixes #1593 2017-04-28 00:59:59 +10:00
Jesse Boyd
bfe98f3285
Some claiming fixes 2017-04-20 14:12:40 +10:00
Jesse Boyd
47915b8b86
Read sign on main thread 2017-04-20 01:09:52 +10:00
Jesse Boyd
3c110bb125
Fixes #1585 2017-04-18 22:55:04 +10:00
Jesse Boyd
a87fee1224 Merge pull request #1583 from manuelgu/patch-3
Added useSSL=false to JDBC connection URL
2017-04-17 22:28:20 +10:00
Jesse Boyd
757b9c695f
Fix compile 2017-04-17 19:11:55 +10:00
Jesse Boyd
193948d4fd
Fix claim 2017-04-17 11:56:10 +10:00
manuelgu
b616951e23 Added useSSL=false to JDBC connection URL
This is required according to MySQL 5.5.45+, 5.6.26+ and 5.7.6+.
2017-04-16 22:17:17 +02:00
Jesse Boyd
37977f1da4
Check database before claiming plot 2017-04-15 12:40:23 +10:00
Jesse Boyd
7eb7cd9b53
Ensure world loading occurs on the main thread 2017-04-11 01:49:01 +10:00
Jesse Boyd
ddfcc5b077
Player login tweaks 2017-04-10 09:06:44 +10:00
Jesse Boyd
9f6bf14649
Log when a plot is created/deleted 2017-04-09 17:10:23 +10:00
Jesse Boyd
f99994737c
Print error when failing to close database 2017-04-09 17:09:06 +10:00
Jesse Boyd
6e0ade4f63
Some sponge fixes 2017-04-07 08:25:08 +10:00
Jesse Boyd
c1a6c75ebe
* 2017-04-04 08:07:54 +10:00
Jesse Boyd
022372e9b7
Fixes #1534 + various
Auto world loading/unloading
Auto player teleporting on login
2017-04-04 07:59:36 +10:00
Jesse Boyd
3f54ba23c2
Fix world delete 2017-04-01 04:36:45 +11:00
The Gitter Badger
e8672df760 Add Gitter badge (#1565) 2017-03-27 12:03:33 -04:00
Jesse Boyd
5d6f4c6668
Some plot area restructuring 2017-03-23 11:10:29 +11:00
Jesse Boyd
a07ed4eafd
* 2017-03-18 00:50:43 +11:00
Jesse Boyd
5262ff665a
Fix door break 2017-03-18 00:49:41 +11:00
Jesse Boyd
1129a80329
Fixes #1510 2017-03-17 17:41:58 +11:00
Jesse Boyd
a628c5927f
Fixes #1560 2017-03-17 16:40:29 +11:00
Jesse Boyd
478ad9670b
Fixes #1476 2017-03-16 14:15:00 +11:00
Jesse Boyd
8e3407505a
Recover on database error
Might resolve #1476
2017-03-15 02:10:57 +11:00
Jesse Boyd
e208d7f72a
Fix mass purge 2017-03-15 01:28:02 +11:00
Jesse Boyd
b0df79bb80
Break up purge task 2017-03-15 00:16:27 +11:00
Jesse Boyd
411c75b219
Fixes #1556 Close #1555 2017-03-14 01:56:14 +11:00
Jesse Boyd
491cc50440
Fixes #1528 2017-03-13 18:45:37 +11:00
Jesse Boyd
e9723f5be1
Fixes #1532 2017-03-13 18:38:58 +11:00
Jesse Boyd
a015039dad
Fixes #1535
Set `misc_spawn_unowned`
2017-03-13 18:36:40 +11:00
Jesse Boyd
a0640a1e66
Fixes #1536 2017-03-13 18:12:38 +11:00
Jesse Boyd
0b6d2d3dd6
Fixes #1538 2017-03-13 18:07:48 +11:00
Jesse Boyd
ad11ad3472
Fixes #1517 2017-03-13 18:02:05 +11:00
Jesse Boyd
93717e670c
Use InteractBlockEvent
For some reason sponge was calling the event twice, the second with a
relative location, which makes no sense. Switching to a different event
works.
2017-03-13 17:34:44 +11:00
Jesse Boyd
38a33248e7
Send message on perm check 2017-03-13 09:04:40 +11:00
Jesse Boyd
52496af9a1
Fix road interact on sponge 2017-03-13 07:16:16 +11:00
Jesse Boyd
4d4950090d
Fix 1.7 block placer 2017-03-10 07:07:50 +11:00
Jesse Boyd
c8c144b6da
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2017-03-08 16:51:29 +11:00
Jesse Boyd
e94adb04ea
Add maven repo
closes #1394
2017-03-08 16:51:01 +11:00
Jesse Boyd
395c1c743f Merge pull request #1537 from HexagonMC/master
Fix plot teleport.
2017-03-06 15:40:28 +11:00
Simon
b1fb01303d Fix plot teleport.
Fixes https://github.com/IntellectualSites/PlotSquared/issues/1302
2017-02-20 20:29:43 +01:00
Jesse Boyd
aa7b770c03
tweak highest block check 2017-01-31 16:45:02 +11:00
Jesse Boyd
e7990a06e2
Check player name for invalid character first 2017-01-30 19:42:16 +11:00
Jesse Boyd
88f5e5b0bc
Sort player names 2017-01-15 22:51:54 +11:00
Jesse Boyd
47db330764
Fix title global flag 2017-01-13 08:05:13 +11:00
Jesse Boyd
35ebc8c830
Permission check fix 2017-01-13 07:22:28 +11:00
Jesse Boyd
686a6c499f
Fixes #1502 2017-01-11 07:53:53 +11:00
Jesse Boyd
cb6d839214
Possible fix for #1476
Changes database load to prefer the latest entry over older ones.

Some previous changes may fix connections dropping, which resulted in
(incorrect) fixes being attempted by the plugin.
2017-01-11 07:21:36 +11:00
Jesse Boyd
6af96f43d4
Optimize schematic paste 2016-12-31 17:23:46 +11:00
Jesse Boyd
e3eccfd476
Fix debugpaste 2016-12-31 17:23:38 +11:00
Jesse Boyd
15d4b6d34b
Bump spigot version 2016-12-29 07:23:51 +11:00
Jesse Boyd
c3e2421d51 Merge pull request #1492 from c7w/master
Update s_chinese.yml
2016-12-25 17:32:36 +11:00
c7w
f7793f027c Update s_chinese.yml 2016-12-25 14:30:32 +08:00
Jesse Boyd
6ec96870c0
Fix SO 2016-12-23 15:33:19 +11:00
Jesse Boyd
a843203ca3
Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java
2016-12-15 17:42:51 +11:00
Jesse Boyd
3240fc9559
Exit plot on unclaim
Fixes #1471
2016-12-15 17:37:26 +11:00
Jesse Boyd
5fd1486cec Merge pull request #1478 from EvilOlaf/patch-2
Update ISSUE_TEMPLATE.md
2016-12-13 01:44:37 +11:00
Very Evil Olaf
d648148f51 Update ISSUE_TEMPLATE.md 2016-12-12 15:42:00 +01:00
MattBDev
d554dab8c8 Fix potential NPE with claiming 2016-12-10 14:33:48 -05:00
MattBDev
9ad45750ee Unclaiming a plot should call plotExit() 2016-12-09 20:58:05 -05:00
MattBDev
a554ae5633 Potential fix for commands 2016-12-09 16:58:32 -05:00
Jesse Boyd
7b1c4a5042
Check border when claiming a plot
Also fixes #1467
2016-12-10 01:09:07 +11:00
Jesse Boyd
9fc464e896
Shorter border teleportation 2016-12-10 00:44:42 +11:00
Jesse Boyd
bec11b244e
Use the correct plot id 2016-12-10 00:26:40 +11:00
Jesse Boyd
dc94418b51
Only expand border to current plot. 2016-12-09 23:52:48 +11:00
Jesse Boyd
72ab10c079
remove debug 2016-12-03 23:08:10 +11:00
Jesse Boyd
f50d32f06b
* 2016-12-02 17:17:16 +11:00
Jesse Boyd
6cc744a2e6
Fixes #1444 2016-12-02 17:16:19 +11:00
MattBDev
e40dc37f89 Fix versioning messup. 2016-12-01 21:56:19 -05:00
Jesse Boyd
7e34d9e20a
Fix title logic 2016-11-30 21:26:52 +11:00
Jesse Boyd
c891abce09
Allow added players to use frost walker
Properly fixes #1438
2016-11-30 20:46:48 +11:00
Jesse Boyd
2b561f2efa
Rename to ice-form 2016-11-30 19:06:03 +11:00
Jesse Boyd
dea0a452df
Add fading 1.11 titles 2016-11-30 16:28:50 +11:00
Jesse Boyd
81418b07a8
Fixes #1438 (unless other things call this event) 2016-11-30 16:15:20 +11:00
Jesse Boyd
a3c1ad3ec8
Fixes #1449 2016-11-30 16:10:08 +11:00
Jesse Boyd
7c6c19ba63
Fixes #740 2016-11-30 16:07:16 +11:00
Jesse Boyd
2e23ae0811
Fixes #1243 2016-11-30 16:00:47 +11:00
Jesse Boyd
28e7f5bc08
Fixes #1349
Non standard plot managers/areas not supported
2016-11-30 15:57:24 +11:00
Jesse Boyd
7a1417dc56
Fixes #1415 2016-11-30 15:45:28 +11:00
Jesse Boyd
e7fa9e01be
Fixes #1419 2016-11-30 15:43:23 +11:00
Jesse Boyd
93414d54c1
Fixes #1453 2016-11-30 15:41:08 +11:00
Jesse Boyd
5642fd3899
Fixes #1359
plots.chat.color
and
PLOT_CHAT_SPY_FORMAT
2016-11-30 15:36:13 +11:00
Jesse Boyd
f3d950f6e1
Fix flame enchant damaging entities 2016-11-30 15:03:48 +11:00
Jesse Boyd
95f8aaa2fe
this could be here? 2016-11-30 13:10:36 +11:00
Jesse Boyd
878010255c
Java 9 2016-11-28 18:02:03 +11:00
MattBDev
8edc357d01 Fixed #1448 2016-11-27 01:26:06 -05:00
MattBDev
588639d9c2 3.5.1 Start 2016-11-27 01:08:35 -05:00
MattBDev
ff401b65c4 3.5.0 Release 2016-11-26 18:02:39 -05:00
MattBDev
11913bfbe5 Fix compile issue 2016-11-26 17:53:44 -05:00
MattBDev
62b353f82d Various Sponge changes
- many improvements
- inventory utilities broke when updating to Sponge API 6.0.0
2016-11-26 16:49:13 -05:00
MattBDev
8d442f58d4 Fixes #1445 2016-11-26 12:05:08 -05:00
MattBDev
5cbd2f44bd Update Sponge Gradle 2016-11-26 11:55:59 -05:00
MattBDev
dc673f9715 Fixed #1440 , Fixed #1446 2016-11-26 11:55:38 -05:00
Jesse Boyd
deb5441bcf
*Fix compile error 2016-11-24 11:05:28 +11:00
Jesse Boyd
8ebf71c87f
DB fix 2016-11-24 10:19:00 +11:00
Jesse Boyd
9fd53af483
Add world argument 2016-11-23 15:47:18 +11:00
Jesse Boyd
fb729df59e
Setting to sort plots by area 2016-11-23 15:36:25 +11:00
SupremeMortal
ce6e1be13e Fix maven dependencies (#1439)
* Fixes

* Fix wrong version
2016-11-21 09:59:11 -05:00
MattBDev
e126054053 Fixes #1429 Removes duplicate aliases. 2016-11-20 22:29:14 -05:00
MattBDev
77281017d4 Fixes #1428 , Fixes #1431 2016-11-20 22:24:27 -05:00
Jesse Boyd
e0208aa369
Fix plot help category pagination 2016-11-18 10:49:03 +11:00
Jesse Boyd
fdc42a3d5c
Seems the new spigot 1.11 sqlite driver has issues parsing timestamps, no idea why. 2016-11-18 09:08:41 +11:00
Jesse Boyd
3070557a3a
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-11-13 22:18:11 +11:00
Jesse Boyd
2ec0b55482
Fix database lock error 2016-11-13 22:17:17 +11:00
Jesse Boyd
10dd9b6371 Merge pull request #1424 from c7w/master
translation
2016-11-13 06:41:25 +11:00
c7w
1ac0a7dad0 translation
translation of chinese
2016-11-12 12:52:43 +08:00
Jesse Boyd
f8b1fcffa1
Fix worldedit mask area 2016-11-12 00:14:12 +11:00
Jesse Boyd
17762f5ae7
Tweak delete message 2016-11-09 00:13:46 +11:00
Jesse Boyd
1d7cdde84a
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-11-02 04:28:11 +11:00
Jesse Boyd
c950b0021f
Notify inbox permission 2016-11-02 04:27:52 +11:00
Very Evil Olaf
e4bc2b30b1 Update ISSUE_TEMPLATE.md (#1409) 2016-10-28 10:15:38 -04:00
MattBDev
e0c4c944bb Merge remote-tracking branch 'origin/master' 2016-10-26 23:01:01 -04:00
MattBDev
dd09ef18e6 Add missing gradle batch
Signed-off-by: MattBDev <mattbdev@outlook.com>
2016-10-26 23:00:43 -04:00
Jesse Boyd
68011f43cd
Fixes #1390 2016-10-21 03:51:27 +11:00
Jesse Boyd
93c4854454
Add misc-interact flag 2016-10-18 05:03:14 +11:00
Jesse Boyd
e594227d95
Fix some height issues 2016-10-14 16:56:28 +11:00
Jesse Boyd
d6be5703ae
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-10-14 15:14:35 +11:00
Jesse Boyd
c97544d083
Minor fixes 2016-10-14 15:14:08 +11:00
MattBDev
a05fd2dd11 Fix #1386
Signed-off-by: MattBDev <mattbdev@outlook.com>
2016-10-10 00:18:35 -04:00
Jesse Boyd
5978c9c3c0
Fix center 2016-10-03 00:56:27 +11:00
Jesse Boyd
5d3e096501
*Fix the toggle 2016-10-03 00:56:26 +11:00
Jesse Boyd
39e99c0593 Merge pull request #1381 from filoghost/patch-1
Fix permission checks being ignored
2016-10-02 14:08:22 +11:00
filoghost
cd33aaa1b6 Fix permission checks being ignored 2016-10-01 21:35:57 +02:00
Jesse Boyd
0244c0241c
Trim deletes expired plots 2016-10-01 20:17:50 +10:00
Jesse Boyd
5ed2190cb3 Fixes #1369 2016-09-30 23:32:49 +10:00
Jesse Boyd
c533f0bae9 Fix area removal 2016-09-30 17:05:18 +10:00
Jesse Boyd
cd2b6c8ccc Fixes #1379 2016-09-30 17:04:06 +10:00
Jesse Boyd
6f2c7de0ff Minor fix to conversion 2016-09-30 16:46:10 +10:00
Jesse Boyd
62373c0737 * 2016-09-30 16:15:15 +10:00
Jesse Boyd
499120963a Streamline PlotMe conversion
Use reflection to disable PlotMe and forward DefaultGenerator to
PlotSquared
Fix border material copying from plotme config
You no longer need to delete the PlotMe jar for conversion
Fix some outdated messages
2016-09-30 16:14:35 +10:00
Jesse Boyd
f1d581a8d8 Fixes #1377 2016-09-30 15:29:50 +10:00
Jesse Boyd
6074fc8033 Nukkit generator fixes 2016-09-30 14:26:20 +10:00
Jesse Boyd
e4d7270c28 Fix some merged plot events 2016-09-30 03:30:34 +10:00
Jesse Boyd
b6df07f723 Add snow-form flag 2016-09-27 01:38:59 +10:00
Jesse Boyd
177b33154f Multiple
Fixes #1362
Fixes border id for PlotMe converter
2016-09-27 00:56:39 +10:00
Jesse Boyd
6bf2fbcfcf Command tweaks 2016-09-26 18:33:27 +10:00
Jesse Boyd
12f8861d07 Various
externalize strings
plotme conversion fixes
2016-09-26 18:31:08 +10:00
Jesse Boyd
c99e23bd3c Fixes #1367 2016-09-25 18:48:38 +10:00
Jesse Boyd
1b6d08b3fe Fixes #1365 2016-09-25 18:43:53 +10:00
Jesse Boyd
3b4490c1c6 Fixes #1366 2016-09-25 18:42:05 +10:00
Jesse Boyd
04c011164a Add near cmd 2016-09-25 18:06:20 +10:00
Jesse Boyd
86b776f742 Nukkit perms 2016-09-25 16:49:51 +10:00
Jesse Boyd
61022b717a Fixes #1360 2016-09-21 13:42:59 +10:00
Jesse Boyd
9e5af7a642 Possible fix for redstone in merged plots 2016-09-20 23:49:22 +10:00
Jesse Boyd
364b4347d1 Fix area id parsing 2016-09-19 14:18:47 +10:00
Jesse Boyd
d89274ce09 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java
2016-09-17 16:03:57 +10:00
Jesse Boyd
264114332b Let generator be up to the implementation 2016-09-17 16:02:05 +10:00
MattBDev
a4363bdb27 Fix #1355
There is the possibility this will cause issues with sponge

Signed-off-by: MattBDev <mattbdev@outlook.com>
2016-09-14 19:27:30 -04:00
MattBDev
8e7e5dcb25 Cleanup
Signed-off-by: MattBDev <mattbdev@outlook.com>
2016-09-14 12:16:22 -04:00
Jesse Boyd
56227a6d7d Fixes #1351 2016-09-14 10:21:14 +10:00
Jesse Boyd
63259ec269 Merge pull request #1352 from MisterErwin/master
A (possible) fix to #1351
2016-09-14 10:17:11 +10:00
Jesse Boyd
0286a7b046 Fixes #1131 2016-09-14 10:12:53 +10:00
MattBDev
b6dac54677 Code cleaning and Gradle Update
Updated gradle wrapper to 3.0
Updated Gradle files for Nukkit
Added/cleaned minor Nukkit code
Removed duplicate TitleManagement code

Signed-off-by: MattBDev <mattbdev@outlook.com>
2016-09-13 18:10:01 -04:00
Alexander Lüpges/MisterErwin
bf1d487508 A (possible) fix to #1351 2016-09-12 17:05:13 +02:00
Jesse Boyd
a95b68b73c Add villager-interact flag 2016-09-09 15:17:37 +10:00
Jesse Boyd
85ff8bf639 Minor tweaks 2016-09-07 00:28:01 +10:00
Jesse Boyd
0557671b80 Recover from third party generator error 2016-09-04 14:22:01 +10:00
Jesse Boyd
d75ab130da Sponge fixes 2016-09-02 15:58:24 +10:00
Jesse Boyd
6a12a6ba64 print chat to console
Fixes #1339
2016-09-02 15:47:19 +10:00
Jesse Boyd
22901bf9f2 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-09-01 16:57:52 +10:00
Jesse Boyd
07ee19b4bb Fixes #1337 2016-08-31 19:09:17 +10:00
MattBDev
27c21b9ab6 Fix #1321 2016-08-30 21:50:52 -04:00
Jesse Boyd
da7a12bc00 Fixes #1234 2016-08-29 16:21:14 +10:00
Jesse Boyd
3b73b2e9d8 Fix grant check 2016-08-29 15:33:26 +10:00
Jesse Boyd
970c80cb15 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-08-29 15:01:27 +10:00
Jesse Boyd
dd665ed9ce Fence rotation 2016-08-29 15:01:19 +10:00
Jesse Boyd
572da7d436 Merge pull request #1332 from manuelgu/patch-2
Might resolve #1331
2016-08-29 14:41:48 +10:00
Jesse Boyd
ab05b026e9 Merge pull request #1335 from Herocraft/fix/vault-repo
Switch Vault repository to the real one
2016-08-29 12:19:48 +10:00
kashike
2fcb59f8cf Switch Vault repository to the real one 2016-08-28 18:26:11 -07:00
manuelgu
20250bc989 Might resolve #1331
Wasn't able to reproduce the issue
2016-08-28 20:14:58 +02:00
Jesse Boyd
5e4798165b Merge pull request #1330 from MinelinkNetwork/fix-pom
Fix Spigot artifact in POM
2016-08-28 18:26:57 +10:00
Byteflux
7fc3fb097e Fix Spigot artifact in POM
Use the correct groupId, artifactId and version of Spigot dependency
installed by BuildTools
2016-08-28 01:13:21 -07:00
Jesse Boyd
3a08e5c091 Merge pull request #1326 from SupremeMortal/SupremeMortal-patch-1
Update Non-existent Repo
2016-08-28 00:52:04 +10:00
SupremeMortal
50770a78d7 Fixed mistake 2016-08-27 14:09:03 +01:00
SupremeMortal
1266eed86a Add Replacement Repo For Vault 2016-08-27 14:08:35 +01:00
SupremeMortal
c0996299b4 Remove non-existent Repo
"nexus.theyeticave.net" does not exist anymore.
2016-08-27 14:03:41 +01:00
Jesse Boyd
90d48b2cd0 Fixes #1289 2016-08-26 13:54:22 +10:00
Jesse Boyd
a95d18499e Fixes #1285 2016-08-26 13:19:42 +10:00
Jesse Boyd
61d00e51ef Fixes #1303 2016-08-26 03:02:50 +10:00
Jesse Boyd
b5349e16f0 Fixes #1305
Just teleports the player further back
Combine move/tp since tp extends move
2016-08-26 02:31:50 +10:00
Jesse Boyd
a801127036 Merge pull request #1301 from MisterErwin/master
Calling events when players are removed from plots & correct calling of Member & Trusted events
2016-08-26 02:02:40 +10:00
Jesse Boyd
2806f8b20c Fixes #1307 2016-08-26 01:36:35 +10:00
Jesse Boyd
7d11147836 Add Lazzy "Offline -> Offline Lowercase" conversion 2016-08-20 21:40:54 +10:00
Matt
74a6df1fa7 Update README.md 2016-08-20 00:26:53 -04:00
Jesse Boyd
bc0c0abe7e Fix NPE 2016-08-19 12:16:13 +10:00
MattBDev
56907e4580 Version Bump
3.4.6-SNAPSHOT
2016-08-18 10:38:06 -04:00
Jesse Boyd
005e13a216 Maybe #1239 2016-08-17 18:30:58 +10:00
Jesse Boyd
3558105789 Fix default flags NPE 2016-08-17 15:08:01 +10:00
Jesse Boyd
f651607d2f Might work? 2016-08-17 12:22:45 +10:00
Jesse Boyd
6b95e57d9e Merge pull request #1313 from MinelinkNetwork/blocked-cmds
Only show blocked-cmds message when event is cancelled
2016-08-17 12:13:27 +10:00
Byteflux
98d0819383 Only show blocked-cmds message when event is cancelled 2016-08-16 19:09:02 -07:00
Jesse Boyd
30da060f83 Potential fix for schematic placement on clear 2016-08-16 15:53:26 +10:00
Jesse Boyd
e4408d56ec *And this 2016-08-16 14:32:31 +10:00
Jesse Boyd
f07ac646f3 Possible fix for greeting spam 2016-08-15 09:31:03 +10:00
MattBDev
ef3380dc0a Merge remote-tracking branch 'origin/master' 2016-08-12 15:04:18 -04:00
MattBDev
749ab83e5d Move permission check out of loop
See #1307
2016-08-12 15:04:11 -04:00
Jesse Boyd
daea9cf60d Allow teleportation for console 2016-08-10 12:33:18 +10:00
MattBDev
2f74368879 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-08-09 12:45:45 -04:00
MattBDev
63d4476d97 Fix #1181 2016-08-09 12:40:38 -04:00
Jesse Boyd
db69da5b07 *Wrong runnable 2016-08-09 08:52:31 +10:00
Alex
634802ef98 Got rid of that auto-optimize-imports option 2016-08-08 23:20:31 +02:00
Alex
37e4a652dd Now calling the respective events when a user is removed from a plot.
And switched the event calling of adding Helpers and Trusted players. (Correct me if that was wrong)
2016-08-08 22:45:08 +02:00
MattBDev
d22f7b8781 Merge remote-tracking branch 'origin/master' 2016-08-08 14:03:17 -04:00
MattBDev
112da17614 Squashed commit of the following:
commit 91c78407cd82501954460e3eec3fdca06dbf7184
Author: Jesse Boyd <jessepaleg@gmail.com>
Date:   Sun Aug 7 11:29:59 2016 +1000

    Use a queue for expiry

commit 395d6364be702558c3c30cbe0273d7e466a41507
Author: Jesse Boyd <jessepaleg@gmail.com>
Date:   Sun Aug 7 04:43:41 2016 +1000

    Cache on fail as well

commit facd43700d48686d071061f41667d969f4ce8388
Author: Jesse Boyd <jessepaleg@gmail.com>
Date:   Sun Aug 7 04:00:50 2016 +1000

    Cache entity count every second

commit 1ae694ff5b83ffaff51d66d45499773fbb158902
Author: Jesse Boyd <jessepaleg@gmail.com>
Date:   Sun Aug 7 03:52:37 2016 +1000

    Tweak entity counting

commit c99dd1e74aae450c2a3c24087155285c195fd587
Author: Jesse Boyd <jessepaleg@gmail.com>
Date:   Sat Aug 6 00:10:11 2016 +1000

    Needs sponge builds

commit f408ac82be0f7186c58963cc794b081400b39e53
Author: Alexander Söderberg <Sauilitired@users.noreply.github.com>
Date:   Fri Aug 5 12:13:39 2016 +0200

    Update README.md

commit 9b95990ba60181bc1252b61b651e51e7e67a8f5e
Author: Alexander Söderberg <Sauilitired@users.noreply.github.com>
Date:   Thu Aug 4 16:50:37 2016 +0200

    Update this here as well
2016-08-08 14:02:25 -04:00
Jesse Boyd
91c78407cd Use a queue for expiry 2016-08-07 11:29:59 +10:00
Jesse Boyd
395d6364be Cache on fail as well 2016-08-07 04:43:41 +10:00
Jesse Boyd
facd43700d Cache entity count every second 2016-08-07 04:00:50 +10:00
Jesse Boyd
1ae694ff5b Tweak entity counting 2016-08-07 03:52:37 +10:00
Jesse Boyd
c99dd1e74a Needs sponge builds 2016-08-06 00:10:11 +10:00
Alexander Söderberg
f408ac82be Update README.md 2016-08-05 12:13:39 +02:00
Alexander Söderberg
9b95990ba6 Update this here as well 2016-08-04 16:50:37 +02:00
MattBDev
77fb329c9e Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-07-31 21:26:18 -04:00
Jesse Boyd
a13b9fb31b flag tix 2016-08-01 11:20:06 +10:00
MattBDev
ea3306d070 Fix #1034 2016-07-31 20:17:35 -04:00
Jesse Boyd
bcbcd6d916 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-07-31 18:14:12 +10:00
Jesse Boyd
415c6fb0d4 Fixes #1283 2016-07-31 18:14:06 +10:00
MattBDev
e801c6d7e8 Merge branch '3.4.5' 2016-07-31 00:16:37 -04:00
Jesse Boyd
409456e895 Minor sponge fix 2016-07-31 09:16:58 +10:00
MattBDev
e8f4eae6f7 Merge remote-tracking branch 'origin/3.4.5' into 3.4.5
# Conflicts:
#	Sponge/build.gradle
#	Sponge/src/main/java/com/plotsquared/sponge/util/SpongeSetupUtils.java
2016-07-29 21:45:34 -04:00
MattBDev
c8419f4a4a Added more Java 8 warnings 2016-07-29 21:40:23 -04:00
MattBDev
09994724db Fix #1277 2016-07-29 21:40:02 -04:00
MattBDev
610e204d12 Fix #1281 , Fix #1282 , and Sponge gradle 2016-07-29 12:47:42 -04:00
MattBDev
1f341e6ba9 Merge remote-tracking branch 'origin/master' into 3.4.5
# Conflicts:
#	Sponge/src/main/java/com/plotsquared/sponge/SpongeMain.java
#	Sponge/src/main/java/com/plotsquared/sponge/generator/SpongeAugmentedGenerator.java
#	Sponge/src/main/java/com/plotsquared/sponge/util/SpongeSetupUtils.java
#	Sponge/src/main/java/com/plotsquared/sponge/util/SpongeUtil.java
#	Sponge/src/main/java/com/plotsquared/sponge/util/block/GenChunk.java
#	build.gradle
2016-07-29 12:25:11 -04:00
Jesse Boyd
ffddf5c187 Fix sponge generator cast 2016-07-29 12:12:28 +10:00
MattBDev
b5ec6232f9 Sponge Fixes and minor changes. 2016-07-25 22:25:15 -04:00
MattBDev
34c2da55ca Change Sponge method behavior 2016-07-25 22:25:15 -04:00
MattBDev
33ec80c2cb Fix Sponge generation casting 2016-07-25 22:25:15 -04:00
MattBDev
48064da1ee Fixed deny-teleport flag 2016-07-25 22:25:15 -04:00
MattBDev
adc021109f Added Polar Bear where missing 2016-07-25 22:25:15 -04:00
Jesse Boyd
d23d8c2fd8 *should use this cause instead 2016-07-25 22:25:15 -04:00
Jesse Boyd
3498f309e8 Minor sponge fixes 2016-07-25 22:24:31 -04:00
Jesse Boyd
0b5177f192 Minor uuid cache changes 2016-07-25 22:23:49 -04:00
Jesse Boyd
07dc6a46fb Remove metrics depend 2016-07-25 22:23:19 -04:00
Jesse Boyd
0b19cc7d9d Possible fix + add guest-gamemode flag 2016-07-25 22:23:19 -04:00
Jesse Boyd
4e019ab796 UUID cache changes 2016-07-25 22:23:19 -04:00
MattBDev
b2fdcad317 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared into 3.4.5
# Conflicts:
#	Sponge/src/main/java/com/plotsquared/sponge/util/SpongeUtil.java
#	Sponge/src/main/java/com/plotsquared/sponge/util/block/GenChunk.java
2016-07-25 22:08:54 -04:00
MattBDev
80ea3e9ce7 Sponge Fixes and minor changes. 2016-07-25 20:00:59 -04:00
MattBDev
5f8c77a6cd Change Sponge method behavior 2016-07-25 18:43:11 -04:00
MattBDev
290e5c68dc Fix Sponge generation casting 2016-07-25 18:42:31 -04:00
MattBDev
5d92701100 Fixed deny-teleport flag 2016-07-25 18:04:17 -04:00
MattBDev
1a86d5fb9e Added Polar Bear where missing 2016-07-25 01:19:29 -04:00
Jesse Boyd
30d18c917d *should use this cause instead 2016-07-25 09:54:35 +10:00
Jesse Boyd
b91eab2f0c Minor sponge fixes 2016-07-25 09:47:49 +10:00
Jesse Boyd
770b9be160 Minor uuid cache changes 2016-07-25 09:23:20 +10:00
Jesse Boyd
14b2b11bf3 Remove metrics depend 2016-07-25 08:09:57 +10:00
Jesse Boyd
975a5765c1 Possible fix + add guest-gamemode flag 2016-07-25 08:02:17 +10:00
MattBDev
2b9c2959cf Merge branch '3.4.5' of https://github.com/IntellectualSites/PlotSquared into 3.5.0 2016-07-24 17:45:34 -04:00
Jesse Boyd
07977ac2ce UUID cache changes 2016-07-25 07:44:47 +10:00
MattBDev
9e5ac80435 Merge remote-tracking branch 'origin/3.4.5' into 3.4.5 2016-07-24 17:42:21 -04:00
MattBDev
dda6849412 Fix sponge compile 2016-07-24 17:42:03 -04:00
MattBDev
85d6e42462 Merge branch '3.4.5' of https://github.com/IntellectualSites/PlotSquared into 3.5.0 2016-07-24 17:27:41 -04:00
Alexander Söderberg
b1ee223b0a Merge pull request #1271 from manuelgu/patch-1
Make debug output useful
2016-07-24 07:51:45 +02:00
manuelgu
98e865cdf0 Make debug output useful 2016-07-23 12:50:39 +02:00
MattBDev
8b084839fd Fix #1261 2016-07-19 10:22:50 -04:00
MattBDev
c1d4c481fb Fix #1244 2016-07-17 23:20:31 -04:00
MattBDev
269e409e3e Version Bump 2016-07-17 23:19:37 -04:00
MattBDev
8538170cba Metrics 2016-07-16 22:51:49 -04:00
Jesse Boyd
76bce7c0ef Catch CommandException 2016-07-14 20:29:11 +10:00
Jesse Boyd
ba568a3f60 Recover from invalid flag value 2016-07-14 00:28:46 +10:00
Jesse Boyd
a43430b722 Fix NPE for null arg 2016-07-13 00:14:26 +10:00
Jesse Boyd
e2c57cea52 . 2016-07-12 23:56:59 +10:00
Jesse Boyd
ca776b2912 Fixes #1226 2016-07-12 22:12:14 +10:00
Jesse Boyd
e859a7f56c Change to interact perm, not build 2016-07-11 20:27:25 +10:00
Jesse Boyd
ad2db9b836 Merge pull request #1245 from manuelgu/fix/CentreCenterName
Add additional alias for /p middle
2016-07-10 22:58:54 +10:00
manuelgu
279084b043 Add additional alias for /p middle
http://grammarist.com/spelling/center-centre/
2016-07-09 09:18:55 +02:00
MattBDev
8b0e59209c Remove getServerName() 2016-07-05 23:43:08 -04:00
MattBDev
ca8b82dcbe Version Bump 2016-07-05 23:39:38 -04:00
MattBDev
cf5d2a5e86 Entity Fix and Gradle changes 2016-07-01 17:13:49 -04:00
Jesse Boyd
b9ad75ad84 Add teleport flag 2016-06-29 21:22:55 +10:00
Jesse Boyd
185352d3cf Fixes #1229 2016-06-29 15:23:10 +10:00
Jesse Boyd
f4fe762135 * 2016-06-28 20:21:50 +10:00
Jesse Boyd
06682b18a5 Fix compile
Recover on unknown command error
Fixes #1224
Close #1213 (fixed elsewhere)
Fixes #1212
2016-06-28 19:55:51 +10:00
Jesse Boyd
f8e97f14d6 Fix end crystal spawn cap 2016-06-28 02:03:23 +10:00
MattBDev
a579df00db Merge remote-tracking branch 'origin/master' 2016-06-27 10:14:28 -04:00
Jesse Boyd
29a0b68dcb Fix currently online for seen info. 2016-06-27 23:59:38 +10:00
MattBDev
d2581bf38b Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-06-27 09:58:17 -04:00
Jesse Boyd
817a5bc16e Various
Fix compatibility with bukkit 1.5
Recover on failed fancy message initialization
Fix /2 remove *
2016-06-27 18:38:14 +10:00
Jesse Boyd
047f9a75b9 Fix #1222 2016-06-27 17:45:19 +10:00
Jesse Boyd
96d0bb0e5e bump pom version 2016-06-26 17:08:54 +10:00
Jesse Boyd
7da0b9877f Fixes #1221 (the NPE at least) 2016-06-26 17:07:46 +10:00
Jesse Boyd
f20ef15774 Revert creature spawn message + change expire to seen 2016-06-26 04:30:12 +10:00
MattBDev
3a973342ae Merge remote-tracking branch 'origin/master' 2016-06-24 10:59:18 -04:00
MattBDev
6e25aab51f Cleanup some docs. 2016-06-24 10:56:38 -04:00
Jesse Boyd
a49492aae3 Fix roadregen 2016-06-24 16:16:22 +10:00
Jesse Boyd
dbe965e901 init script engine on get 2016-06-24 15:41:34 +10:00
MattBDev
2c82d1106a Fixed kick message 2016-06-23 23:19:02 -04:00
MattBDev
5b9dc59abf Updates to docs, code style tweaks, and some code optimizations 2016-06-23 20:12:17 -04:00
Jesse Boyd
b587b430b8 #1211 2016-06-24 05:30:26 +10:00
Jesse Boyd
8fd2599686 Fixes #1211 2016-06-24 02:20:21 +10:00
Jesse Boyd
56000d60e7 Just in case 2016-06-23 13:14:29 +10:00
Jesse Boyd
1643399fc6 Alternatives for setowner none if the username is taken 2016-06-23 13:11:26 +10:00
MattBDev
532fd09800 Merge remote-tracking branch 'origin/master' 2016-06-22 23:10:15 -04:00
Jesse Boyd
e6387419f7 Potential fix for plot biome (untested) 2016-06-23 13:09:56 +10:00
MattBDev
30d49880b6 Fix #1208 NPE 2016-06-22 16:31:04 -04:00
Jesse Boyd
16d191db2c Fixes /plot kick * 2016-06-23 04:08:06 +10:00
MattBDev
7dc7714261 Update Gradle to 2.14 2016-06-22 12:31:25 -04:00
Jesse Boyd
9e1f6d8748 Closes #1209 2016-06-22 13:33:32 +10:00
Jesse Boyd
7fb2631421 Cast to string if necessary 2016-06-21 14:23:04 +10:00
Jesse Boyd
718831e8e0 * 2016-06-21 14:10:20 +10:00
Jesse Boyd
df4585a847 Check args for grant 2016-06-21 13:38:08 +10:00
Jesse Boyd
88d8339cfd fix other NPE 2016-06-21 13:32:28 +10:00
Jesse Boyd
e08db3d12b Check teleportation on command location prefix 2016-06-21 03:02:41 +10:00
Jesse Boyd
2ff4e07919 Setup border on world creation 2016-06-21 01:13:09 +10:00
Jesse Boyd
f6fec56677 Potential fix for terrain 3 worlds. 2016-06-21 00:29:39 +10:00
Jesse Boyd
3fabfa10d7 Add liquid-flow flag 2016-06-20 22:48:04 +10:00
Jesse Boyd
a2ca9a52ea Merge pull request #1205 from manuelgu/fix/deadlink
Remove dead link
2016-06-20 18:52:35 +10:00
Jesse Boyd
e5e3600206 Why were these restricted to players? 2016-06-20 18:52:00 +10:00
manuelgu
7ad50b6314 Remove dead link 2016-06-20 10:49:40 +02:00
Jesse Boyd
01d508edf4 Fix remove * 2016-06-20 15:08:56 +10:00
Jesse Boyd
9fa28e1179 * 2016-06-20 01:50:43 +10:00
Jesse Boyd
c3dd28caeb Fix clear done flag requirements 2016-06-20 01:49:35 +10:00
Jesse Boyd
0888940307 bump version 2016-06-20 01:37:27 +10:00
Jesse Boyd
ce7468e63a Fix economy NPE 2016-06-20 00:52:05 +10:00
Jesse Boyd
f5e7d08ace Allow duplicates after 5s 2016-06-19 16:14:13 +10:00
Jesse Boyd
3ce225c044 Bump version 2016-06-19 15:51:46 +10:00
Jesse Boyd
c2f10a7065 Update desc for debugpaste 2016-06-19 13:44:14 +10:00
Jesse Boyd
8512adf9d6 Fix for augmented 2016-06-19 13:01:30 +10:00
Alexander Söderberg
b2c885e8d1 Merge pull request #1197 from manuelgu/patch-1
Fix #1196
2016-06-19 00:15:20 +02:00
manuelgu
5eabf863d6 Fix #1196 2016-06-19 00:11:21 +02:00
Jesse Boyd
cff30a1db4 Fix scripting initialization 2016-06-18 16:29:51 +10:00
Jesse Boyd
ab51d27e49 Remove pointless thread dump 2016-06-18 15:01:42 +10:00
Jesse Boyd
6375922808 I can't count + fix variable scope 2016-06-18 13:54:35 +10:00
Jesse Boyd
29ce4af350 Fixes #987 and #299 (untested)
Example usage:
claim: 50*{arg}
2016-06-18 13:43:34 +10:00
Jesse Boyd
3ced832b80 Fix biome stripes (whoops) 2016-06-18 13:15:50 +10:00
Jesse Boyd
91c742c141 Fixes #590 2016-06-18 13:13:36 +10:00
Jesse Boyd
232091454a Fix augmented 2016-06-18 12:44:56 +10:00
Jesse Boyd
600d060b6e Fix sponge compile issue 2016-06-17 22:05:06 +10:00
Jesse Boyd
081081b36e Fixes #1063 2016-06-17 15:42:23 +10:00
Jesse Boyd
4319300b34 Fixes #1126 2016-06-17 13:46:13 +10:00
Jesse Boyd
b2b90a8d17 Fixes #1064 2016-06-17 13:33:47 +10:00
Jesse Boyd
480453b716 Various
Fixes #1177
Additional check for left click with milk on adult entity
Add setting for enabling persistent meta
Only set fly persistent meta if it differs from the current gamemode fly
mode.
2016-06-16 20:16:48 +10:00
Jesse Boyd
28ad14500a Fixes #1172 2016-06-16 17:59:39 +10:00
Jesse Boyd
2bbfec1a32 Fix load / flush queue before sending message 2016-06-16 17:31:02 +10:00
Jesse Boyd
b2997b7c7b Don't send duplicate messages 2016-06-16 10:31:33 +10:00
Sauilitired
472aadcd01 Add suggestion for flags when invalid flag name was given :] 2016-06-16 02:30:16 +02:00
Sauilitired
5b103d49c0 Fixes #1171 2016-06-16 02:08:01 +02:00
MattBDev
ae5e15e434 Fix invalid record type error 2016-06-13 15:05:38 -04:00
Jesse Boyd
341967cbfc Reclassify armor stand as vehicle 2016-06-13 15:35:33 +10:00
Jesse Boyd
b238bdbd21 Fix armor stand / hangings being considered vehicles 2016-06-13 15:32:13 +10:00
Jesse Boyd
4f0ede646e Chat / Merge blocks placer / generator 2016-06-13 14:47:50 +10:00
Jesse Boyd
506455ae40 Remove debug 2016-06-12 15:33:56 +10:00
Jesse Boyd
15c7957d0e Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-06-12 15:27:23 +10:00
Jesse Boyd
6165469e76 Fix scripting 2016-06-12 15:26:58 +10:00
MattBDev
a7087f314f Merge remote-tracking branch 'origin/master' 2016-06-11 19:25:27 -04:00
MattBDev
0cfef63376 Fix backwards compatibility 2016-06-11 19:25:13 -04:00
Jesse Boyd
bfd9b53555 Update pom 2016-06-11 11:58:11 +10:00
MattBDev
5bdb2263dc CheckStyle code tweaks 2016-06-10 14:04:55 -04:00
MattBDev
76bcb76905 Merge remote-tracking branch 'origin/master' 2016-06-10 13:31:41 -04:00
MattBDev
93deebf4ca 1.10 fixes 2016-06-10 13:31:28 -04:00
MattBDev
482f4d6815 Modify Setting and Storage class names. 2016-06-10 13:00:34 -04:00
Jesse Boyd
0d47e4599f Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-06-09 18:06:08 +10:00
Jesse Boyd
f41c7dc1f6 Fix NPE 2016-06-09 18:06:00 +10:00
MattBDev
8fe381d098 Fix SpongeCommand 2016-06-08 19:06:07 -04:00
MattBDev
12c01760a6 Tweaks and small memory improvement. 2016-06-06 01:43:06 -04:00
Jesse Boyd
880e084006 Register expiry tasks 2016-06-06 12:47:54 +10:00
Jesse Boyd
f1f6b2781e Fix INSTABREAK flag 2016-06-06 06:34:05 +10:00
Jesse Boyd
237a0d8b6b Always cache * uuid 2016-06-05 20:11:02 +10:00
Jesse Boyd
a1c722aa9e Fix player location/current plot 2016-06-05 20:03:05 +10:00
Jesse Boyd
960ad50070 Use DBFunc instead of dbManager 2016-06-05 19:54:33 +10:00
Jesse Boyd
7d44850bb0 Mask getBlock 2016-06-05 19:46:52 +10:00
Jesse Boyd
7427d83ae2 final primitives are final 2016-06-05 19:39:51 +10:00
Jesse Boyd
48cf381ed6 * 2016-06-05 18:57:11 +10:00
Jesse Boyd
0114dd7558 Fix convert 2016-06-05 18:42:34 +10:00
Jesse Boyd
48382e0c4e Remove null version from storage 2016-06-05 18:23:24 +10:00
Jesse Boyd
ce23ad5615 Fix NPE 2016-06-05 18:07:41 +10:00
Jesse Boyd
0b1153da21 Include other config files in DebugPaste 2016-06-05 17:43:40 +10:00
Jesse Boyd
386157edc1 fix reserved flags 2016-06-05 17:35:44 +10:00
Jesse Boyd
b7a8c8ecd6 Don't need this 2016-06-05 17:33:06 +10:00
Jesse Boyd
951a6b82a2 simplify config / multiple expiry tasks / block cache fix 2016-06-05 17:28:43 +10:00
MattBDev
70aaa984e2 Documentation and Flag Changes. 2016-06-04 17:19:37 -04:00
Jesse Boyd
17ff6a7e1d Merge pull request #1157 from MisterErwin/master
Fixed invalid condition
2016-06-05 04:34:47 +10:00
Alex
281f60a4ef Fixed invalid condition 2016-06-04 20:26:32 +02:00
Jesse Boyd
ca5d3a818b PlotBlock cache / events / flags 2016-06-04 06:20:13 +10:00
Jesse Boyd
f84766074e Fixes #1145 2016-06-04 03:36:39 +10:00
MattBDev
7dba332455 Debug a player is added to the known list. 2016-06-03 11:17:08 -04:00
MattBDev
b4707c94c4 Fix #579
Also tweaks to deprecation for development purposes.
2016-06-03 10:57:25 -04:00
MattBDev
0147690eba Make Sponge compile
It doesn't work but it allows the project to compile.
2016-06-02 19:38:35 -04:00
MattBDev
cee970e3d9 Tweaked some things 2016-06-02 13:42:32 -04:00
MattBDev
da58c7b411 Beautify code 2016-06-02 11:38:47 -04:00
MattBDev
8e306a92e3 Condense HttpUtil 2016-06-02 09:59:54 -04:00
MattBDev
89c4ce24ef Merge branch 'fix/forcefieldflag' of https://github.com/manuelgu/PlotSquared into manuelgu-fix/forcefieldflag 2016-06-02 09:52:30 -04:00
MattBDev
e6433a24ab Fix grow flags 2016-06-02 00:33:50 -04:00
MattBDev
f21d159911 Various fixes and tweaks. 2016-06-01 16:50:35 -04:00
MattBDev
042d8950ee Fix #1139 2016-05-29 20:48:14 -04:00
manuelgu
8d6565c32c Fix NPE 2016-05-29 19:38:31 +02:00
manuelgu
def33bc9ad Fix IntellectualSites/PlotSquared#1140 2016-05-29 11:59:16 +02:00
MattBDev
53e4b728a6 Merge remote-tracking branch 'origin/master' 2016-05-28 22:38:10 -04:00
MattBDev
4af846967c Fix #958 2016-05-28 22:37:56 -04:00
manuelgu
9ae4f02205 Fix forcefield flag 2016-05-28 01:16:01 +02:00
Jesse Boyd
85055320c2 Merge pull request #1134 from manuelgu/feature/componentevent
[WIP] Implement PlotComponentSetEvent
2016-05-28 09:13:04 +10:00
manuelgu
d7b2881778 Don't * import 2016-05-28 01:12:05 +02:00
manuelgu
a7c965c6b0 Merge branch 'feature/componentevent' of https://github.com/manuelgu/PlotSquared into feature/componentevent 2016-05-28 01:09:25 +02:00
manuelgu
ec4839ec3f Move event calling to Plot class 2016-05-28 01:09:13 +02:00
Jesse Boyd
b5cc6eeb0c Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Sponge/src/main/java/com/plotsquared/sponge/SpongeMain.java
2016-05-28 08:45:35 +10:00
manuelgu
4078f0708b Proper javadoc for event 2016-05-28 00:29:27 +02:00
Jesse Boyd
28a5c9f597 Remove pre-init logging 2016-05-28 02:01:50 +10:00
Matt
604f62dbd3 Remove dumb log statement 2016-05-27 11:10:36 -04:00
MattBDev
6c40ed7718 Fix Titles 2016-05-27 10:54:06 -04:00
MattBDev
e615fb4c44 Merge remote-tracking branch 'origin/master' 2016-05-26 09:19:50 -04:00
MattBDev
cc2d99849b Optimizations and javadoc tweaks 2016-05-26 09:19:38 -04:00
manuelgu
ceb8fb9fa3 Implement PlotComponentSetEvent 2016-05-25 21:49:55 +02:00
manuelgu
d44ca23abd Minor change to issue template (#1132) 2016-05-25 15:14:16 -04:00
manuelgu
ef60aeb017 Minor change to issue template 2016-05-25 20:54:26 +02:00
Jesse Boyd
88ad051637 Direction/chance for bo3 2016-05-26 04:14:47 +10:00
MattBDev
465f7f4504 Tweaks and doc updates. 2016-05-24 22:08:45 -04:00
Jesse Boyd
83f664129f Fixes #1130 2016-05-23 17:27:40 +10:00
Jesse Boyd
a2a43816ad *And this 2016-05-23 04:41:25 +10:00
Jesse Boyd
7bdcde6d24 Why was this made private? 2016-05-23 04:12:11 +10:00
Jesse Boyd
89442a0e77 Fix visit 2016-05-22 07:13:59 +10:00
Jesse Boyd
b8afbe8a00 Optimize auto trim + command cost/confirmation 2016-05-22 05:29:27 +10:00
MattBDev
e2182260d9 Fix Sponge Errors 2016-05-21 12:55:06 -04:00
MattBDev
6f26e42251 Fix Sponge Errors 2016-05-21 12:54:50 -04:00
MattBDev
13b7a798e6 ignored exception 2016-05-21 11:54:00 -04:00
MattBDev
8af30667e4 ignored exception 2016-05-21 11:18:35 -04:00
MattBDev
4bd83ab298 Logger changes 2016-05-21 11:16:21 -04:00
Jesse Boyd
7ae5042c32 Recover from bad data file
Closes #1122
2016-05-22 01:16:04 +10:00
Jesse Boyd
3ea2d06e70 Closes #1124 2016-05-22 01:11:27 +10:00
Jesse Boyd
4ceb54b566 Add logger 2016-05-22 00:47:14 +10:00
MattBDev
dc4776d16b Sponge changes. 2016-05-21 10:39:06 -04:00
MattBDev
b51d659ff9 Merge remote-tracking branch 'origin/master' 2016-05-20 20:29:32 -04:00
MattBDev
1768943360 Register flags 2016-05-20 20:29:16 -04:00
Jesse Boyd
6b1298a5e6 *Fix version check 2016-05-20 05:10:46 +10:00
Jesse Boyd
b125ef6668 Add git revision hash to version 2016-05-20 03:32:35 +10:00
Jesse Boyd
82e162ae00 * 2016-05-20 03:29:51 +10:00
Jesse Boyd
5665e9b709 Fix merging sometimes not removing intersection 2016-05-20 03:25:45 +10:00
Jesse Boyd
6bad640cec Fixes #1037 2016-05-19 18:53:07 +10:00
Jesse Boyd
7873bcf592 Fixes #1102 2016-05-19 18:28:06 +10:00
Jesse Boyd
75c7fe969c Fixes #1008 2016-05-19 18:20:23 +10:00
Jesse Boyd
1df9ae77ab Fixes #1111 2016-05-19 18:13:37 +10:00
Jesse Boyd
78796ca7b4 Fixes #1117 2016-05-19 18:09:12 +10:00
Jesse Boyd
1ece792e2b Create parent directory for bo3 2016-05-18 16:35:37 +10:00
MattBDev
1b9c92fd4a Fix #1067 2016-05-17 21:52:36 -04:00
manuelgu
18e3a7553e Fix #1085
Fix #1085
2016-05-15 22:05:52 -04:00
Jesse Boyd
64f3e8f79b Fixes #1116 2016-05-15 01:54:12 +10:00
Jesse Boyd
c70c2283a2 Recover from failed event registration 2016-05-14 23:50:43 +10:00
Jesse Boyd
4b962c35ab Merge pull request #1118 from manuelgu/apilocationremoval
Remove unused API Location that got printed on startup
2016-05-14 21:46:20 +10:00
manuelgu
72096db8d6 Remove unused API Location that got printed on startup 2016-05-14 12:33:52 +02:00
Jesse Boyd
2039cb2891 Merge pull request #1112 from manuelgu/stuffnthings
Method renaming, util class and logic change
2016-05-14 15:04:11 +10:00
manuelgu
a5a001130c Fetch latest vesion on command
PS.get().update would return the URL of the latest update at the time
the server was started. Not everybody is restarting their servers daily
so it might end up in people not noticing an update in a long while
2016-05-13 19:09:40 +02:00
manuelgu
c1bc3dfc29 Add HttpUtil utility class 2016-05-13 19:07:56 +02:00
manuelgu
7701e7f05f Beautify listing of plot areas 2016-05-13 19:05:50 +02:00
manuelgu
2c0743b7e9 Proper method name 2016-05-13 19:04:55 +02:00
Jesse Boyd
00340d5154 Important fix 2016-05-14 01:13:08 +10:00
MattBDev
d47eeff23b Cleaning and Fix #1108 2016-05-12 18:00:38 -04:00
MattBDev
0958b57e46 Tidy code. 2016-05-12 17:09:35 -04:00
MattBDev
7947c3fdd7 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-05-12 15:43:44 -04:00
Jesse Boyd
0095af0ce5 Flag info 2016-05-13 03:38:32 +10:00
Jesse Boyd
dee8072d83 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared
# Conflicts:

#	Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java

#	Bukkit/src/main/java/com/plotsquared/bukkit/util/block/FastQueue_1_9.java
2016-05-13 03:04:43 +10:00
Jesse Boyd
63c7041a34 Flag tweaks 2016-05-13 02:55:57 +10:00
MattBDev
63472ebeaf Merge branch '3.3.4'
# Conflicts:
#	Bukkit/src/main/java/com/plotsquared/bukkit/util/SendChunk.java
2016-05-11 16:45:17 -04:00
MattBDev
d5cf81be5c 1.9.4 compatibility. 2016-05-11 12:11:46 -04:00
MattBDev
1db3d1aa72 Start 3.3.4 work to support 1.9.4 2016-05-11 11:16:38 -04:00
MattBDev
a4647b05e2 Fix #1011 2016-05-10 14:24:02 -04:00
MattBDev
3be0f74498 Fix #1098 2016-05-10 13:41:59 -04:00
MattBDev
e63b436edd Possible build everywhere fix. 2016-05-06 22:05:31 -04:00
MattBDev
1535c5e2f5 Fix test file 2016-05-05 13:41:11 -04:00
MattBDev
894524f998 Fix test file 2016-05-05 13:39:54 -04:00
MattBDev
8925c66b6e Fix file name 2016-05-05 13:19:15 -04:00
Matt
e4350feb2a Fixed missing type change 2016-05-05 13:17:17 -04:00
Paulomart
5d8492b675 Fixes cast exception 2016-05-05 13:13:55 -04:00
MattBDev
421203a27d Bug Fix and Cleanup 2016-04-29 18:14:12 -04:00
MattBDev
8f3d35bca3 Bug Fix and Cleanup 2016-04-28 16:38:51 -04:00
MattBDev
669359cd37 General changes 2016-04-26 10:14:22 -04:00
MattBDev
2c16c767e7 Fix flag values being loaded as strings 2016-04-26 08:40:52 -04:00
Jesse Boyd
d8849f718c Fix plotworld get 2016-04-26 09:32:16 +10:00
Jesse Boyd
8c56affb2f Fix for paint 2016-04-25 03:58:47 +10:00
MattBDev
1bce69d288 Merge flags to master 2016-04-22 23:54:53 -04:00
MattBDev
c266b1a428 Merge flags to master 2016-04-22 23:54:19 -04:00
MattBDev
e57af63af4 Possible remove fix. 2016-04-22 23:46:16 -04:00
MattBDev
3e4dbe0fbf fix compile error 2016-04-22 23:46:16 -04:00
MattBDev
74ed10c376 Completed and ready to test 2016-04-22 23:46:16 -04:00
MattBDev
aaf9511673 Start implementing new Flag system. 2016-04-22 23:46:16 -04:00
Jesse Boyd
d3dd88eb8d Fixes #1062 2016-04-22 23:45:19 -04:00
Jesse Boyd
9b22f38ff0 Fix plot download/done 2016-04-22 23:45:19 -04:00
Jesse Boyd
10bf03f81b Disable colored chat 2016-04-22 23:45:19 -04:00
Jesse Boyd
7c12a20a2b perm requirement for add/trust * 2016-04-22 23:45:19 -04:00
Jesse Boyd
40e063e702 Fixes #1050 2016-04-22 23:45:19 -04:00
Jesse Boyd
1c04b1a0e0 Fixes #1062 2016-04-19 15:32:31 +10:00
Jesse Boyd
02d17b363d Fix plot download/done 2016-04-17 03:55:55 +10:00
Jesse Boyd
d34abf4f02 Disable colored chat 2016-04-17 03:11:05 +10:00
Jesse Boyd
30a2c5d881 perm requirement for add/trust * 2016-04-13 03:35:14 +10:00
Jesse Boyd
76c3879c1f Fixes #1050 2016-04-13 02:41:40 +10:00
MattBDev
c2c20ff189 Merge remote-tracking branch 'remotes/origin/master' 2016-04-11 17:04:52 -04:00
Jesse Boyd
588f5d7ebc Fixes #1047 2016-04-09 22:48:27 +10:00
Jesse Boyd
9ba3b06854 change priority to low 2016-04-07 20:05:02 +10:00
Jesse Boyd
45b6950111 Fixes chat error / plot deny * 2016-04-07 03:33:49 +10:00
Jesse Boyd
8b10b7109c Merge remote-tracking branch 'origin/master'
# Conflicts:

#	Bukkit/src/main/java/com/plotsquared/bukkit/util/block/FastQueue_1_8_3.java

#	Bukkit/src/main/java/com/plotsquared/bukkit/util/block/FastQueue_1_9.java
2016-04-07 02:33:23 +10:00
Jesse Boyd
f7810860da Re-add WorldEdit check 2016-04-07 02:14:50 +10:00
MattBDev
4dcac29028 Weaken Declaration 2016-04-06 00:17:30 -04:00
MattBDev
d49de5297b Tweaks 2016-04-05 23:50:04 -04:00
MattBDev
c5282b29b2 Merge remote-tracking branch 'origin/master' 2016-04-05 19:10:57 -04:00
MattBDev
3df772aa4e Fixed #852 and small changes
Hid updater error when debugging is not enabled.
Javadoc changes
2016-04-05 19:10:26 -04:00
Matt
de97028a20 Merge pull request #1045 from IntellectualSites/3.4.0 2016-04-05 12:55:06 -04:00
MattBDev
9c81dfa5c3 Cleanup and Optimizations
Abstracted TitleManagers
Removed a lot of Statics.
ETC.
2016-04-05 12:53:40 -04:00
Jesse Boyd
fab60a0d53 Fix schematic on claim/auto 2016-04-05 11:07:37 +10:00
Jesse Boyd
1f32707ec2 Fix populate offset for older versions 2016-04-05 10:08:10 +10:00
MattBDev
95c9fd01dd Merged 2016-04-04 12:49:11 -04:00
Jesse Boyd
3c5e7a1509 version 2016-04-04 19:35:47 +10:00
Jesse Boyd
6ea1383027 Merge pull request #1042 from manuelgu/feature/tpondeath
Add teleport on death feature
2016-04-04 19:35:44 +10:00
manuelgu
6ab3a029b2 Add teleport on death feature 2016-04-04 11:31:15 +02:00
Jesse Boyd
b1cb6c0f57 Merge pull request #1038 from manuelgu/feature/bypassbreakbedrock
Add bypass permission for breaking blocks at y0
2016-04-04 18:46:57 +10:00
manuelgu
c69c4dd2e1 It actually is tested 2016-04-04 00:11:32 +02:00
manuelgu
4da38a6f9c Add bypass permission to breaking blocks at y0 2016-04-04 00:09:46 +02:00
Jesse Boyd
dffa00858d More than 2 lines 2016-04-02 17:15:36 +11:00
MattBDev
4ebd778c62 Optimizations and a purge fix 2016-04-02 01:30:26 -04:00
MattBDev
8243e0118a Optionals introduced, code cleaned, potential purge fix 2016-04-01 19:14:46 -04:00
MattBDev
3edfd39af9 Bump Version 2016-04-01 09:30:13 -04:00
MattBDev
b7ebde874f Clean gradle target directory 2016-03-31 21:27:29 -04:00
MattBDev
8978d3b9a7 Update Gradle to 2.12 2016-03-31 16:45:07 -04:00
Jesse Boyd
b909792d6a typo in disable titles 2016-04-01 06:54:28 +11:00
Jesse Boyd
4a7112a0a5 Various
Add some 1.9 blocks to chest content with schematic paste
Restructure tileentity placement from schematic (will soon add signs
etc)
Prepare for release 3.3.3
2016-04-01 04:23:26 +11:00
Jesse Boyd
edd18a7178 Various
- Fix some block change issues (for some reason sending a chunk would
sometimes reset any recent changes)
- Send chunk changes for relight command
- Have kick cmd kick the player from the server if they are kicked from
the spawn plot
- Plot size checks for downloading
- Fix some potential integer overflow issues for large plots (>64K x
64K)
- Fix some edge cases for plot move/copy
2016-03-31 20:49:00 +11:00
Jesse Boyd
dbdd9f9e5a Merge pull request #1026 from manuelgu/feature/fixes
Fixes and cleanup
2016-03-31 20:42:31 +11:00
manuelgu
25dfc34695 Comma-separate plot area list again 2016-03-30 15:25:25 +02:00
manuelgu
ea17ba8e46 Fix sponge conflicts 2016-03-30 15:09:00 +02:00
manuelgu
6fc8bf587b Comma-separate list of plot worlds 2016-03-30 14:43:16 +02:00
manuelgu
429fed2ab3 Fix target command
Threw an exception when you didnt pass an argument
2016-03-30 14:43:04 +02:00
manuelgu
510b9a47dc Formatting 2016-03-30 14:42:41 +02:00
manuelgu
44e11e9c6b Add command to list all available scripts
Additional debugexec subcommand
2016-03-30 14:42:34 +02:00
Jesse Boyd
95d03e878c Cancel potion throw 2016-03-30 13:41:13 +11:00
Jesse Boyd
dca2696782 Forgot wall height 2016-03-30 13:26:23 +11:00
Jesse Boyd
1e93398fd8 Cancel lingering potion splash
Cancelling the event still doesn't stop the animation.
2016-03-30 13:23:31 +11:00
Jesse Boyd
1f6ad47a79 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Bukkit/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java
2016-03-30 12:12:19 +11:00
Jesse Boyd
312ad4c48c fix index 2016-03-30 12:09:55 +11:00
MattBDev
31d346a587 Minor code cleanup
Plus an optimization
2016-03-29 17:00:07 -04:00
MattBDev
6007f040cd OCD 2016-03-29 15:47:59 -04:00
MattBDev
d0622eb87d PlotAPI doc and code cleaning 2016-03-29 14:35:40 -04:00
Jesse Boyd
6ebfd426c3 Just "height" would have made more sense 2016-03-30 05:14:51 +11:00
Jesse Boyd
bbe43f782c Fix nested command configuration 2016-03-30 04:47:47 +11:00
Jesse Boyd
560ebf412b Relight command 2016-03-30 04:34:48 +11:00
Jesse Boyd
df630f9be1 Remove outdated copyright notice at the top of each file
- No license is the same as all rights reserved
- There's already a license at the root of the project
- The message was not in most files. easier to remove it
- Support link isn't valid
- No longer just the bukkit API
2016-03-30 02:50:13 +11:00
Jesse Boyd
578e884be7 Merge pull request #1025 from manuelgu/master
Cleanup
2016-03-29 20:08:33 +11:00
manuelgu
22f56d4da6 Remove ChatColor
Sponge support
2016-03-29 10:57:27 +02:00
Jesse Boyd
745f9c4858 Buy 2016-03-29 19:52:57 +11:00
manuelgu
5f2856e0ea Cleanup
Consistent use of String[] instead of String...
Removed unused variables
2016-03-29 10:47:56 +02:00
Jesse Boyd
d9c6d04b46 Debug PlotMe conversion (temporary) 2016-03-29 19:13:48 +11:00
Jesse Boyd
8244086840 Merge pull request #1024 from dmodoomsirius/master
Revert "have clean help delete the output directory"
2016-03-29 19:13:00 +11:00
dmodoomsirius
e282998765 Revert "have clean help delete the output directory"
This reverts commit afa9935a7a79305c18fbb851a8f2aa8298776234.
2016-03-29 04:11:25 -04:00
Jesse Boyd
bd633c0150 Merge pull request #1023 from dmodoomsirius/master
Give the ability to clean the output directory
2016-03-29 19:00:57 +11:00
dmodoomsirius
5ec6bc62ca Merge branch 'master' of https://github.com/dmodoomsirius/PlotSquared 2016-03-29 03:59:42 -04:00
dmodoomsirius
afa9935a7a have clean help delete the output directory
to make things nice and clean
2016-03-29 03:59:12 -04:00
Jesse Boyd
512ae38392 Fix plot kick args 2016-03-29 18:57:35 +11:00
Jesse Boyd
19ef76de33 Oh, and this 2016-03-29 18:51:10 +11:00
Jesse Boyd
638f267498 Remove required args for visit 2016-03-29 18:48:07 +11:00
Jesse Boyd
bc8becae8e Check for null 2016-03-29 18:47:04 +11:00
Jesse Boyd
6f9af04274 Cleanup BukkitChunkManager 2016-03-29 18:44:04 +11:00
Jesse Boyd
75a70bcff4 Merge pull request #1022 from EvilOlaf/patch-1
Missing brackets
2016-03-29 18:11:12 +11:00
Very Evil Olaf
30043fd1c1 Missing brackets
very (VERY!) minor change ^^
2016-03-29 09:10:24 +02:00
Jesse Boyd
ef4438889b Fix plot move 2016-03-29 18:09:40 +11:00
Jesse Boyd
9bd3f2cbfd Fix plot list add 2016-03-29 17:56:48 +11:00
Jesse Boyd
eed8cbec5a Fixes #1015 2016-03-29 17:39:29 +11:00
Jesse Boyd
5f8a55568c Fix plot rate categories 2016-03-29 17:21:58 +11:00
Jesse Boyd
5275d4ec62 Fix "cleanup" breaking plugin again 2016-03-29 17:13:19 +11:00
Jesse Boyd
30dc20b3b3 Fix "Fixes #1015" not resetting the home location.
Resetting involves clearing the current value i.e. so it respects
whatever is set in the config, if that value is changed.
2016-03-29 17:06:58 +11:00
MattBDev
32ba55baf5 Code cleanup and Optimizations 2016-03-29 00:56:44 -04:00
MattBDev
49d18b9229 Code cleanup 2016-03-28 23:26:44 -04:00
MattBDev
a8fd6d00d0 Sorry for the versioning confusion 2016-03-28 23:23:56 -04:00
MattBDev
b1fa258688 Code cleanup 2016-03-28 19:30:55 -04:00
Matt
874da8c5bc Merge pull request #1019 from manuelgu/master
Fixes #1018
2016-03-28 18:17:45 -04:00
MattBDev
76e2b1f416 Code cleanup
maybe a bug fix or two
2016-03-28 17:31:40 -04:00
manuelgu
83fa310fbb Fix ArrayIndexOutOfBoundsExceptions
Occured for /plot trust and /plot add
2016-03-28 23:18:29 +02:00
MattBDev
8d4f042abc Cleanup of code 2016-03-28 13:28:21 -04:00
MattBDev
feee63b3af Fix DebugLoadTest 2016-03-28 13:02:20 -04:00
Matt
c4f5905252 Merge pull request #1016 from manuelgu/master
Fixes #1015
2016-03-28 11:25:33 -04:00
manuelgu
c2e48bb95b Fixes #1015 2016-03-28 16:27:32 +02:00
Jesse Boyd
d9c0ec27b0 Fixes #774 2016-03-28 23:04:08 +11:00
Jesse Boyd
dcd1a50a0c default tab completion + plot chat for merged plots 2016-03-28 22:52:29 +11:00
Matt
b6bdb02fa2 Merge pull request #1012 from manuelgu/master
Update Plugin command to show correct versions
2016-03-28 07:23:07 -04:00
manuelgu
8f0de80755 Update Plugin command to show correct version
Not using PS.get().update but rather reading from the GitHub releases. Can be changed if needed/wanted
2016-03-28 11:29:58 +02:00
MattBDev
978be89e52 Fix bug causing the Updater to not work. 2016-03-27 23:48:24 -04:00
MattBDev
93ef066d7b 3.3.3-SNAPSHOT Beginning
Sponge Gradle Changes
2016-03-27 18:55:57 -04:00
Jesse Boyd
ff1b7c66b1 What's snow-melt doing there? 2016-03-27 19:38:15 +11:00
Jesse Boyd
3fb6ccbbb6 Fix TNT explosions for sponge 2016-03-27 19:10:08 +11:00
Jesse Boyd
357400c5ac Fix block break road (sponge) 2016-03-27 17:01:49 +11:00
Jesse Boyd
32e10fbff6 Fix permission caching (sponge) 2016-03-27 16:19:56 +11:00
Jesse Boyd
1bf05df706 Try this coolty 2016-03-27 16:01:53 +11:00
Jesse Boyd
e3f5842299 Recover from invalid db entry 2016-03-27 07:31:35 +11:00
Jesse Boyd
53e56a6414 Fix required args 2016-03-27 07:11:09 +11:00
Jesse Boyd
46d3dc609e Update sponge port 2016-03-27 06:47:34 +11:00
Jesse Boyd
056f77a3ba 3.3.2 2016-03-27 03:34:55 +11:00
Jesse Boyd
d4d9a9e148 Change to SubCommand 2016-03-26 20:28:45 +11:00
Jesse Boyd
6a7cf0d56f forgot to push this 2016-03-26 16:44:38 +11:00
Jesse Boyd
1252e004a0 Cancel chat event 2016-03-25 15:56:11 +11:00
Jesse Boyd
2816ceae72 Change chat priority 2016-03-25 15:07:35 +11:00
Jesse Boyd
f74e7bb4cb Fixes #997 for 1.8 2016-03-25 14:50:57 +11:00
Jesse Boyd
30d57d8642 Fixes #997 for 1.9 (TODO fix for 1.8 as well) 2016-03-25 14:25:06 +11:00
Matt
ce9ec20b59 Merge pull request #1000 from manuelgu/patch-1
Rename PlotGamemode to PlotGameMode
2016-03-24 23:09:51 -04:00
manuelgu
65d428a989 Rename PlotGamemode to PlotGameMode
@MattBDev I think you just forgot renaming the class
2016-03-24 23:06:45 +01:00
Jesse Boyd
7ab8d22325 Move confirmation to commands.yml 2016-03-25 02:03:36 +11:00
Jesse Boyd
ed62ed2487 Fixes #983 2016-03-24 22:08:07 +11:00
Jesse Boyd
8a42eecc11 Command changes
Legacy commands still need to be cleaned up (after which economy /
confirmation can be centralized)
All command names / usage / description is configurable
Simplifies creating commands
Deeper tab completion / command help
2016-03-24 20:57:59 +11:00
MattBDev
a62b9a334d Cleaning 2016-03-24 00:50:25 -04:00
MattBDev
48f22eaed4 More cleaning 2016-03-23 13:13:09 -04:00
MattBDev
bb4700aa5a More cleaning 2016-03-23 13:09:13 -04:00
MattBDev
9e2c6f2182 Major code reformatting 2016-03-22 21:41:39 -04:00
Matt
e18e1d4816 Merge pull request #995 from manuelgu/master
Cleanup
2016-03-22 14:36:41 -04:00
manuelgu
35c7c20874 Track renamed Music.java file 2016-03-22 18:53:56 +01:00
manuelgu
84188f6557 Cleanup 2016-03-22 18:53:17 +01:00
Matt
09ee7f3048 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Core/src/main/java/com/intellectualcrafters/plot/commands/Area.java
#	Core/src/main/java/com/intellectualcrafters/plot/commands/Auto.java
#	Core/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java
#	Core/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java
#	Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java
#	Core/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java
2016-03-20 23:03:31 -04:00
Matt
029241912b Code Style Cleanup 2016-03-20 22:52:16 -04:00
MattBDev
0e49dd6f62 Merge branch 'manuelgu-feature/rm-redundant-methods' 2016-03-20 19:54:46 -04:00
MattBDev
cb0b59fdb4 Merge branch 'feature/rm-redundant-methods' of https://github.com/manuelgu/PlotSquared into manuelgu-feature/rm-redundant-methods 2016-03-20 19:52:11 -04:00
MattBDev
bb4ecb94a1 Cleanup 2016-03-20 19:35:40 -04:00
manuelgu
df12e53d40 Remove redundant .s() methods 2016-03-20 23:19:37 +01:00
MattBDev
274d819f8c Use Metrics as dependency in Sponge
Unlike Bukkit, we can support Sponge Metrics as a dependency.
2016-03-20 14:00:39 -04:00
Jesse Boyd
2e4f4d0064 Merge pull request #986 from SynergyMC/testing
A small change to /p weanywhere's behavior
2016-03-20 21:50:17 +11:00
zomb
712ce74af6 /p weanywhere change
Allows players with "WorldEdit Anywhere" toggled to use the wand
anywhere
2016-03-20 00:26:45 -10:00
zomb
015dda21f2 Merge remote-tracking branch 'IntellectualSites/master' into testing 2016-03-19 18:11:36 -10:00
Matt
19b6df8268 Cleanup 2016-03-19 14:07:55 -04:00
zomb
f16affabcc Merge remote-tracking branch 'IntellectualSites/master' into testing 2016-03-18 23:28:49 -10:00
Jesse Boyd
8074d041b8 Fix "Cleaner reflection" breaking plugin.
Also add method to sort plots by modification date.
2016-03-19 17:32:05 +11:00
Matt
d30626d11f Cleaner reflection 2016-03-19 00:39:42 -04:00
Jesse Boyd
f26278f72e Fixes #950 2016-03-19 13:01:10 +11:00
Matt
79864d269a Extremely minor text change to LICENSE 2016-03-18 16:50:43 -04:00
Jesse Boyd
ab40d97327 Try this? 2016-03-18 05:08:09 +11:00
Jesse Boyd
fe43143bdb Fixes #972 2016-03-18 03:33:31 +11:00
Jesse Boyd
9e32ce9885 Automatically drop unique_alias for MySQL 2016-03-18 03:05:36 +11:00
Jesse Boyd
3921fdfc3f Fixes #967 2016-03-18 02:18:18 +11:00
Jesse Boyd
e1e5497558 Fixes #871 2016-03-18 02:06:06 +11:00
Jesse Boyd
f9db269813 Various
Close #966
Close #953
(duplicates)
Changes to chunk copying etc to interfere less with world generation
2016-03-18 01:22:51 +11:00
Jesse Boyd
16dac99fed Any reason for breaking it in the last commit? 2016-03-17 20:33:47 +11:00
Jesse Boyd
98c4483535 Various
some sponge stuff
schematic/mca/bo3 uploading rework
fix minor issue with plot visit
fix #956
2016-03-17 20:11:07 +11:00
Matt
75bf01c13f Fixed casting issue in FastQueue_1_9 2016-03-16 19:18:09 -04:00
Matt
7bbd359be8 Fixed #957 2016-03-16 18:50:55 -04:00
Matt
58eeeb16d4 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-03-16 10:16:19 -04:00
Matt
65ddb12701 Beginning rewrite of Flags and various cleanups 2016-03-16 10:15:38 -04:00
Jesse Boyd
1f42ee6744 Merge pull request #969 from SynergyMC/testing
Implements fire-related flags
2016-03-17 01:06:00 +11:00
zomb
4a1c206f98 Revert "Fixed bukkit dependency in maven"
This reverts commit e6f33e7150631b705b729292541c53ae3ad9aeb5.
2016-03-15 22:25:31 -10:00
zomb
a297d505f8 Pulled files from official repository 2016-03-15 22:15:47 -10:00
zomb
a26db46242 Pyromania
Adds block-ignition, which allows fire being set by players,
dispensers, explosions, and fireballs (if their origin is the same as
the plot that they land in)

Adds fire-spread, which allows fire to spread from lava and fire
spreading in general

Adds block-burn, which allows blocks to burn away
2016-03-15 21:59:01 -10:00
Matt
3fb64d9811 Added snow-melt flag 2016-03-15 01:16:29 -04:00
Matt
bb8883dfaf Added snow-melt flag 2016-03-14 11:01:52 -04:00
Matt
bee6f83e79 Various changes 2016-03-14 02:18:04 -04:00
Matt
ae885eafca Various changes and Merge Economy Fix 2016-03-13 22:44:59 -04:00
Jesse Boyd
8739f3ef78 Horses aren't hostile. 2016-03-14 12:34:58 +11:00
Matt
dfd29f6713 Various changes
Plot class is now more reliable as most fields are private
Cleanup some classes.
Fixes #955
makes progress on #953
2016-03-13 14:09:48 -04:00
zomb
e6f33e7150 Fixed bukkit dependency in maven 2016-03-12 23:37:45 -10:00
Jesse Boyd
3fb686608b Merge pull request #951 from Gabscap/fix-static
Make WorldEvents method non-static
2016-03-13 04:00:40 +11:00
Jesse Boyd
a8fd1b49ca Various
sponge changes / documentation / cleanup / event tweak
2016-03-13 03:57:36 +11:00
Gabscap
4c40268e8f Make WorldEvents method non-static 2016-03-12 16:27:03 +01:00
Matt
edc43bd53b Update README.md 2016-03-11 09:05:42 -05:00
Jesse Boyd
66da71bc9f Various
Fixes a few typos
Fixes #943
Fixes #944
Fixes metrics (broke in b69e31129df9f7455856d75d0578d39b8d989015)
Fixes plot setup issue
Fixes some lighting issues
Fixes ChunkListener + cauldron
Tweak some  schematic stuff
2016-03-11 15:33:39 +11:00
Matt
c979be2994 Add missing permission to plugin.yml file 2016-03-10 17:12:56 -05:00
Matt
33222b25a3 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-03-08 21:41:47 -05:00
Matt
57fa265b48 Optimizations and cleaning.
Fixes #943 (even though it should be impossible)
2016-03-08 21:18:54 -05:00
Jesse Boyd
fef2bc0cf2 Restore metrics 2016-03-08 16:31:40 +11:00
Jesse Boyd
f391ae444f remove java 8 code 2016-03-08 14:09:50 +11:00
Matt
286e5b8b97 Minor performance improvements. 2016-03-07 15:28:59 -05:00
Matt
d2c81cbd01 Use Metrics Dependency 2016-03-07 14:56:06 -05:00
Matt
e4d460107f Update ISSUE_TEMPLATE.md 2016-03-07 11:24:36 -05:00
Jesse Boyd
b59665b00b Fix #938 2016-03-07 19:37:53 +11:00
Jesse Boyd
62531a42c7 Fix for @Htgan / clear
Possibly fixes #932
2016-03-07 17:34:57 +11:00
Jesse Boyd
05caa2ca8d Fixes #935 2016-03-06 23:46:37 +11:00
Jesse Boyd
00c174fdf1 Various
Progress on #929
Fix area loading from config with negative ids @skroob
2016-03-06 19:08:01 +11:00
Jesse Boyd
b95fdeccca Maybe? 2016-03-06 19:08:01 +11:00
Matt
32d4a08db1 Small cleanup 2016-03-04 19:53:31 -05:00
Matt
5c60d69fd1 closes #915 2016-03-04 16:37:38 -05:00
Jesse Boyd
780d4e09d5 Delay economy hook #922 2016-03-04 05:04:11 +11:00
Jesse Boyd
2b3fb7b4d0 Fix for explosion 2016-03-03 12:25:57 +11:00
Jesse Boyd
0dc672bcd5 Apparently resetTitles only resets the top part? 2016-03-03 09:12:20 +11:00
Jesse Boyd
6e2256ffcf Update titles 2016-03-03 09:08:43 +11:00
Jesse Boyd
cfcfd87f57 messy nms for 1.9 2016-03-03 08:51:17 +11:00
Jesse Boyd
955f14e2d7 Merge pull request #920 from manuelgu/patch-4
Formatting in pom.xml
2016-03-03 08:12:48 +11:00
manuelgu
4ead7bb9da Formatting in pom.xml
Because that just looks better :P
2016-03-02 22:11:28 +01:00
Jesse Boyd
0408e9a37c Sorry, I'll fix it. 2016-03-03 07:34:59 +11:00
Jesse Boyd
b294ff528f Push file for legacy updater 2016-03-02 17:49:17 +11:00
Jesse Boyd
f00ac79c91 Bump version / misc
Fix regenallroads
Add schematic y_offset
Change visit/list for multi-owner plots
Fix updater (pre-1.7.10)
2016-03-02 17:42:04 +11:00
Jesse Boyd
109715e0d7 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-03-02 06:59:05 +11:00
Jesse Boyd
8bf3ceac6f Changes
Plot auto clear confirmation
Add timediff to keep flag
Add expired parameter to list cmd
Fixes some compatibility issues
2016-03-02 06:56:50 +11:00
Jesse Boyd
106c3c5cb4 Temporary fix for 1.9 2016-03-01 14:17:29 +11:00
Matt
0bbfd0f49a Begin 1.9 NMS updates 2016-02-29 20:44:58 -05:00
Matt
9596544f97 Cleanup Code
I also updated the build.gradle and pom to 1.9 bukkit
2016-02-29 20:13:18 -05:00
Matt
5079361fbf Fix negation issue. 2016-02-29 11:50:04 -05:00
Matt
b0a3f70cbd Updater now uses GitHub Releases and API 2016-02-29 11:15:51 -05:00
Jesse Boyd
841809b93d Various
Closes #906
Add command confirmation for setowner
Require confirmation delayed by 1 tick
2016-03-01 02:01:52 +11:00
Jesse Boyd
43b7a7aba8 Fixes #910 2016-02-29 15:12:20 +11:00
Jesse Boyd
8906577699 Merge pull request #909 from zombachu/master
Implements the ice-melt flag
2016-02-29 14:08:31 +11:00
zomb
224caee56e Implements the ice-melt flag 2016-02-28 15:41:32 -10:00
Jesse Boyd
5c4178b1dd Fixes
Fixes #905
Fixes auto claim limit
2016-02-29 04:09:09 +11:00
Matt
911bef974a Stop spectating before being kicked when denied.
Fixes #886
2016-02-27 20:11:18 -05:00
Matt
7d340b58b4 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-02-27 15:49:45 -05:00
Jesse Boyd
ce8775414a Fix some logic 2016-02-28 07:04:57 +11:00
Matt
5da8700f7f Force Core to use Java 7 2016-02-27 13:41:49 -05:00
Jesse Boyd
01710e3ddb Fixes
Notify core of all world loading regardless of generator
Optimize plot area fetching
Fix plot delete not deleting the plot until restart
Fix plot unclaim not removing the owner on any cached plots
Change gradle output directory
Fix plotme conversion sometimes not copying over the floor/main blocks
2016-02-27 21:07:42 +11:00
Jesse Boyd
7d8893b5d7 Fixes #900 2016-02-27 17:07:15 +11:00
Jesse Boyd
7a97c69d4f Fix bed explosion in hell biome when flag not present 2016-02-27 16:44:29 +11:00
Jesse Boyd
1a80b344b9 replace jar with one that's less broken 2016-02-27 16:09:55 +11:00
Jesse Boyd
afe6c5fd69 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-02-27 16:05:56 +11:00
Jesse Boyd
f68042bc11 Fixes
Fixes unlink failing if a parameter is provided
Fix plot unlinking not resetting the road biome
Fixes #888
2016-02-27 16:05:21 +11:00
Matt
ac77c755d0 Add plot middle permission to plugin.yml 2016-02-26 19:10:59 -05:00
Jesse Boyd
c7870b617c Gradle / maven
Fix archive names (includes project/module name + version)
Generate MD5 hash alongside jar
Improve build time
- asynchronous building
- enable daemon
- change scope of a few statements
- skip building of 3 jars
Add filtering to the plugin.yml (maven/gradle)
Bump version to 3.3.0 in pom
2016-02-26 23:55:21 +11:00
Jesse Boyd
f921db937a Fix plot music duplication when moving between plots in a merged plot 2016-02-26 17:43:49 +11:00
Jesse Boyd
4669f31658 Fixes
Fixes hybridplotworld rotation for stairs
Fixes hybridplotworld skipping non-rotatable blocks on swapped sideroad
schem
Fixes schematic generation using wrong height
Fixes debug spam printed when using download cmd
Fixes pagination having page number instead of total list items
Fixes plot area list page being off by 1
Remove compatibility for a spigot 1.8.0 bug where getting the world name
during initialization crashes the server.
Fixes type 1,2 plot worlds not being fetchable if there are more than 8
plot worlds loaded.
2016-02-26 17:29:31 +11:00
Jesse Boyd
c8ddcd7f54 Fixes
Fix plot cluster command NPE
Fix path iterator (for Plot.getAllCorners()) being off by 1
2016-02-26 04:17:23 +11:00
Jesse Boyd
fb2e949711 Fix rotation for stairs metadata (range:8-15) 2016-02-26 01:21:30 +11:00
Jesse Boyd
7659884e73 Fixes
Fixes #868
Fixes #778
Fixes attributes passing wrong key to persistent meta
Fixes blob compatibility with JDBC driver for persistent meta
Fix stackoverflow from countEntities under certain circumstances
Minor cleanup
2016-02-26 01:17:07 +11:00
Jesse Boyd
efae2c2e63 Finished several core parts of the sponge port
Mass block changes / chunk packet sending
AsyncWorldEdit (buggy)
Fixed world ground cover layers being generated
Fixed tab completion
Fixed plot title color
Fixed worlds unloading when no players are present
Fixed falling blocks not falling where they should
Fixed console color
Fixed chunk regeneration on full plot worlds
Other stuff
2016-02-25 20:13:07 +11:00
Jesse Boyd
d3465b7bde Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-02-24 05:12:20 +11:00
Jesse Boyd
f73a542b04 Tab completion, fix SpongeUtil.getWorld 2016-02-24 05:12:07 +11:00
Matt
6f3485c87d Hard-code version into plugin.yml 2016-02-23 13:08:20 -05:00
Jesse Boyd
bf85ba5833 No they aren't 2016-02-24 04:20:40 +11:00
Jesse Boyd
8a2c44759f Chunk regeneration 2016-02-24 04:04:23 +11:00
Jesse Boyd
882394987b Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-02-24 03:08:12 +11:00
Jesse Boyd
7a217b2f08 a wild pom appears
fork/pr if you don't like how I've done it
2016-02-24 03:07:49 +11:00
Matt
b94e816c55 Sponge changes. 2016-02-23 09:55:40 -05:00
Matt
87ee693a49 Fix small Gradle things. 2016-02-22 23:30:49 -05:00
Matt
1768651782 Merge pull request #874 from IntellectualSites/gradle
Move from Maven to Gradle
2016-02-22 23:16:03 -05:00
Matt
b69e31129d Updated Gradle 2016-02-22 23:11:40 -05:00
Jesse Boyd
7b15d50674 Add PS.get().isPlotWorld() and MainUtil.getPlotID( Location );
@_Cory_
2016-02-23 05:46:57 +11:00
Jesse Boyd
f996b1d95d Using ReflectionUtils simplifies stuff? 2016-02-23 05:38:28 +11:00
Jesse Boyd
14eb3279c0 Revert version 2016-02-23 05:31:35 +11:00
Jesse Boyd
ced342f14e Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2016-02-22 17:24:30 +11:00
Jesse Boyd
f5ff82c8cc Sponge / Other
Fix area teleportation for type 0,1 worlds
Add blockstate<>id/data resolving for sponge
Finish world generation for sponge
Add chat color for sponge
Fix economy support for sponge
Fix sponge event system
Other stuff
2016-02-22 17:20:22 +11:00
Matt
b255c5db47 Cleanup and Fixes
Fixed StackOverflowError caused by c83378a
2016-02-21 23:29:33 -05:00
Matt
ca5e7f4564 Cleanup 2016-02-20 23:07:04 -05:00
Matt
ef5846f688 Cleanup 2016-02-20 16:50:10 -05:00
Matt
36ebd1983d Use UTF-8 2016-02-19 15:51:04 -05:00
Jesse Boyd
eabb5f3180 Fix remaining compile errors
Note: Sponge version needs a number of things implemented before it will
actually run
2016-02-20 06:55:49 +11:00
Jesse Boyd
92b3ddb0ac Finish debugpaste for sponge 2016-02-20 06:13:41 +11:00
Jesse Boyd
6caa7ee757 Merge remote-tracking branch 'origin/master' 2016-02-20 06:05:47 +11:00
Jesse Boyd
de1328e78c Update some sponge classes
Update world generator
Replace some broken code with TODO
FIxed a few errors
Started on block placement
Other sponge stuff
2016-02-20 05:52:26 +11:00
Jesse Boyd
60629db042 Feature / Fix
Add trim regen argument @manuelgu /plot trim <world> true
Add grant check other + console usage
Finish abstracting world generation to prepare for sponge port
Fix economy hook
Add ban as alias for deny
Remove some redundant code
2016-02-20 05:42:06 +11:00
Jesse Boyd
a055a90979 Add target folder 2016-02-20 05:16:20 +11:00
Matt
302fe0c2c8 Fix SpongeEventUtil 2016-02-19 12:50:38 -05:00
Matt
660cd1b870 Fix more Sponge Classes 2016-02-19 12:45:43 -05:00
Matt
63cd7c8b97 Fix SpongeEconHandler 2016-02-19 12:18:15 -05:00
Matt
c719d548d0 Fix SpongePlayer 2016-02-19 12:07:09 -05:00
Matt
536b011ea0 Fix SpongePlayer 2016-02-19 12:01:24 -05:00
Matt
2a2c85a642 Fix Typos and Various little things. 2016-02-19 11:55:00 -05:00
Matt
c592790f68 Merge pull request #881 from manuelgu/patch-3
Update Issue Template
2016-02-18 16:35:13 -05:00
manuelgu
81f57b5675 Update Issue Template
More proper description
2016-02-18 22:19:50 +01:00
Alexander Söderberg
3fadbf3358 Lol okay this is better 2016-02-18 22:05:09 +01:00
Alexander Söderberg
26e73af35c Rename CONTRIBUTING.md to .github/CONTRIBUTING.md 2016-02-18 21:59:55 +01:00
Alexander Söderberg
4a9d063576 Create ISSUE_TEMPLATE.md 2016-02-18 21:58:48 +01:00
Jesse Boyd
411a74eefa Fix compatibility with old type 2 plotworld cluster data 2016-02-17 23:38:36 +11:00
Jesse Boyd
11064ec814 Fixes #878 2016-02-17 14:49:10 +11:00
Jesse Boyd
af9f5b5f44 Fixes
Fix #879 stackoverflow in PlotHandler (from
fde845e1d885c74a625561c8984589401d477bba)
Fix getCorners returning last value twice
Fix getConnectedPlots only returning adjacent connections (from
c83378a91b52237e677c63d768c54c0f8d23ff00)
other tweaks
2016-02-17 14:46:25 +11:00
Jesse Boyd
3b58e19b25 Merge pull request #869 from manuelgu/patch-2
Fix mismatch of brackets
2016-02-15 20:11:51 +11:00
Jesse Boyd
eda4575dd6 Tweaks / Fixes
Fixed id being renamed to type in
fde845e1d885c74a625561c8984589401d477bba
Fixes #870
2016-02-15 16:25:37 +11:00
Matt
87d4ecb1f1 Fix TextualCompontent Class that broke in last commit 2016-02-13 20:05:30 -05:00
Matt
fde845e1d8 Refractoring and Cleanup
Optimized some of the code where possible and removed some magic numbers as well.
2016-02-13 20:01:18 -05:00
manuelgu
0a4e42e1a7 Fix mismatch of brackets
This could potentially cause problems because the permission check is not correct
2016-02-13 18:45:35 +01:00
Jesse Boyd
a1eec4eb0c Fixes #853 2016-02-13 22:19:07 +11:00
Jesse Boyd
e2ba9fb8e9 Fixes / Additions / Tweaks
Fixed #867
Fixes some issues with partial plot areas
Added /plot area regen
2016-02-13 22:01:22 +11:00
Jesse Boyd
03aec43f5d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	src/main/java/com/intellectualcrafters/plot/commands/Condense.java
#	src/main/java/com/intellectualcrafters/plot/commands/Deny.java
#	src/main/java/com/intellectualcrafters/plot/commands/Save.java
#	src/main/java/com/intellectualcrafters/plot/commands/list.java
#	src/main/java/com/intellectualcrafters/plot/database/SQLManager.java
2016-02-13 04:32:43 +11:00
Jesse Boyd
b87a886345 Additions / Fixes
Added `/plot area` command for area info and management
Fixed typo for player meta table preventing the plugin from starting /
cleanup
Moved pagination from list to subcommand
Removed default PlotArea values
Added pair and tuple RunnableVal classes
Tweak pom so that it actually compiles
More command categories
Removed unclaim and limit command
Fixed a few issues with the 2d mapping of plot areas
2016-02-13 03:25:04 +11:00
Matt
ccbd4f60c2 Refractoring and Cleanup 2016-02-10 20:37:21 -05:00
Alexander Söderberg
ca73addc88 Updated this via browser, sorry if something broke xD 2016-02-10 22:23:49 +01:00
Jesse Boyd
893c2b3088 Remove bukkit classes from core 2016-02-11 06:43:47 +11:00
Jesse Boyd
50f891a974 this 2016-02-11 06:02:54 +11:00
Jesse Boyd
c83378a91b Refactor / Cleanup / Optimizations 2016-02-11 05:59:51 +11:00
Alexander Söderberg
085f621f0f Merge pull request #856 from MattBDev/spelling
Spelling Corrections
2016-02-07 16:37:40 +01:00
Matt
8d6b412dc8 Spelling Corrections 2016-02-04 18:45:50 -05:00
Alexander Söderberg
692ad5db81 Update README.md 2016-01-24 10:50:53 +01:00
Alexander Söderberg
a69f7162f1 Merge pull request #839 from manuelgu/patch-1
Update README.md
2016-01-23 23:19:54 +01:00
Alexander Söderberg
ee6d9d2d5c Merge pull request #840 from aaomidi/master
Make plugin compatible with DeluxeChat
2016-01-23 23:13:48 +01:00
Amir Ali Omidi
7cc8e8bfb5 Merge pull request #1 from aaomidi/aaomidi-patch-1
Update PlayerEvents.java
2016-01-24 00:33:50 +03:30
Amir Ali Omidi
5f74aa8ab8 Update PlayerEvents.java
Allow other plugins to manage chat.

Makes plugin work with DeluxeChat plugin.
2016-01-24 00:32:43 +03:30
manuelgu
df27b1ddd8 Update README.md 2016-01-23 20:18:48 +01:00
Sauilitired
d8998ac715 Yeah, no. This needs fixing. 2016-01-23 19:21:17 +01:00
Alexander Söderberg
948b5c5789 Merge pull request #837 from manuelgu/patch-2
Push target folder as it is needed for /p update
2016-01-21 12:07:47 +01:00
manuelgu
8a34276eb5 Push target folder as it is needed for /p update 2016-01-21 11:23:48 +01:00
Alexander Söderberg
e8d2e9fd12 Merge pull request #830 from sgdc3/master
Clean the project [WIP]
2016-01-20 20:11:27 +01:00
Gabriele C
e3b5ca14be Disable spongeapi dependency 2016-01-20 13:34:33 +01:00
Gabriele C
a872bd0f61 Shade libs 2016-01-20 13:30:03 +01:00
Gabriele C
efeecd423e Merge pull request #1 from IntellectualSites/master
Up
2016-01-20 12:44:33 +01:00
Gabriele C
51d2e37853 Clean the project 2016-01-20 12:40:04 +01:00
Alexander Söderberg
ddfa4fe6af Merge pull request #831 from manuelgu/patch-1
Fix notify-enter message being sent to wrong person
2016-01-19 15:53:32 +01:00
manuelgu
165d9b6258 Fix #829 2016-01-19 14:12:42 +01:00
Alexander Söderberg
0f3d6b63f5 I was tired, okay. 2016-01-18 23:07:10 +01:00
Sauilitired
adfd0e6674 Should fix #824 2016-01-17 13:19:14 +01:00
Sauilitired
faa9c10364 Add fixes to shizzle 2016-01-16 18:32:00 +01:00
Sauilitired
830a5111f4 Add plot grants for /plot auto 2016-01-16 17:48:49 +01:00
Sauilitired
cf6ca67ce7 Add persistent meta, and added plot grants 2016-01-16 17:07:42 +01:00
Sauilitired
dc22514809 Implements #752 and gives credits to manuelgu :) 2016-01-16 13:14:18 +01:00
Sauilitired
c6f087fd50 Fixes #774 and allows for similar features in the future 2016-01-16 13:03:51 +01:00
Jesse Boyd
ad1272b0e5 Minor fixes
Fixes #797
Fixes #794
2016-01-12 23:13:47 +11:00
Jesse Boyd
af79100f7d Update README / pom / merge with 8629c4a6f5bb0021ccc8284d8f84dfe91e5995ff
closes #809
2016-01-11 07:00:56 +11:00
Jesse Boyd
00b6158181 Use plot metadata to track tasks 2015-12-20 06:40:42 +11:00
Jesse Boyd
f70e2248e7 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2015-12-20 06:30:16 +11:00
Jesse Boyd
cf517d5be0 Cleanup 2015-12-20 06:30:06 +11:00
Jesse Boyd
9b990faa47 Merge pull request #792 from manuelgu/master
fix typo
2015-12-20 06:15:46 +11:00
Jesse Boyd
2aab349c4b Merge pull request #796 from MattBDev/spongeFix
Fix Sponge Generator
2015-12-20 06:15:33 +11:00
Jesse Boyd
dc799ecc26 Merge pull request #795 from MattBDev/cleanup
Fixes javadoc errors
2015-12-20 06:15:28 +11:00
MattBDev
d65bd7a704 Fixes javadoc errors
It does not improve upon the existing documentation but instead removes all broken documentation and has minor changes to some existing. More work will need to be done later to documentation.
2015-12-19 12:23:32 -05:00
MattBDev
8ddecce75b Fix Sponge Generator 2015-12-19 12:05:00 -05:00
manuelgu
5e33c175ab Typo in "ice-melt" flag
The flag doesnt seem to be used anyways, so not much of a deal.
2015-12-17 18:11:50 +01:00
manuelgu
abc2681f97 fix typo 2015-12-17 18:07:57 +01:00
Jesse Boyd
ce387333d2 Plot deny / kick bypass
Fixes #777
2015-12-17 17:51:12 +11:00
Jesse Boyd
c32cfc62fa Various
Fix sethome/home for mega plots
Minor tweaks
2015-12-16 16:38:53 +11:00
Jesse Boyd
dd4a1faede Fixes #772 2015-12-15 03:32:59 +11:00
Jesse Boyd
163ccc9eae Fixes
Fixes #783
Fixes #780
2015-12-15 03:15:30 +11:00
Jesse Boyd
35589dcc5f Fixe
Fixes #753
2015-12-04 20:00:30 +11:00
Jesse Boyd
c72edc40f0 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2015-12-03 02:43:05 +11:00
Jesse Boyd
f102b2b448 Fixes
Fixes #768 (Plot clearing with given plot id)
2015-12-03 02:42:50 +11:00
Jesse Boyd
2cdb279528 Merge pull request #769 from XxCoolGamesxX/patch-1
Added Spanish Translation
2015-12-03 02:42:21 +11:00
Charles
08e3876b01 Added Spanish Translation
We translation in Spanish so the people can read it.

Thank to my team of Mega Planet (www.megaplanet.net).
2015-12-02 00:09:22 +01:00
Jesse Boyd
1b7a58b720 Merge pull request #766 from swan201/master
Update Korean Translation File
2015-11-30 13:55:33 +11:00
swan201
b71b0aa46e Update Korean Translation 2015-11-30 05:59:14 +09:00
swan201
dcefa95278 Merge pull request #1 from IntellectualSites/master
Merge
2015-11-30 05:56:40 +09:00
Alexander Söderberg
60406812ee Merge pull request #764 from manuelgu/patch-3
remove website link
2015-11-29 21:42:20 +01:00
Jesse Boyd
82ccca8f63 . 2015-11-30 02:24:01 +11:00
manuelgu
1fcb4ea705 remove website link 2015-11-29 12:49:20 +01:00
Jesse Boyd
9118f111e4 Fixes
fixes #763
2015-11-29 19:21:32 +11:00
Jesse Boyd
c2b781da98 Deny negative ratings 2015-11-28 23:27:36 +11:00
Jesse Boyd
1ee13ff96c Fix commands being case sensitive. 2015-11-28 22:56:12 +11:00
Jesse Boyd
d1ac355e58 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared
# Conflicts:
#	src/main/java/com/intellectualcrafters/plot/config/C.java
2015-11-28 22:49:42 +11:00
Jesse Boyd
94b0fbb266 Stuff
Fixes #748
Fixes #759
2015-11-28 22:46:10 +11:00
Jesse Boyd
ef327434cd Merge pull request #751 from Aaron1011/update-spongeapi
git@github.com:Aaron1011/PlotSquared.gitUpdate for SpongeAPI changes
2015-11-26 14:45:39 +11:00
Aaron Hill
e0e2756b95 Update for SpongeAPI changes 2015-11-25 22:40:22 -05:00
Alexander Söderberg
7d494fef16 Merge pull request #749 from manuelgu/patch-1
fixed importing
2015-11-25 23:12:00 +01:00
manuelgu
7bbf549221 fixed importing
related to #733
2015-11-25 23:05:08 +01:00
Alexander Söderberg
a0c93bb3e7 Merge pull request #747 from manuelgu/patch-2
formatting in german file
2015-11-25 22:51:18 +01:00
Alexander Söderberg
46989faee6 Merge pull request #746 from manuelgu/patch-1
formatting
2015-11-25 22:51:06 +01:00
manuelgu
f80a833689 formatting in german file 2015-11-25 22:30:35 +01:00
manuelgu
eba75363c8 formatting 2015-11-25 22:29:20 +01:00
Alexander Söderberg
cc10c52230 Update README.md 2015-11-25 22:04:16 +01:00
Alexander Söderberg
8a1dfe46c9 Merge pull request #733 from manuelgu/patch-1
fix color formatting
2015-11-22 22:01:28 +01:00
manuelgu
d56b4da7c2 fix color formatting 2015-11-22 12:04:24 +01:00
Jesse Boyd
7db30590c6 Fixes
Fixes #701
Fixes set components for other plots
Add setowner uuid.
Probably some other stuff
2015-11-20 17:28:33 +11:00
Jesse Boyd
7ed693dfc8 Fix populator random seed / algorithm differing from chunk generator 2015-11-18 16:42:19 +11:00
Jesse Boyd
1e1259b81d Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2015-11-18 10:39:52 +11:00
Jesse Boyd
452efc4b08 Fix
Fixes #724
Fixes flag remove for non list based flags when player lacks permission.
2015-11-18 10:39:44 +11:00
Jesse Boyd
9adb256ff6 Merge pull request #719 from manuelgu/patch-2
remove not needed message
2015-11-16 12:31:36 +11:00
manuelgu
c34f41b150 remove not needed message
Since calculating the TPS Values has been removed, the message is no longer in use
2015-11-15 18:58:12 +01:00
Jesse Boyd
a8140f8cb0 Check if no metadata is set. 2015-11-15 20:52:32 +11:00
Jesse Boyd
27d1ba810b Default, default flags 2015-11-15 19:56:32 +11:00
Jesse Boyd
9218147aa0 Whoops. 2015-11-15 13:51:28 +11:00
Jesse Boyd
ab5e826fe8 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2015-11-15 13:31:01 +11:00
Jesse Boyd
93a7b2cace Potential fixes
Fixes #712
Fixes #711
Fixes #707
Fixes #705
Fixes #702
Fixes #698
Fixes #697
Fixes #694
Fixes #717
2015-11-15 13:30:52 +11:00
Jesse Boyd
8a9f4d2598 Merge pull request #706 from swan201/master
Add Korean Translate File
2015-11-07 12:48:40 +11:00
swan201
ebf0fee3ac Add Korean Translate File
First Korean Translate
2015-11-07 10:44:31 +09:00
Jesse Boyd
c32edfe0ee . 2015-11-04 04:52:44 +11:00
Jesse Boyd
008e35d307 Fixes #700 2015-11-04 02:39:42 +11:00
Jesse Boyd
215ed04754 Minor tweaks 2015-10-29 23:13:10 +11:00
Jesse Boyd
95feaed870 Changes
ratings api
misc-cap
other tweakes
2015-10-27 10:57:34 +11:00
Jesse Boyd
2e79f3d0f8 Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared 2015-10-26 18:21:35 +11:00
Jesse Boyd
2afc16de7a Schematics / tweak message 2015-10-26 18:18:31 +11:00
Jesse Boyd
bc836201d5 Merge pull request #687 from manuelgu/patch-1
Update german.yml
2015-10-26 18:05:49 +11:00
manuelgu
24406a250b Update german.yml
tweaked some german translations and also added untranslated things
2015-10-24 22:52:50 +02:00
Jesse Boyd
e20e4a8650 Fixes
Closes #683
Potential fix for sign issue
Potential fix for templates not working
Incremented version number.
2015-10-24 21:55:34 +11:00
Jesse Boyd
6650ea2a4c Fixes #681 2015-10-21 18:31:14 +11:00
Jesse Boyd
a6dad4fb7b Fixes #682 2015-10-21 16:34:15 +11:00
Jesse Boyd
fa442f5903 Fixes
closes #679
closes #676
2015-10-19 17:27:51 +11:00
Jesse Boyd
f509252646 Fix plot cluster command from console. 2015-10-18 23:31:35 +11:00
Jesse Boyd
f75822f56c Fixed no argument feedback for move/copy/swap 2015-10-18 23:18:45 +11:00
Jesse Boyd
26c0e3fa85 Fixes
- Fix sign lines on claim not updating
- Fix plot tier removing for merged plots
- Fix stair rotation for id=24
- Fix interaction to have a lower priority than chestshop (why doesn't
chestshop use monitor priority?)
2015-10-18 22:20:12 +11:00
Jesse Boyd
c595b69c3a fixed world loading. 2015-10-18 01:25:17 +11:00
Jesse Boyd
54655c1a72 Fixes
closes #673
closes #668
closes #672
closes #664 (hopefully)
2015-10-17 22:50:52 +11:00
Jesse Boyd
50c6753bf4 Fixes
close #659
close #662
close #665
close #638
2015-10-10 18:07:26 +11:00
Jesse Boyd
8e874ddeb0 Fix PlotMe conversion 2015-10-07 18:42:50 +11:00
Jesse Boyd
0c4b703510 Fix for sponge 2015-10-07 17:33:33 +11:00
Jesse Boyd
74a967b535 Fixes container contents spillage on plot clear
TODO: fix component setting for ^
2015-10-05 01:40:46 +11:00
Jesse Boyd
f2431c869f fixes
Fixes #657
Fixes #656
Fixes #653
Fixes #652
Fixes #585
2015-10-05 00:59:43 +11:00
Jesse Boyd
9d77b422df Fixes #651 #618 2015-09-30 16:11:44 +10:00
Jesse Boyd
3bd4895676 Fix structure growth on roads (from big trees on plot edges)
Possible unresolved issue (TODO)
- big tree growth on plot edges with 0 road width
2015-09-29 19:50:05 +10:00
Jesse Boyd
b9bb9f5674 Fixes #646 2015-09-29 16:29:28 +10:00
boy0001
c3eb44f51c un-cache base plot on merge 2015-09-27 19:42:22 +10:00
boy0001
0273a4614b Load plots with no settings. 2015-09-27 18:37:33 +10:00
boy0001
bb32507841 Fix plot unclaiming for non hybrid classic generators. 2015-09-27 17:20:59 +10:00
boy0001
3336d302ac Potential fixes 2015-09-27 16:43:11 +10:00
boy0001
a93e8fac38 Some fixes
Fixes #641
Closes #640 (need to also update Plot2Dynmap)
Fixes #637 (duplicate)
Fixes #636
Fixes #634
2015-09-26 18:05:27 +10:00
boy0001
d42ef3cf63 restructure a couple things. 2015-09-22 23:23:28 +10:00
boy0001
c948b18239 Forward plot home to plot visit 2015-09-15 14:56:23 +10:00
boy0001
9682e2914c Recover from world gen error. 2015-09-15 00:35:28 +10:00
boy0001
b524d5fcfe minor conversion tweaks + fix plot sorting with empty worlds. 2015-09-15 00:24:25 +10:00
boy0001
4002ed4de1 Fixes #613 2015-09-14 20:43:51 +10:00
boy0001
064a555ba1 Fix cluster create with non ascending coords 2015-09-14 18:39:07 +10:00
boy0001
91bfcd0deb Fixes #620 2015-09-14 18:20:25 +10:00
boy0001
5137b23357 Hows this? 2015-09-13 14:04:31 +10:00
boy0001
1cccdd9d4d Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared
Conflicts:
	src/main/java/com/intellectualcrafters/plot/IPlotMain.java
	src/main/java/com/intellectualcrafters/plot/commands/Trim.java
	src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java
	src/main/java/com/plotsquared/bukkit/BukkitMain.java
	src/main/java/com/plotsquared/bukkit/util/BukkitChunkManager.java
	src/main/java/com/plotsquared/sponge/SpongeMain.java
	src/main/java/com/plotsquared/sponge/util/SpongeChunkManager.java
2015-09-13 13:46:45 +10:00
boy0001
c163446f7e Fix plot clear event not being called. 2015-09-13 13:33:18 +10:00
boy0001
052019bb35 default to offline-mode uuid if owner isn't valid. 2015-09-13 13:30:28 +10:00
boy0001
a6535d3b7b Forward plot set flag to the flag command. 2015-09-13 01:26:35 +10:00
boy0001
1c28a72f9c WE unregistration + home/visit sorting + format
- WorldEdit listener unregistration for external masking/extent/async
worldedit management. (wink)
- Use the same listing for home and visit as previous behavior was
confusing.
2015-09-13 01:19:39 +10:00
boy0001
c386f33df8 cleanup 2015-09-11 20:09:22 +10:00
Jesse Boyd
063a369d8d Merge pull request #615 from MinelinkNetwork/fix-trimming
Fix trimming for worlds in non-standard directories
2015-09-11 08:52:30 +10:00
Byteflux
629ff443f3 Fix trimming for worlds in non-standard directories 2015-09-09 22:34:41 -07:00
boy0001
37a8861fa0 Temporary fix for sponge toggles. 2015-09-07 22:31:48 +10:00
boy0001
66730794d6 Fixes for sponge + minor tweaks for spigot
- Updated to sponge 591
- Added optional WorldEdit restriction
- several fixes (including greeting/farewell flag)
2015-09-07 22:17:48 +10:00
boy0001
2b3b947143 Fix plot entry/leave for sponge. 2015-09-06 11:53:56 +10:00
boy0001
ea146dcf91 Fix plot chat, chatspy + add comment spying 2015-09-06 10:33:11 +10:00
boy0001
e704784570 Try this version, otherwise maybe downgrade? 2015-09-05 20:45:31 +10:00
boy0001
1e386d274e add jars 2015-09-05 20:21:29 +10:00
boy0001
a71d5a134b Fix rating when no categories are configured 2015-09-05 20:17:39 +10:00
boy0001
e3cb59f362 Lazy UUID conversion 2015-09-05 20:07:59 +10:00
boy0001
8606319340 Fix world caching + block interaction
Fixes #608
2015-09-05 11:35:43 +10:00
boy0001
4cc4196487 jars 2015-09-03 23:37:19 +10:00
boy0001
c707a7baa2 Remove spectator from flag pack 2015-09-03 23:34:52 +10:00
boy0001
4e321d2b27 Here you go. 2015-09-03 22:40:36 +10:00
boy0001
dfc32741fa Export negative coord blocks with BO3 if not part of normal plot component 2015-09-03 15:57:12 +10:00
boy0001
574ca7a180 Call plot leave on quit 2015-09-03 15:48:36 +10:00
boy0001
afef79ea66 Some changes
Fixes #605
Possibly #604
Other minor tweaks
2015-09-03 15:45:25 +10:00
boy0001
3a29022d19 Add command queue option + fix nearest target 2015-09-01 21:33:45 +10:00
boy0001
fcb7c23380 Latest jars 2015-09-01 15:46:56 +10:00
boy0001
ea6d5778c8 Added chat spy toggle 2015-09-01 15:09:46 +10:00
boy0001
6006b0e011 Add world parameter to EconHandler permission checks
Fixes #595
2015-09-01 14:02:37 +10:00
boy0001
f22874970f Fix side location + fix brushtool mask 2015-09-01 10:23:46 +10:00
boy0001
6671fd7e6d Fixes #582 2015-09-01 09:55:14 +10:00
boy0001
29da0da8bb Fixes #577 2015-09-01 08:51:51 +10:00
boy0001
9accbd5ea7 Decrease intensity of fastmode clearing 2015-09-01 07:31:53 +10:00
Jesse Boyd
80b2c6b792 Merge pull request #589 from Maescool/master
Fixing plotme converter for some installations
2015-08-31 07:05:25 +10:00
Pieter Maes
a63110f303 Fixing plotme converter for some installations
-Making sure the uuid is checked when it's ownerId
-Checking if there are uuid's for denied/allowed, then use them if those are not in the cache
2015-08-30 16:23:05 +02:00
boy0001
4027e84a0a Fixed boat interaction 2015-08-30 16:24:53 +10:00
boy0001
0ba838b16b Minor tweaks
- SBQ unsanitized input
- plotme conversion tweaks
- schematic default output directory
- increment version number
2015-08-30 16:19:35 +10:00
boy0001
3662b05da8 Fixes #584 2015-08-29 18:47:56 +10:00
boy0001
fb0b50218d Ignore invalid tool 2015-08-29 12:25:13 +10:00
boy0001
75fbf67dca Fix async worldedit masks 2015-08-29 06:56:02 +10:00
boy0001
0dbb1887d5 Prevent teleporting to invalid coordinates 2015-08-28 16:36:26 +10:00
boy0001
1e8bdb17f8 Per player plot cluster limits 2015-08-28 16:28:55 +10:00
boy0001
22997ac089 Some work on plot clusters 2015-08-28 12:37:01 +10:00
boy0001
ad94637c2a Fix inbox deletion perm 2015-08-28 09:53:35 +10:00
boy0001
552ace359a Feedback for failed uploads + fix plot list done 2015-08-28 09:51:59 +10:00
boy0001
ac27a7f37a Fix automerge.js 2015-08-28 09:51:05 +10:00
boy0001
fcf2400798 Fix lighting updates for chunks not sent to players 2015-08-28 09:50:57 +10:00
boy0001
5acd9c5143 Download requires done 2015-08-28 09:50:44 +10:00
boy0001
56d50bd9e1 Fix masking extent + process non plot worlds 2015-08-28 08:33:32 +10:00
boy0001
5b44e39bec documentation + fix toggles for admins 2015-08-26 16:44:50 +10:00
boy0001
3229705012 Offline uuid from flat file. 2015-08-26 14:21:48 +10:00
boy0001
1872e147cb WE delayed command execution + fix SBQ notify 2015-08-26 12:02:00 +10:00
boy0001
dc37465c8a Forgot to push this 2015-08-26 08:35:32 +10:00
boy0001
b2f8238f5d fix undo 2015-08-25 12:23:10 +10:00
boy0001
2b187f2066 3.1.6 2015-08-25 10:51:33 +10:00
boy0001
ee17457403 v3.1.5 2015-08-25 09:13:13 +10:00
boy0001
6ca6880917 New features + fixes
Fixed a very specific case of IC world not loading with multiverse every
second startup
Fixed chunks not being sent for plot clearing (although it was being
sent for other thing) Fixes #554
Added fast experimental sudo-async worldedit processor
2015-08-25 09:01:45 +10:00
boy0001
0e8ae9e6e4 WE tweak / Fix teleport event 2015-08-25 05:56:22 +10:00
boy0001
3164838e05 Experimental allow plot clearing on mega plots 2015-08-25 03:07:09 +10:00
boy0001
c7f5e3061d Retain trusted / helpers / denied when merging
fixes #533
2015-08-25 02:52:02 +10:00
boy0001
8c245b4f21 Optional bo3 tags 2015-08-25 02:33:28 +10:00
boy0001
68df5b1930 Fixed interactive chat colors + added interactive pages to sponge. 2015-08-25 02:28:32 +10:00
boy0001
83d0b8cebb Revert some plot chat changes.
- Having chat for that plotworld will force it on all players without
the bypass permission
- Not having it will require the player to opt into plot chat
2015-08-25 00:35:37 +10:00
boy0001
3bc3b51a27 Fix plot automerging 2015-08-25 00:19:50 +10:00
boy0001
f2d56ec231 Plot merge limits 2015-08-25 00:00:29 +10:00
boy0001
66f73374ac Tweak block interaction flags 2015-08-24 04:31:33 +10:00
boy0001
d427ba3152 Fix auto-trim 2015-08-24 04:09:57 +10:00
boy0001
79b16b8040 ChunkProcessor auto trim and chunk unloading
- The auto trim drastically reduces the cost of players exploring on
speed 10, as it prevents chunks of unowned plots from saving to disk
when the chunk is unloaded
- It is recommended to disable world auto saving, or also enable the
chunk processor GC, as otherwise minecraft will also save chunks as they
are loaded.
2015-08-24 03:29:59 +10:00
boy0001
e228c00d87 Increment version 2015-08-24 00:18:31 +10:00
boy0001
bd86caa818 Fixed fallback plotme conversion 2015-08-24 00:17:17 +10:00
boy0001
d52e9b4c8c Minor fixes 2015-08-23 22:04:52 +10:00
Jesse Boyd
dbdd207390 Merge pull request #576 from confuser/master
Fixed bukkit plot chat
2015-08-23 22:01:35 +10:00
confuser
316a4e0484 Fixed plot chat using meta instead of attributes
Pass message into setFormat and setMessage correctly
this avoids % symbols in player messages causing exceptions

Fixed #571
2015-08-23 12:00:52 +01:00
confuser
b5fbc6629f Fixed compiliation issue 2015-08-23 11:36:41 +01:00
Jesse Boyd
a1be218580 Merge pull request #568 from LaxWasHere/patch-1
cannot into spelling
2015-08-22 17:47:08 +10:00
Lax
373044c928 cannot into spelling 2015-08-21 21:12:16 -07:00
boy0001
83b1be8944 revert this 2015-08-21 19:24:20 +10:00
boy0001
2185384746 . 2015-08-21 14:53:53 +10:00
boy0001
b063494955 Redstone, chunk sending, reload fix, chunk unloader,
- Added redstone disabler when no players are in the plot
- Fixed chunk sending leaving ghost blocks
- Fixed reloading not populating new values
- Added chunk unloader to chunk processor (decreases memory usage)
2015-08-21 04:54:42 +10:00
boy0001
ae7eed8a5b . 2015-08-20 21:54:04 +10:00
boy0001
5f8505e698 Fix permission checking 2015-08-20 21:51:26 +10:00
boy0001
75f189aae8 Fix auto updating. 2015-08-20 20:48:48 +10:00
boy0001
d0605b9b55 Fixes
Fixes #556
Fixes #540
Fixed plot analysis being slow
Fixed auto updating
2015-08-20 14:56:25 +10:00
979 changed files with 90281 additions and 70339 deletions

387
.editorconfig Normal file
View File

@ -0,0 +1,387 @@
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 130
tab_width = 4
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = false
ij_smart_tabs = false
ij_wrap_on_typing = true
[*.java]
ij_java_align_consecutive_assignments = false
ij_java_align_consecutive_variable_declarations = false
ij_java_align_group_field_declarations = false
ij_java_align_multiline_annotation_parameters = false
ij_java_align_multiline_array_initializer_expression = false
ij_java_align_multiline_assignment = false
ij_java_align_multiline_binary_operation = false
ij_java_align_multiline_chained_methods = false
ij_java_align_multiline_extends_list = false
ij_java_align_multiline_for = true
ij_java_align_multiline_method_parentheses = false
ij_java_align_multiline_parameters = true
ij_java_align_multiline_parameters_in_calls = false
ij_java_align_multiline_parenthesized_expression = false
ij_java_align_multiline_records = true
ij_java_align_multiline_resources = true
ij_java_align_multiline_ternary_operation = false
ij_java_align_multiline_text_blocks = false
ij_java_align_multiline_throws_list = false
ij_java_align_subsequent_simple_methods = false
ij_java_align_throws_keyword = false
ij_java_annotation_parameter_wrap = off
ij_java_array_initializer_new_line_after_left_brace = false
ij_java_array_initializer_right_brace_on_new_line = false
ij_java_array_initializer_wrap = off
ij_java_assert_statement_colon_on_next_line = false
ij_java_assert_statement_wrap = off
ij_java_assignment_wrap = off
ij_java_binary_operation_sign_on_next_line = false
ij_java_binary_operation_wrap = off
ij_java_blank_lines_after_anonymous_class_header = 0
ij_java_blank_lines_after_class_header = 1
ij_java_blank_lines_after_imports = 1
ij_java_blank_lines_after_package = 1
ij_java_blank_lines_around_class = 1
ij_java_blank_lines_around_field = 0
ij_java_blank_lines_around_field_in_interface = 0
ij_java_blank_lines_around_initializer = 1
ij_java_blank_lines_around_method = 1
ij_java_blank_lines_around_method_in_interface = 1
ij_java_blank_lines_before_class_end = 1
ij_java_blank_lines_before_imports = 1
ij_java_blank_lines_before_method_body = 0
ij_java_blank_lines_before_package = 0
ij_java_block_brace_style = end_of_line
ij_java_block_comment_at_first_column = true
ij_java_call_parameters_new_line_after_left_paren = true
ij_java_call_parameters_right_paren_on_new_line = true
ij_java_call_parameters_wrap = on_every_item
ij_java_case_statement_on_separate_line = true
ij_java_catch_on_new_line = false
ij_java_class_annotation_wrap = split_into_lines
ij_java_class_brace_style = end_of_line
ij_java_class_count_to_use_import_on_demand = 100000
ij_java_class_names_in_javadoc = 1
ij_java_do_not_indent_top_level_class_members = false
ij_java_do_not_wrap_after_single_annotation = false
ij_java_do_while_brace_force = always
ij_java_doc_add_blank_line_after_description = true
ij_java_doc_add_blank_line_after_param_comments = false
ij_java_doc_add_blank_line_after_return = false
ij_java_doc_add_p_tag_on_empty_lines = true
ij_java_doc_align_exception_comments = true
ij_java_doc_align_param_comments = true
ij_java_doc_do_not_wrap_if_one_line = false
ij_java_doc_enable_formatting = true
ij_java_doc_enable_leading_asterisks = true
ij_java_doc_indent_on_continuation = true
ij_java_doc_keep_empty_lines = true
ij_java_doc_keep_empty_parameter_tag = true
ij_java_doc_keep_empty_return_tag = true
ij_java_doc_keep_empty_throws_tag = true
ij_java_doc_keep_invalid_tags = false
ij_java_doc_param_description_on_new_line = false
ij_java_doc_preserve_line_breaks = false
ij_java_doc_use_throws_not_exception_tag = true
ij_java_else_on_new_line = false
ij_java_enum_constants_wrap = split_into_lines
ij_java_extends_keyword_wrap = off
ij_java_extends_list_wrap = normal
ij_java_field_annotation_wrap = split_into_lines
ij_java_finally_on_new_line = false
ij_java_for_brace_force = always
ij_java_for_statement_new_line_after_left_paren = false
ij_java_for_statement_right_paren_on_new_line = false
ij_java_for_statement_wrap = off
ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true
ij_java_if_brace_force = always
ij_java_imports_layout = *, |, javax.**, java.**, |, $*
ij_java_indent_case_from_switch = true
ij_java_insert_inner_class_imports = false
ij_java_insert_override_annotation = true
ij_java_keep_blank_lines_before_right_brace = 2
ij_java_keep_blank_lines_between_package_declaration_and_header = 2
ij_java_keep_blank_lines_in_code = 2
ij_java_keep_blank_lines_in_declarations = 2
ij_java_keep_control_statement_in_one_line = true
ij_java_keep_first_column_comment = true
ij_java_keep_indents_on_empty_lines = false
ij_java_keep_line_breaks = true
ij_java_keep_multiple_expressions_in_one_line = false
ij_java_keep_simple_blocks_in_one_line = false
ij_java_keep_simple_classes_in_one_line = false
ij_java_keep_simple_lambdas_in_one_line = false
ij_java_keep_simple_methods_in_one_line = false
ij_java_label_indent_absolute = false
ij_java_label_indent_size = 0
ij_java_lambda_brace_style = end_of_line
ij_java_layout_static_imports_separately = true
ij_java_line_comment_add_space = false
ij_java_line_comment_at_first_column = true
ij_java_method_annotation_wrap = split_into_lines
ij_java_method_brace_style = end_of_line
ij_java_method_call_chain_wrap = on_every_item
ij_java_method_parameters_new_line_after_left_paren = true
ij_java_method_parameters_right_paren_on_new_line = true
ij_java_method_parameters_wrap = on_every_item
ij_java_modifier_list_wrap = false
ij_java_names_count_to_use_import_on_demand = 100000
ij_java_new_line_after_lparen_in_record_header = false
ij_java_parameter_annotation_wrap = off
ij_java_parentheses_expression_new_line_after_left_paren = false
ij_java_parentheses_expression_right_paren_on_new_line = false
ij_java_place_assignment_sign_on_next_line = false
ij_java_prefer_longer_names = false
ij_java_prefer_parameters_wrap = true
ij_java_record_components_wrap = normal
ij_java_repeat_synchronized = true
ij_java_replace_instanceof_and_cast = false
ij_java_replace_null_check = true
ij_java_replace_sum_lambda_with_method_ref = true
ij_java_resource_list_new_line_after_left_paren = false
ij_java_resource_list_right_paren_on_new_line = false
ij_java_resource_list_wrap = off
ij_java_rparen_on_new_line_in_record_header = false
ij_java_space_after_closing_angle_bracket_in_type_argument = false
ij_java_space_after_colon = true
ij_java_space_after_comma = true
ij_java_space_after_comma_in_type_arguments = true
ij_java_space_after_for_semicolon = true
ij_java_space_after_quest = true
ij_java_space_after_type_cast = true
ij_java_space_before_annotation_array_initializer_left_brace = false
ij_java_space_before_annotation_parameter_list = false
ij_java_space_before_array_initializer_left_brace = false
ij_java_space_before_catch_keyword = true
ij_java_space_before_catch_left_brace = true
ij_java_space_before_catch_parentheses = true
ij_java_space_before_class_left_brace = true
ij_java_space_before_colon = true
ij_java_space_before_colon_in_foreach = true
ij_java_space_before_comma = false
ij_java_space_before_do_left_brace = true
ij_java_space_before_else_keyword = true
ij_java_space_before_else_left_brace = true
ij_java_space_before_finally_keyword = true
ij_java_space_before_finally_left_brace = true
ij_java_space_before_for_left_brace = true
ij_java_space_before_for_parentheses = true
ij_java_space_before_for_semicolon = false
ij_java_space_before_if_left_brace = true
ij_java_space_before_if_parentheses = true
ij_java_space_before_method_call_parentheses = false
ij_java_space_before_method_left_brace = true
ij_java_space_before_method_parentheses = false
ij_java_space_before_opening_angle_bracket_in_type_parameter = false
ij_java_space_before_quest = true
ij_java_space_before_switch_left_brace = true
ij_java_space_before_switch_parentheses = true
ij_java_space_before_synchronized_left_brace = true
ij_java_space_before_synchronized_parentheses = true
ij_java_space_before_try_left_brace = true
ij_java_space_before_try_parentheses = true
ij_java_space_before_type_parameter_list = false
ij_java_space_before_while_keyword = true
ij_java_space_before_while_left_brace = true
ij_java_space_before_while_parentheses = true
ij_java_space_inside_one_line_enum_braces = false
ij_java_space_within_empty_array_initializer_braces = false
ij_java_space_within_empty_method_call_parentheses = false
ij_java_space_within_empty_method_parentheses = false
ij_java_spaces_around_additive_operators = true
ij_java_spaces_around_assignment_operators = true
ij_java_spaces_around_bitwise_operators = true
ij_java_spaces_around_equality_operators = true
ij_java_spaces_around_lambda_arrow = true
ij_java_spaces_around_logical_operators = true
ij_java_spaces_around_method_ref_dbl_colon = false
ij_java_spaces_around_multiplicative_operators = true
ij_java_spaces_around_relational_operators = true
ij_java_spaces_around_shift_operators = true
ij_java_spaces_around_type_bounds_in_type_parameters = true
ij_java_spaces_around_unary_operator = false
ij_java_spaces_within_angle_brackets = false
ij_java_spaces_within_annotation_parentheses = false
ij_java_spaces_within_array_initializer_braces = false
ij_java_spaces_within_braces = false
ij_java_spaces_within_brackets = false
ij_java_spaces_within_cast_parentheses = false
ij_java_spaces_within_catch_parentheses = false
ij_java_spaces_within_for_parentheses = false
ij_java_spaces_within_if_parentheses = false
ij_java_spaces_within_method_call_parentheses = false
ij_java_spaces_within_method_parentheses = false
ij_java_spaces_within_parentheses = false
ij_java_spaces_within_switch_parentheses = false
ij_java_spaces_within_synchronized_parentheses = false
ij_java_spaces_within_try_parentheses = false
ij_java_spaces_within_while_parentheses = false
ij_java_special_else_if_treatment = true
ij_java_subclass_name_suffix = Impl
ij_java_ternary_operation_signs_on_next_line = true
ij_java_ternary_operation_wrap = on_every_item
ij_java_test_name_suffix = Test
ij_java_throws_keyword_wrap = off
ij_java_throws_list_wrap = normal
ij_java_use_external_annotations = false
ij_java_use_fq_class_names = false
ij_java_use_relative_indents = false
ij_java_use_single_class_imports = true
ij_java_variable_annotation_wrap = off
ij_java_visibility = public
ij_java_while_brace_force = always
ij_java_while_on_new_line = false
ij_java_wrap_comments = false
ij_java_wrap_first_method_in_call_chain = true
ij_java_wrap_long_lines = false
[*.properties]
ij_properties_align_group_field_declarations = false
ij_properties_keep_blank_lines = false
ij_properties_key_value_delimiter = equals
ij_properties_spaces_around_key_value_delimiter = false
[.editorconfig]
ij_editorconfig_align_group_field_declarations = false
ij_editorconfig_space_after_colon = false
ij_editorconfig_space_after_comma = true
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_before_comma = false
ij_editorconfig_spaces_around_assignment_operators = true
[{*.gradle.kts, *.kt, *.kts, *.main.kts}]
ij_kotlin_align_in_columns_case_branch = false
ij_kotlin_align_multiline_binary_operation = false
ij_kotlin_align_multiline_extends_list = false
ij_kotlin_align_multiline_method_parentheses = false
ij_kotlin_align_multiline_parameters = true
ij_kotlin_align_multiline_parameters_in_calls = false
ij_kotlin_allow_trailing_comma = false
ij_kotlin_allow_trailing_comma_on_call_site = false
ij_kotlin_assignment_wrap = off
ij_kotlin_blank_lines_after_class_header = 0
ij_kotlin_blank_lines_around_block_when_branches = 0
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
ij_kotlin_block_comment_at_first_column = true
ij_kotlin_call_parameters_new_line_after_left_paren = false
ij_kotlin_call_parameters_right_paren_on_new_line = false
ij_kotlin_call_parameters_wrap = off
ij_kotlin_catch_on_new_line = false
ij_kotlin_class_annotation_wrap = split_into_lines
ij_kotlin_continuation_indent_for_chained_calls = true
ij_kotlin_continuation_indent_for_expression_bodies = true
ij_kotlin_continuation_indent_in_argument_lists = true
ij_kotlin_continuation_indent_in_elvis = true
ij_kotlin_continuation_indent_in_if_conditions = true
ij_kotlin_continuation_indent_in_parameter_lists = true
ij_kotlin_continuation_indent_in_supertype_lists = true
ij_kotlin_else_on_new_line = false
ij_kotlin_enum_constants_wrap = off
ij_kotlin_extends_list_wrap = off
ij_kotlin_field_annotation_wrap = split_into_lines
ij_kotlin_finally_on_new_line = false
ij_kotlin_if_rparen_on_new_line = false
ij_kotlin_import_nested_classes = false
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
ij_kotlin_keep_blank_lines_before_right_brace = 2
ij_kotlin_keep_blank_lines_in_code = 2
ij_kotlin_keep_blank_lines_in_declarations = 2
ij_kotlin_keep_first_column_comment = true
ij_kotlin_keep_indents_on_empty_lines = false
ij_kotlin_keep_line_breaks = true
ij_kotlin_lbrace_on_next_line = false
ij_kotlin_line_comment_add_space = false
ij_kotlin_line_comment_at_first_column = true
ij_kotlin_method_annotation_wrap = split_into_lines
ij_kotlin_method_call_chain_wrap = off
ij_kotlin_method_parameters_new_line_after_left_paren = false
ij_kotlin_method_parameters_right_paren_on_new_line = false
ij_kotlin_method_parameters_wrap = off
ij_kotlin_name_count_to_use_star_import = 5
ij_kotlin_name_count_to_use_star_import_for_members = 3
ij_kotlin_parameter_annotation_wrap = off
ij_kotlin_space_after_comma = true
ij_kotlin_space_after_extend_colon = true
ij_kotlin_space_after_type_colon = true
ij_kotlin_space_before_catch_parentheses = true
ij_kotlin_space_before_comma = false
ij_kotlin_space_before_extend_colon = true
ij_kotlin_space_before_for_parentheses = true
ij_kotlin_space_before_if_parentheses = true
ij_kotlin_space_before_lambda_arrow = true
ij_kotlin_space_before_type_colon = false
ij_kotlin_space_before_when_parentheses = true
ij_kotlin_space_before_while_parentheses = true
ij_kotlin_spaces_around_additive_operators = true
ij_kotlin_spaces_around_assignment_operators = true
ij_kotlin_spaces_around_equality_operators = true
ij_kotlin_spaces_around_function_type_arrow = true
ij_kotlin_spaces_around_logical_operators = true
ij_kotlin_spaces_around_multiplicative_operators = true
ij_kotlin_spaces_around_range = false
ij_kotlin_spaces_around_relational_operators = true
ij_kotlin_spaces_around_unary_operator = false
ij_kotlin_spaces_around_when_arrow = true
ij_kotlin_variable_annotation_wrap = off
ij_kotlin_while_on_new_line = false
ij_kotlin_wrap_elvis_expressions = 1
ij_kotlin_wrap_expression_body_functions = 0
ij_kotlin_wrap_first_method_in_call_chain = false
[*.json]
indent_size = 2
ij_json_keep_blank_lines_in_code = 0
ij_json_keep_indents_on_empty_lines = false
ij_json_keep_line_breaks = true
ij_json_space_after_colon = true
ij_json_space_after_comma = true
ij_json_space_before_colon = true
ij_json_space_before_comma = false
ij_json_spaces_within_braces = false
ij_json_spaces_within_brackets = false
ij_json_wrap_long_lines = false
[{*.htm, *.html, *.sht, *.shtm, *.shtml}]
ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3
ij_html_align_attributes = true
ij_html_align_text = false
ij_html_attribute_wrap = normal
ij_html_block_comment_at_first_column = true
ij_html_do_not_align_children_of_min_lines = 0
ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p
ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot
ij_html_enforce_quotes = false
ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var
ij_html_keep_blank_lines = 2
ij_html_keep_indents_on_empty_lines = false
ij_html_keep_line_breaks = true
ij_html_keep_line_breaks_in_text = true
ij_html_keep_whitespaces = false
ij_html_keep_whitespaces_inside = span, pre, textarea
ij_html_line_comment_at_first_column = true
ij_html_new_line_after_last_attribute = never
ij_html_new_line_before_first_attribute = never
ij_html_quote_style = double
ij_html_remove_new_line_before_tags = br
ij_html_space_after_tag_name = false
ij_html_space_around_equality_in_attribute = false
ij_html_space_inside_empty_tag = false
ij_html_text_wrap = normal
ij_html_uniform_ident = false
[{*.yaml, *.yml}]
indent_size = 2
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true

4
.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
* text=auto
*.java text
*.jar binary

1
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1 @@
* @IntellectualSites/plotsquared-team

105
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@ -0,0 +1,105 @@
name: Bug report
description: Create a report to help us improve
labels: 'Requires Testing'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report for PlotSquared! Fill out the following form to your best ability to help us fix the problem.
Only use this if you're absolutely sure that you found a bug and can reproduce it. For anything else, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.github.io/plotsquared-documentation/).
Do NOT use the public issue tracker to report security vulnerabilities! They are disclosed using [this](https://forms.gle/btgdRn9yhGtzEiGW8) form!
- type: dropdown
attributes:
label: Server Implementation
description: Which server Implementation are you using? If your server implementation is not listed, it is not supported. Switch to a supported version first.
multiple: false
options:
- Paper
- Spigot
validations:
required: true
- type: dropdown
attributes:
label: Server Version
description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
multiple: false
options:
- '1.19.3'
- '1.19.2'
- '1.19.1'
- '1.19'
- '1.18.2'
- '1.18.1'
- '1.17.1'
- '1.16.5'
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce this behaviour
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
attributes:
label: Expected behaviour
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Screenshots / Videos
description: If applicable, add screenshots to help explain your problem.
- type: input
attributes:
label: Error log (if applicable)
description: If you are reporting a console error, upload any relevant log excerpts to either https://paste.gg/ or https://gist.github.com, save and the paste the link in this box.
- type: input
attributes:
label: Plot Debugpaste
description: Run `/plot debugpaste` in your console or ingame and provide the output link here.
validations:
required: true
- type: input
attributes:
label: PlotSquared Version
description: What version of PlotSquared are you running? (`/version PlotSquared`)
placeholder: "For example: PlotSquared version 5.13.11-Premium"
validations:
required: true
- type: checkboxes
attributes:
label: Checklist
description: Make sure you have followed each of the steps outlined here.
options:
- label: I have included a Plot debugpaste.
required: true
- label: I am using the newest build from https://www.spigotmc.org/resources/77506/ and the issue still persists.
required: true
- type: textarea
attributes:
label: Anything else?
description: You can provide additional context below.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: IntellectualSites Discord
url: https://discord.gg/intellectualsites
about: Our support Discord, please ask questions and seek support here.
- name: PlotSquared Wiki
url: https://intellectualsites.github.io/plotsquared-documentation/
about: Take a look at the wiki page for instructions how to setup PlotSquared and use its commands.

View File

@ -0,0 +1,29 @@
name: Feature request
description: Suggest an idea for this project
labels: 'Enhancement'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request for PlotSquared! Fill out the following form to your best ability to help us understand your feature request and greately improve the change of it getting added.
For anything else than a feature request, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.github.io/plotsquared-documentation/).
- type: textarea
attributes:
label: What feature do you want to see added?
description: A clear and concise description of your feature request.
validations:
required: true
- type: textarea
attributes:
label: Are there any alternatives?
description: List any alternatives you might have tried
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: You can provide additional context below.

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

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

18
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,18 @@
daysUntilStale: 30
daysUntilClose: 7
only: issues
exemptLabels:
- "Bug"
- "Enhancement"
- "Approved"
- "Priority"
- "Under investigation"
staleLabel: "resolution: stale"
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. If the issue is still present and can be reproduced, please let the team know.
Thank you for your contributions.
closeComment: >
This issue has been automatically closed because it has not had activity in
a long time. If the issue still applies to the most recent supported
version, please reply to this issue and the team will reopen it.

View File

@ -0,0 +1,24 @@
name: Announce release on discord
on:
release:
types: [published]
jobs:
send_announcement:
runs-on: ubuntu-latest
steps:
- name: send custom message with args
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: PlotSquared Release
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
uses: Ilshidur/action-discord@08d9328877d6954120eef2b07abbc79249bb6210 # ratchet:Ilshidur/action-discord@0.3.2
with:
args: |
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
""
"<:plotsquared:730750385886593039> **PlotSquared ${{ github.event.release.tag_name }} has been released!**"
""
"Click here to view changelog: https://github.com/IntellectualSites/PlotSquared/releases/tag/${{ github.event.release.tag_name }}"
""
"The download is available at:"
"- Spigot: <https://www.spigotmc.org/resources/77506/>"

21
.github/workflows/build-pr.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Build PR
on: [pull_request]
jobs:
build_pr:
if: github.repository_owner == 'IntellectualSites'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Clean Build
run: ./gradlew clean build

67
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,67 @@
name: build
on:
push:
branches:
- v6
jobs:
build:
if: github.repository_owner == 'IntellectualSites'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: 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 }}
- name: Publish core javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'Core/build/docs/javadoc'
destination-github-username: 'IntellectualSites'
destination-repository-name: 'plotsquared-javadocs'
user-email: ${{ secrets.USER_EMAIL }}
target-branch: main
target-directory: core
- name: Publish bukkit javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'Bukkit/build/docs/javadoc'
destination-github-username: 'IntellectualSites'
destination-repository-name: 'plotsquared-javadocs'
user-email: ${{ secrets.USER_EMAIL }}
target-branch: main
target-directory: bukkit

28
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: "CodeQL"
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [v6]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['java']
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2

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

@ -0,0 +1,17 @@
name: draft release
on:
push:
branches:
- v6
pull_request:
types: [opened, reopened, synchronize]
pull_request_target:
types: [opened, reopened, synchronize]
jobs:
update_release_draft:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

81
.gitignore vendored
View File

@ -1,9 +1,15 @@
### Ignore script files
### Others ###
*.cmd
*.sh
*.bat
*.prefs
Core/build
### Maven template
target/
### Maven ###
/mvn
/target/lib
/target/maven-archiver
/target/classes
/target/maven-status
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
@ -12,21 +18,38 @@ release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
out/
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
### Java ###
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
*.iml
## Directory-based project format:
.idea/
/.idea/*
!/.idea/icon.svg
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# .idea/shelf
# Sensitive or high-churn files:
# .idea/dataSources.ids
@ -38,6 +61,7 @@ buildNumber.properties
# Gradle:
# .idea/gradle.xml
# .idea/libraries
.gradle
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
@ -51,9 +75,6 @@ buildNumber.properties
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
@ -61,23 +82,12 @@ atlassian-ide-plugin.xml
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### NetBeans template
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
### Eclipse template
### Eclipse ###
*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
@ -115,20 +125,15 @@ local.properties
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
/target/
checkstyle.xml
classes/
*.bat
### Java template
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# Other
docs/
build/
.DS_Store

50
.idea/icon.svg generated Normal file
View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="svg2" xml:space="preserve" width="4000" height="3333.3333" viewBox="0 0 4000 3333.3333" sodipodi:docname="PlotSquared.ai">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6">
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath18">
<path d="M 0,2500 H 3000 V 0 H 0 Z" id="path16" />
</clipPath>
</defs>
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview4" />
<g id="g10" inkscape:groupmode="layer" inkscape:label="PlotSquared" transform="matrix(1.3333333,0,0,-1.3333333,0,3333.3333)">
<g id="g12">
<g id="g14" clip-path="url(#clipPath18)">
<g id="g20" transform="translate(1486.1511,2242.6453)">
<path d="m 0,0 c 16.533,10.846 33.211,21.453 50.104,31.699 78.972,-48.281 153.985,-102.704 227.269,-159.144 148.61,-115.422 287.884,-243.01 414.393,-382.333 111.39,-122.861 212.751,-255.152 298.898,-396.971 52.744,-87.322 100.544,-177.884 139.514,-272.214 -11.638,-3.551 -23.108,-7.655 -34.362,-12.286 l -0.24,0.288 c -11.135,12.982 -24.141,24.212 -34.915,37.506 -22.557,23.013 -45.425,45.737 -68.03,68.678 -19.725,20.253 -40.601,39.45 -58.958,60.974 -36.355,36.451 -72.517,73.093 -108.944,109.471 -22.628,26.013 -48.064,49.385 -71.965,74.197 -19.029,19.485 -38.706,38.346 -57.519,57.999 -12.166,14.998 -26.684,27.716 -39.93,41.658 -27.668,27.524 -54.903,55.479 -82.571,82.979 -23.924,27.956 -51.664,52.264 -76.692,79.164 -4.68,4.487 -8.855,10.774 -15.886,11.326 -22.34,34.027 -58.311,57.327 -97.377,67.502 -104.312,99.153 -215.487,191.202 -332.661,274.782 -117.942,-83.94 -229.476,-176.781 -334.484,-276.39 -26.684,-0.024 -53.368,0.024 -80.076,-0.024 0.024,-26.564 0.048,-53.104 0,-79.668 -72.229,-73.021 -139.491,-150.937 -202.385,-232.092 -63.758,-82.619 -121.973,-169.51 -173.541,-260.264 131.932,-69.061 257.864,-149.521 375.926,-240.275 0.096,-26.444 -0.12,-52.888 0.096,-79.332 l 0.744,-0.984 c 20.109,-24.14 43.409,-45.233 65.126,-67.861 15.118,-15.382 30.571,-30.404 45.569,-45.881 17.565,-20.733 37.698,-39.042 56.607,-58.503 19.917,-20.781 41.25,-40.218 59.967,-62.151 29.156,-29.299 58.167,-58.815 87.515,-87.922 29.155,-33.043 61.502,-63.111 92.169,-94.738 13.726,-12.67 25.124,-27.571 38.634,-40.457 25.029,-25.365 50.129,-50.657 75.325,-75.853 -37.914,-51.208 -73.741,-103.952 -107.192,-158.183 -167.83,273.317 -397.235,507.305 -662.37,687.158 -81.875,55.335 -167.23,105.584 -255.681,149.641 -52.815,26.276 -106.831,50.248 -162.239,70.381 99.393,233.628 242.795,446.715 410.289,636.79 93.562,106.088 194.634,205.433 301.466,298.13 C -217.335,-155.808 -111.439,-73.789 0,0" style="fill:#062f4c;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path22" />
</g>
<g id="g24" transform="translate(1201.7948,1741.5303)">
<path d="M 0,0 C 105.008,99.609 216.543,192.45 334.485,276.39 451.659,192.81 562.833,100.76 667.146,1.608 c -34.987,8.83 -71.51,9.718 -107.264,6.431 -41.202,-4.296 -82.907,-19.077 -112.543,-48.953 -33.019,-32.155 -49.456,-77.604 -55.311,-122.501 -28.124,27.908 -56.104,55.983 -84.035,84.083 -2.976,2.976 -6.839,4.823 -10.391,6.911 -19.029,26.348 -45.953,46.673 -76.62,57.495 C 187.555,-2.472 151.513,-0.12 116.166,0 Z" style="fill:#4c8fcc;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path26" />
</g>
<g id="g28" transform="translate(919.3342,1429.7462)">
<path d="m 0,0 c 62.894,81.156 130.156,159.072 202.385,232.092 0.048,-244.21 0.024,-488.421 0,-732.631 C 84.323,-409.785 -41.61,-329.325 -173.541,-260.264 -121.973,-169.51 -63.758,-82.619 0,0" style="fill:#4c8fcc;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path30" />
</g>
<g id="g32" transform="translate(1649.134,1700.6166)">
<path d="m 0,0 c 29.635,29.875 71.341,44.657 112.543,48.952 35.754,3.288 72.277,2.4 107.263,-6.431 39.066,-10.174 75.037,-33.474 97.377,-67.501 11.879,-17.661 20.181,-37.411 26.42,-57.687 10.871,-38.802 11.95,-79.356 11.446,-119.358 -44.345,-0.072 -88.69,0.048 -133.035,-0.072 -1.032,30.907 3.263,63.686 -10.175,92.626 -9.526,20.325 -32.107,31.243 -53.751,32.131 -21.453,1.44 -45.065,-4.32 -59.175,-21.597 -12.79,-15.861 -15.382,-37.002 -16.558,-56.655 -1.295,-29.132 3.696,-59.031 17.518,-84.923 16.821,-30.619 39.378,-57.783 64.526,-81.9 31.387,-32.634 67.501,-60.374 97.857,-94.041 27.332,-28.988 51.256,-61.479 68.005,-97.785 20.541,-41.13 26.972,-87.827 25.82,-133.372 -0.912,-32.107 -5.231,-64.406 -16.149,-94.737 -11.59,-31.699 -31.123,-61.047 -58.335,-81.371 -25.124,-19.125 -55.696,-29.852 -86.651,-34.771 -49.552,-6.743 -101.888,-4.847 -148.465,14.854 -35.227,14.829 -64.238,42.689 -81.708,76.548 -20.996,40.242 -27.115,86.339 -27.259,131.212 0.048,17.829 0,35.658 0.048,53.463 44.345,0.048 88.69,-0.023 133.059,0.048 1.728,-35.538 -4.055,-72.06 5.663,-106.807 5.783,-22.173 26.204,-37.794 48.185,-41.754 20.733,-3.431 43.577,-2.015 61.622,9.791 15.502,9.43 23.949,26.78 26.78,44.225 5.903,35.922 1.872,74.293 -15.381,106.688 -16.918,30.595 -39.474,57.711 -64.55,81.899 -33.187,34.099 -71.173,63.254 -102.585,99.081 -26.756,28.867 -49.408,61.646 -65.486,97.641 -24.572,52.48 -26.731,112.422 -20.18,169.102 C -49.456,-77.604 -33.019,-32.155 0,0" style="fill:#feeeee;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path34" />
</g>
<g id="g36" transform="translate(1262.7214,1613.126)">
<path d="m 0,0 v -301.13 c 23.204,0.024 46.409,-0.048 69.613,0.024 18.525,0.288 38.202,6.575 50.153,21.429 12.43,17.277 13.917,39.522 14.613,60.111 0.024,43.985 -0.048,87.994 0.024,131.979 -0.48,23.637 -0.983,50.369 -17.277,69.23 C 104.864,-5.711 86.867,-0.24 69.589,0 46.385,0.048 23.204,0.024 0,0 m -141.002,128.38 c 26.708,0.048 53.392,0 80.075,0.024 H 55.24 c 35.346,-0.12 71.389,-2.471 104.815,-14.925 30.668,-10.823 57.592,-31.148 76.621,-57.496 26.852,-39.09 36.69,-87.202 38.058,-133.947 0.024,-48.833 0.096,-97.689 -0.024,-146.521 -1.728,-47.993 -11.974,-97.953 -41.514,-136.971 -22.748,-30.644 -57.495,-50.801 -94.281,-59.583 -45.377,-11.878 -92.578,-6.791 -138.891,-7.847 -0.072,-111.799 0,-223.574 -0.024,-335.373 -13.942,0 -27.86,0.024 -41.778,-0.024 -32.802,0.072 -65.605,0 -98.384,0.048 l -0.744,0.984 c -0.216,26.444 0,52.888 -0.096,79.332 0.024,244.211 0.048,488.421 0,732.632 0.048,26.563 0.024,53.103 0,79.667" style="fill:#feeeee;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path38" />
</g>
<g id="g40" transform="translate(1966.3174,1675.6364)">
<path d="m 0,0 c 7.031,-0.552 11.206,-6.839 15.885,-11.326 25.029,-26.9 52.768,-51.208 76.693,-79.164 27.667,-27.5 54.903,-55.456 82.571,-82.979 13.246,-13.942 27.764,-26.66 39.93,-41.658 18.813,-19.653 38.49,-38.514 57.519,-57.999 23.9,-24.812 49.337,-48.185 71.965,-74.197 36.427,-36.378 72.589,-73.02 108.943,-109.471 18.358,-21.524 39.234,-40.722 58.959,-60.974 22.605,-22.941 45.473,-45.665 68.03,-68.678 10.774,-13.294 23.78,-24.524 34.914,-37.506 -103.904,-41.97 -203.488,-94.114 -298.922,-152.761 -246.994,-152.28 -466.224,-350.298 -639.333,-583.398 -25.197,25.196 -50.297,50.488 -75.325,75.852 -13.51,12.886 -24.908,27.788 -38.634,40.458 -30.667,31.627 -63.014,61.695 -92.17,94.738 -29.347,29.107 -58.359,58.623 -87.514,87.922 -18.717,21.933 -40.05,41.37 -59.967,62.151 -18.909,19.461 -39.042,37.77 -56.607,58.503 -14.998,15.477 -30.452,30.499 -45.569,45.88 -21.717,22.629 -45.017,43.722 -65.126,67.862 32.779,-0.048 65.582,0.024 98.384,-0.048 114.391,-98.097 220.407,-205.984 315.384,-322.99 92.914,114.318 196.242,220.022 307.753,316.271 30.955,4.919 61.526,15.646 86.65,34.771 27.212,20.325 46.745,49.672 58.335,81.371 107.312,77.988 219.327,149.929 337.509,210.376 -35.299,64.67 -75.829,126.437 -118.254,186.643 C 176.253,-228.037 104.24,-140.115 26.42,-57.687 20.181,-37.41 11.878,-17.661 0,0" style="fill:#042338;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path42" />
</g>
<g id="g44" transform="translate(1499.3971,1669.1094)">
<path d="m 0,0 c 3.551,-2.088 7.415,-3.935 10.39,-6.911 27.932,-28.1 55.912,-56.175 84.036,-84.083 -6.551,-56.679 -4.392,-116.622 20.18,-169.102 16.078,-35.994 38.73,-68.774 65.486,-97.641 31.412,-35.826 69.398,-64.982 102.585,-99.081 25.076,-24.188 47.632,-51.304 64.55,-81.899 17.253,-32.395 21.284,-70.765 15.381,-106.688 -2.831,-17.445 -11.278,-34.794 -26.78,-44.225 -18.045,-11.806 -40.889,-13.222 -61.622,-9.79 -21.981,3.959 -42.402,19.58 -48.185,41.753 -9.718,34.747 -3.935,71.269 -5.663,106.808 -44.369,-0.072 -88.714,0 -133.059,-0.048 -0.048,-17.806 0,-35.635 -0.048,-53.464 0.144,-44.873 6.263,-90.97 27.259,-131.212 17.47,-33.859 46.481,-61.718 81.708,-76.548 46.577,-19.701 98.913,-21.597 148.465,-14.854 -111.511,-96.249 -214.839,-201.953 -307.753,-316.271 -94.977,117.006 -200.993,224.893 -315.383,322.99 13.918,0.048 27.836,0.024 41.777,0.024 0.024,111.799 -0.048,223.574 0.024,335.372 46.313,1.056 93.514,-4.031 138.891,7.847 36.786,8.783 71.533,28.94 94.282,59.583 29.539,39.018 39.785,88.978 41.513,136.971 0.12,48.833 0.048,97.689 0.024,146.522 C 36.69,-87.203 26.852,-39.09 0,0" style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path46" />
</g>
<g id="g48" transform="translate(1748.0469,1601.6797)">
<path d="M 0,0 C 14.11,17.277 37.722,23.036 59.175,21.597 80.82,20.709 103.4,9.791 112.927,-10.534 c 13.438,-28.94 9.142,-61.719 10.174,-92.626 44.345,0.12 88.691,0 133.036,0.072 0.504,40.002 -0.576,80.556 -11.447,119.358 77.82,-82.428 149.833,-170.35 215.583,-262.664 42.426,-60.207 82.956,-121.973 118.254,-186.643 -118.182,-60.447 -230.196,-132.388 -337.508,-210.376 10.918,30.331 15.238,62.63 16.149,94.737 1.152,45.545 -5.279,92.242 -25.82,133.372 -16.749,36.306 -40.673,68.797 -68.005,97.785 -30.355,33.667 -66.47,61.406 -97.857,94.041 -25.148,24.117 -47.705,51.28 -64.526,81.9 -13.822,25.892 -18.813,55.791 -17.517,84.923 C -15.382,-37.002 -12.79,-15.862 0,0" style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path50" />
</g>
<g id="g52" transform="translate(1262.7214,1613.126)">
<path d="m 0,0 c 23.204,0.024 46.385,0.048 69.589,0 17.278,-0.24 35.275,-5.711 47.537,-18.357 16.294,-18.861 16.797,-45.593 17.277,-69.23 -0.072,-43.985 0,-87.994 -0.024,-131.979 -0.696,-20.589 -2.183,-42.834 -14.613,-60.111 -11.951,-14.854 -31.628,-21.141 -50.153,-21.429 -23.204,-0.072 -46.409,0 -69.613,-0.024 z" style="fill:#1c72ba;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path54" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

116
Bukkit/build.gradle.kts Normal file
View File

@ -0,0 +1,116 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
repositories {
maven {
name = "PlaceholderAPI"
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}
maven {
name = "PaperMC"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
name = "EssentialsX"
url = uri("https://repo.essentialsx.net/releases/")
}
}
dependencies {
api(projects.plotSquaredCore)
// Metrics
implementation("org.bstats:bstats-bukkit")
// Paper
compileOnly("io.papermc.paper:paper-api")
implementation("io.papermc:paperlib")
// Plugins
compileOnly(libs.worldeditBukkit) {
exclude(group = "org.bukkit")
exclude(group = "org.spigotmc")
}
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false }
testImplementation("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false }
compileOnly("com.github.MilkBowl:VaultAPI") {
exclude(group = "org.bukkit")
}
compileOnly(libs.placeholderapi)
compileOnly(libs.luckperms)
compileOnly(libs.essentialsx)
compileOnly(libs.mvdwapi) { isTransitive = false }
// Other libraries
implementation(libs.squirrelid) { isTransitive = false }
implementation("dev.notmyfault.serverlib:ServerLib")
// Our libraries
implementation(libs.arkitektonika)
implementation(libs.http4j)
implementation("com.intellectualsites.paster:Paster")
implementation("com.intellectualsites.informative-annotations:informative-annotations")
// Adventure
implementation("net.kyori:adventure-platform-bukkit")
}
tasks.processResources {
filesMatching("plugin.yml") {
expand("version" to project.version)
}
}
tasks.named<ShadowJar>("shadowJar") {
dependencies {
exclude(dependency("org.checkerframework:"))
}
relocate("net.kyori.adventure", "com.plotsquared.core.configuration.adventure")
relocate("net.kyori.examination", "com.plotsquared.core.configuration.examination")
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
relocate("org.bstats", "com.plotsquared.metrics")
relocate("org.enginehub", "com.plotsquared.squirrelid")
relocate("org.khelekore.prtree", "com.plotsquared.prtree")
relocate("com.google.inject", "com.plotsquared.google")
relocate("org.aopalliance", "com.plotsquared.core.aopalliance")
relocate("cloud.commandframework.services", "com.plotsquared.core.services")
relocate("io.leangen.geantyref", "com.plotsquared.core.geantyref")
relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika")
relocate("com.intellectualsites.http", "com.plotsquared.core.http")
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
relocate("org.incendo.serverlib", "com.plotsquared.bukkit.serverlib")
relocate("org.jetbrains", "com.plotsquared.core.annotations")
relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations")
relocate("javax.annotation", "com.plotsquared.core.annotation")
relocate("com.github.spotbugs", "com.plotsquared.core.spotbugs")
relocate("javax.inject", "com.plotsquared.core.annotation.inject")
relocate("net.jcip", "com.plotsquared.core.annotations.jcip")
relocate("edu.umd.cs.findbugs", "com.plotsquared.core.annotations.findbugs")
relocate("com.intellectualsites.informative-annotations", "com.plotsquared.core.annotation.informative")
// Get rid of all the libs which are 100% unused.
minimize()
mergeServiceFiles()
}
tasks {
withType<Javadoc> {
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
val opt = options as StandardJavadocDocletOptions
opt.links("https://jd.papermc.io/paper/1.18/")
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
opt.links("https://intellectualsites.github.io/plotsquared-javadocs/core/")
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
opt.links("https://checkerframework.org/api/")
opt.isLinkSource = true
opt.bottom(File("$rootDir/javadocfooter.html").readText())
opt.isUse = true
opt.encoding("UTF-8")
opt.keyWords()
opt.addStringOption("-since", isRelease)
}
}

View File

@ -0,0 +1,86 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.command.MainCommand;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.PlotPlayer;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.ProxiedCommandSender;
import org.bukkit.command.RemoteConsoleCommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
public class BukkitCommand implements CommandExecutor, TabCompleter {
@Override
public boolean onCommand(
CommandSender commandSender, Command command, String commandLabel,
String[] args
) {
if (commandSender instanceof Player) {
return MainCommand.onCommand(BukkitUtil.adapt((Player) commandSender), args);
}
if (commandSender instanceof ConsoleCommandSender
|| commandSender instanceof ProxiedCommandSender
|| commandSender instanceof RemoteConsoleCommandSender) {
return MainCommand.onCommand(ConsolePlayer.getConsole(), args);
}
return false;
}
@Override
public List<String> onTabComplete(
CommandSender commandSender, Command command, String label,
String[] args
) {
if (!(commandSender instanceof Player)) {
return null;
}
PlotPlayer<?> player = BukkitUtil.adapt((Player) commandSender);
if (args.length == 0) {
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 =
MainCommand.getInstance().tab(player, args, label.endsWith(" "));
if (objects == null) {
return null;
}
List<String> result = new ArrayList<>();
for (com.plotsquared.core.command.Command o : objects) {
result.add(o.toString());
}
return result;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
class AgeableStats {
int age;
boolean locked;
boolean adult;
}

View File

@ -0,0 +1,34 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
class ArmorStandStats {
final float[] head = new float[3];
final float[] body = new float[3];
final float[] leftLeg = new float[3];
final float[] rightLeg = new float[3];
final float[] leftArm = new float[3];
final float[] rightArm = new float[3];
boolean arms;
boolean noPlate;
boolean invisible;
boolean small;
}

View File

@ -0,0 +1,31 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
class EntityBaseStats {
EntityWrapper passenger;
float fall;
short fire;
int age;
double vZ;
double vY;
double vX;
}

View File

@ -0,0 +1,87 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.checkerframework.checker.nullness.qual.NonNull;
public abstract class EntityWrapper {
protected final float yaw;
protected final float pitch;
private final Entity entity;
private final EntityType type;
public double x;
public double y;
public double z;
EntityWrapper(final @NonNull Entity entity) {
this.entity = entity;
this.type = entity.getType();
final Location location = entity.getLocation();
this.x = location.getX();
this.y = location.getY();
this.z = location.getZ();
this.yaw = location.getYaw();
this.pitch = location.getPitch();
}
@SuppressWarnings("deprecation")
@Override
public String toString() {
return String.format("[%s, x=%s, y=%s, z=%s]", type.getName(), x, y, z);
}
public abstract Entity spawn(World world, int xOffset, int zOffset);
public abstract void saveEntity();
public float getYaw() {
return this.yaw;
}
public float getPitch() {
return this.pitch;
}
public Entity getEntity() {
return this.entity;
}
public EntityType getType() {
return this.type;
}
public double getX() {
return this.x;
}
public double getY() {
return this.y;
}
public double getZ() {
return this.z;
}
}

View File

@ -0,0 +1,31 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
import org.bukkit.entity.Horse;
class HorseStats {
double jump;
boolean chest;
Horse.Variant variant;
Horse.Color color;
Horse.Style style;
}

View File

@ -0,0 +1,47 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import java.util.Collection;
class LivingEntityStats {
boolean loot;
String name;
boolean visible;
float health;
short air;
boolean persistent;
boolean leashed;
short leashX;
short leashY;
short leashZ;
boolean equipped;
ItemStack mainHand;
ItemStack helmet;
ItemStack boots;
ItemStack leggings;
ItemStack chestplate;
Collection<PotionEffect> potions;
ItemStack offHand;
}

View File

@ -0,0 +1,763 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
import com.plotsquared.core.configuration.Settings;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.Art;
import org.bukkit.DyeColor;
import org.bukkit.Location;
import org.bukkit.Rotation;
import org.bukkit.TreeSpecies;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.AbstractHorse;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Bat;
import org.bukkit.entity.Boat;
import org.bukkit.entity.ChestedHorse;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.Entity;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Item;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Painting;
import org.bukkit.entity.Rabbit;
import org.bukkit.entity.Sheep;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Tameable;
import org.bukkit.inventory.EntityEquipment;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
import org.bukkit.util.Vector;
import java.util.List;
public final class ReplicatingEntityWrapper extends EntityWrapper {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ReplicatingEntityWrapper.class.getSimpleName());
private final short depth;
private final int hash;
private final EntityBaseStats base = new EntityBaseStats();
private ItemStack[] inventory;
// Extended
private ItemStack stack;
private byte dataByte;
private byte dataByte2;
private String dataString;
private LivingEntityStats lived;
private AgeableStats aged;
private TameableStats tamed;
private ArmorStandStats stand;
private HorseStats horse;
private boolean noGravity;
public ReplicatingEntityWrapper(Entity entity, short depth) {
super(entity);
this.hash = entity.getEntityId();
this.depth = depth;
if (depth == 0) {
return;
}
List<Entity> passengers = entity.getPassengers();
if (passengers.size() > 0) {
this.base.passenger = new ReplicatingEntityWrapper(passengers.get(0), depth);
}
this.base.fall = entity.getFallDistance();
this.base.fire = (short) entity.getFireTicks();
this.base.age = entity.getTicksLived();
Vector velocity = entity.getVelocity();
this.base.vX = velocity.getX();
this.base.vY = velocity.getY();
this.base.vZ = velocity.getZ();
if (depth == 1) {
return;
}
if (!entity.hasGravity()) {
this.noGravity = true;
}
switch (entity.getType().toString()) {
case "BOAT":
Boat boat = (Boat) entity;
this.dataByte = getOrdinal(TreeSpecies.values(), boat.getWoodType());
return;
case "ARROW":
case "EGG":
case "ENDER_CRYSTAL":
case "ENDER_PEARL":
case "ENDER_SIGNAL":
case "EXPERIENCE_ORB":
case "FALLING_BLOCK":
case "FIREBALL":
case "FIREWORK":
case "FISHING_HOOK":
case "LEASH_HITCH":
case "LIGHTNING":
case "MINECART":
case "MINECART_COMMAND":
case "MINECART_MOB_SPAWNER":
case "MINECART_TNT":
case "PLAYER":
case "PRIMED_TNT":
case "SLIME":
case "SMALL_FIREBALL":
case "SNOWBALL":
case "MINECART_FURNACE":
case "SPLASH_POTION":
case "THROWN_EXP_BOTTLE":
case "WITHER_SKULL":
case "UNKNOWN":
case "SPECTRAL_ARROW":
case "SHULKER_BULLET":
case "DRAGON_FIREBALL":
case "AREA_EFFECT_CLOUD":
case "TRIDENT":
case "LLAMA_SPIT":
// Do this stuff later
return;
// MISC //
case "DROPPED_ITEM":
Item item = (Item) entity;
this.stack = item.getItemStack();
return;
case "ITEM_FRAME":
this.x = Math.floor(this.getX());
this.y = Math.floor(this.getY());
this.z = Math.floor(this.getZ());
ItemFrame itemFrame = (ItemFrame) entity;
this.dataByte = getOrdinal(Rotation.values(), itemFrame.getRotation());
this.stack = itemFrame.getItem().clone();
return;
case "PAINTING":
this.x = Math.floor(this.getX());
this.y = Math.floor(this.getY());
this.z = Math.floor(this.getZ());
Painting painting = (Painting) entity;
Art art = painting.getArt();
this.dataByte = getOrdinal(BlockFace.values(), painting.getFacing());
int h = art.getBlockHeight();
if (h % 2 == 0) {
this.y -= 1;
}
this.dataString = art.name();
return;
// END MISC //
// INVENTORY HOLDER //
case "MINECART_CHEST":
case "MINECART_HOPPER":
storeInventory((InventoryHolder) entity);
return;
// START LIVING ENTITY //
// START AGEABLE //
// START TAMEABLE //
case "HORSE":
case "DONKEY":
case "LLAMA":
case "MULE":
case "SKELETON_HORSE":
AbstractHorse horse = (AbstractHorse) entity;
this.horse = new HorseStats();
this.horse.jump = horse.getJumpStrength();
if (horse instanceof ChestedHorse horse1) {
this.horse.chest = horse1.isCarryingChest();
}
//todo these horse features need fixing
//this.horse.variant = horse.getVariant();
//this.horse.style = horse.getStyle();
//this.horse.color = horse.getColor();
storeTameable(horse);
storeAgeable(horse);
storeLiving(horse);
storeInventory(horse);
return;
// END INVENTORY HOLDER //
case "WOLF":
case "OCELOT":
storeTameable((Tameable) entity);
storeAgeable((Ageable) entity);
storeLiving((LivingEntity) entity);
return;
// END TAMEABLE //
//todo fix sheep
case "SHEEP":
Sheep sheep = (Sheep) entity;
if (sheep.isSheared()) {
this.dataByte = (byte) 1;
} else {
this.dataByte = (byte) 0;
}
this.dataByte2 = sheep.getColor().getDyeData();
storeAgeable(sheep);
storeLiving(sheep);
return;
case "VILLAGER":
case "CHICKEN":
case "COW":
case "MUSHROOM_COW":
case "PIG":
case "TURTLE":
case "POLAR_BEAR":
storeAgeable((Ageable) entity);
storeLiving((LivingEntity) entity);
return;
case "RABBIT":
this.dataByte = getOrdinal(Rabbit.Type.values(), ((Rabbit) entity).getRabbitType());
storeAgeable((Ageable) entity);
storeLiving((LivingEntity) entity);
return;
// END AGEABLE //
case "ARMOR_STAND":
ArmorStand stand = (ArmorStand) entity;
this.inventory =
new ItemStack[]{stand.getItemInHand().clone(), stand.getHelmet().clone(),
stand.getChestplate().clone(), stand.getLeggings().clone(),
stand.getBoots().clone()};
storeLiving(stand);
this.stand = new ArmorStandStats();
EulerAngle head = stand.getHeadPose();
this.stand.head[0] = (float) head.getX();
this.stand.head[1] = (float) head.getY();
this.stand.head[2] = (float) head.getZ();
EulerAngle body = stand.getBodyPose();
this.stand.body[0] = (float) body.getX();
this.stand.body[1] = (float) body.getY();
this.stand.body[2] = (float) body.getZ();
EulerAngle leftLeg = stand.getLeftLegPose();
this.stand.leftLeg[0] = (float) leftLeg.getX();
this.stand.leftLeg[1] = (float) leftLeg.getY();
this.stand.leftLeg[2] = (float) leftLeg.getZ();
EulerAngle rightLeg = stand.getRightLegPose();
this.stand.rightLeg[0] = (float) rightLeg.getX();
this.stand.rightLeg[1] = (float) rightLeg.getY();
this.stand.rightLeg[2] = (float) rightLeg.getZ();
EulerAngle leftArm = stand.getLeftArmPose();
this.stand.leftArm[0] = (float) leftArm.getX();
this.stand.leftArm[1] = (float) leftArm.getY();
this.stand.leftArm[2] = (float) leftArm.getZ();
EulerAngle rightArm = stand.getRightArmPose();
this.stand.rightArm[0] = (float) rightArm.getX();
this.stand.rightArm[1] = (float) rightArm.getY();
this.stand.rightArm[2] = (float) rightArm.getZ();
if (stand.hasArms()) {
this.stand.arms = true;
}
if (!stand.hasBasePlate()) {
this.stand.noPlate = true;
}
if (!stand.isVisible()) {
this.stand.invisible = true;
}
if (stand.isSmall()) {
this.stand.small = true;
}
return;
case "ENDERMITE":
return;
case "BAT":
if (((Bat) entity).isAwake()) {
this.dataByte = (byte) 1;
} else {
this.dataByte = (byte) 0;
}
return;
case "ENDER_DRAGON":
EnderDragon entity1 = (EnderDragon) entity;
this.dataByte = (byte) entity1.getPhase().ordinal();
return;
case "SKELETON":
case "WITHER_SKELETON":
case "GUARDIAN":
case "ELDER_GUARDIAN":
case "GHAST":
case "MAGMA_CUBE":
case "SQUID":
case "PIG_ZOMBIE":
case "HOGLIN":
case "ZOMBIFIED_PIGLIN":
case "PIGLIN":
case "PIGLIN_BRUTE":
case "ZOMBIE":
case "WITHER":
case "WITCH":
case "SPIDER":
case "CAVE_SPIDER":
case "SILVERFISH":
case "GIANT":
case "ENDERMAN":
case "CREEPER":
case "BLAZE":
case "SHULKER":
case "SNOWMAN":
storeLiving((LivingEntity) entity);
return;
case "IRON_GOLEM":
if (((IronGolem) entity).isPlayerCreated()) {
this.dataByte = (byte) 1;
} else {
this.dataByte = (byte) 0;
}
storeLiving((LivingEntity) entity);
// END LIVING //
}
}
@Override
public boolean equals(Object obj) {
return this.hash == obj.hashCode();
}
@Override
public int hashCode() {
return this.hash;
}
public void storeInventory(InventoryHolder held) {
this.inventory = held.getInventory().getContents().clone();
}
void restoreLiving(LivingEntity entity) {
entity.setCanPickupItems(this.lived.loot);
if (this.lived.name != null) {
entity.setCustomName(this.lived.name);
entity.setCustomNameVisible(this.lived.visible);
}
if (this.lived.potions != null && !this.lived.potions.isEmpty()) {
entity.addPotionEffects(this.lived.potions);
}
entity.setRemainingAir(this.lived.air);
entity.setRemoveWhenFarAway(this.lived.persistent);
if (this.lived.equipped) {
this.restoreEquipment(entity);
}
if (this.lived.leashed) {
// TODO leashes
// World world = entity.getWorld();
// Entity leash = world.spawnEntity(new Location(world, Math.floor(x) +
// lived.leashX, Math.floor(y) + lived.leashY, Math.floor(z) + lived.leashZ),
// EntityType.LEASH_HITCH);
// entity.setLeashHolder(leash);
}
}
void restoreEquipment(LivingEntity entity) {
EntityEquipment equipment = entity.getEquipment();
if (equipment != null) {
equipment.setItemInMainHand(this.lived.mainHand);
equipment.setItemInOffHand(this.lived.offHand);
equipment.setHelmet(this.lived.helmet);
equipment.setChestplate(this.lived.chestplate);
equipment.setLeggings(this.lived.leggings);
equipment.setBoots(this.lived.boots);
}
}
private void restoreInventory(InventoryHolder entity) {
try {
entity.getInventory().setContents(this.inventory);
} catch (IllegalArgumentException e) {
LOGGER.error("Failed to restore inventory", e);
}
}
private void storeLiving(LivingEntity lived) {
this.lived = new LivingEntityStats();
this.lived.potions = lived.getActivePotionEffects();
this.lived.loot = lived.getCanPickupItems();
this.lived.name = lived.getCustomName();
this.lived.visible = lived.isCustomNameVisible();
this.lived.health = (float) lived.getHealth();
this.lived.air = (short) lived.getRemainingAir();
this.lived.persistent = lived.getRemoveWhenFarAway();
this.lived.leashed = lived.isLeashed();
if (this.lived.leashed) {
Location location = lived.getLeashHolder().getLocation();
this.lived.leashX = (short) (this.getX() - location.getBlockX());
this.lived.leashY = (short) (this.getY() - location.getBlockY());
this.lived.leashZ = (short) (this.getZ() - location.getBlockZ());
}
EntityEquipment equipment = lived.getEquipment();
this.lived.equipped = equipment != null;
if (this.lived.equipped) {
storeEquipment(equipment);
}
}
void storeEquipment(EntityEquipment equipment) {
this.lived.mainHand = equipment.getItemInMainHand().clone();
this.lived.offHand = equipment.getItemInOffHand().clone();
this.lived.boots = equipment.getBoots().clone();
this.lived.leggings = equipment.getLeggings().clone();
this.lived.chestplate = equipment.getChestplate().clone();
this.lived.helmet = equipment.getHelmet().clone();
}
private void restoreTameable(Tameable entity) {
if (this.tamed.tamed) {
if (this.tamed.owner != null) {
entity.setTamed(true);
entity.setOwner(this.tamed.owner);
}
}
}
private void restoreAgeable(Ageable entity) {
if (!this.aged.adult) {
entity.setBaby();
}
entity.setAgeLock(this.aged.locked);
if (this.aged.age > 0) {
entity.setAge(this.aged.age);
}
}
public void storeAgeable(Ageable aged) {
this.aged = new AgeableStats();
this.aged.age = aged.getAge();
this.aged.locked = aged.getAgeLock();
this.aged.adult = aged.isAdult();
}
public void storeTameable(Tameable tamed) {
this.tamed = new TameableStats();
this.tamed.owner = tamed.getOwner();
this.tamed.tamed = tamed.isTamed();
}
@SuppressWarnings("deprecation") // Paper deprecation
@Override
public Entity spawn(World world, int xOffset, int zOffset) {
Location location = new Location(world, this.getX() + xOffset, this.getY(), this.z + zOffset);
location.setYaw(this.yaw);
location.setPitch(this.pitch);
if (!this.getType().isSpawnable()) {
return null;
}
Entity entity;
switch (this.getType().toString()) {
case "DROPPED_ITEM":
return world.dropItem(location, this.stack);
case "PLAYER":
case "LEASH_HITCH":
return null;
case "ITEM_FRAME":
entity = world.spawn(location, ItemFrame.class);
break;
case "PAINTING":
entity = world.spawn(location, Painting.class);
break;
default:
entity = world.spawnEntity(location, this.getType());
break;
}
if (this.depth == 0) {
return entity;
}
if (this.base.passenger != null) {
try {
entity.addPassenger(this.base.passenger.spawn(world, xOffset, zOffset));
} catch (Exception ignored) {
}
}
if (this.base.fall != 0) {
entity.setFallDistance(this.base.fall);
}
if (this.base.fire != 0) {
entity.setFireTicks(this.base.fire);
}
if (this.base.age != 0) {
entity.setTicksLived(this.base.age);
}
entity.setVelocity(new Vector(this.base.vX, this.base.vY, this.base.vZ));
if (this.depth == 1) {
return entity;
}
if (this.noGravity) {
entity.setGravity(false);
}
switch (entity.getType().toString()) {
case "BOAT":
Boat boat = (Boat) entity;
boat.setWoodType(TreeSpecies.values()[dataByte]);
return entity;
case "SLIME":
((Slime) entity).setSize(this.dataByte);
return entity;
case "ARROW":
case "EGG":
case "ENDER_CRYSTAL":
case "ENDER_PEARL":
case "ENDER_SIGNAL":
case "DROPPED_ITEM":
case "EXPERIENCE_ORB":
case "FALLING_BLOCK":
case "FIREBALL":
case "FIREWORK":
case "FISHING_HOOK":
case "LEASH_HITCH":
case "LIGHTNING":
case "MINECART":
case "MINECART_COMMAND":
case "MINECART_MOB_SPAWNER":
case "MINECART_TNT":
case "PLAYER":
case "PRIMED_TNT":
case "SMALL_FIREBALL":
case "SNOWBALL":
case "SPLASH_POTION":
case "THROWN_EXP_BOTTLE":
case "SPECTRAL_ARROW":
case "SHULKER_BULLET":
case "AREA_EFFECT_CLOUD":
case "DRAGON_FIREBALL":
case "WITHER_SKULL":
case "MINECART_FURNACE":
case "LLAMA_SPIT":
case "TRIDENT":
case "UNKNOWN":
// Do this stuff later
return entity;
// MISC //
case "ITEM_FRAME":
ItemFrame itemframe = (ItemFrame) entity;
itemframe.setRotation(Rotation.values()[this.dataByte]);
itemframe.setItem(this.stack);
return entity;
case "PAINTING":
Painting painting = (Painting) entity;
painting.setFacingDirection(BlockFace.values()[this.dataByte], true);
painting.setArt(Art.getByName(this.dataString), true);
return entity;
// END MISC //
// INVENTORY HOLDER //
case "MINECART_CHEST":
case "MINECART_HOPPER":
restoreInventory((InventoryHolder) entity);
return entity;
// START LIVING ENTITY //
// START AGEABLE //
// START TAMEABLE //
case "HORSE":
case "LLAMA":
case "SKELETON_HORSE":
case "DONKEY":
case "MULE":
AbstractHorse horse = (AbstractHorse) entity;
horse.setJumpStrength(this.horse.jump);
if (horse instanceof ChestedHorse) {
((ChestedHorse) horse).setCarryingChest(this.horse.chest);
}
//todo broken as of 1.13
//horse.setVariant(this.horse.variant);
//horse.setStyle(this.horse.style);
//horse.setColor(this.horse.color);
restoreTameable(horse);
restoreAgeable(horse);
restoreLiving(horse);
restoreInventory(horse);
return entity;
// END INVENTORY HOLDER //
case "WOLF":
case "OCELOT":
restoreTameable((Tameable) entity);
restoreAgeable((Ageable) entity);
restoreLiving((LivingEntity) entity);
return entity;
// END AGEABLE //
case "SHEEP":
Sheep sheep = (Sheep) entity;
if (this.dataByte == 1) {
sheep.setSheared(true);
}
if (this.dataByte2 != 0) {
sheep.setColor(DyeColor.getByDyeData(this.dataByte2));
}
restoreAgeable(sheep);
restoreLiving(sheep);
return sheep;
case "VILLAGER":
case "CHICKEN":
case "COW":
case "TURTLE":
case "POLAR_BEAR":
case "MUSHROOM_COW":
case "PIG":
restoreAgeable((Ageable) entity);
restoreLiving((LivingEntity) entity);
return entity;
// END AGEABLE //
case "RABBIT":
if (this.dataByte != 0) {
((Rabbit) entity).setRabbitType(Rabbit.Type.values()[this.dataByte]);
}
restoreAgeable((Ageable) entity);
restoreLiving((LivingEntity) entity);
return entity;
case "ARMOR_STAND":
// CHECK positions
ArmorStand stand = (ArmorStand) entity;
if (this.inventory[0] != null) {
stand.setItemInHand(this.inventory[0]);
}
if (this.inventory[1] != null) {
stand.setHelmet(this.inventory[1]);
}
if (this.inventory[2] != null) {
stand.setChestplate(this.inventory[2]);
}
if (this.inventory[3] != null) {
stand.setLeggings(this.inventory[3]);
}
if (this.inventory[4] != null) {
stand.setBoots(this.inventory[4]);
}
if (this.stand.head[0] != 0 || this.stand.head[1] != 0 || this.stand.head[2] != 0) {
EulerAngle pose =
new EulerAngle(this.stand.head[0], this.stand.head[1], this.stand.head[2]);
stand.setHeadPose(pose);
}
if (this.stand.body[0] != 0 || this.stand.body[1] != 0 || this.stand.body[2] != 0) {
EulerAngle pose =
new EulerAngle(this.stand.body[0], this.stand.body[1], this.stand.body[2]);
stand.setBodyPose(pose);
}
if (this.stand.leftLeg[0] != 0 || this.stand.leftLeg[1] != 0
|| this.stand.leftLeg[2] != 0) {
EulerAngle pose = new EulerAngle(this.stand.leftLeg[0], this.stand.leftLeg[1],
this.stand.leftLeg[2]
);
stand.setLeftLegPose(pose);
}
if (this.stand.rightLeg[0] != 0 || this.stand.rightLeg[1] != 0
|| this.stand.rightLeg[2] != 0) {
EulerAngle pose = new EulerAngle(this.stand.rightLeg[0], this.stand.rightLeg[1],
this.stand.rightLeg[2]
);
stand.setRightLegPose(pose);
}
if (this.stand.leftArm[0] != 0 || this.stand.leftArm[1] != 0
|| this.stand.leftArm[2] != 0) {
EulerAngle pose = new EulerAngle(this.stand.leftArm[0], this.stand.leftArm[1],
this.stand.leftArm[2]
);
stand.setLeftArmPose(pose);
}
if (this.stand.rightArm[0] != 0 || this.stand.rightArm[1] != 0
|| this.stand.rightArm[2] != 0) {
EulerAngle pose = new EulerAngle(this.stand.rightArm[0], this.stand.rightArm[1],
this.stand.rightArm[2]
);
stand.setRightArmPose(pose);
}
if (this.stand.invisible) {
stand.setVisible(false);
}
if (this.stand.arms) {
stand.setArms(true);
}
if (this.stand.noPlate) {
stand.setBasePlate(false);
}
if (this.stand.small) {
stand.setSmall(true);
}
restoreLiving(stand);
return stand;
case "BAT":
if (this.dataByte != 0) {
((Bat) entity).setAwake(true);
}
restoreLiving((LivingEntity) entity);
return entity;
case "ENDER_DRAGON":
if (this.dataByte != 0) {
((EnderDragon) entity).setPhase(EnderDragon.Phase.values()[this.dataByte]);
}
restoreLiving((LivingEntity) entity);
return entity;
case "ENDERMITE":
case "GHAST":
case "MAGMA_CUBE":
case "SQUID":
case "PIG_ZOMBIE":
case "HOGLIN":
case "PIGLIN":
case "ZOMBIFIED_PIGLIN":
case "PIGLIN_BRUTE":
case "ZOMBIE":
case "WITHER":
case "WITCH":
case "SPIDER":
case "CAVE_SPIDER":
case "SILVERFISH":
case "GIANT":
case "ENDERMAN":
case "CREEPER":
case "BLAZE":
case "SNOWMAN":
case "SHULKER":
case "GUARDIAN":
case "ELDER_GUARDIAN":
case "SKELETON":
case "WITHER_SKELETON":
restoreLiving((LivingEntity) entity);
return entity;
case "IRON_GOLEM":
if (this.dataByte != 0) {
((IronGolem) entity).setPlayerCreated(true);
}
restoreLiving((LivingEntity) entity);
return entity;
default:
if (Settings.DEBUG) {
LOGGER.info("Could not identify entity: {}", entity.getType());
}
return entity;
// END LIVING
}
}
public void saveEntity() {
}
private byte getOrdinal(Object[] list, Object value) {
for (byte i = 0; i < list.length; i++) {
if (list[i].equals(value)) {
return i;
}
}
return 0;
}
}

View File

@ -0,0 +1,28 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
import org.bukkit.entity.AnimalTamer;
class TameableStats {
AnimalTamer owner;
boolean tamed;
}

View File

@ -0,0 +1,116 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.entity;
import com.plotsquared.bukkit.BukkitPlatform;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.metadata.FixedMetadataValue;
public class TeleportEntityWrapper extends EntityWrapper {
private Location oldLocation;
private boolean gravityOld;
private boolean invulnerableOld;
private int fireTicksOld;
private int livingTicksOld;
public TeleportEntityWrapper(final Entity entity) {
super(entity);
}
@Override
public Entity spawn(final World world, final int xOffset, final int zOffset) {
if (!getEntity().getLocation().getChunk().equals(oldLocation.getChunk())) {
final Location oldLocation = this.oldLocation.clone();
oldLocation.add(xOffset, 0, xOffset);
getEntity().teleport(oldLocation);
getEntity().setGravity(gravityOld);
getEntity().setInvulnerable(invulnerableOld);
getEntity().setFireTicks(fireTicksOld);
getEntity().setTicksLived(livingTicksOld);
getEntity().removeMetadata("ps-tmp-teleport", BukkitPlatform.getPlugin(BukkitPlatform.class));
}
return getEntity();
}
@Override
public void saveEntity() {
if (getEntity().hasMetadata("ps-tmp-teleport")) {
this.oldLocation = (Location) this.getEntity().getMetadata("ps-tmp-teleport").get(0);
} else {
this.oldLocation = this.getEntity().getLocation();
}
// To account for offsets in the chunk manager
this.oldLocation = oldLocation.clone();
this.oldLocation.setX(this.getX());
this.oldLocation.setY(this.getY());
this.oldLocation.setZ(this.getZ());
this.gravityOld = this.getEntity().hasGravity();
this.getEntity().setGravity(false);
this.invulnerableOld = this.getEntity().isInvulnerable();
this.getEntity().setInvulnerable(true);
this.fireTicksOld = this.getEntity().getFireTicks();
this.livingTicksOld = this.getEntity().getTicksLived();
this.getEntity().setMetadata(
"ps-tmp-teleport",
new FixedMetadataValue(BukkitPlatform.getPlugin(BukkitPlatform.class), oldLocation)
);
final Chunk newChunk = getNewChunk();
this.getEntity().teleport(
new Location(newChunk.getWorld(), newChunk.getX() << 4, 5000, newChunk.getZ() << 4));
}
private Chunk getNewChunk() {
final Chunk oldChunk = oldLocation.getChunk();
Chunk chunk = null;
for (Chunk lChunk : oldChunk.getWorld().getLoadedChunks()) {
if (!lChunk.equals(oldChunk) && lChunk.isLoaded()) {
chunk = lChunk;
break;
}
}
if (chunk == null) {
for (int dx = 1; dx < Integer.MAX_VALUE; dx++) {
for (int dz = 0; dz < Integer.MAX_VALUE; dz++) {
if ((chunk = getChunkRelative(oldChunk, dx, dz)).isLoaded()) {
break;
} else if ((chunk = getChunkRelative(oldChunk, -dx, dz)).isLoaded()) {
break;
} else if ((chunk = getChunkRelative(oldChunk, dx, -dz)).isLoaded()) {
break;
} else if ((chunk = getChunkRelative(oldChunk, -dx, -dz)).isLoaded()) {
break;
}
}
}
}
return chunk;
}
private Chunk getChunkRelative(final Chunk chunk, final int dx, final int dz) {
return chunk.getWorld().getChunkAt(chunk.getX() + dx, chunk.getZ() + dz);
}
}

View File

@ -0,0 +1,87 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.generator;
import com.plotsquared.bukkit.queue.LimitedRegionWrapperQueue;
import com.plotsquared.core.generator.HybridPlotWorld;
import com.plotsquared.core.generator.IndependentPlotGenerator;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.location.UncheckedWorldLocation;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.plot.world.SinglePlotArea;
import com.plotsquared.core.queue.ScopedQueueCoordinator;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.LimitedRegion;
import org.bukkit.generator.WorldInfo;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Random;
final class BlockStatePopulator extends BlockPopulator {
private final IndependentPlotGenerator plotGenerator;
/**
* @since 6.9.0
*/
public BlockStatePopulator(
final @NonNull IndependentPlotGenerator plotGenerator
) {
this.plotGenerator = plotGenerator;
}
/**
* @deprecated Use {@link BlockStatePopulator#BlockStatePopulator(IndependentPlotGenerator)} as plotAreManager is unused
*/
@Deprecated(forRemoval = true, since = "6.9.0")
public BlockStatePopulator(
final @NonNull IndependentPlotGenerator plotGenerator,
final @NonNull PlotAreaManager plotAreaManager
) {
this.plotGenerator = plotGenerator;
}
@Override
public void populate(
@NonNull final WorldInfo worldInfo,
@NonNull final Random random,
final int chunkX,
final int chunkZ,
@NonNull final LimitedRegion limitedRegion
) {
PlotArea area = UncheckedWorldLocation.at(worldInfo.getName(), chunkX << 4, 0, chunkZ << 4).getPlotArea();
if (area == null || (area instanceof HybridPlotWorld hpw && !hpw.populationNeeded()) || area instanceof SinglePlotArea) {
return;
}
LimitedRegionWrapperQueue wrapped = new LimitedRegionWrapperQueue(limitedRegion);
// It is possible for the region to be larger than the chunk, but there is no reason for P2 to need to populate
// outside of the actual chunk area.
Location min = UncheckedWorldLocation.at(worldInfo.getName(), chunkX << 4, worldInfo.getMinHeight(), chunkZ << 4);
Location max = UncheckedWorldLocation.at(
worldInfo.getName(),
(chunkX << 4) + 15,
worldInfo.getMaxHeight(),
(chunkZ << 4) + 15
);
ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(wrapped, min, max);
this.plotGenerator.populateChunk(offsetChunkQueue, area);
}
}

View File

@ -0,0 +1,62 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.generator;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.generator.AugmentedUtils;
import com.plotsquared.core.queue.QueueCoordinator;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.util.SideEffectSet;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.generator.BlockPopulator;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Random;
public class BukkitAugmentedGenerator extends BlockPopulator {
private static BukkitAugmentedGenerator generator;
public static BukkitAugmentedGenerator get(World world) {
for (BlockPopulator populator : world.getPopulators()) {
if (populator instanceof BukkitAugmentedGenerator) {
return (BukkitAugmentedGenerator) populator;
}
}
if (generator == null) {
generator = new BukkitAugmentedGenerator();
}
world.getPopulators().add(generator);
return generator;
}
@Override
public void populate(@NonNull World world, @NonNull Random random, @NonNull Chunk source) {
QueueCoordinator queue = PlotSquared.platform().globalBlockQueue().getNewQueue(BukkitAdapter.adapt(world));
// The chunk is already loaded and we do not want to load the chunk in "fully" by using any PaperLib methods.
queue.setForceSync(true);
queue.setSideEffectSet(SideEffectSet.none());
queue.setBiomesEnabled(false);
queue.setChunkObject(source);
AugmentedUtils.generateChunk(world.getName(), source.getX(), source.getZ(), queue);
queue.enqueue();
}
}

View File

@ -0,0 +1,286 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.generator;
import com.plotsquared.bukkit.queue.GenChunk;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.bukkit.util.BukkitWorld;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.generator.GeneratorWrapper;
import com.plotsquared.core.generator.IndependentPlotGenerator;
import com.plotsquared.core.generator.SingleWorldGenerator;
import com.plotsquared.core.location.ChunkWrapper;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.queue.ScopedQueueCoordinator;
import com.plotsquared.core.util.ChunkManager;
import com.sk89q.worldedit.math.BlockVector2;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Set;
public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> {
@SuppressWarnings("unused")
public final boolean PAPER_ASYNC_SAFE = true;
private final PlotAreaManager plotAreaManager;
private final IndependentPlotGenerator plotGenerator;
private final ChunkGenerator platformGenerator;
private final boolean full;
private final String levelName;
private List<BlockPopulator> populators;
private boolean loaded = false;
public BukkitPlotGenerator(
final @NonNull String name,
final @NonNull IndependentPlotGenerator generator,
final @NonNull PlotAreaManager plotAreaManager
) {
this.plotAreaManager = plotAreaManager;
this.levelName = name;
this.plotGenerator = generator;
this.platformGenerator = this;
this.populators = new ArrayList<>();
int minecraftMinorVersion = PlotSquared.platform().serverVersion()[1];
if (minecraftMinorVersion >= 17) {
this.populators.add(new BlockStatePopulator(this.plotGenerator));
} else {
this.populators.add(new LegacyBlockStatePopulator(this.plotGenerator));
}
this.full = true;
}
public BukkitPlotGenerator(final String world, final ChunkGenerator cg, final @NonNull PlotAreaManager plotAreaManager) {
if (cg instanceof BukkitPlotGenerator) {
throw new IllegalArgumentException("ChunkGenerator: " + cg.getClass().getName()
+ " is already a BukkitPlotGenerator!");
}
this.plotAreaManager = plotAreaManager;
this.levelName = world;
this.full = false;
this.platformGenerator = cg;
this.plotGenerator = new DelegatePlotGenerator(cg, world);
}
@Override
public void augment(PlotArea area) {
BukkitAugmentedGenerator.get(BukkitUtil.getWorld(area.getWorldName()));
}
@Override
public boolean isFull() {
return this.full;
}
@Override
public IndependentPlotGenerator getPlotGenerator() {
return this.plotGenerator;
}
@Override
public ChunkGenerator getPlatformGenerator() {
return this.platformGenerator;
}
@Override
public @NonNull List<BlockPopulator> getDefaultPopulators(@NonNull World world) {
try {
checkLoaded(world);
} catch (Exception e) {
e.printStackTrace();
}
ArrayList<BlockPopulator> toAdd = new ArrayList<>();
List<BlockPopulator> existing = world.getPopulators();
if (populators == null && platformGenerator != null) {
populators = new ArrayList<>(platformGenerator.getDefaultPopulators(world));
}
if (populators != null) {
for (BlockPopulator populator : this.populators) {
if (!existing.contains(populator)) {
toAdd.add(populator);
}
}
}
return toAdd;
}
private synchronized void checkLoaded(@NonNull World world) {
// Do not attempt to load configurations until WorldEdit has a platform ready.
if (!PlotSquared.get().isWeInitialised()) {
return;
}
if (!this.loaded) {
String name = world.getName();
PlotSquared.get().loadWorld(name, this);
final Set<PlotArea> areas = this.plotAreaManager.getPlotAreasSet(name);
if (!areas.isEmpty()) {
PlotArea area = areas.iterator().next();
if (!area.isMobSpawning()) {
if (!area.isSpawnEggs()) {
world.setSpawnFlags(false, false);
}
setSpawnLimits(world, 0);
} else {
world.setSpawnFlags(true, true);
setSpawnLimits(world, -1);
}
}
this.loaded = true;
}
}
@SuppressWarnings("deprecation")
private void setSpawnLimits(@NonNull World world, int limit) {
world.setAmbientSpawnLimit(limit);
world.setAnimalSpawnLimit(limit);
world.setMonsterSpawnLimit(limit);
world.setWaterAnimalSpawnLimit(limit);
}
/**
* The entire method is deprecated, but kept for compatibility with versions lower than or equal to 1.16.2.
* The method will be removed in future versions, because WorldEdit and FastAsyncWorldEdit only support the latest point
* release.
*/
@Deprecated(forRemoval = true, since = "6.11.0")
@Override
public @NonNull ChunkData generateChunkData(
@NonNull World world, @NonNull Random random, int x, int z,
@NonNull BiomeGrid biome
) {
int minY = BukkitWorld.getMinWorldHeight(world);
int maxY = BukkitWorld.getMaxWorldHeight(world);
GenChunk result = new GenChunk(minY, maxY);
if (this.getPlotGenerator() instanceof SingleWorldGenerator) {
if (result.getChunkData() != null) {
for (int chunkX = 0; chunkX < 16; chunkX++) {
for (int chunkZ = 0; chunkZ < 16; chunkZ++) {
for (int y = minY; y < maxY; y++) {
biome.setBiome(chunkX, y, chunkZ, Biome.PLAINS);
}
}
}
return result.getChunkData();
}
}
// Set the chunk location
result.setChunk(new ChunkWrapper(world.getName(), x, z));
// Set the result data
result.setChunkData(createChunkData(world));
result.biomeGrid = biome;
result.result = null;
// Catch any exceptions (as exceptions usually thrown)
try {
// Fill the result data if necessary
if (this.platformGenerator != this) {
return this.platformGenerator.generateChunkData(world, random, x, z, biome);
} else {
generate(BlockVector2.at(x, z), world, result);
}
} catch (Throwable e) {
e.printStackTrace();
}
// Return the result data
return result.getChunkData();
}
private void generate(BlockVector2 loc, World world, ScopedQueueCoordinator result) {
// Load if improperly loaded
if (!this.loaded) {
checkLoaded(world);
}
// Process the chunk
if (ChunkManager.preProcessChunk(loc, result)) {
return;
}
PlotArea area = this.plotAreaManager.getPlotArea(world.getName(), null);
if (area == null && (area = this.plotAreaManager.getPlotArea(this.levelName, null)) == null) {
throw new IllegalStateException(
"Cannot regenerate chunk that does not belong to a plot area." + " Location: " + loc
+ ", world: " + world);
}
try {
this.plotGenerator.generateChunk(result, area);
} catch (Throwable e) {
// Recover from generator error
e.printStackTrace();
}
ChunkManager.postProcessChunk(loc, result);
}
@Override
public boolean canSpawn(final @NonNull World world, final int x, final int z) {
return true;
}
public boolean shouldGenerateCaves() {
return false;
}
public boolean shouldGenerateDecorations() {
return false;
}
public boolean isParallelCapable() {
return true;
}
public boolean shouldGenerateMobs() {
return false;
}
public boolean shouldGenerateStructures() {
return true;
}
@Override
public String toString() {
if (this.platformGenerator == this) {
return this.plotGenerator.getName();
}
if (this.platformGenerator == null) {
return "null";
} else {
return this.platformGenerator.getClass().getName();
}
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
return toString().equals(obj.toString()) || toString().equals(obj.getClass().getName());
}
public String getLevelName() {
return this.levelName;
}
}

View File

@ -0,0 +1,102 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.generator;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.generator.IndependentPlotGenerator;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotId;
import com.plotsquared.core.queue.ScopedQueueCoordinator;
import com.plotsquared.core.util.MathMan;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Random;
final class DelegatePlotGenerator extends IndependentPlotGenerator {
private final ChunkGenerator chunkGenerator;
private final String world;
public DelegatePlotGenerator(ChunkGenerator chunkGenerator, String world) {
this.chunkGenerator = chunkGenerator;
this.world = world;
}
@Override
public void initialize(PlotArea area) {
}
@Override
public String getName() {
return this.chunkGenerator.getClass().getName();
}
@Override
public PlotArea getNewPlotArea(String world, String id, PlotId min, PlotId max) {
return PlotSquared.platform().defaultGenerator().getNewPlotArea(world, id, min, max);
}
@Override
public void generateChunk(final ScopedQueueCoordinator result, PlotArea settings) {
World world = BukkitUtil.getWorld(this.world);
Location min = result.getMin();
int chunkX = min.getX() >> 4;
int chunkZ = min.getZ() >> 4;
Random random = new Random(MathMan.pair((short) chunkX, (short) chunkZ));
try {
ChunkGenerator.BiomeGrid grid = new ChunkGenerator.BiomeGrid() {
@Override
public void setBiome(int x, int z, @NonNull Biome biome) {
result.setBiome(x, z, BukkitAdapter.adapt(biome));
}
//do not annotate with Override until we discontinue support for 1.4.4 (we no longer support 1.4.4)
@Override
public void setBiome(int x, int y, int z, @NonNull Biome biome) {
result.setBiome(x, z, BukkitAdapter.adapt(biome));
}
@Override
public @NonNull Biome getBiome(int x, int z) {
return Biome.FOREST;
}
@Override
public @NonNull Biome getBiome(int x, int y, int z) {
return Biome.FOREST;
}
};
chunkGenerator.generateChunkData(world, random, chunkX, chunkZ, grid);
return;
} catch (Throwable ignored) {
}
for (BlockPopulator populator : chunkGenerator.getDefaultPopulators(world)) {
populator.populate(world, random, world.getChunkAt(chunkX, chunkZ));
}
}
}

View File

@ -0,0 +1,73 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.generator;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.generator.HybridPlotWorld;
import com.plotsquared.core.generator.IndependentPlotGenerator;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.location.UncheckedWorldLocation;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.world.SinglePlotArea;
import com.plotsquared.core.queue.QueueCoordinator;
import com.plotsquared.core.queue.ScopedQueueCoordinator;
import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.util.SideEffectSet;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.generator.BlockPopulator;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Random;
final class LegacyBlockStatePopulator extends BlockPopulator {
private final IndependentPlotGenerator plotGenerator;
/**
* @since 6.9.0
*/
public LegacyBlockStatePopulator(
final @NonNull IndependentPlotGenerator plotGenerator
) {
this.plotGenerator = plotGenerator;
}
@Override
public void populate(@NonNull final World world, @NonNull final Random random, @NonNull final Chunk source) {
int chunkMinX = source.getX() << 4;
int chunkMinZ = source.getZ() << 4;
PlotArea area = Location.at(world.getName(), chunkMinX, 0, chunkMinZ).getPlotArea();
if (area == null || (area instanceof HybridPlotWorld hpw && !hpw.populationNeeded()) || area instanceof SinglePlotArea) {
return;
}
QueueCoordinator queue = PlotSquared.platform().globalBlockQueue().getNewQueue(new BukkitWorld(world));
queue.setForceSync(true);
queue.setSideEffectSet(SideEffectSet.none());
queue.setBiomesEnabled(false);
queue.setChunkObject(source);
Location min = UncheckedWorldLocation.at(world.getName(), chunkMinX, world.getMinHeight(), chunkMinZ);
Location max = UncheckedWorldLocation.at(world.getName(), chunkMinX + 15, world.getMaxHeight(), chunkMinZ + 15);
ScopedQueueCoordinator offsetChunkQueue = new ScopedQueueCoordinator(queue, min, max);
this.plotGenerator.populateChunk(offsetChunkQueue, area);
queue.enqueue();
}
}

View File

@ -0,0 +1,49 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.inject;
import com.google.inject.AbstractModule;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.plotsquared.core.backup.BackupManager;
import com.plotsquared.core.backup.BackupProfile;
import com.plotsquared.core.backup.NullBackupManager;
import com.plotsquared.core.backup.PlayerBackupProfile;
import com.plotsquared.core.backup.SimpleBackupManager;
import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class BackupModule extends AbstractModule {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BackupModule.class.getSimpleName());
@Override
protected void configure() {
try {
install(new FactoryModuleBuilder()
.implement(BackupProfile.class, PlayerBackupProfile.class).build(PlayerBackupProfileFactory.class));
bind(BackupManager.class).to(SimpleBackupManager.class);
} catch (final Exception e) {
LOGGER.error("Failed to initialize backup manager", e);
LOGGER.error("Backup features will be disabled");
bind(BackupManager.class).to(NullBackupManager.class);
}
}
}

View File

@ -0,0 +1,148 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.inject;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.plotsquared.bukkit.BukkitPlatform;
import com.plotsquared.bukkit.listener.SingleWorldListener;
import com.plotsquared.bukkit.player.BukkitPlayerManager;
import com.plotsquared.bukkit.queue.BukkitChunkCoordinator;
import com.plotsquared.bukkit.queue.BukkitQueueCoordinator;
import com.plotsquared.bukkit.schematic.BukkitSchematicHandler;
import com.plotsquared.bukkit.util.BukkitChunkManager;
import com.plotsquared.bukkit.util.BukkitEconHandler;
import com.plotsquared.bukkit.util.BukkitInventoryUtil;
import com.plotsquared.bukkit.util.BukkitRegionManager;
import com.plotsquared.bukkit.util.BukkitSetupUtils;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.bukkit.util.fawe.FaweRegionManager;
import com.plotsquared.bukkit.util.fawe.FaweSchematicHandler;
import com.plotsquared.core.PlotPlatform;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.generator.HybridGen;
import com.plotsquared.core.generator.IndependentPlotGenerator;
import com.plotsquared.core.inject.annotations.ConsoleActor;
import com.plotsquared.core.inject.annotations.DefaultGenerator;
import com.plotsquared.core.inject.factory.ChunkCoordinatorBuilderFactory;
import com.plotsquared.core.inject.factory.ChunkCoordinatorFactory;
import com.plotsquared.core.inject.factory.HybridPlotWorldFactory;
import com.plotsquared.core.inject.factory.ProgressSubscriberFactory;
import com.plotsquared.core.plot.world.DefaultPlotAreaManager;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.plot.world.SinglePlotAreaManager;
import com.plotsquared.core.queue.ChunkCoordinator;
import com.plotsquared.core.queue.GlobalBlockQueue;
import com.plotsquared.core.queue.QueueProvider;
import com.plotsquared.core.queue.subscriber.DefaultProgressSubscriber;
import com.plotsquared.core.queue.subscriber.ProgressSubscriber;
import com.plotsquared.core.util.ChunkManager;
import com.plotsquared.core.util.EconHandler;
import com.plotsquared.core.util.InventoryUtil;
import com.plotsquared.core.util.PlayerManager;
import com.plotsquared.core.util.RegionManager;
import com.plotsquared.core.util.SchematicHandler;
import com.plotsquared.core.util.SetupUtils;
import com.plotsquared.core.util.WorldUtil;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldedit.extension.platform.Actor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.plugin.java.JavaPlugin;
import org.checkerframework.checker.nullness.qual.NonNull;
public class BukkitModule extends AbstractModule {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BukkitModule.class.getSimpleName());
private final BukkitPlatform bukkitPlatform;
public BukkitModule(final @NonNull BukkitPlatform bukkitPlatform) {
this.bukkitPlatform = bukkitPlatform;
}
@Override
protected void configure() {
bind(PlayerManager.class).to(BukkitPlayerManager.class);
bind(JavaPlugin.class).toInstance(bukkitPlatform);
bind(PlotPlatform.class).toInstance(bukkitPlatform);
bind(BukkitPlatform.class).toInstance(bukkitPlatform);
bind(IndependentPlotGenerator.class).annotatedWith(DefaultGenerator.class).to(HybridGen.class);
// Console actor
@NonNull ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
WorldEditPlugin wePlugin = ((WorldEditPlugin) Bukkit.getPluginManager().getPlugin("WorldEdit"));
bind(Actor.class).annotatedWith(ConsoleActor.class).toInstance(wePlugin.wrapCommandSender(console));
bind(InventoryUtil.class).to(BukkitInventoryUtil.class);
bind(SetupUtils.class).to(BukkitSetupUtils.class);
bind(WorldUtil.class).to(BukkitUtil.class);
install(new FactoryModuleBuilder()
.implement(ProgressSubscriber.class, DefaultProgressSubscriber.class)
.build(ProgressSubscriberFactory.class));
bind(ChunkManager.class).to(BukkitChunkManager.class);
if (PlotSquared.platform().isFaweHooking()) {
bind(SchematicHandler.class).to(FaweSchematicHandler.class);
bind(RegionManager.class).to(FaweRegionManager.class);
} else {
bind(SchematicHandler.class).to(BukkitSchematicHandler.class);
bind(RegionManager.class).to(BukkitRegionManager.class);
}
bind(GlobalBlockQueue.class).toInstance(new GlobalBlockQueue(QueueProvider.of(BukkitQueueCoordinator.class)));
if (Settings.Enabled_Components.WORLDS) {
bind(PlotAreaManager.class).to(SinglePlotAreaManager.class);
try {
bind(SingleWorldListener.class).toInstance(new SingleWorldListener());
} catch (Exception e) {
e.printStackTrace();
}
} else {
bind(PlotAreaManager.class).to(DefaultPlotAreaManager.class);
}
install(new FactoryModuleBuilder().build(HybridPlotWorldFactory.class));
install(new FactoryModuleBuilder()
.implement(ChunkCoordinator.class, BukkitChunkCoordinator.class)
.build(ChunkCoordinatorFactory.class));
install(new FactoryModuleBuilder().build(ChunkCoordinatorBuilderFactory.class));
}
@Provides
@Singleton
@NonNull EconHandler provideEconHandler() {
if (!Settings.Enabled_Components.ECONOMY) {
return EconHandler.nullEconHandler();
}
if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
try {
BukkitEconHandler econHandler = new BukkitEconHandler();
if (!econHandler.init()) {
LOGGER.warn("Economy is enabled but no plugin is providing an economy service. Falling back...");
return EconHandler.nullEconHandler();
}
return econHandler;
} catch (final Exception ignored) {
}
}
return EconHandler.nullEconHandler();
}
}

View File

@ -0,0 +1,43 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.inject;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.plotsquared.bukkit.permissions.BukkitPermissionHandler;
import com.plotsquared.bukkit.permissions.VaultPermissionHandler;
import com.plotsquared.core.permissions.PermissionHandler;
import org.bukkit.Bukkit;
public class PermissionModule extends AbstractModule {
@Provides
@Singleton
PermissionHandler providePermissionHandler() {
try {
if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
return new VaultPermissionHandler();
}
} catch (final Exception ignored) {
}
return new BukkitPermissionHandler();
}
}

View File

@ -0,0 +1,43 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.inject;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.plotsquared.bukkit.managers.BukkitWorldManager;
import com.plotsquared.bukkit.managers.MultiverseWorldManager;
import com.plotsquared.core.util.PlatformWorldManager;
import org.bukkit.Bukkit;
import org.bukkit.World;
public class WorldManagerModule extends AbstractModule {
@SuppressWarnings("removal") // Internal use only
@Provides
@Singleton
PlatformWorldManager<World> provideWorldManager() {
if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) {
return new MultiverseWorldManager();
} else {
return new BukkitWorldManager();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,189 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.flag.implementations.CopperOxideFlag;
import com.plotsquared.core.plot.flag.implementations.MiscInteractFlag;
import com.plotsquared.core.util.PlotFlagUtil;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockFertilizeEvent;
import org.bukkit.event.block.BlockFormEvent;
import org.bukkit.event.block.BlockReceiveGameEvent;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
@SuppressWarnings("unused")
public class BlockEventListener117 implements Listener {
private static final Set<Material> COPPER_OXIDIZING = Set.of(
Material.COPPER_BLOCK,
Material.EXPOSED_COPPER,
Material.WEATHERED_COPPER,
Material.OXIDIZED_COPPER,
Material.CUT_COPPER,
Material.EXPOSED_CUT_COPPER,
Material.WEATHERED_CUT_COPPER,
Material.OXIDIZED_CUT_COPPER,
Material.CUT_COPPER_STAIRS,
Material.EXPOSED_CUT_COPPER_STAIRS,
Material.WEATHERED_CUT_COPPER_STAIRS,
Material.OXIDIZED_CUT_COPPER_STAIRS,
Material.CUT_COPPER_SLAB,
Material.EXPOSED_CUT_COPPER_SLAB,
Material.WEATHERED_CUT_COPPER_SLAB,
Material.OXIDIZED_CUT_COPPER_SLAB
);
@Inject
public BlockEventListener117() {
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBlockReceiveGame(BlockReceiveGameEvent event) {
Block block = event.getBlock();
Location location = BukkitUtil.adapt(block.getLocation());
Entity entity = event.getEntity();
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
BukkitPlayer plotPlayer = null;
if (entity instanceof Player player) {
plotPlayer = BukkitUtil.adapt(player);
if (area.notifyIfOutsideBuildArea(plotPlayer, location.getY())) {
event.setCancelled(true);
return;
}
}
Plot plot = location.getOwnedPlot();
if (plot == null && !PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, MiscInteractFlag.class, true) || plot != null && !plot.getFlag(
MiscInteractFlag.class)) {
if (plotPlayer != null) {
if (plot != null) {
if (!plot.isAdded(plotPlayer.getUUID())) {
plot.debug(plotPlayer.getName() + " couldn't trigger sculk sensors because misc-interact = false");
event.setCancelled(true);
}
}
return;
}
if (entity instanceof Item item) {
UUID itemThrower = item.getThrower();
if (plot != null) {
if (itemThrower == null && (itemThrower = item.getOwner()) == null) {
plot.debug(
"A thrown item couldn't trigger sculk sensors because misc-interact = false and the item's owner could not be resolved.");
event.setCancelled(true);
return;
}
if (!plot.isAdded(itemThrower)) {
if (!plot.isAdded(itemThrower)) {
plot.debug("A thrown item couldn't trigger sculk sensors because misc-interact = false");
event.setCancelled(true);
}
}
}
}
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBlockFertilize(BlockFertilizeEvent event) {
Block block = event.getBlock();
List<org.bukkit.block.BlockState> blocks = event.getBlocks();
Location location = BukkitUtil.adapt(blocks.get(0).getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
for (int i = blocks.size() - 1; i >= 0; i--) {
Location blockLocation = BukkitUtil.adapt(blocks.get(i).getLocation());
blockLocation = BukkitUtil.adapt(blocks.get(i).getLocation());
if (blockLocation.isPlotArea()) {
blocks.remove(i);
}
}
} else {
Plot origin = area.getOwnedPlot(location);
if (origin == null) {
event.setCancelled(true);
return;
}
for (int i = blocks.size() - 1; i >= 0; i--) {
Location blockLocation = BukkitUtil.adapt(blocks.get(i).getLocation());
if (!area.contains(blockLocation.getX(), blockLocation.getZ())) {
blocks.remove(i);
continue;
}
Plot plot = area.getOwnedPlot(blockLocation);
if (!Objects.equals(plot, origin)) {
event.getBlocks().remove(i);
continue;
}
if (!area.buildRangeContainsY(location.getY())) {
event.getBlocks().remove(i);
}
}
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBlockForm(BlockFormEvent event) {
Block block = event.getBlock();
Location location = BukkitUtil.adapt(block.getLocation());
if (location.isPlotRoad()) {
event.setCancelled(true);
return;
}
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
Plot plot = area.getOwnedPlot(location);
if (plot == null) {
return;
}
if (COPPER_OXIDIZING.contains(event.getNewState().getType())) {
if (!plot.getFlag(CopperOxideFlag.class)) {
plot.debug("Copper could not oxide because copper-oxide = false");
event.setCancelled(true);
}
}
}
}

View File

@ -0,0 +1,365 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
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.RefField;
import com.plotsquared.core.util.ReflectionUtils.RefMethod;
import com.plotsquared.core.util.task.PlotSquaredTask;
import com.plotsquared.core.util.task.TaskManager;
import com.plotsquared.core.util.task.TaskTime;
import io.papermc.lib.PaperLib;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.BlockState;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.event.world.ChunkUnloadEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Objects;
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
@SuppressWarnings("unused")
public class ChunkListener implements Listener {
private final PlotAreaManager plotAreaManager;
private final int version;
private RefMethod methodGetHandleChunk;
private RefMethod methodGetHandleWorld;
private RefField mustSave;
/*
private RefMethod methodGetFullChunk;
private RefMethod methodGetBukkitChunk;
private RefMethod methodGetChunkProvider;
private RefMethod methodGetVisibleMap;
private RefField worldServer;
private RefField playerChunkMap;
private RefField updatingChunks;
private RefField visibleChunks;
*/
private Chunk lastChunk;
private boolean ignoreUnload = false;
private boolean isTrueForNotSave = true;
@Inject
public ChunkListener(final @NonNull PlotAreaManager plotAreaManager) {
this.plotAreaManager = plotAreaManager;
version = PlotSquared.platform().serverVersion()[1];
if (!Settings.Chunk_Processor.AUTO_TRIM) {
return;
}
try {
RefClass classCraftWorld = getRefClass("{cb}.CraftWorld");
this.methodGetHandleWorld = classCraftWorld.getMethod("getHandle");
RefClass classCraftChunk = getRefClass("{cb}.CraftChunk");
this.methodGetHandleChunk = classCraftChunk.getMethod("getHandle");
try {
if (version < 17) {
RefClass classChunk = getRefClass("{nms}.Chunk");
if (version == 13) {
this.mustSave = classChunk.getField("mustSave");
this.isTrueForNotSave = false;
} else {
this.mustSave = classChunk.getField("mustNotSave");
}
} else {
RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.Chunk");
this.mustSave = classChunk.getField("mustNotSave");
}
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
} catch (Throwable ignored) {
Settings.Chunk_Processor.AUTO_TRIM = false;
}
for (World world : Bukkit.getWorlds()) {
world.setAutoSave(false);
}
if (version > 13) {
return;
}
TaskManager.runTaskRepeat(() -> {
try {
HashSet<Chunk> toUnload = new HashSet<>();
for (World world : Bukkit.getWorlds()) {
String worldName = world.getName();
if (!this.plotAreaManager.hasPlotArea(worldName)) {
continue;
}
Object craftWorld = methodGetHandleWorld.of(world).call();
if (version == 13) {
Object chunkMap = craftWorld.getClass().getDeclaredMethod("getPlayerChunkMap").invoke(craftWorld);
Method methodIsChunkInUse =
chunkMap.getClass().getDeclaredMethod("isChunkInUse", int.class, int.class);
Chunk[] chunks = world.getLoadedChunks();
for (Chunk chunk : chunks) {
if ((boolean) methodIsChunkInUse.invoke(chunkMap, chunk.getX(), chunk.getZ())) {
continue;
}
int x = chunk.getX();
int z = chunk.getZ();
if (!shouldSave(worldName, x, z)) {
unloadChunk(worldName, chunk, false);
continue;
}
toUnload.add(chunk);
}
}
}
if (toUnload.isEmpty()) {
return;
}
long start = System.currentTimeMillis();
for (Chunk chunk : toUnload) {
if (System.currentTimeMillis() - start > 5) {
return;
}
chunk.unload(true);
}
} catch (Throwable e) {
e.printStackTrace();
}
}, TaskTime.ticks(1L));
}
public boolean unloadChunk(String world, Chunk chunk, boolean safe) {
if (safe && shouldSave(world, chunk.getX(), chunk.getZ())) {
return false;
}
Object c = this.methodGetHandleChunk.of(chunk).call();
RefField.RefExecutor field = this.mustSave.of(c);
if ((Boolean) field.get() != isTrueForNotSave) {
field.set(isTrueForNotSave);
if (chunk.isLoaded()) {
ignoreUnload = true;
chunk.unload(false);
ignoreUnload = false;
}
}
return true;
}
public boolean shouldSave(String world, int chunkX, int chunkZ) {
int x = chunkX << 4;
int z = chunkZ << 4;
int x2 = x + 15;
int z2 = z + 15;
Location loc = Location.at(world, x, 1, z);
PlotArea plotArea = plotAreaManager.getPlotArea(loc);
if (plotArea != null) {
Plot plot = plotArea.getPlot(loc);
if (plot != null && plot.hasOwner()) {
return true;
}
}
loc = Location.at(world, x2, 1, z2);
plotArea = plotAreaManager.getPlotArea(loc);
if (plotArea != null) {
Plot plot = plotArea.getPlot(loc);
if (plot != null && plot.hasOwner()) {
return true;
}
}
loc = Location.at(world, x2, 1, z);
plotArea = plotAreaManager.getPlotArea(loc);
if (plotArea != null) {
Plot plot = plotArea.getPlot(loc);
if (plot != null && plot.hasOwner()) {
return true;
}
}
loc = Location.at(world, x, 1, z2);
plotArea = plotAreaManager.getPlotArea(loc);
if (plotArea != null) {
Plot plot = plotArea.getPlot(loc);
if (plot != null && plot.hasOwner()) {
return true;
}
}
loc = Location.at(world, x + 7, 1, z + 7);
plotArea = plotAreaManager.getPlotArea(loc);
if (plotArea == null) {
return false;
}
Plot plot = plotArea.getPlot(loc);
return plot != null && plot.hasOwner();
}
@EventHandler
public void onChunkUnload(ChunkUnloadEvent event) {
if (ignoreUnload) {
return;
}
Chunk chunk = event.getChunk();
if (Settings.Chunk_Processor.AUTO_TRIM) {
String world = chunk.getWorld().getName();
if ((!Settings.Enabled_Components.WORLDS || !SinglePlotArea.isSinglePlotWorld(world)) && this.plotAreaManager.hasPlotArea(world)) {
if (unloadChunk(world, chunk, true)) {
return;
}
}
}
if (processChunk(event.getChunk(), true)) {
chunk.setForceLoaded(true);
}
}
@EventHandler
public void onChunkLoad(ChunkLoadEvent event) {
processChunk(event.getChunk(), false);
}
@EventHandler(priority = EventPriority.LOWEST)
public void onItemSpawn(ItemSpawnEvent event) {
Item entity = event.getEntity();
PaperLib.getChunkAtAsync(event.getLocation()).thenAccept(chunk -> {
if (chunk == this.lastChunk) {
event.getEntity().remove();
event.setCancelled(true);
return;
}
if (!this.plotAreaManager.hasPlotArea(chunk.getWorld().getName())) {
return;
}
Entity[] entities = chunk.getEntities();
if (entities.length > Settings.Chunk_Processor.MAX_ENTITIES) {
event.getEntity().remove();
event.setCancelled(true);
this.lastChunk = chunk;
} else {
this.lastChunk = null;
}
});
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBlockPhysics(BlockPhysicsEvent event) {
if (Settings.Chunk_Processor.DISABLE_PHYSICS) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onEntitySpawn(CreatureSpawnEvent event) {
LivingEntity entity = event.getEntity();
PaperLib.getChunkAtAsync(event.getLocation()).thenAccept(chunk -> {
if (chunk == this.lastChunk) {
event.getEntity().remove();
event.setCancelled(true);
return;
}
if (!this.plotAreaManager.hasPlotArea(chunk.getWorld().getName())) {
return;
}
Entity[] entities = chunk.getEntities();
if (entities.length > Settings.Chunk_Processor.MAX_ENTITIES) {
event.getEntity().remove();
event.setCancelled(true);
this.lastChunk = chunk;
} else {
this.lastChunk = null;
}
});
}
private void cleanChunk(final Chunk chunk) {
final int currentIndex = TaskManager.index.incrementAndGet();
PlotSquaredTask task = TaskManager.runTaskRepeat(() -> {
if (!chunk.isLoaded()) {
Objects.requireNonNull(TaskManager.removeTask(currentIndex)).cancel();
chunk.unload(true);
return;
}
BlockState[] tiles = chunk.getTileEntities();
if (tiles.length == 0) {
Objects.requireNonNull(TaskManager.removeTask(currentIndex)).cancel();
chunk.unload(true);
return;
}
long start = System.currentTimeMillis();
int i = 0;
while (System.currentTimeMillis() - start < 250) {
if (i >= tiles.length - Settings.Chunk_Processor.MAX_TILES) {
Objects.requireNonNull(TaskManager.removeTask(currentIndex)).cancel();
chunk.unload(true);
return;
}
tiles[i].getBlock().setType(Material.AIR, false);
i++;
}
}, TaskTime.ticks(5L));
TaskManager.addTask(task, currentIndex);
}
public boolean processChunk(Chunk chunk, boolean unload) {
if (!this.plotAreaManager.hasPlotArea(chunk.getWorld().getName())) {
return false;
}
Entity[] entities = chunk.getEntities();
BlockState[] tiles = chunk.getTileEntities();
if (entities.length > Settings.Chunk_Processor.MAX_ENTITIES) {
int toRemove = entities.length - Settings.Chunk_Processor.MAX_ENTITIES;
int index = 0;
while (toRemove > 0 && index < entities.length) {
final Entity entity = entities[index++];
if (!(entity instanceof Player)) {
entity.remove();
toRemove--;
}
}
}
if (tiles.length > Settings.Chunk_Processor.MAX_TILES) {
if (unload) {
cleanChunk(chunk);
return true;
}
for (int i = 0; i < (tiles.length - Settings.Chunk_Processor.MAX_TILES); i++) {
tiles[i].getBlock().setType(Material.AIR, false);
}
}
return false;
}
}

View File

@ -0,0 +1,439 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.bukkit.util.BukkitEntityUtil;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.listener.PlayerBlockEventType;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotHandler;
import com.plotsquared.core.plot.flag.implementations.DisablePhysicsFlag;
import com.plotsquared.core.plot.flag.implementations.EntityChangeBlockFlag;
import com.plotsquared.core.plot.flag.implementations.ExplosionFlag;
import com.plotsquared.core.plot.flag.implementations.InvincibleFlag;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.PlotFlagUtil;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.world.block.BlockType;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Boat;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.entity.Vehicle;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntityChangeBlockEvent;
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.event.vehicle.VehicleCreateEvent;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
import org.bukkit.projectiles.BlockProjectileSource;
import org.bukkit.projectiles.ProjectileSource;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Iterator;
import java.util.List;
@SuppressWarnings("unused")
public class EntityEventListener implements Listener {
private final PlotAreaManager plotAreaManager;
private final EventDispatcher eventDispatcher;
private float lastRadius;
@Inject
public EntityEventListener(
final @NonNull PlotAreaManager plotAreaManager,
final @NonNull EventDispatcher eventDispatcher
) {
this.plotAreaManager = plotAreaManager;
this.eventDispatcher = eventDispatcher;
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onEntityCombustByEntity(EntityCombustByEntityEvent event) {
EntityDamageByEntityEvent eventChange =
new EntityDamageByEntityEvent(
event.getCombuster(),
event.getEntity(),
EntityDamageEvent.DamageCause.FIRE_TICK,
event.getDuration()
);
onEntityDamageByEntityEvent(eventChange);
if (eventChange.isCancelled()) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent event) {
Entity damager = event.getDamager();
Location location = BukkitUtil.adapt(damager.getLocation());
if (!this.plotAreaManager.hasPlotArea(location.getWorldName())) {
return;
}
Entity victim = event.getEntity();
/*
if (victim.getType().equals(EntityType.ITEM_FRAME)) {
Plot plot = BukkitUtil.getLocation(victim).getPlot();
if (plot != null && !plot.isAdded(damager.getUniqueId())) {
event.setCancelled(true);
return;
}
}
*/
if (!BukkitEntityUtil.entityDamage(damager, victim, event.getCause())) {
if (event.isCancelled()) {
if (victim instanceof Ageable ageable) {
if (ageable.getAge() == -24000) {
ageable.setAge(0);
ageable.setAdult();
}
}
}
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void creatureSpawnEvent(CreatureSpawnEvent event) {
Entity entity = event.getEntity();
Location location = BukkitUtil.adapt(entity.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason();
switch (reason.toString()) {
case "DISPENSE_EGG":
case "EGG":
case "OCELOT_BABY":
case "SPAWNER_EGG":
if (!area.isSpawnEggs()) {
event.setCancelled(true);
return;
}
break;
case "REINFORCEMENTS":
case "NATURAL":
case "MOUNT":
case "PATROL":
case "RAID":
case "SHEARED":
case "SILVERFISH_BLOCK":
case "ENDER_PEARL":
case "TRAP":
case "VILLAGE_DEFENSE":
case "VILLAGE_INVASION":
case "BEEHIVE":
case "CHUNK_GEN":
if (!area.isMobSpawning()) {
event.setCancelled(true);
return;
}
break;
case "BREEDING":
if (!area.isSpawnBreeding()) {
event.setCancelled(true);
return;
}
break;
case "BUILD_IRONGOLEM":
case "BUILD_SNOWMAN":
case "BUILD_WITHER":
case "CUSTOM":
if (!area.isSpawnCustom() && entity.getType() != EntityType.ARMOR_STAND) {
event.setCancelled(true);
return;
}
break;
case "SPAWNER":
if (!area.isMobSpawnerSpawning()) {
event.setCancelled(true);
return;
}
break;
}
Plot plot = area.getOwnedPlotAbs(location);
if (plot == null) {
if (!area.isMobSpawning()) {
event.setCancelled(true);
}
return;
}
if (BukkitEntityUtil.checkEntity(entity, plot.getBasePlot(false))) {
event.setCancelled(true);
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
public void onEntityFall(EntityChangeBlockEvent event) {
if (event.getEntityType() != EntityType.FALLING_BLOCK) {
return;
}
Block block = event.getBlock();
World world = block.getWorld();
String worldName = world.getName();
if (!this.plotAreaManager.hasPlotArea(worldName)) {
return;
}
Location location = BukkitUtil.adapt(block.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
Plot plot = area.getOwnedPlotAbs(location);
if (plot == null || plot.getFlag(DisablePhysicsFlag.class)) {
event.setCancelled(true);
if (plot != null) {
if (block.getType().hasGravity()) {
BlockEventListener.sendBlockChange(block.getLocation(), block.getBlockData());
}
plot.debug("Falling block event was cancelled because disable-physics = true");
}
return;
}
if (event.getTo().hasGravity()) {
Entity entity = event.getEntity();
List<MetadataValue> meta = entity.getMetadata("plot");
if (meta.isEmpty()) {
return;
}
Plot origin = (Plot) meta.get(0).value();
if (origin != null && !origin.equals(plot)) {
event.setCancelled(true);
entity.remove();
}
} else if (event.getTo() == Material.AIR) {
event.getEntity().setMetadata("plot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot));
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onDamage(EntityDamageEvent event) {
if (event.getEntityType() != EntityType.PLAYER) {
return;
}
Location location = BukkitUtil.adapt(event.getEntity().getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
Plot plot = location.getOwnedPlot();
if (plot == null) {
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, InvincibleFlag.class, true)) {
event.setCancelled(true);
}
return;
}
if (plot.getFlag(InvincibleFlag.class)) {
plot.debug(event.getEntity().getName() + " could not take damage because invincible = true");
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBigBoom(EntityExplodeEvent event) {
Location location = BukkitUtil.adapt(event.getLocation());
PlotArea area = location.getPlotArea();
boolean plotArea = location.isPlotArea();
if (!plotArea) {
if (!this.plotAreaManager.hasPlotArea(location.getWorldName())) {
return;
}
return;
}
Plot plot = area.getOwnedPlot(location);
if (plot != null) {
if (plot.getFlag(ExplosionFlag.class)) {
List<MetadataValue> meta = event.getEntity().getMetadata("plot");
Plot origin;
if (meta.isEmpty()) {
origin = plot;
} else {
origin = (Plot) meta.get(0).value();
}
if (this.lastRadius != 0) {
List<Entity> nearby = event.getEntity().getNearbyEntities(this.lastRadius, this.lastRadius, this.lastRadius);
for (Entity near : nearby) {
if (near instanceof TNTPrimed || near.getType().equals(EntityType.MINECART_TNT)) {
if (!near.hasMetadata("plot")) {
near.setMetadata("plot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot));
}
}
}
this.lastRadius = 0;
}
Iterator<Block> iterator = event.blockList().iterator();
while (iterator.hasNext()) {
Block block = iterator.next();
location = BukkitUtil.adapt(block.getLocation());
if (!area.contains(location.getX(), location.getZ()) || !origin.equals(area.getOwnedPlot(location))) {
iterator.remove();
}
}
return;
} else {
plot.debug("Explosion was cancelled because explosion = false");
}
}
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)
public void onPeskyMobsChangeTheWorldLikeWTFEvent(EntityChangeBlockEvent event) {
Entity e = event.getEntity();
Material type = event.getBlock().getType();
Location location = BukkitUtil.adapt(event.getBlock().getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
if (e instanceof FallingBlock) {
// allow falling blocks converting to blocks and vice versa
return;
} else if (e instanceof Boat) {
// allow boats destroying lily pads
if (type == Material.LILY_PAD) {
return;
}
} else if (e instanceof Player player) {
BukkitPlayer pp = BukkitUtil.adapt(player);
if (type.toString().equals("POWDER_SNOW")) {
// Burning player evaporating powder snow. Use same checks as
// trampling farmland
BlockType blockType = BukkitAdapter.asBlockType(type);
if (!this.eventDispatcher.checkPlayerBlockEvent(pp,
PlayerBlockEventType.TRIGGER_PHYSICAL, location, blockType, true
)) {
event.setCancelled(true);
}
return;
} else {
// already handled by other flags (mainly the 'use' flag):
// - player tilting big dripleaf by standing on it
// - player picking glow berries from cave vine
// - player trampling farmland
// - player standing on or clicking redstone ore
return;
}
} else if (e instanceof Projectile entity) {
// Exact same as the ProjectileHitEvent listener, except that we let
// the entity-change-block determine what to do with shooters that
// aren't players and aren't blocks
Plot plot = area.getPlot(location);
ProjectileSource shooter = entity.getShooter();
if (shooter instanceof Player) {
PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter);
if (plot == null) {
if (!pp.hasPermission(Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) {
entity.remove();
event.setCancelled(true);
}
return;
}
if (plot.isAdded(pp.getUUID()) || pp.hasPermission(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER)) {
return;
}
entity.remove();
event.setCancelled(true);
return;
}
if (!(shooter instanceof Entity) && shooter != null) {
if (plot == null) {
entity.remove();
event.setCancelled(true);
return;
}
Location sLoc =
BukkitUtil.adapt(((BlockProjectileSource) shooter).getBlock().getLocation());
if (!area.contains(sLoc.getX(), sLoc.getZ())) {
entity.remove();
event.setCancelled(true);
return;
}
Plot sPlot = area.getOwnedPlotAbs(sLoc);
if (sPlot == null || !PlotHandler.sameOwners(plot, sPlot)) {
entity.remove();
event.setCancelled(true);
}
return;
}
// fall back to entity-change-block flag
}
Plot plot = area.getOwnedPlot(location);
if (plot != null && !plot.getFlag(EntityChangeBlockFlag.class)) {
plot.debug(e.getType() + " could not change block because entity-change-block = false");
event.setCancelled(true);
}
}
@EventHandler
public void onPrime(ExplosionPrimeEvent event) {
this.lastRadius = event.getRadius() + 1;
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onVehicleCreate(VehicleCreateEvent event) {
Vehicle entity = event.getVehicle();
Location location = BukkitUtil.adapt(entity.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
Plot plot = area.getOwnedPlotAbs(location);
if (plot == null || BukkitEntityUtil.checkEntity(entity, plot)) {
entity.remove();
return;
}
if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) {
entity.setMetadata("plot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot));
}
}
}

View File

@ -0,0 +1,231 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.plotsquared.bukkit.util.BukkitEntityUtil;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.flag.implementations.DoneFlag;
import io.papermc.lib.PaperLib;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Vehicle;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntitySpawnEvent;
import org.bukkit.event.entity.EntityTeleportEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
import org.bukkit.event.vehicle.VehicleCreateEvent;
import org.bukkit.event.vehicle.VehicleMoveEvent;
import org.bukkit.event.vehicle.VehicleUpdateEvent;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
public class EntitySpawnListener implements Listener {
private static final String KEY = "P2";
private static boolean ignoreTP = false;
private static boolean hasPlotArea = false;
private static String areaName = null;
public static void testNether(final Entity entity) {
@NonNull World world = entity.getWorld();
if (world.getEnvironment() != World.Environment.NETHER && world.getEnvironment() != World.Environment.THE_END) {
return;
}
test(entity);
}
public static void testCreate(final Entity entity) {
@NonNull World world = entity.getWorld();
if (!world.getName().equals(areaName)) {
areaName = world.getName();
hasPlotArea = PlotSquared.get().getPlotAreaManager().hasPlotArea(areaName);
}
if (!hasPlotArea) {
return;
}
test(entity);
}
public static void test(Entity entity) {
@NonNull World world = entity.getWorld();
List<MetadataValue> meta = entity.getMetadata(KEY);
if (meta.isEmpty()) {
if (PlotSquared.get().getPlotAreaManager().hasPlotArea(world.getName())) {
entity.setMetadata(KEY, new FixedMetadataValue((Plugin) PlotSquared.platform(), entity.getLocation()));
}
} else {
org.bukkit.Location origin = (org.bukkit.Location) meta.get(0).value();
World originWorld = origin.getWorld();
if (!originWorld.equals(world)) {
if (!ignoreTP) {
if (!world.getName().equalsIgnoreCase(originWorld + "_the_end")) {
if (entity.getType() == EntityType.PLAYER) {
return;
}
try {
ignoreTP = true;
PaperLib.teleportAsync(entity, origin);
} finally {
ignoreTP = false;
}
if (entity.getLocation().getWorld().equals(world)) {
entity.remove();
}
}
} else {
if (entity.getType() == EntityType.PLAYER) {
return;
}
entity.remove();
}
}
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void creatureSpawnEvent(EntitySpawnEvent event) {
Entity entity = event.getEntity();
Location location = BukkitUtil.adapt(entity.getLocation());
PlotArea area = location.getPlotArea();
if (!location.isPlotArea()) {
return;
}
Plot plot = location.getOwnedPlotAbs();
EntityType type = entity.getType();
if (plot == null) {
if (type == EntityType.DROPPED_ITEM) {
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
event.setCancelled(true);
}
return;
}
if (!area.isMobSpawning()) {
if (type == EntityType.PLAYER) {
return;
}
if (type.isAlive()) {
event.setCancelled(true);
}
}
if (!area.isMiscSpawnUnowned() && !type.isAlive()) {
event.setCancelled(true);
}
return;
}
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
event.setCancelled(true);
}
if (type == EntityType.ENDER_CRYSTAL) {
if (BukkitEntityUtil.checkEntity(entity, plot)) {
event.setCancelled(true);
}
return;
}
if (type == EntityType.SHULKER) {
if (!entity.hasMetadata("shulkerPlot")) {
entity.setMetadata("shulkerPlot", new FixedMetadataValue((Plugin) PlotSquared.platform(), plot.getId()));
}
}
}
@EventHandler
public void onChunkLoad(ChunkLoadEvent event) {
@NonNull Chunk chunk = event.getChunk();
for (final Entity entity : chunk.getEntities()) {
testCreate(entity);
}
}
@EventHandler
public void onVehicle(VehicleUpdateEvent event) {
testNether(event.getVehicle());
}
@EventHandler
public void onVehicle(VehicleCreateEvent event) {
testCreate(event.getVehicle());
}
@EventHandler
public void onVehicle(VehicleBlockCollisionEvent event) {
testNether(event.getVehicle());
}
@EventHandler
public void onTeleport(EntityTeleportEvent event) {
Entity entity = event.getEntity();
Entity fromLocation = event.getEntity();
Block toLocation = event.getTo().getBlock();
final Location fromLocLocation = BukkitUtil.adapt(fromLocation.getLocation());
final PlotArea fromArea = fromLocLocation.getPlotArea();
Location toLocLocation = BukkitUtil.adapt(toLocation.getLocation());
PlotArea toArea = toLocLocation.getPlotArea();
if (toArea == null) {
if (fromLocation.getType() == EntityType.SHULKER && fromArea != null) {
event.setCancelled(true);
}
return;
}
Plot toPlot = toArea.getOwnedPlot(toLocLocation);
if (fromLocation.getType() == EntityType.SHULKER && fromArea != null) {
final Plot fromPlot = fromArea.getOwnedPlot(fromLocLocation);
if (fromPlot != null || toPlot != null) {
if ((fromPlot == null || !fromPlot.equals(toPlot)) && (toPlot == null || !toPlot.equals(fromPlot))) {
event.setCancelled(true);
return;
}
}
}
if (entity instanceof Vehicle || entity instanceof ArmorStand) {
testNether(event.getEntity());
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void vehicleMove(VehicleMoveEvent event) {
testNether(event.getVehicle());
}
@EventHandler
public void spawn(CreatureSpawnEvent event) {
if (event.getEntityType() == EntityType.ARMOR_STAND) {
testCreate(event.getEntity());
}
}
}

View File

@ -0,0 +1,128 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.flag.implementations.ForcefieldFlag;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
@SuppressWarnings("unused")
public class ForceFieldListener {
private static Set<PlotPlayer<?>> getNearbyPlayers(Player player, Plot plot) {
Set<PlotPlayer<?>> players = new HashSet<>();
for (Player nearPlayer : player.getNearbyEntities(5d, 5d, 5d).stream()
.filter(entity -> entity instanceof Player)
.map(entity -> (Player) entity)
.toList()
) {
PlotPlayer<?> plotPlayer;
if ((plotPlayer = BukkitUtil.adapt(nearPlayer)) == null || !plot
.equals(plotPlayer.getCurrentPlot())) {
continue;
}
if (!plot.isAdded(plotPlayer.getUUID())) {
players.add(plotPlayer);
}
}
return players;
}
private static PlotPlayer<?> hasNearbyPermitted(Player player, Plot plot) {
for (Player nearPlayer : player.getNearbyEntities(5d, 5d, 5d).stream()
.filter(entity -> entity instanceof Player)
.map(entity -> (Player) entity)
.toList()
) {
PlotPlayer<?> plotPlayer;
if ((plotPlayer = BukkitUtil.adapt(nearPlayer)) == null || !plot
.equals(plotPlayer.getCurrentPlot())) {
continue;
}
if (plot.isAdded(plotPlayer.getUUID())) {
return plotPlayer;
}
}
return null;
}
private static Vector calculateVelocity(PlotPlayer<?> player, PlotPlayer<?> e) {
Location playerLocation = player.getLocationFull();
Location oPlayerLocation = e.getLocation();
double playerX = playerLocation.getX();
double playerY = playerLocation.getY();
double playerZ = playerLocation.getZ();
double oPlayerX = oPlayerLocation.getX();
double oPlayerY = oPlayerLocation.getY();
double oPlayerZ = oPlayerLocation.getZ();
double x = 0d;
if (playerX < oPlayerX) {
x = 1.0d;
} else if (playerX > oPlayerX) {
x = -1.0d;
}
double y = 0d;
if (playerY < oPlayerY) {
y = 0.5d;
} else if (playerY > oPlayerY) {
y = -0.5d;
}
double z = 0d;
if (playerZ < oPlayerZ) {
z = 1.0d;
} else if (playerZ > oPlayerZ) {
z = -1.0d;
}
return new Vector(x, y, z);
}
public static void handleForcefield(Player player, PlotPlayer<?> plotPlayer, Plot plot) {
if (plot.getFlag(ForcefieldFlag.class)) {
UUID uuid = plotPlayer.getUUID();
if (plot.isAdded(uuid)) {
Set<PlotPlayer<?>> players = getNearbyPlayers(player, plot);
for (PlotPlayer<?> oPlayer : players) {
if (!oPlayer.hasPermission(Permission.PERMISSION_ADMIN_ENTRY_FORCEFIELD)) {
((BukkitPlayer) oPlayer).player
.setVelocity(calculateVelocity(plotPlayer, oPlayer));
}
}
} else {
PlotPlayer<?> oPlayer = hasNearbyPermitted(player, plot);
if (oPlayer == null) {
return;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_ENTRY_FORCEFIELD)) {
player.setVelocity(calculateVelocity(oPlayer, plotPlayer));
}
}
}
}
}

View File

@ -0,0 +1,456 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.destroystokyo.paper.event.block.BeaconEffectEvent;
import com.destroystokyo.paper.event.entity.EntityPathfindEvent;
import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent;
import com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent;
import com.destroystokyo.paper.event.entity.PreSpawnerSpawnEvent;
import com.destroystokyo.paper.event.entity.SlimePathfindEvent;
import com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent;
import com.destroystokyo.paper.event.server.AsyncTabCompleteEvent;
import com.google.inject.Inject;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.command.Command;
import com.plotsquared.core.command.MainCommand;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.flag.FlagContainer;
import com.plotsquared.core.plot.flag.implementations.BeaconEffectsFlag;
import com.plotsquared.core.plot.flag.implementations.DoneFlag;
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
import com.plotsquared.core.plot.flag.types.BooleanFlag;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.PlotFlagUtil;
import net.kyori.adventure.text.minimessage.Template;
import org.bukkit.Chunk;
import org.bukkit.block.Block;
import org.bukkit.block.TileState;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.Slime;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.projectiles.ProjectileSource;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
/**
* Events specific to Paper. Some toit nups here
*/
@SuppressWarnings("unused")
public class PaperListener implements Listener {
private final PlotAreaManager plotAreaManager;
private Chunk lastChunk;
@Inject
public PaperListener(final @NonNull PlotAreaManager plotAreaManager) {
this.plotAreaManager = plotAreaManager;
}
@EventHandler
public void onEntityPathfind(EntityPathfindEvent event) {
if (!Settings.Paper_Components.ENTITY_PATHING) {
return;
}
Location toLoc = BukkitUtil.adapt(event.getLoc());
Location fromLoc = BukkitUtil.adapt(event.getEntity().getLocation());
PlotArea tarea = toLoc.getPlotArea();
if (tarea == null) {
return;
}
PlotArea farea = fromLoc.getPlotArea();
if (farea == null) {
return;
}
if (tarea != farea) {
event.setCancelled(true);
return;
}
Plot tplot = toLoc.getPlot();
Plot fplot = fromLoc.getPlot();
if (tplot == null ^ fplot == null) {
event.setCancelled(true);
return;
}
if (tplot == null || tplot.getId().hashCode() == fplot.getId().hashCode()) {
return;
}
if (fplot.isMerged() && fplot.getConnectedPlots().contains(fplot)) {
return;
}
event.setCancelled(true);
}
@EventHandler
public void onEntityPathfind(SlimePathfindEvent event) {
if (!Settings.Paper_Components.ENTITY_PATHING) {
return;
}
Slime slime = event.getEntity();
Block b = slime.getTargetBlock(4);
if (b == null) {
return;
}
Location toLoc = BukkitUtil.adapt(b.getLocation());
Location fromLoc = BukkitUtil.adapt(event.getEntity().getLocation());
PlotArea tarea = toLoc.getPlotArea();
if (tarea == null) {
return;
}
PlotArea farea = fromLoc.getPlotArea();
if (farea == null) {
return;
}
if (tarea != farea) {
event.setCancelled(true);
return;
}
Plot tplot = toLoc.getPlot();
Plot fplot = fromLoc.getPlot();
if (tplot == null ^ fplot == null) {
event.setCancelled(true);
return;
}
if (tplot == null || tplot.getId().hashCode() == fplot.getId().hashCode()) {
return;
}
if (fplot.isMerged() && fplot.getConnectedPlots().contains(fplot)) {
return;
}
event.setCancelled(true);
}
@EventHandler
public void onPreCreatureSpawnEvent(PreCreatureSpawnEvent event) {
if (!Settings.Paper_Components.CREATURE_SPAWN) {
return;
}
Location location = BukkitUtil.adapt(event.getSpawnLocation());
PlotArea area = location.getPlotArea();
if (!location.isPlotArea()) {
return;
}
//If entities are spawning... the chunk should be loaded?
Entity[] entities = event.getSpawnLocation().getChunk().getEntities();
if (entities.length > Settings.Chunk_Processor.MAX_ENTITIES) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
return;
}
CreatureSpawnEvent.SpawnReason reason = event.getReason();
switch (reason.toString()) {
case "DISPENSE_EGG":
case "EGG":
case "OCELOT_BABY":
case "SPAWNER_EGG":
if (!area.isSpawnEggs()) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
return;
}
break;
case "REINFORCEMENTS":
case "NATURAL":
case "MOUNT":
case "PATROL":
case "RAID":
case "SHEARED":
case "SILVERFISH_BLOCK":
case "ENDER_PEARL":
case "TRAP":
case "VILLAGE_DEFENSE":
case "VILLAGE_INVASION":
case "BEEHIVE":
case "CHUNK_GEN":
if (!area.isMobSpawning()) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
return;
}
break;
case "BREEDING":
if (!area.isSpawnBreeding()) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
return;
}
break;
case "BUILD_IRONGOLEM":
case "BUILD_SNOWMAN":
case "BUILD_WITHER":
case "CUSTOM":
if (!area.isSpawnCustom() && event.getType() != EntityType.ARMOR_STAND) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
return;
}
break;
case "SPAWNER":
if (!area.isMobSpawnerSpawning()) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
return;
}
break;
}
Plot plot = location.getOwnedPlotAbs();
if (plot == null) {
EntityType type = event.getType();
// PreCreatureSpawnEvent **should** not be called for DROPPED_ITEM, just for the sake of consistency
if (type == EntityType.DROPPED_ITEM) {
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
event.setCancelled(true);
}
return;
}
if (!area.isMobSpawning()) {
if (type == EntityType.PLAYER) {
return;
}
if (type.isAlive()) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
}
}
if (!area.isMiscSpawnUnowned() && !type.isAlive()) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
}
return;
}
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
}
}
@EventHandler
public void onPlayerNaturallySpawnCreaturesEvent(PlayerNaturallySpawnCreaturesEvent event) {
if (Settings.Paper_Components.CANCEL_CHUNK_SPAWN) {
Location location = BukkitUtil.adapt(event.getPlayer().getLocation());
PlotArea area = location.getPlotArea();
if (area != null && !area.isMobSpawning()) {
event.setCancelled(true);
}
}
}
@EventHandler
public void onPreSpawnerSpawnEvent(PreSpawnerSpawnEvent event) {
if (Settings.Paper_Components.SPAWNER_SPAWN) {
Location location = BukkitUtil.adapt(event.getSpawnerLocation());
PlotArea area = location.getPlotArea();
if (area != null && !area.isMobSpawnerSpawning()) {
event.setCancelled(true);
event.setShouldAbortSpawn(true);
}
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockPlace(BlockPlaceEvent event) {
if (!Settings.Paper_Components.TILE_ENTITY_CHECK || !Settings.Enabled_Components.CHUNK_PROCESSOR) {
return;
}
if (!(event.getBlock().getState(false) instanceof TileState)) {
return;
}
final Location location = BukkitUtil.adapt(event.getBlock().getLocation());
final PlotArea plotArea = location.getPlotArea();
if (plotArea == null) {
return;
}
final int tileEntityCount = event.getBlock().getChunk().getTileEntities(false).length;
if (tileEntityCount >= Settings.Chunk_Processor.MAX_TILES) {
final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer());
plotPlayer.sendMessage(
TranslatableCaption.of("errors.tile_entity_cap_reached"),
Template.of("amount", String.valueOf(Settings.Chunk_Processor.MAX_TILES))
);
event.setCancelled(true);
event.setBuild(false);
}
}
/**
* Unsure if this will be any performance improvement over the spigot version,
* but here it is anyway :)
*
* @param event Paper's PlayerLaunchProjectileEvent
*/
@EventHandler
public void onProjectileLaunch(PlayerLaunchProjectileEvent event) {
if (!Settings.Paper_Components.PLAYER_PROJECTILE) {
return;
}
Projectile entity = event.getProjectile();
ProjectileSource shooter = entity.getShooter();
if (!(shooter instanceof Player)) {
return;
}
Location location = BukkitUtil.adapt(entity.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
PlotPlayer<Player> pp = BukkitUtil.adapt((Player) shooter);
Plot plot = location.getOwnedPlot();
if (plot == null) {
if (!PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, ProjectilesFlag.class, true) && !pp.hasPermission(
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 (!pp.hasPermission(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 (!plot.getFlag(ProjectilesFlag.class)) {
if (!pp.hasPermission(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);
}
}
}
}
@EventHandler
public void onAsyncTabCompletion(final AsyncTabCompleteEvent event) {
if (!Settings.Paper_Components.ASYNC_TAB_COMPLETION) {
return;
}
String buffer = event.getBuffer();
if (!(event.getSender() instanceof Player)) {
return;
}
if ((!event.isCommand() && !buffer.startsWith("/")) || buffer.indexOf(' ') == -1) {
return;
}
if (buffer.startsWith("/")) {
buffer = buffer.substring(1);
}
final String[] unprocessedArgs = buffer.split(Pattern.quote(" "));
if (unprocessedArgs.length == 1) {
return; // We don't do anything in this case
} else if (!Settings.Enabled_Components.TAB_COMPLETED_ALIASES
.contains(unprocessedArgs[0].toLowerCase(Locale.ENGLISH))) {
return;
}
final String[] args = new String[unprocessedArgs.length - 1];
System.arraycopy(unprocessedArgs, 1, args, 0, args.length);
try {
final PlotPlayer<?> player = BukkitUtil.adapt((Player) event.getSender());
final Collection<Command> objects = MainCommand.getInstance().tab(player, args, buffer.endsWith(" "));
if (objects == null) {
return;
}
final List<String> result = new ArrayList<>();
for (final com.plotsquared.core.command.Command o : objects) {
result.add(o.toString());
}
event.setCompletions(result);
event.setHandled(true);
} catch (final Exception ignored) {
}
}
@EventHandler(ignoreCancelled = true)
public void onBeaconEffect(final BeaconEffectEvent event) {
Block block = event.getBlock();
Location beaconLocation = BukkitUtil.adapt(block.getLocation());
Plot beaconPlot = beaconLocation.getPlot();
PlotArea area = beaconLocation.getPlotArea();
if (area == null) {
return;
}
Player player = event.getPlayer();
Location playerLocation = BukkitUtil.adapt(player.getLocation());
PlotPlayer<Player> plotPlayer = BukkitUtil.adapt(player);
Plot playerStandingPlot = playerLocation.getPlot();
if (playerStandingPlot == null) {
FlagContainer container = area.getRoadFlagContainer();
if (!getBooleanFlagValue(container, BeaconEffectsFlag.class, true) ||
(beaconPlot != null && Settings.Enabled_Components.DISABLE_BEACON_EFFECT_OVERFLOW)) {
event.setCancelled(true);
}
return;
}
FlagContainer container = playerStandingPlot.getFlagContainer();
boolean plotBeaconEffects = getBooleanFlagValue(container, BeaconEffectsFlag.class, true);
if (playerStandingPlot.equals(beaconPlot)) {
if (!plotBeaconEffects) {
event.setCancelled(true);
}
return;
}
if (!plotBeaconEffects || Settings.Enabled_Components.DISABLE_BEACON_EFFECT_OVERFLOW) {
event.setCancelled(true);
}
}
private boolean getBooleanFlagValue(@NonNull FlagContainer container,
@NonNull Class<? extends BooleanFlag<?>> flagClass,
boolean defaultValue) {
BooleanFlag<?> flag = container.getFlag(flagClass);
return flag == null ? defaultValue : flag.getValue();
}
}

View File

@ -0,0 +1,91 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.world.PlotAreaManager;
import net.kyori.adventure.text.minimessage.Template;
import org.bukkit.block.Banner;
import org.bukkit.block.Beacon;
import org.bukkit.block.BlockState;
import org.bukkit.block.CommandBlock;
import org.bukkit.block.Comparator;
import org.bukkit.block.Conduit;
import org.bukkit.block.Container;
import org.bukkit.block.CreatureSpawner;
import org.bukkit.block.DaylightDetector;
import org.bukkit.block.EnchantingTable;
import org.bukkit.block.EndGateway;
import org.bukkit.block.EnderChest;
import org.bukkit.block.Jukebox;
import org.bukkit.block.Sign;
import org.bukkit.block.Skull;
import org.bukkit.block.Structure;
import org.bukkit.block.data.type.Bed;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockPlaceEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* @deprecated P2 effectively no longer supports 1.13
*/
@Deprecated(forRemoval = true, since = "6.10.4")
public class PaperListener113 extends PaperListener {
@Inject
public PaperListener113(@NonNull PlotAreaManager plotAreaManager) {
super(plotAreaManager);
}
@EventHandler
public void onBlockPlace(BlockPlaceEvent event) {
if (!Settings.Paper_Components.TILE_ENTITY_CHECK || !Settings.Enabled_Components.CHUNK_PROCESSOR) {
return;
}
BlockState state = event.getBlock().getState(false);
if (!(state instanceof Banner || state instanceof Beacon || state instanceof Bed || state instanceof CommandBlock
|| state instanceof Comparator || state instanceof Conduit || state instanceof Container || state instanceof CreatureSpawner
|| state instanceof DaylightDetector || state instanceof EnchantingTable || state instanceof EnderChest || state instanceof EndGateway
|| state instanceof Jukebox || state instanceof Sign || state instanceof Skull || state instanceof Structure)) {
return;
}
final Location location = BukkitUtil.adapt(event.getBlock().getLocation());
final PlotArea plotArea = location.getPlotArea();
if (plotArea == null) {
return;
}
final int tileEntityCount = event.getBlock().getChunk().getTileEntities(false).length;
if (tileEntityCount >= Settings.Chunk_Processor.MAX_TILES) {
final PlotPlayer<?> plotPlayer = BukkitUtil.adapt(event.getPlayer());
plotPlayer.sendMessage(
TranslatableCaption.of("errors.tile_entity_cap_reached"),
Template.of("amount", String.valueOf(Settings.Chunk_Processor.MAX_TILES))
);
event.setCancelled(true);
event.setBuild(false);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,208 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.bukkit.util.BukkitEntityUtil;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotHandler;
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.PlotFlagUtil;
import net.kyori.adventure.text.minimessage.Template;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.LingeringPotionSplashEvent;
import org.bukkit.event.entity.PotionSplashEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.projectiles.BlockProjectileSource;
import org.bukkit.projectiles.ProjectileSource;
import org.checkerframework.checker.nullness.qual.NonNull;
@SuppressWarnings("unused")
public class ProjectileEventListener implements Listener {
private final PlotAreaManager plotAreaManager;
@Inject
public ProjectileEventListener(final @NonNull PlotAreaManager plotAreaManager) {
this.plotAreaManager = plotAreaManager;
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onLingeringPotionSplash(LingeringPotionSplashEvent event) {
// Cancelling projectile hit events still results in area effect clouds.
// We need to cancel the splash events to get rid of those.
onProjectileHit(event);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onPotionSplash(PotionSplashEvent event) {
ThrownPotion damager = event.getPotion();
Location location = BukkitUtil.adapt(damager.getLocation());
if (!this.plotAreaManager.hasPlotArea(location.getWorldName())) {
return;
}
int count = 0;
for (LivingEntity victim : event.getAffectedEntities()) {
if (!BukkitEntityUtil.entityDamage(damager, victim)) {
event.setIntensity(victim, 0);
count++;
}
}
if (count > 0 && count == event.getAffectedEntities().size()) {
event.setCancelled(true);
} else {
// Cancelling projectile hit events still results in potions
// splashing in the world. We need to cancel the splash events to
// avoid that.
onProjectileHit(event);
}
}
@EventHandler(ignoreCancelled = true)
public void onProjectileLaunch(ProjectileLaunchEvent event) {
Projectile entity = event.getEntity();
ProjectileSource shooter = entity.getShooter();
if (!(shooter instanceof Player)) {
return;
}
Location location = BukkitUtil.adapt(entity.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
PlotPlayer<Player> pp = BukkitUtil.adapt((Player) shooter);
Plot plot = location.getOwnedPlot();
if (plot == null) {
if (!PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, ProjectilesFlag.class, true) && !pp.hasPermission(
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 (!pp.hasPermission(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 (!plot.getFlag(ProjectilesFlag.class)) {
if (!pp.hasPermission(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);
}
}
}
}
@EventHandler
public void onProjectileHit(ProjectileHitEvent event) {
Projectile entity = event.getEntity();
Location location = BukkitUtil.adapt(entity.getLocation());
if (!this.plotAreaManager.hasPlotArea(location.getWorldName())) {
return;
}
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
Plot plot = area.getPlot(location);
ProjectileSource shooter = entity.getShooter();
if (shooter instanceof Player) {
if (!((Player) shooter).isOnline()) {
if (plot != null) {
if (plot.isAdded(((Player) shooter).getUniqueId()) || plot.getFlag(ProjectilesFlag.class)) {
return;
}
} else if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, ProjectilesFlag.class, true)) {
return;
}
entity.remove();
event.setCancelled(true);
return;
}
PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter);
if (plot == null) {
if (!PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, ProjectilesFlag.class, true) && !pp.hasPermission(
Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED
)) {
entity.remove();
event.setCancelled(true);
}
return;
}
if (plot.isAdded(pp.getUUID()) || pp.hasPermission(Permission.PERMISSION_ADMIN_PROJECTILE_OTHER) || plot.getFlag(
ProjectilesFlag.class)) {
return;
}
entity.remove();
event.setCancelled(true);
return;
}
if (!(shooter instanceof Entity) && shooter != null) {
if (plot == null) {
entity.remove();
event.setCancelled(true);
return;
}
Location sLoc =
BukkitUtil.adapt(((BlockProjectileSource) shooter).getBlock().getLocation());
if (!area.contains(sLoc.getX(), sLoc.getZ())) {
entity.remove();
event.setCancelled(true);
return;
}
Plot sPlot = area.getOwnedPlotAbs(sLoc);
if (sPlot == null || !PlotHandler.sameOwners(plot, sPlot)) {
entity.remove();
event.setCancelled(true);
}
}
}
}

View File

@ -0,0 +1,50 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.bukkit.BukkitPlatform;
import com.plotsquared.bukkit.placeholder.MVdWPlaceholders;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.player.ConsolePlayer;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.ServerLoadEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
public class ServerListener implements Listener {
private final BukkitPlatform plugin;
@Inject
public ServerListener(final @NonNull BukkitPlatform plugin) {
this.plugin = plugin;
}
@EventHandler
public void onServerLoad(ServerLoadEvent event) {
if (Bukkit.getPluginManager().getPlugin("MVdWPlaceholderAPI") != null && Settings.Enabled_Components.USE_MVDWAPI) {
new MVdWPlaceholders(this.plugin, this.plugin.placeholderRegistry());
ConsolePlayer.getConsole().sendMessage(TranslatableCaption.of("placeholder.hooked"));
}
}
}

View File

@ -0,0 +1,102 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.plotsquared.core.PlotSquared;
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.util.ReflectionUtils;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.world.ChunkEvent;
import org.bukkit.event.world.ChunkLoadEvent;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
public class SingleWorldListener implements Listener {
private final Method methodGetHandleChunk;
private Field shouldSave = null;
public SingleWorldListener() throws Exception {
ReflectionUtils.RefClass classCraftChunk = getRefClass("{cb}.CraftChunk");
this.methodGetHandleChunk = classCraftChunk.getMethod("getHandle").getRealMethod();
try {
if (PlotSquared.platform().serverVersion()[1] < 17) {
ReflectionUtils.RefClass classChunk = getRefClass("{nms}.Chunk");
if (PlotSquared.platform().serverVersion()[1] == 13) {
this.shouldSave = classChunk.getField("mustSave").getRealField();
} else {
this.shouldSave = classChunk.getField("s").getRealField();
}
} else if (PlotSquared.platform().serverVersion()[1] == 17) {
ReflectionUtils.RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.Chunk");
this.shouldSave = classChunk.getField("r").getRealField();
} else if (PlotSquared.platform().serverVersion()[1] == 18) {
ReflectionUtils.RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.IChunkAccess");
this.shouldSave = classChunk.getField("b").getRealField();
}
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
public void markChunkAsClean(Chunk chunk) {
try {
Object nmsChunk = methodGetHandleChunk.invoke(chunk);
if (shouldSave != null) {
this.shouldSave.set(nmsChunk, false);
}
} catch (Throwable e) {
e.printStackTrace();
}
}
private void handle(ChunkEvent event) {
World world = event.getWorld();
String name = world.getName();
PlotAreaManager man = PlotSquared.get().getPlotAreaManager();
if (!(man instanceof SinglePlotAreaManager)) {
return;
}
if (!SinglePlotArea.isSinglePlotWorld(name)) {
return;
}
markChunkAsClean(event.getChunk());
}
// @EventHandler
// public void onPopulate(ChunkPopulateEvent event) {
// handle(event);
// }
@EventHandler(priority = EventPriority.LOWEST)
public void onChunkLoad(ChunkLoadEvent event) {
handle(event);
}
}

View File

@ -0,0 +1,57 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.flag.FlagContainer;
import com.plotsquared.core.plot.flag.implementations.BeaconEffectsFlag;
import org.bukkit.entity.Entity;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityPotionEffectEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Fallback listener for paper events on spigot
*/
public class SpigotListener implements Listener {
@EventHandler(ignoreCancelled = true)
public void onEffect(@NonNull EntityPotionEffectEvent event) {
if (event.getCause() != EntityPotionEffectEvent.Cause.BEACON) {
return;
}
Entity entity = event.getEntity();
Location location = BukkitUtil.adapt(entity.getLocation());
Plot plot = location.getPlot();
if (plot == null) {
return;
}
FlagContainer container = plot.getFlagContainer();
BeaconEffectsFlag effectsEnabled = container.getFlag(BeaconEffectsFlag.class);
if (effectsEnabled != null && !effectsEnabled.getValue()) {
event.setCancelled(true);
}
}
}

View File

@ -0,0 +1,63 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.generator.GeneratorWrapper;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.plot.world.SinglePlotAreaManager;
import org.bukkit.World;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.world.WorldInitEvent;
import org.bukkit.generator.ChunkGenerator;
import org.checkerframework.checker.nullness.qual.NonNull;
@SuppressWarnings("unused")
public class WorldEvents implements Listener {
private final PlotAreaManager plotAreaManager;
@Inject
public WorldEvents(final @NonNull PlotAreaManager plotAreaManager) {
this.plotAreaManager = plotAreaManager;
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onWorldInit(WorldInitEvent event) {
World world = event.getWorld();
String name = world.getName();
if (this.plotAreaManager instanceof final SinglePlotAreaManager single) {
if (single.isWorld(name)) {
world.setKeepSpawnInMemory(false);
return;
}
}
ChunkGenerator gen = world.getGenerator();
if (gen instanceof GeneratorWrapper) {
PlotSquared.get().loadWorld(name, (GeneratorWrapper<?>) gen);
} else {
PlotSquared.get().loadWorld(name, new BukkitPlotGenerator(name, gen, this.plotAreaManager));
}
}
}

View File

@ -0,0 +1,89 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.managers;
import com.google.inject.Singleton;
import com.plotsquared.core.configuration.file.YamlConfiguration;
import com.plotsquared.core.util.PlatformWorldManager;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import org.bukkit.WorldType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Default Bukkit world manager. It will handle world creation by
* registering the generator in bukkit.yml
*/
@Singleton
public class BukkitWorldManager implements PlatformWorldManager<World> {
@Override
public void initialize() {
}
@Override
public @Nullable World handleWorldCreation(@NonNull String worldName, @Nullable String generator) {
this.setGenerator(worldName, generator);
final WorldCreator wc = new WorldCreator(worldName);
wc.environment(World.Environment.NORMAL);
if (generator != null) {
wc.generator(generator);
wc.type(WorldType.FLAT);
}
return Bukkit.createWorld(wc);
}
protected void setGenerator(final @Nullable String worldName, final @Nullable String generator) {
if (generator == null) {
return;
}
File file = new File("bukkit.yml").getAbsoluteFile();
YamlConfiguration yml = YamlConfiguration.loadConfiguration(file);
yml.set(String.format("worlds.%s.generator", worldName), generator);
try {
yml.save(file);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public String getName() {
return "bukkit";
}
@Override
public Collection<String> getWorlds() {
final List<World> worlds = Bukkit.getWorlds();
final List<String> worldNames = new ArrayList<>();
for (final World world : worlds) {
worldNames.add(world.getName());
}
return worldNames;
}
}

View File

@ -0,0 +1,63 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.managers;
/*
import com.google.inject.Singleton;
import org.bukkit.World;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import se.hyperver.hyperverse.Hyperverse;
import se.hyperver.hyperverse.world.WorldConfiguration;
import se.hyperver.hyperverse.world.WorldConfigurationBuilder;
import se.hyperver.hyperverse.world.WorldFeatures;
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
repository.
@Singleton
public class HyperverseWorldManager extends BukkitWorldManager {
@Override
public @Nullable World handleWorldCreation(@NonNull String worldName, @Nullable String generator) {
// First let Bukkit register the world
this.setGenerator(worldName, generator);
// Create the world
final WorldConfigurationBuilder worldConfigurationBuilder = WorldConfiguration.builder()
.setName(worldName).setType(WorldType.OVER_WORLD);
if (generator != null) {
worldConfigurationBuilder.setGenerator(generator).setWorldFeatures(WorldFeatures.FLATLAND);
}
try {
return Hyperverse.getApi().createWorld(worldConfigurationBuilder.createWorldConfiguration())
.getBukkitWorld();
} catch (final Exception e) {
e.printStackTrace();
}
return null;
}
@Override
public String getName() {
return "bukkit-hyperverse";
}
}
*/

View File

@ -0,0 +1,58 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.managers;
import com.google.inject.Singleton;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Multiverse specific manager that informs Multiverse of
* world creation by executing a console command
*
* @deprecated Deprecated and scheduled for removal without replacement
* in favor of the build in setup wizard.
* However, this class will be kept around for a while, given it's not a maintenance burden.
*/
@Deprecated
@Singleton
public class MultiverseWorldManager extends BukkitWorldManager {
@Override
public @Nullable World handleWorldCreation(final @NonNull String worldName, final @Nullable String generator) {
// First let Bukkit register the world
this.setGenerator(worldName, generator);
// Then we send the console command
final StringBuilder commandBuilder = new StringBuilder("mv create ")
.append(worldName).append(" normal");
if (generator != null) {
commandBuilder.append(" -g ").append(generator);
}
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), commandBuilder.toString());
return Bukkit.getWorld(worldName);
}
@Override
public String getName() {
return "bukkit-multiverse";
}
}

View File

@ -0,0 +1,100 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.permissions;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.core.permissions.ConsolePermissionProfile;
import com.plotsquared.core.permissions.PermissionHandler;
import com.plotsquared.core.permissions.PermissionProfile;
import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.OfflinePlotPlayer;
import com.plotsquared.core.player.PlotPlayer;
import org.bukkit.entity.Player;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.lang.ref.WeakReference;
import java.util.EnumSet;
import java.util.Optional;
import java.util.Set;
public class BukkitPermissionHandler implements PermissionHandler {
@Override
public void initialize() {
}
@NonNull
@Override
public Optional<PermissionProfile> getPermissionProfile(
@NonNull PlotPlayer<?> playerPlotPlayer
) {
if (playerPlotPlayer instanceof final BukkitPlayer bukkitPlayer) {
return Optional.of(new BukkitPermissionProfile(bukkitPlayer.getPlatformPlayer()));
} else if (playerPlotPlayer instanceof ConsolePlayer) {
return Optional.of(ConsolePermissionProfile.INSTANCE);
}
return Optional.empty();
}
@NonNull
@Override
public Optional<PermissionProfile> getPermissionProfile(
@NonNull OfflinePlotPlayer offlinePlotPlayer
) {
return Optional.empty();
}
@NonNull
@Override
public Set<PermissionHandlerCapability> getCapabilities() {
return EnumSet.of(PermissionHandlerCapability.ONLINE_PERMISSIONS);
}
private static final class BukkitPermissionProfile implements PermissionProfile {
private final WeakReference<Player> playerReference;
private BukkitPermissionProfile(final @NonNull Player player) {
this.playerReference = new WeakReference<>(player);
}
@Override
public boolean hasPermission(
final @Nullable String world,
final @NonNull String permission
) {
final Player player = this.playerReference.get();
return player != null && player.hasPermission(permission);
}
@Override
public boolean hasKeyedPermission(
final @Nullable String world,
final @NonNull String stub,
final @NonNull String key
) {
final Player player = this.playerReference.get();
return player != null && (player.hasPermission(stub + "." + key) || player.hasPermission(stub + ".*"));
}
}
}

View File

@ -0,0 +1,135 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.permissions;
import com.plotsquared.bukkit.player.BukkitOfflinePlayer;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.core.permissions.ConsolePermissionProfile;
import com.plotsquared.core.permissions.PermissionHandler;
import com.plotsquared.core.permissions.PermissionProfile;
import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.OfflinePlotPlayer;
import com.plotsquared.core.player.PlotPlayer;
import net.milkbowl.vault.permission.Permission;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.EnumSet;
import java.util.Optional;
import java.util.Set;
public class VaultPermissionHandler implements PermissionHandler {
private Permission permissions;
@Override
public void initialize() {
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null) {
throw new IllegalStateException("Vault is not present on the server");
}
RegisteredServiceProvider<Permission> permissionProvider =
Bukkit.getServer().getServicesManager().getRegistration(Permission.class);
if (permissionProvider != null) {
this.permissions = permissionProvider.getProvider();
}
}
@NonNull
@Override
public Optional<PermissionProfile> getPermissionProfile(
@NonNull PlotPlayer<?> playerPlotPlayer
) {
if (playerPlotPlayer instanceof final BukkitPlayer bukkitPlayer) {
return Optional.of(new VaultPermissionProfile(bukkitPlayer.getPlatformPlayer()));
} else if (playerPlotPlayer instanceof ConsolePlayer) {
return Optional.of(ConsolePermissionProfile.INSTANCE);
}
return Optional.empty();
}
@NonNull
@Override
public Optional<PermissionProfile> getPermissionProfile(
@NonNull OfflinePlotPlayer offlinePlotPlayer
) {
if (offlinePlotPlayer instanceof BukkitOfflinePlayer) {
return Optional.of(new VaultPermissionProfile(((BukkitOfflinePlayer) offlinePlotPlayer).player));
}
return Optional.empty();
}
@NonNull
@Override
public Set<PermissionHandlerCapability> getCapabilities() {
return EnumSet.of(
PermissionHandlerCapability.PER_WORLD_PERMISSIONS,
PermissionHandlerCapability.ONLINE_PERMISSIONS,
PermissionHandlerCapability.OFFLINE_PERMISSIONS
);
}
private final class VaultPermissionProfile implements PermissionProfile {
private final OfflinePlayer offlinePlayer;
private VaultPermissionProfile(final @NonNull OfflinePlayer offlinePlayer) {
this.offlinePlayer = offlinePlayer;
}
@Override
public boolean hasPermission(
final @Nullable String world,
final @NonNull String permission
) {
if (permissions == null) {
return false;
}
if (world == null && offlinePlayer instanceof BukkitPlayer) {
return permissions.playerHas(((BukkitPlayer) offlinePlayer).getPlatformPlayer(), permission);
}
return permissions.playerHas(world, offlinePlayer, permission);
}
@Override
public boolean hasKeyedPermission(
final @Nullable String world,
final @NonNull String stub,
final @NonNull String key
) {
if (permissions == null) {
return false;
}
if (world == null && offlinePlayer instanceof BukkitPlayer) {
return permissions.playerHas(
((BukkitPlayer) offlinePlayer).getPlatformPlayer(),
stub + ".*"
) || permissions.playerHas(((BukkitPlayer) offlinePlayer).getPlatformPlayer(), stub + "." + key);
}
return permissions.playerHas(world, offlinePlayer, stub + ".*") || permissions.playerHas(world, offlinePlayer,
stub + "." + key
);
}
}
}

View File

@ -0,0 +1,73 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.placeholder;
import be.maximvdw.placeholderapi.PlaceholderAPI;
import com.google.common.eventbus.Subscribe;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.util.placeholders.Placeholder;
import com.plotsquared.core.util.placeholders.PlaceholderRegistry;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Placeholder support for MVdWPlaceholderAPI
*/
public class MVdWPlaceholders {
private static final String PREFIX = "plotsquared_";
private final Plugin plugin;
private final PlaceholderRegistry registry;
public MVdWPlaceholders(
final @NonNull Plugin plugin,
final @NonNull PlaceholderRegistry registry
) {
this.plugin = plugin;
this.registry = registry;
for (final Placeholder placeholder : registry.getPlaceholders()) {
this.addPlaceholder(placeholder);
}
PlotSquared.get().getEventDispatcher().registerListener(this);
}
@Subscribe
public void onNewPlaceholder(final PlaceholderRegistry.@NonNull PlaceholderAddedEvent event) {
this.addPlaceholder(event.getPlaceholder());
}
private void addPlaceholder(final @NonNull Placeholder placeholder) {
PlaceholderAPI.registerPlaceholder(
plugin,
PREFIX + String.format("%s", placeholder.getKey()),
placeholderReplaceEvent -> {
if (!placeholderReplaceEvent.isOnline() || placeholderReplaceEvent.getPlayer() == null) {
return "";
}
final PlotPlayer<Player> player = BukkitUtil.adapt(placeholderReplaceEvent.getPlayer());
String key = placeholderReplaceEvent.getPlaceholder().substring(PREFIX.length());
return registry.getPlaceholderValue(key, player);
}
);
}
}

View File

@ -0,0 +1,90 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.placeholder;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.player.PlotPlayer;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.entity.Player;
public class PAPIPlaceholders extends PlaceholderExpansion {
public PAPIPlaceholders() {
}
@Override
public boolean persist() {
return true;
}
@Override
public boolean canRegister() {
return true;
}
@Override
public String getAuthor() {
return "IntellectualSites";
}
@Override
public String getIdentifier() {
return "plotsquared";
}
@Override
public String getVersion() {
return "3";
}
@Override
public String onPlaceholderRequest(Player p, String identifier) {
final PlotPlayer<?> pl = PlotSquared.platform().playerManager().getPlayerIfExists(p.getUniqueId());
if (pl == null) {
return "";
}
// PAPI specific ones that don't translate well over into other placeholder APIs
if (identifier.startsWith("has_plot_")) {
identifier = identifier.substring("has_plot_".length());
if (identifier.isEmpty()) {
return "";
}
return pl.getPlotCount(identifier) > 0 ?
PlaceholderAPIPlugin.booleanTrue() :
PlaceholderAPIPlugin.booleanFalse();
}
if (identifier.startsWith("plot_count_")) {
identifier = identifier.substring("plot_count_".length());
if (identifier.isEmpty()) {
return "";
}
return String.valueOf(pl.getPlotCount(identifier));
}
// PlotSquared placeholders
return PlotSquared.platform().placeholderRegistry().getPlaceholderValue(identifier, pl);
}
}

View File

@ -0,0 +1,43 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.placeholder;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.core.configuration.caption.ChatFormatter;
import com.plotsquared.core.player.PlotPlayer;
import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.entity.Player;
import org.checkerframework.checker.nullness.qual.NonNull;
public class PlaceholderFormatter implements ChatFormatter {
@Override
public void format(final @NonNull ChatContext context) {
final PlotPlayer<?> recipient = context.getRecipient();
if (recipient instanceof BukkitPlayer) {
if (context.isRawOutput()) {
context.setMessage(context.getMessage().replace('%', '\u2010'));
} else {
final Player player = ((BukkitPlayer) recipient).player;
context.setMessage(PlaceholderAPI.setPlaceholders(player, context.getMessage()));
}
}
}
}

View File

@ -0,0 +1,95 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.player;
import com.plotsquared.core.permissions.NullPermissionProfile;
import com.plotsquared.core.permissions.PermissionHandler;
import com.plotsquared.core.permissions.PermissionProfile;
import com.plotsquared.core.player.OfflinePlotPlayer;
import org.bukkit.OfflinePlayer;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.UUID;
public class BukkitOfflinePlayer implements OfflinePlotPlayer {
public final OfflinePlayer player;
private final PermissionProfile permissionProfile;
/**
* Please do not use this method. Instead use BukkitUtil.getPlayer(Player),
* as it caches player objects.
*
* @param player Bukkit OfflinePlayer player to convert
* @param permissionHandler Permission Profile to be used
*/
public BukkitOfflinePlayer(
final @NonNull OfflinePlayer player, final @NonNull
PermissionHandler permissionHandler
) {
this.player = player;
this.permissionProfile = permissionHandler.getPermissionProfile(this)
.orElse(NullPermissionProfile.INSTANCE);
}
@NonNull
@Override
public UUID getUUID() {
return this.player.getUniqueId();
}
@Override
@NonNegative
public long getLastPlayed() {
return this.player.getLastSeen();
}
@Override
public String getName() {
return this.player.getName();
}
@Override
public boolean hasPermission(
final @Nullable String world,
final @NonNull String permission
) {
return this.permissionProfile.hasPermission(world, permission);
}
@Override
public boolean hasKeyedPermission(
final @Nullable String world,
final @NonNull String stub,
final @NonNull String key
) {
return this.permissionProfile.hasPermission(world, stub + "." + key) || this.permissionProfile.hasPermission(
world,
stub + ".*"
);
}
@Override
public boolean hasPermission(@NonNull final String permission, final boolean notify) {
return hasPermission(permission);
}
}

View File

@ -0,0 +1,394 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.player;
import com.google.common.base.Charsets;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.events.TeleportCause;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.permissions.PermissionHandler;
import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.PlotWeather;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.MathMan;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.world.item.ItemType;
import com.sk89q.worldedit.world.item.ItemTypes;
import io.papermc.lib.PaperLib;
import net.kyori.adventure.audience.Audience;
import org.bukkit.GameMode;
import org.bukkit.Sound;
import org.bukkit.WeatherType;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.EventException;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.permissions.PermissionAttachmentInfo;
import org.bukkit.plugin.RegisteredListener;
import org.bukkit.potion.PotionEffectType;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Arrays;
import java.util.Set;
import java.util.UUID;
import static com.sk89q.worldedit.world.gamemode.GameModes.ADVENTURE;
import static com.sk89q.worldedit.world.gamemode.GameModes.CREATIVE;
import static com.sk89q.worldedit.world.gamemode.GameModes.SPECTATOR;
import static com.sk89q.worldedit.world.gamemode.GameModes.SURVIVAL;
public class BukkitPlayer extends PlotPlayer<Player> {
private static boolean CHECK_EFFECTIVE = true;
public final Player player;
private String name;
/**
* @param plotAreaManager PlotAreaManager instance
* @param eventDispatcher EventDispatcher instance
* @param player Bukkit player instance
* @param permissionHandler PermissionHandler instance
*
* @deprecated Please do not use this method. Instead use {@link BukkitUtil#adapt(Player)}, as it caches player objects.
* This method will be made private in a future release.
*/
@Deprecated(forRemoval = true, since = "6.10.9")
public BukkitPlayer(
final @NonNull PlotAreaManager plotAreaManager, final @NonNull EventDispatcher eventDispatcher,
final @NonNull Player player, final @NonNull PermissionHandler permissionHandler
) {
this(plotAreaManager, eventDispatcher, player, false, permissionHandler);
}
/**
* @param plotAreaManager PlotAreaManager instance
* @param eventDispatcher EventDispatcher instance
* @param player Bukkit player instance
* @param permissionHandler PermissionHandler instance
*
* @deprecated Please do not use this method. Instead use {@link BukkitUtil#adapt(Player)}, as it caches player objects.
* This method will be made private in a future release.
*/
@Deprecated(forRemoval = true, since = "6.10.9")
public BukkitPlayer(
final @NonNull PlotAreaManager plotAreaManager, final @NonNull
EventDispatcher eventDispatcher, final @NonNull Player player,
final boolean realPlayer,
final @NonNull PermissionHandler permissionHandler
) {
super(plotAreaManager, eventDispatcher, permissionHandler);
this.player = player;
this.setupPermissionProfile();
if (realPlayer) {
super.populatePersistentMetaMap();
}
}
@Override
public Actor toActor() {
return BukkitAdapter.adapt(player);
}
@Override
public Player getPlatformPlayer() {
return this.player;
}
@NonNull
@Override
public UUID getUUID() {
if (Settings.UUID.OFFLINE) {
if (Settings.UUID.FORCE_LOWERCASE) {
return UUID.nameUUIDFromBytes(("OfflinePlayer:" +
getName().toLowerCase()).getBytes(Charsets.UTF_8));
} else {
return UUID.nameUUIDFromBytes(("OfflinePlayer:" +
getName()).getBytes(Charsets.UTF_8));
}
}
return player.getUniqueId();
}
@Override
@NonNegative
public long getLastPlayed() {
return this.player.getLastSeen();
}
@Override
public boolean canTeleport(final @NonNull Location location) {
final org.bukkit.Location to = BukkitUtil.adapt(location);
final org.bukkit.Location from = player.getLocation();
PlayerTeleportEvent event = new PlayerTeleportEvent(player, from, to);
callEvent(event);
if (event.isCancelled() || !event.getTo().equals(to)) {
return false;
}
event = new PlayerTeleportEvent(player, to, from);
callEvent(event);
return true;
}
private void callEvent(final @NonNull Event event) {
final RegisteredListener[] listeners = event.getHandlers().getRegisteredListeners();
for (final RegisteredListener listener : listeners) {
if (listener.getPlugin().getName().equals(PlotSquared.platform().pluginName())) {
continue;
}
try {
listener.callEvent(event);
} catch (final EventException e) {
e.printStackTrace();
}
}
}
@SuppressWarnings("StringSplitter")
@Override
@NonNegative
public int hasPermissionRange(
final @NonNull String stub,
@NonNegative final int range
) {
if (hasPermission(Permission.PERMISSION_ADMIN.toString())) {
return Integer.MAX_VALUE;
}
final String[] nodes = stub.split("\\.");
final StringBuilder n = new StringBuilder();
for (int i = 0; i < (nodes.length - 1); i++) {
n.append(nodes[i]).append(".");
if (!stub.equals(n + Permission.PERMISSION_STAR.toString())) {
if (hasPermission(n + Permission.PERMISSION_STAR.toString())) {
return Integer.MAX_VALUE;
}
}
}
if (hasPermission(stub + ".*")) {
return Integer.MAX_VALUE;
}
int max = 0;
if (CHECK_EFFECTIVE) {
boolean hasAny = false;
String stubPlus = stub + ".";
final Set<PermissionAttachmentInfo> effective = player.getEffectivePermissions();
if (!effective.isEmpty()) {
for (PermissionAttachmentInfo attach : effective) {
String permStr = attach.getPermission();
if (permStr.startsWith(stubPlus)) {
hasAny = true;
String end = permStr.substring(stubPlus.length());
if (MathMan.isInteger(end)) {
int val = Integer.parseInt(end);
if (val > range) {
return val;
}
if (val > max) {
max = val;
}
}
}
}
if (hasAny) {
return max;
}
// Workaround
for (PermissionAttachmentInfo attach : effective) {
String permStr = attach.getPermission();
if (permStr.startsWith("plots.") && !permStr.equals("plots.use")) {
return max;
}
}
CHECK_EFFECTIVE = false;
}
}
for (int i = range; i > 0; i--) {
if (hasPermission(stub + "." + i)) {
return i;
}
}
return max;
}
@Override
public void teleport(final @NonNull Location location, final @NonNull TeleportCause cause) {
if (Math.abs(location.getX()) >= 30000000 || Math.abs(location.getZ()) >= 30000000) {
return;
}
final org.bukkit.Location bukkitLocation =
new org.bukkit.Location(BukkitUtil.getWorld(location.getWorldName()), location.getX() + 0.5,
location.getY(), location.getZ() + 0.5, location.getYaw(), location.getPitch()
);
PaperLib.teleportAsync(player, bukkitLocation, getTeleportCause(cause));
}
@Override
public String getName() {
if (this.name == null) {
this.name = this.player.getName();
}
return this.name;
}
@Override
public void setCompassTarget(Location location) {
this.player.setCompassTarget(
new org.bukkit.Location(BukkitUtil.getWorld(location.getWorldName()), location.getX(),
location.getY(), location.getZ()
));
}
@Override
public Location getLocationFull() {
return BukkitUtil.adaptComplete(this.player.getLocation());
}
@Override
public void setWeather(final @NonNull PlotWeather weather) {
switch (weather) {
case CLEAR -> this.player.setPlayerWeather(WeatherType.CLEAR);
case RAIN -> this.player.setPlayerWeather(WeatherType.DOWNFALL);
case WORLD -> this.player.resetPlayerWeather();
default -> {
//do nothing as this is PlotWeather.OFF
}
}
}
@Override
public com.sk89q.worldedit.world.gamemode.GameMode getGameMode() {
return switch (this.player.getGameMode()) {
case ADVENTURE -> ADVENTURE;
case CREATIVE -> CREATIVE;
case SPECTATOR -> SPECTATOR;
default -> SURVIVAL;
};
}
@Override
public void setGameMode(final com.sk89q.worldedit.world.gamemode.GameMode gameMode) {
if (ADVENTURE.equals(gameMode)) {
this.player.setGameMode(GameMode.ADVENTURE);
} else if (CREATIVE.equals(gameMode)) {
this.player.setGameMode(GameMode.CREATIVE);
} else if (SPECTATOR.equals(gameMode)) {
this.player.setGameMode(GameMode.SPECTATOR);
} else {
this.player.setGameMode(GameMode.SURVIVAL);
}
}
@Override
public void setTime(final long time) {
if (time != Long.MAX_VALUE) {
this.player.setPlayerTime(time, false);
} else {
this.player.resetPlayerTime();
}
}
@Override
public boolean getFlight() {
return player.getAllowFlight();
}
@Override
public void setFlight(boolean fly) {
this.player.setAllowFlight(fly);
}
@Override
public void playMusic(final @NonNull Location location, final @NonNull ItemType id) {
if (id == ItemTypes.AIR) {
// Let's just stop all the discs because why not?
for (final Sound sound : Arrays.stream(Sound.values())
.filter(sound -> sound.name().contains("DISC")).toList()) {
player.stopSound(sound);
}
// this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, Material.AIR);
} else {
// this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, id.to(Material.class));
this.player.playSound(BukkitUtil.adapt(location),
Sound.valueOf(BukkitAdapter.adapt(id).name()), Float.MAX_VALUE, 1f
);
}
}
@SuppressWarnings("deprecation") // Needed for Spigot compatibility
@Override
public void kick(final String message) {
this.player.kickPlayer(message);
}
@Override
public void stopSpectating() {
if (getGameMode() == SPECTATOR) {
this.player.setSpectatorTarget(null);
}
}
@Override
public boolean isBanned() {
return this.player.isBanned();
}
@Override
public @NonNull Audience getAudience() {
return BukkitUtil.BUKKIT_AUDIENCES.player(this.player);
}
@Override
public void removeEffect(@NonNull String name) {
PotionEffectType type = PotionEffectType.getByName(name);
if (type != null) {
player.removePotionEffect(type);
}
}
@Override
public boolean canSee(final PlotPlayer<?> other) {
if (other instanceof ConsolePlayer) {
return true;
} else {
return this.player.canSee(((BukkitPlayer) other).getPlatformPlayer());
}
}
/**
* Convert from PlotSquared's {@link TeleportCause} to Bukkit's {@link PlayerTeleportEvent.TeleportCause}
*
* @param cause PlotSquared teleport cause to convert
* @return Bukkit's equivalent teleport cause
*/
public PlayerTeleportEvent.TeleportCause getTeleportCause(final @NonNull TeleportCause cause) {
if (TeleportCause.CauseSets.COMMAND.contains(cause)) {
return PlayerTeleportEvent.TeleportCause.COMMAND;
} else if (cause == TeleportCause.UNKNOWN) {
return PlayerTeleportEvent.TeleportCause.UNKNOWN;
}
return PlayerTeleportEvent.TeleportCause.PLUGIN;
}
}

View File

@ -0,0 +1,93 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.player;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.plotsquared.core.permissions.PermissionHandler;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.PlayerManager;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.UUID;
/**
* Player manager providing {@link BukkitPlayer Bukkit players}
*/
@Singleton
public class BukkitPlayerManager extends PlayerManager<BukkitPlayer, Player> {
private final PlotAreaManager plotAreaManager;
private final EventDispatcher eventDispatcher;
private final PermissionHandler permissionHandler;
@Inject
public BukkitPlayerManager(
final @NonNull PlotAreaManager plotAreaManager,
final @NonNull EventDispatcher eventDispatcher,
final @NonNull PermissionHandler permissionHandler
) {
this.plotAreaManager = plotAreaManager;
this.eventDispatcher = eventDispatcher;
this.permissionHandler = permissionHandler;
}
@NonNull
@Override
@SuppressWarnings("deprecation")
public BukkitPlayer getPlayer(final @NonNull Player object) {
if (object.getUniqueId().version() == 2) { // not a real player
return new BukkitPlayer(this.plotAreaManager, this.eventDispatcher, object, false, this.permissionHandler);
}
if (!object.isOnline()) {
throw new NoSuchPlayerException(object.getUniqueId());
}
return getPlayer(object.getUniqueId());
}
@Override
@SuppressWarnings("deprecation")
public @NonNull BukkitPlayer createPlayer(final @NonNull UUID uuid) {
final Player player = Bukkit.getPlayer(uuid);
if (player == null || !player.isOnline()) {
throw new NoSuchPlayerException(uuid);
}
return new BukkitPlayer(this.plotAreaManager, this.eventDispatcher, player, this.permissionHandler);
}
@Nullable
@Override
public BukkitOfflinePlayer getOfflinePlayer(final @Nullable UUID uuid) {
if (uuid == null) {
return null;
}
return new BukkitOfflinePlayer(Bukkit.getOfflinePlayer(uuid), this.permissionHandler);
}
@NonNull
@Override
public BukkitOfflinePlayer getOfflinePlayer(final @NonNull String username) {
return new BukkitOfflinePlayer(Bukkit.getOfflinePlayer(username), this.permissionHandler);
}
}

View File

@ -0,0 +1,283 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.queue;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.plotsquared.bukkit.BukkitPlatform;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.queue.ChunkCoordinator;
import com.plotsquared.core.queue.subscriber.ProgressSubscriber;
import com.plotsquared.core.util.task.PlotSquaredTask;
import com.plotsquared.core.util.task.TaskManager;
import com.plotsquared.core.util.task.TaskTime;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.world.World;
import io.papermc.lib.PaperLib;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
/**
* Utility that allows for the loading and coordination of chunk actions
* <p>
* The coordinator takes in collection of chunk coordinates, loads them
* and allows the caller to specify a sink for the loaded chunks. The
* coordinator will prevent the chunks from being unloaded until the sink
* has fully consumed the chunk
* </p>
**/
public final class BukkitChunkCoordinator extends ChunkCoordinator {
private final List<ProgressSubscriber> progressSubscribers = new LinkedList<>();
private final Queue<BlockVector2> requestedChunks;
private final Queue<Chunk> availableChunks;
private final long maxIterationTime;
private final Plugin plugin;
private final Consumer<BlockVector2> chunkConsumer;
private final org.bukkit.World bukkitWorld;
private final Runnable whenDone;
private final Consumer<Throwable> throwableConsumer;
private final boolean unloadAfter;
private final int totalSize;
private final AtomicInteger expectedSize;
private final AtomicInteger loadingChunks = new AtomicInteger();
private final boolean forceSync;
private int batchSize;
private PlotSquaredTask task;
private volatile boolean shouldCancel;
private boolean finished;
@Inject
private BukkitChunkCoordinator(
@Assisted final long maxIterationTime,
@Assisted final int initialBatchSize,
@Assisted final @NonNull Consumer<BlockVector2> chunkConsumer,
@Assisted final @NonNull World world,
@Assisted final @NonNull Collection<BlockVector2> requestedChunks,
@Assisted final @NonNull Runnable whenDone,
@Assisted final @NonNull Consumer<Throwable> throwableConsumer,
@Assisted("unloadAfter") final boolean unloadAfter,
@Assisted final @NonNull Collection<ProgressSubscriber> progressSubscribers,
@Assisted("forceSync") final boolean forceSync
) {
this.requestedChunks = new LinkedBlockingQueue<>(requestedChunks);
this.availableChunks = new LinkedBlockingQueue<>();
this.totalSize = requestedChunks.size();
this.expectedSize = new AtomicInteger(this.totalSize);
this.batchSize = initialBatchSize;
this.chunkConsumer = chunkConsumer;
this.maxIterationTime = maxIterationTime;
this.whenDone = whenDone;
this.throwableConsumer = throwableConsumer;
this.unloadAfter = unloadAfter;
this.plugin = JavaPlugin.getPlugin(BukkitPlatform.class);
this.bukkitWorld = Bukkit.getWorld(world.getName());
this.progressSubscribers.addAll(progressSubscribers);
this.forceSync = forceSync;
}
@Override
public void start() {
if (!forceSync) {
// Request initial batch
this.requestBatch();
// Wait until next tick to give the chunks a chance to be loaded
TaskManager.runTaskLater(() -> task = TaskManager.runTaskRepeat(this, TaskTime.ticks(1)), TaskTime.ticks(1));
} else {
try {
while (!shouldCancel && !requestedChunks.isEmpty()) {
chunkConsumer.accept(requestedChunks.poll());
}
} catch (Throwable t) {
throwableConsumer.accept(t);
} finally {
finish();
}
}
}
@Override
public void cancel() {
shouldCancel = true;
}
private void finish() {
try {
this.whenDone.run();
} catch (final Throwable throwable) {
this.throwableConsumer.accept(throwable);
} finally {
for (final ProgressSubscriber subscriber : this.progressSubscribers) {
subscriber.notifyEnd();
}
if (task != null) {
task.cancel();
}
finished = true;
}
}
@Override
public void run() {
if (shouldCancel) {
if (unloadAfter) {
Chunk chunk;
while ((chunk = availableChunks.poll()) != null) {
freeChunk(chunk);
}
}
finish();
return;
}
Chunk chunk = this.availableChunks.poll();
if (chunk == null) {
if (this.availableChunks.isEmpty()) {
if (this.requestedChunks.isEmpty() && loadingChunks.get() == 0) {
finish();
} else {
requestBatch();
}
}
return;
}
long[] iterationTime = new long[2];
int processedChunks = 0;
do {
final long start = System.currentTimeMillis();
try {
this.chunkConsumer.accept(BlockVector2.at(chunk.getX(), chunk.getZ()));
} catch (final Throwable throwable) {
this.throwableConsumer.accept(throwable);
}
if (unloadAfter) {
this.freeChunk(chunk);
}
processedChunks++;
final long end = System.currentTimeMillis();
// Update iteration time
iterationTime[0] = iterationTime[1];
iterationTime[1] = end - start;
} while (iterationTime[0] + iterationTime[1] < this.maxIterationTime * 2 && (chunk = availableChunks.poll()) != null);
if (processedChunks < this.batchSize) {
// Adjust batch size based on the amount of processed chunks per tick
this.batchSize = processedChunks;
}
final int expected = this.expectedSize.addAndGet(-processedChunks);
if (expected <= 0) {
finish();
} else {
if (this.availableChunks.size() < processedChunks) {
final double progress = ((double) totalSize - (double) expected) / (double) totalSize;
for (final ProgressSubscriber subscriber : this.progressSubscribers) {
subscriber.notifyProgress(this, progress);
}
this.requestBatch();
}
}
}
/**
* Requests a batch of chunks to be loaded
*/
private void requestBatch() {
BlockVector2 chunk;
for (int i = 0; i < this.batchSize && (chunk = this.requestedChunks.poll()) != null; i++) {
// This required PaperLib to be bumped to version 1.0.4 to mark the request as urgent
loadingChunks.incrementAndGet();
PaperLib
.getChunkAtAsync(this.bukkitWorld, chunk.getX(), chunk.getZ(), true, true)
.whenComplete((chunkObject, throwable) -> {
loadingChunks.decrementAndGet();
if (throwable != null) {
throwable.printStackTrace();
// We want one less because this couldn't be processed
this.expectedSize.decrementAndGet();
} else if (PlotSquared.get().isMainThread(Thread.currentThread())) {
this.processChunk(chunkObject);
} else {
TaskManager.runTask(() -> this.processChunk(chunkObject));
}
});
}
}
/**
* Once a chunk has been loaded, process it (add a plugin ticket and add to
* available chunks list). It is important that this gets executed on the
* server's main thread.
*/
private void processChunk(final @NonNull Chunk chunk) {
/* Chunk#isLoaded does not necessarily return true shortly after PaperLib#getChunkAtAsync completes, but the chunk is
still loaded.
if (!chunk.isLoaded()) {
throw new IllegalArgumentException(String.format("Chunk %d;%d is is not loaded", chunk.getX(), chunk.getZ());
}*/
if (finished) {
return;
}
chunk.addPluginChunkTicket(this.plugin);
this.availableChunks.add(chunk);
}
/**
* Once a chunk has been used, free it up for unload by removing the plugin ticket
*/
private void freeChunk(final @NonNull Chunk chunk) {
if (!chunk.isLoaded()) {
throw new IllegalArgumentException(String.format("Chunk %d;%d is is not loaded", chunk.getX(), chunk.getZ()));
}
chunk.removePluginChunkTicket(this.plugin);
}
@Override
public int getRemainingChunks() {
return this.expectedSize.get();
}
@Override
public int getTotalChunks() {
return this.totalSize;
}
/**
* Subscribe to coordinator progress updates
*
* @param subscriber Subscriber
*/
public void subscribeToProgress(final @NonNull ProgressSubscriber subscriber) {
this.progressSubscribers.add(subscriber);
}
}

View File

@ -0,0 +1,402 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.queue;
import com.google.inject.Inject;
import com.plotsquared.bukkit.schematic.StateWrapper;
import com.plotsquared.bukkit.util.BukkitBlockUtil;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.inject.factory.ChunkCoordinatorBuilderFactory;
import com.plotsquared.core.inject.factory.ChunkCoordinatorFactory;
import com.plotsquared.core.queue.BasicQueueCoordinator;
import com.plotsquared.core.queue.ChunkCoordinator;
import com.plotsquared.core.queue.LocalChunk;
import com.plotsquared.core.util.ChunkUtil;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.SideEffect;
import com.sk89q.worldedit.util.SideEffectSet;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.block.Block;
import org.bukkit.block.Container;
import org.bukkit.block.data.BlockData;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.function.Consumer;
public class BukkitQueueCoordinator extends BasicQueueCoordinator {
private static final SideEffectSet NO_SIDE_EFFECT_SET;
private static final SideEffectSet EDGE_SIDE_EFFECT_SET;
private static final SideEffectSet LIGHTING_SIDE_EFFECT_SET;
private static final SideEffectSet EDGE_LIGHTING_SIDE_EFFECT_SET;
static {
NO_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.LIGHTING, SideEffect.State.OFF).with(
SideEffect.NEIGHBORS,
SideEffect.State.OFF
);
EDGE_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.UPDATE, SideEffect.State.ON).with(
SideEffect.NEIGHBORS,
SideEffect.State.ON
);
LIGHTING_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.NEIGHBORS, SideEffect.State.OFF);
EDGE_LIGHTING_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.UPDATE, SideEffect.State.ON).with(
SideEffect.NEIGHBORS,
SideEffect.State.ON
);
}
private org.bukkit.World bukkitWorld;
@Inject
private ChunkCoordinatorBuilderFactory chunkCoordinatorBuilderFactory;
@Inject
private ChunkCoordinatorFactory chunkCoordinatorFactory;
private ChunkCoordinator chunkCoordinator;
@Inject
public BukkitQueueCoordinator(@NonNull World world) {
super(world);
}
@Override
public BlockState getBlock(int x, int y, int z) {
Block block = getBukkitWorld().getBlockAt(x, y, z);
return BukkitBlockUtil.get(block);
}
@Override
public void start() {
chunkCoordinator.start();
}
@Override
public void cancel() {
chunkCoordinator.cancel();
}
@Override
public boolean enqueue() {
final Clipboard regenClipboard;
if (isRegen()) {
BlockVector3 start = BlockVector3.at(getRegenStart()[0] << 4, getMinY(), getRegenStart()[1] << 4);
BlockVector3 end = BlockVector3.at((getRegenEnd()[0] << 4) + 15, getMaxY(), (getRegenEnd()[1] << 4) + 15);
Region region = new CuboidRegion(start, end);
regenClipboard = new BlockArrayClipboard(region);
regenClipboard.setOrigin(start);
getWorld().regenerate(region, regenClipboard);
} else if (getRegenRegion() != null) {
regenClipboard = new BlockArrayClipboard(getRegenRegion());
regenClipboard.setOrigin(getRegenRegion().getMinimumPoint());
getWorld().regenerate(getRegenRegion(), regenClipboard);
} else {
regenClipboard = null;
}
Consumer<BlockVector2> consumer = getChunkConsumer();
if (consumer == null) {
consumer = blockVector2 -> {
LocalChunk localChunk = getBlockChunks().get(blockVector2);
boolean isRegenChunk =
regenClipboard != null && blockVector2.getBlockX() > getRegenStart()[0] && blockVector2.getBlockZ() > getRegenStart()[1]
&& blockVector2.getBlockX() < getRegenEnd()[0] && blockVector2.getBlockZ() < getRegenEnd()[1];
int sx = blockVector2.getX() << 4;
int sz = blockVector2.getZ() << 4;
if (isRegenChunk) {
for (int layer = getMinLayer(); layer <= getMaxLayer(); layer++) {
for (int y = 0; y < 16; y++) {
for (int x = 0; x < 16; x++) {
for (int z = 0; z < 16; z++) {
x += sx;
y += layer << 4;
z += sz;
BaseBlock block = regenClipboard.getFullBlock(BlockVector3.at(x, y, z));
if (block != null) {
boolean edge = Settings.QUEUE.UPDATE_EDGES && isEdgeRegen(x & 15, z & 15, blockVector2);
setWorldBlock(x, y, z, block, blockVector2, edge);
}
}
}
}
}
}
// Allow regen and then blocks to be placed (plot schematic etc)
if (localChunk == null) {
return;
}
for (int layer = 0; layer < localChunk.getBaseblocks().length; layer++) {
BaseBlock[] blocksLayer = localChunk.getBaseblocks()[layer];
if (blocksLayer == null) {
continue;
}
for (int j = 0; j < blocksLayer.length; j++) {
if (blocksLayer[j] == null) {
continue;
}
BaseBlock block = blocksLayer[j];
if (block != null) {
int lx = ChunkUtil.getX(j);
int lz = ChunkUtil.getZ(j);
int x = sx + lx;
int y = ChunkUtil.getY(layer + localChunk.getMinSection(), j);
int z = sz + lz;
boolean edge = Settings.QUEUE.UPDATE_EDGES && isEdge(y >> 4, lx, y & 15, lz, blockVector2,
localChunk
);
setWorldBlock(x, y, z, block, blockVector2, edge);
}
}
}
for (int layer = 0; layer < localChunk.getBiomes().length; layer++) {
BiomeType[] biomesLayer = localChunk.getBiomes()[layer];
if (biomesLayer == null) {
continue;
}
for (int j = 0; j < biomesLayer.length; j++) {
if (biomesLayer[j] == null) {
continue;
}
BiomeType biome = biomesLayer[j];
if (biome != null) {
int x = sx + ChunkUtil.getX(j);
int y = ChunkUtil.getY(layer, j);
int z = sz + ChunkUtil.getZ(j);
getWorld().setBiome(BlockVector3.at(x, y, z), biome);
}
}
}
if (localChunk.getTiles().size() > 0) {
localChunk.getTiles().forEach((blockVector3, tag) -> {
try {
BaseBlock block = getWorld().getBlock(blockVector3).toBaseBlock(tag);
getWorld().setBlock(blockVector3, block, getSideEffectSet(SideEffectState.NONE));
} catch (WorldEditException ignored) {
StateWrapper sw = new StateWrapper(tag);
sw.restoreTag(getWorld().getName(), blockVector3.getX(), blockVector3.getY(), blockVector3.getZ());
}
});
}
if (localChunk.getEntities().size() > 0) {
localChunk.getEntities().forEach((location, entity) -> getWorld().createEntity(location, entity));
}
};
}
Collection<BlockVector2> read = new ArrayList<>();
if (getReadChunks().size() > 0) {
read.addAll(getReadChunks());
}
chunkCoordinator =
chunkCoordinatorBuilderFactory
.create(chunkCoordinatorFactory)
.inWorld(getWorld())
.withChunks(getBlockChunks().keySet())
.withChunks(read)
.withInitialBatchSize(3)
.withMaxIterationTime(40)
.withThrowableConsumer(Throwable::printStackTrace)
.withFinalAction(getCompleteTask())
.withConsumer(consumer)
.unloadAfter(isUnloadAfter())
.withProgressSubscribers(getProgressSubscribers())
.forceSync(isForceSync())
.build();
return super.enqueue();
}
/**
* Set a block to the world. First tries WNA but defaults to normal block setting methods if that fails
*/
@SuppressWarnings("unused")
private void setWorldBlock(int x, int y, int z, @NonNull BaseBlock block, @NonNull BlockVector2 blockVector2, boolean edge) {
try {
BlockVector3 loc = BlockVector3.at(x, y, z);
boolean lighting = false;
switch (getLightingMode()) {
case NONE:
break;
case PLACEMENT:
lighting = block.getBlockType().getMaterial().getLightValue() > 0;
break;
case REPLACEMENT:
lighting = block.getBlockType().getMaterial().getLightValue() > 0
|| getWorld().getBlock(loc).getBlockType().getMaterial().getLightValue() > 0;
break;
default:
// Can only be "all"
lighting = true;
}
SideEffectSet sideEffectSet;
if (lighting) {
sideEffectSet = getSideEffectSet(edge ? SideEffectState.EDGE_LIGHTING : SideEffectState.LIGHTING);
} else {
sideEffectSet = getSideEffectSet(edge ? SideEffectState.EDGE : SideEffectState.NONE);
}
getWorld().setBlock(loc, block, sideEffectSet);
} catch (WorldEditException ignored) {
// Fallback to not so nice method
BlockData blockData = BukkitAdapter.adapt(block);
Block existing;
// Assume a chunk object has been given only when it should have been.
if (getChunkObject() instanceof Chunk chunkObject) {
existing = chunkObject.getBlock(x & 15, y, z & 15);
} else {
existing = getBukkitWorld().getBlockAt(x, y, z);
}
final BlockState existingBaseBlock = BukkitAdapter.adapt(existing.getBlockData());
if (BukkitBlockUtil.get(existing).equals(existingBaseBlock) && existing.getBlockData().matches(blockData)) {
return;
}
if (existing.getState() instanceof Container) {
((Container) existing.getState()).getInventory().clear();
}
existing.setType(BukkitAdapter.adapt(block.getBlockType()), false);
existing.setBlockData(blockData, false);
if (block.hasNbtData()) {
CompoundTag tag = block.getNbtData();
StateWrapper sw = new StateWrapper(tag);
sw.restoreTag(existing);
}
}
}
private org.bukkit.World getBukkitWorld() {
if (bukkitWorld == null) {
bukkitWorld = Bukkit.getWorld(getWorld().getName());
}
return bukkitWorld;
}
private boolean isEdge(int layer, int x, int y, int z, BlockVector2 blockVector2, LocalChunk localChunk) {
int layerIndex = (layer - localChunk.getMinSection());
if (layer == localChunk.getMinSection() || layerIndex == localChunk.getBaseblocks().length - 1) {
return false;
}
if (x == 0) {
LocalChunk localChunkX = getBlockChunks().get(blockVector2.withX(blockVector2.getX() - 1));
if (localChunkX == null || localChunkX.getBaseblocks()[layerIndex] == null ||
localChunkX.getBaseblocks()[layerIndex][ChunkUtil.getJ(15, y, z)] != null) {
return true;
}
} else if (x == 15) {
LocalChunk localChunkX = getBlockChunks().get(blockVector2.withX(blockVector2.getX() + 1));
if (localChunkX == null || localChunkX.getBaseblocks()[layerIndex] == null ||
localChunkX.getBaseblocks()[layerIndex][ChunkUtil.getJ(0, y, z)] != null) {
return true;
}
}
if (z == 0) {
LocalChunk localChunkZ = getBlockChunks().get(blockVector2.withZ(blockVector2.getZ() - 1));
if (localChunkZ == null || localChunkZ.getBaseblocks()[layerIndex] == null ||
localChunkZ.getBaseblocks()[layerIndex][ChunkUtil.getJ(x, y, 15)] != null) {
return true;
}
} else if (z == 15) {
LocalChunk localChunkZ = getBlockChunks().get(blockVector2.withZ(blockVector2.getZ() + 1));
if (localChunkZ == null || localChunkZ.getBaseblocks()[layerIndex] == null ||
localChunkZ.getBaseblocks()[layerIndex][ChunkUtil.getJ(x, y, 0)] != null) {
return true;
}
}
if (y == 0) {
if (localChunk.getBaseblocks()[layerIndex - 1] == null ||
localChunk.getBaseblocks()[layerIndex][ChunkUtil.getJ(x, 15, z)] != null) {
return true;
}
} else if (y == 15) {
if (localChunk.getBaseblocks()[layerIndex + 1] == null ||
localChunk.getBaseblocks()[layerIndex][ChunkUtil.getJ(x, 0, z)] != null) {
return true;
}
}
BaseBlock[] baseBlocks = localChunk.getBaseblocks()[layerIndex];
if (x > 0 && baseBlocks[ChunkUtil.getJ(x - 1, y, z)] == null) {
return true;
}
if (x < 15 && baseBlocks[ChunkUtil.getJ(x + 1, y, z)] == null) {
return true;
}
if (y > 0 && baseBlocks[ChunkUtil.getJ(x, y - 1, z)] == null) {
return true;
}
if (y < 15 && baseBlocks[ChunkUtil.getJ(x, y + 1, z)] == null) {
return true;
}
if (z > 0 && baseBlocks[ChunkUtil.getJ(x, y, z - 1)] == null) {
return true;
}
return z < 15 && baseBlocks[ChunkUtil.getJ(x, y, z + 1)] == null;
}
private boolean isEdgeRegen(int x, int z, BlockVector2 blockVector2) {
if (x == 0) {
LocalChunk localChunkX = getBlockChunks().get(blockVector2.withX(blockVector2.getX() - 1));
if (localChunkX == null) {
return true;
}
} else if (x == 15) {
LocalChunk localChunkX = getBlockChunks().get(blockVector2.withX(blockVector2.getX() + 1));
if (localChunkX == null) {
return true;
}
}
if (z == 0) {
return getBlockChunks().get(blockVector2.withZ(blockVector2.getZ() - 1)) == null;
} else if (z == 15) {
return getBlockChunks().get(blockVector2.withZ(blockVector2.getZ() + 1)) == null;
}
return false;
}
private SideEffectSet getSideEffectSet(SideEffectState state) {
if (getSideEffectSet() != null) {
return getSideEffectSet();
}
return switch (state) {
case NONE -> NO_SIDE_EFFECT_SET;
case EDGE -> EDGE_SIDE_EFFECT_SET;
case LIGHTING -> LIGHTING_SIDE_EFFECT_SET;
case EDGE_LIGHTING -> EDGE_LIGHTING_SIDE_EFFECT_SET;
};
}
private enum SideEffectState {
NONE,
EDGE,
LIGHTING,
EDGE_LIGHTING
}
}

View File

@ -0,0 +1,281 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.queue;
import com.google.common.base.Preconditions;
import com.intellectualsites.annotations.DoNotUse;
import com.plotsquared.bukkit.util.BukkitBlockUtil;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.location.ChunkWrapper;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.queue.ScopedQueueCoordinator;
import com.plotsquared.core.util.ChunkUtil;
import com.plotsquared.core.util.PatternUtil;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
import org.bukkit.generator.ChunkGenerator.ChunkData;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Arrays;
@DoNotUse
public class GenChunk extends ScopedQueueCoordinator {
public final Biome[] biomes;
public BlockState[][] result;
public BiomeGrid biomeGrid;
public Chunk chunk;
public String world;
public int chunkX;
public int chunkZ;
private ChunkData chunkData = null;
/**
* @param minY minimum world Y, inclusive
* @param maxY maximum world Y, inclusive
*
* @since 6.6.0
*/
public GenChunk(int minY, int maxY) {
super(null, Location.at("", 0, minY, 0), Location.at("", 15, maxY, 15));
this.biomes = Biome.values();
}
public @Nullable ChunkData getChunkData() {
return this.chunkData;
}
/**
* Set the internal Bukkit chunk data
*
* @param chunkData Bukkit ChunkData
*/
public void setChunkData(@NonNull ChunkData chunkData) {
this.chunkData = chunkData;
}
public @NonNull Chunk getChunk() {
if (chunk == null) {
World worldObj = BukkitUtil.getWorld(world);
if (worldObj != null) {
this.chunk = worldObj.getChunkAt(chunkX, chunkZ);
}
}
return chunk;
}
/**
* Set the chunk being represented
*
* @param chunk Bukkit Chunk
*/
public void setChunk(@NonNull Chunk chunk) {
this.chunk = chunk;
}
/**
* Set the world and XZ of the chunk being represented via {@link ChunkWrapper}
*
* @param wrap PlotSquared ChunkWrapper
*/
public void setChunk(@NonNull ChunkWrapper wrap) {
chunk = null;
world = wrap.world;
chunkX = wrap.x;
chunkZ = wrap.z;
}
@Override
public void fillBiome(@NonNull BiomeType biomeType) {
if (biomeGrid == null) {
return;
}
Biome biome = BukkitAdapter.adapt(biomeType);
for (int y = getMin().getY(); y <= getMax().getY(); y++) {
for (int x = 0; x < 16; x++) {
for (int z = 0; z < 16; z++) {
this.biomeGrid.setBiome(x, y, z, biome);
}
}
}
}
@Override
public void setCuboid(@NonNull Location pos1, @NonNull Location pos2, @NonNull BlockState block) {
if (result != null && pos1.getX() == 0 && pos1.getZ() == 0 && pos2.getX() == 15 && pos2.getZ() == 15) {
for (int y = pos1.getY(); y <= pos2.getY(); y++) {
int layer = getLayerIndex(y);
BlockState[] data = result[layer];
if (data == null) {
result[layer] = data = new BlockState[4096];
}
int start = y << 8;
int end = start + 256;
Arrays.fill(data, start, end, block);
}
}
int minX = Math.min(pos1.getX(), pos2.getX());
int minY = Math.min(pos1.getY(), pos2.getY());
int minZ = Math.min(pos1.getZ(), pos2.getZ());
int maxX = Math.max(pos1.getX(), pos2.getX());
int maxY = Math.max(pos1.getY(), pos2.getY());
int maxZ = Math.max(pos1.getZ(), pos2.getZ());
chunkData.setRegion(minX, minY, minZ, maxX + 1, maxY + 1, maxZ + 1, BukkitAdapter.adapt(block));
}
@Override
public boolean setBiome(int x, int z, @NonNull BiomeType biomeType) {
return setBiome(x, z, BukkitAdapter.adapt(biomeType));
}
/**
* Set the in the whole column of XZ
*
* @param x Relative x location within the chunk (0 - 15)
* @param z Relative z location within the chunk (0 - 15)
* @param biome Bukkit biome to set
* @return if successful
*/
public boolean setBiome(int x, int z, @NonNull Biome biome) {
if (this.biomeGrid != null) {
for (int y = getMin().getY(); y <= getMax().getY(); y++) {
this.setBiome(x, y, z, biome);
}
return true;
}
return false;
}
public boolean setBiome(int x, int y, int z, @NonNull Biome biome) {
if (this.biomeGrid != null) {
this.biomeGrid.setBiome(x, y, z, biome);
return true;
}
return false;
}
@Override
public boolean setBlock(int x, int y, int z, @NonNull Pattern pattern) {
final BaseBlock block = PatternUtil.apply(Preconditions.checkNotNull(
pattern,
"Pattern may not be null"
), x + (chunkX << 4), y, z + (chunkZ << 4));
return setBlock(x, y, z, block);
}
@Override
public boolean setBlock(int x, int y, int z, @NonNull BlockState id) {
if (this.result == null) {
this.chunkData.setBlock(x, y, z, BukkitAdapter.adapt(id));
return true;
}
this.chunkData.setBlock(x, y, z, BukkitAdapter.adapt(id));
this.storeCache(x, y, z, id);
return true;
}
private void storeCache(final int x, final int y, final int z, final @NonNull BlockState id) {
int i = getLayerIndex(y);
BlockState[] v = this.result[i];
if (v == null) {
this.result[i] = v = new BlockState[4096];
}
int j = ChunkUtil.getJ(x, y, z);
v[j] = id;
}
@Override
public boolean setBlock(int x, int y, int z, @NonNull BaseBlock id) {
if (this.result == null) {
this.chunkData.setBlock(x, y, z, BukkitAdapter.adapt(id));
return true;
}
this.chunkData.setBlock(x, y, z, BukkitAdapter.adapt(id));
this.storeCache(x, y, z, id.toImmutableState());
return true;
}
@Override
public @Nullable BlockState getBlock(int x, int y, int z) {
int i = getLayerIndex(y);
if (result == null) {
return BukkitBlockUtil.get(chunkData.getType(x, y, z));
}
BlockState[] array = result[i];
if (array == null) {
return BlockTypes.AIR.getDefaultState();
}
int j = ChunkUtil.getJ(x, y, z);
return array[j];
}
public int getX() {
return chunk == null ? chunkX : chunk.getX();
}
public int getZ() {
return chunk == null ? chunkZ : chunk.getZ();
}
@Override
public com.sk89q.worldedit.world.@NonNull World getWorld() {
return chunk == null ? BukkitAdapter.adapt(Bukkit.getWorld(world)) : BukkitAdapter.adapt(chunk.getWorld());
}
@Override
public @NonNull Location getMax() {
return Location.at(getWorld().getName(), 15 + (getX() << 4), super.getMax().getY(), 15 + (getZ() << 4));
}
@Override
public @NonNull Location getMin() {
return Location.at(getWorld().getName(), getX() << 4, super.getMin().getY(), getZ() << 4);
}
public @NonNull GenChunk clone() {
GenChunk toReturn = new GenChunk(getMin().getY(), getMax().getY());
if (this.result != null) {
for (int i = 0; i < this.result.length; i++) {
BlockState[] matrix = this.result[i];
if (matrix != null) {
toReturn.result[i] = new BlockState[matrix.length];
System.arraycopy(matrix, 0, toReturn.result[i], 0, matrix.length);
}
}
}
toReturn.chunkData = this.chunkData;
return toReturn;
}
private int getLayerIndex(int y) {
return (y - getMin().getY()) >> 4;
}
}

View File

@ -0,0 +1,130 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.queue;
import com.plotsquared.bukkit.schematic.StateWrapper;
import com.plotsquared.core.queue.DelegateQueueCoordinator;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.generator.LimitedRegion;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Wraps a {@link LimitedRegion} inside a {@link com.plotsquared.core.queue.QueueCoordinator} so it can be written to.
*
* @since 6.9.0
*/
public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + LimitedRegionWrapperQueue.class.getSimpleName());
private final LimitedRegion limitedRegion;
private boolean useOtherRestoreTagMethod = false;
/**
* @since 6.9.0
*/
public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) {
super(null);
this.limitedRegion = limitedRegion;
}
@Override
public boolean setBlock(final int x, final int y, final int z, @NonNull final Pattern pattern) {
return setBlock(x, y, z, pattern.applyBlock(BlockVector3.at(x, y, z)));
}
@Override
public boolean setBlock(final int x, final int y, final int z, @NonNull final BaseBlock id) {
boolean result = setBlock(x, y, z, id.toImmutableState());
if (result && id.hasNbtData()) {
CompoundTag tag = id.getNbtData();
StateWrapper sw = new StateWrapper(tag);
try {
if (useOtherRestoreTagMethod && getWorld() != null) {
sw.restoreTag(getWorld().getName(), x, y, z);
} else {
sw.restoreTag(limitedRegion.getBlockState(x, y, z).getBlock());
}
} catch (IllegalArgumentException e) {
LOGGER.error("Error attempting to populate tile entity into the world at location {},{},{}", x, y, z, e);
return false;
} catch (IllegalStateException e) {
useOtherRestoreTagMethod = true;
LOGGER.warn("IllegalStateException attempting to populate tile entity into the world at location {},{},{}. " +
"Possibly on <=1.17.1, switching to secondary method.", x, y, z, e);
}
}
return result;
}
@Override
public boolean setBlock(final int x, final int y, final int z, @NonNull final BlockState id) {
try {
limitedRegion.setType(x, y, z, BukkitAdapter.adapt(id.getBlockType()));
limitedRegion.setBlockData(x, y, z, BukkitAdapter.adapt(id));
} catch (IllegalArgumentException e) {
LOGGER.error("Error attempting to populate block into the world at location {},{},{}", x, y, z, e);
return false;
}
return true;
}
@Override
public boolean setEntity(@NonNull final Entity entity) {
EntityType type = BukkitAdapter.adapt(entity.getState().getType());
double x = entity.getLocation().getX();
double y = entity.getLocation().getY();
double z = entity.getLocation().getZ();
Location location = new Location(limitedRegion.getWorld(), x, y, z);
try {
limitedRegion.spawnEntity(location, type);
} catch (IllegalArgumentException e) {
LOGGER.error("Error attempting to populate entity into the world at location {},{},{}", (int) x, (int) y, (int) z, e);
return false;
}
return true;
}
@Override
public boolean setTile(final int x, final int y, final int z, @NonNull final CompoundTag tag) {
StateWrapper sw = new StateWrapper(tag);
try {
return sw.restoreTag(limitedRegion.getBlockState(x, y, z).getBlock());
} catch (IllegalArgumentException e) {
LOGGER.error("Error attempting to populate tile entity into the world at location {},{},{}", x, y, z, e);
return false;
}
}
@Override
public boolean isSettingTiles() {
return true;
}
}

View File

@ -0,0 +1,46 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.schematic;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.plotsquared.core.inject.factory.ProgressSubscriberFactory;
import com.plotsquared.core.queue.QueueCoordinator;
import com.plotsquared.core.util.SchematicHandler;
import com.plotsquared.core.util.WorldUtil;
import com.sk89q.jnbt.CompoundTag;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Schematic Handler.
*/
@Singleton
public class BukkitSchematicHandler extends SchematicHandler {
@Inject
public BukkitSchematicHandler(final @NonNull WorldUtil worldUtil, @NonNull ProgressSubscriberFactory subscriberFactory) {
super(worldUtil, subscriberFactory);
}
@Override
public boolean restoreTile(QueueCoordinator queue, CompoundTag ct, int x, int y, int z) {
return new StateWrapper(ct).restoreTag(queue.getWorld().getName(), x, y, z);
}
}

View File

@ -0,0 +1,317 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.schematic;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.sk89q.jnbt.ByteTag;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
import com.sk89q.jnbt.ShortTag;
import com.sk89q.jnbt.StringTag;
import com.sk89q.jnbt.Tag;
import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.world.item.ItemType;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.Container;
import org.bukkit.block.Sign;
import org.bukkit.block.Skull;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
public class StateWrapper {
public org.bukkit.block.BlockState state = null;
public CompoundTag tag = null;
/**
* @deprecated in favour of using WE methods for obtaining NBT, specifically by obtaining a
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
*/
@Deprecated(forRemoval = true, since = "6.9.0")
public StateWrapper(org.bukkit.block.BlockState state) {
this.state = state;
}
public StateWrapper(CompoundTag tag) {
this.tag = tag;
}
public static String jsonToColourCode(String str) {
str = str.replace("{\"extra\":", "").replace("],\"text\":\"\"}", "]")
.replace("[{\"color\":\"black\",\"text\":\"", "&0")
.replace("[{\"color\":\"dark_blue\",\"text\":\"", "&1")
.replace("[{\"color\":\"dark_green\",\"text\":\"", "&2")
.replace("[{\"color\":\"dark_aqua\",\"text\":\"", "&3")
.replace("[{\"color\":\"dark_red\",\"text\":\"", "&4")
.replace("[{\"color\":\"dark_purple\",\"text\":\"", "&5")
.replace("[{\"color\":\"gold\",\"text\":\"", "&6")
.replace("[{\"color\":\"gray\",\"text\":\"", "&7")
.replace("[{\"color\":\"dark_gray\",\"text\":\"", "&8")
.replace("[{\"color\":\"blue\",\"text\":\"", "&9")
.replace("[{\"color\":\"green\",\"text\":\"", "&a")
.replace("[{\"color\":\"aqua\",\"text\":\"", "&b")
.replace("[{\"color\":\"red\",\"text\":\"", "&c")
.replace("[{\"color\":\"light_purple\",\"text\":\"", "&d")
.replace("[{\"color\":\"yellow\",\"text\":\"", "&e")
.replace("[{\"color\":\"white\",\"text\":\"", "&f")
.replace("[{\"obfuscated\":true,\"text\":\"", "&k")
.replace("[{\"bold\":true,\"text\":\"", "&l")
.replace("[{\"strikethrough\":true,\"text\":\"", "&m")
.replace("[{\"underlined\":true,\"text\":\"", "&n")
.replace("[{\"italic\":true,\"text\":\"", "&o").replace("[{\"color\":\"black\",", "&0")
.replace("[{\"color\":\"dark_blue\",", "&1")
.replace("[{\"color\":\"dark_green\",", "&2")
.replace("[{\"color\":\"dark_aqua\",", "&3").replace("[{\"color\":\"dark_red\",", "&4")
.replace("[{\"color\":\"dark_purple\",", "&5").replace("[{\"color\":\"gold\",", "&6")
.replace("[{\"color\":\"gray\",", "&7").replace("[{\"color\":\"dark_gray\",", "&8")
.replace("[{\"color\":\"blue\",", "&9").replace("[{\"color\":\"green\",", "&a")
.replace("[{\"color\":\"aqua\",", "&b").replace("[{\"color\":\"red\",", "&c")
.replace("[{\"color\":\"light_purple\",", "&d").replace("[{\"color\":\"yellow\",", "&e")
.replace("[{\"color\":\"white\",", "&f").replace("[{\"obfuscated\":true,", "&k")
.replace("[{\"bold\":true,", "&l").replace("[{\"strikethrough\":true,", "&m")
.replace("[{\"underlined\":true,", "&n").replace("[{\"italic\":true,", "&o")
.replace("{\"color\":\"black\",\"text\":\"", "&0")
.replace("{\"color\":\"dark_blue\",\"text\":\"", "&1")
.replace("{\"color\":\"dark_green\",\"text\":\"", "&2")
.replace("{\"color\":\"dark_aqua\",\"text\":\"", "&3")
.replace("{\"color\":\"dark_red\",\"text\":\"", "&4")
.replace("{\"color\":\"dark_purple\",\"text\":\"", "&5")
.replace("{\"color\":\"gold\",\"text\":\"", "&6")
.replace("{\"color\":\"gray\",\"text\":\"", "&7")
.replace("{\"color\":\"dark_gray\",\"text\":\"", "&8")
.replace("{\"color\":\"blue\",\"text\":\"", "&9")
.replace("{\"color\":\"green\",\"text\":\"", "&a")
.replace("{\"color\":\"aqua\",\"text\":\"", "&b")
.replace("{\"color\":\"red\",\"text\":\"", "&c")
.replace("{\"color\":\"light_purple\",\"text\":\"", "&d")
.replace("{\"color\":\"yellow\",\"text\":\"", "&e")
.replace("{\"color\":\"white\",\"text\":\"", "&f")
.replace("{\"obfuscated\":true,\"text\":\"", "&k")
.replace("{\"bold\":true,\"text\":\"", "&l")
.replace("{\"strikethrough\":true,\"text\":\"", "&m")
.replace("{\"underlined\":true,\"text\":\"", "&n")
.replace("{\"italic\":true,\"text\":\"", "&o").replace("{\"color\":\"black\",", "&0")
.replace("{\"color\":\"dark_blue\",", "&1").replace("{\"color\":\"dark_green\",", "&2")
.replace("{\"color\":\"dark_aqua\",", "&3").replace("{\"color\":\"dark_red\",", "&4")
.replace("{\"color\":\"dark_purple\",", "&5").replace("{\"color\":\"gold\",", "&6")
.replace("{\"color\":\"gray\",", "&7").replace("{\"color\":\"dark_gray\",", "&8")
.replace("{\"color\":\"blue\",", "&9").replace("{\"color\":\"green\",", "&a")
.replace("{\"color\":\"aqua\",", "&b").replace("{\"color\":\"red\",", "&c")
.replace("{\"color\":\"light_purple\",", "&d").replace("{\"color\":\"yellow\",", "&e")
.replace("{\"color\":\"white\",", "&f").replace("{\"obfuscated\":true,", "&k")
.replace("{\"bold\":true,", "&l").replace("{\"strikethrough\":true,", "&m")
.replace("{\"underlined\":true,", "&n").replace("{\"italic\":true,", "&o")
.replace("\"color\":\"black\",\"text\":\"", "&0")
.replace("\"color\":\"dark_blue\",\"text\":\"", "&1")
.replace("\"color\":\"dark_green\",\"text\":\"", "&2")
.replace("\"color\":\"dark_aqua\",\"text\":\"", "&3")
.replace("\"color\":\"dark_red\",\"text\":\"", "&4")
.replace("\"color\":\"dark_purple\",\"text\":\"", "&5")
.replace("\"color\":\"gold\",\"text\":\"", "&6")
.replace("\"color\":\"gray\",\"text\":\"", "&7")
.replace("\"color\":\"dark_gray\",\"text\":\"", "&8")
.replace("\"color\":\"blue\",\"text\":\"", "&9")
.replace("\"color\":\"green\",\"text\":\"", "&a")
.replace("\"color\":\"aqua\",\"text\":\"", "&b")
.replace("\"color\":\"red\",\"text\":\"", "&c")
.replace("\"color\":\"light_purple\",\"text\":\"", "&d")
.replace("\"color\":\"yellow\",\"text\":\"", "&e")
.replace("\"color\":\"white\",\"text\":\"", "&f")
.replace("\"obfuscated\":true,\"text\":\"", "&k")
.replace("\"bold\":true,\"text\":\"", "&l")
.replace("\"strikethrough\":true,\"text\":\"", "&m")
.replace("\"underlined\":true,\"text\":\"", "&n")
.replace("\"italic\":true,\"text\":\"", "&o").replace("\"color\":\"black\",", "&0")
.replace("\"color\":\"dark_blue\",", "&1").replace("\"color\":\"dark_green\",", "&2")
.replace("\"color\":\"dark_aqua\",", "&3").replace("\"color\":\"dark_red\",", "&4")
.replace("\"color\":\"dark_purple\",", "&5").replace("\"color\":\"gold\",", "&6")
.replace("\"color\":\"gray\",", "&7").replace("\"color\":\"dark_gray\",", "&8")
.replace("\"color\":\"blue\",", "&9").replace("\"color\":\"green\",", "&a")
.replace("\"color\":\"aqua\",", "&b").replace("\"color\":\"red\",", "&c")
.replace("\"color\":\"light_purple\",", "&d").replace("\"color\":\"yellow\",", "&e")
.replace("\"color\":\"white\",", "&f").replace("\"obfuscated\":true,", "&k")
.replace("\"bold\":true,", "&l").replace("\"strikethrough\":true,", "&m")
.replace("\"underlined\":true,", "&n").replace("\"italic\":true,", "&o")
.replace("[{\"text\":\"", "&0").replace("{\"text\":\"", "&0").replace("\"},", "")
.replace("\"}]", "").replace("\"}", "");
str = ChatColor.translateAlternateColorCodes('&', str);
return str;
}
/**
* Restore the TileEntity data to the given world at the given coordinates.
*
* @param worldName World name
* @param x x position
* @param y y position
* @param z z position
* @return true if successful
*/
public boolean restoreTag(String worldName, int x, int y, int z) {
World world = BukkitUtil.getWorld(worldName);
if (world == null) {
return false;
}
return restoreTag(world.getBlockAt(x, y, z));
}
/**
* Restore the TileEntity data to the given block
*
* @param block Block to restore to
* @return true if successful
*/
@SuppressWarnings("deprecation") // #setLine is needed for Spigot compatibility
public boolean restoreTag(@NonNull Block block) {
if (this.tag == null) {
return false;
}
org.bukkit.block.BlockState state = block.getState();
switch (getId()) {
case "chest", "beacon", "brewingstand", "dispenser", "dropper", "furnace", "hopper", "shulkerbox" -> {
if (!(state instanceof Container container)) {
return false;
}
List<Tag> itemsTag = this.tag.getListTag("Items").getValue();
Inventory inv = container.getSnapshotInventory();
for (Tag itemTag : itemsTag) {
CompoundTag itemComp = (CompoundTag) itemTag;
ItemType type = ItemType.REGISTRY.get(itemComp.getString("id").toLowerCase());
if (type == null) {
continue;
}
int count = itemComp.getByte("Count");
int slot = itemComp.getByte("Slot");
CompoundTag tag = (CompoundTag) itemComp.getValue().get("tag");
BaseItemStack baseItemStack = new BaseItemStack(type, tag, count);
ItemStack itemStack = BukkitAdapter.adapt(baseItemStack);
inv.setItem(slot, itemStack);
}
container.update(true, false);
return true;
}
case "sign" -> {
if (state instanceof Sign sign) {
sign.setLine(0, jsonToColourCode(tag.getString("Text1")));
sign.setLine(1, jsonToColourCode(tag.getString("Text2")));
sign.setLine(2, jsonToColourCode(tag.getString("Text3")));
sign.setLine(3, jsonToColourCode(tag.getString("Text4")));
state.update(true);
return true;
}
return false;
}
case "skull" -> {
if (state instanceof Skull skull) {
CompoundTag skullOwner = ((CompoundTag) this.tag.getValue().get("SkullOwner"));
if (skullOwner == null) {
return true;
}
String player = skullOwner.getString("Name");
if (player == null || player.isEmpty()) {
return false;
}
try {
skull.setOwningPlayer(Bukkit.getOfflinePlayer(player));
skull.update(true);
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
return false;
}
}
return false;
}
/**
* Get a CompoundTag of the contents of a block's inventory (chest, furnace, etc.).
*
* @deprecated in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining a
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
*/
@Deprecated(forRemoval = true, since = "6.9.0")
public CompoundTag getTag() {
if (this.tag != null) {
return this.tag;
}
if (this.state instanceof InventoryHolder inv) {
ItemStack[] contents = inv.getInventory().getContents();
Map<String, Tag> values = new HashMap<>();
values.put("Items", new ListTag(CompoundTag.class, serializeInventory(contents)));
return new CompoundTag(values);
}
return null;
}
public String getId() {
String tileid = this.tag.getString("id").toLowerCase();
if (tileid.startsWith("minecraft:")) {
tileid = tileid.replace("minecraft:", "");
}
return tileid;
}
public List<CompoundTag> serializeInventory(ItemStack[] items) {
List<CompoundTag> tags = new ArrayList<>();
for (int i = 0; i < items.length; ++i) {
if (items[i] != null) {
Map<String, Tag> tagData = serializeItem(items[i]);
tagData.put("Slot", new ByteTag((byte) i));
tags.add(new CompoundTag(tagData));
}
}
return tags;
}
public Map<String, Tag> serializeItem(ItemStack item) {
Map<String, Tag> data = new HashMap<>();
data.put("id", new StringTag(item.getType().name()));
data.put("Damage", new ShortTag(item.getDurability()));
data.put("Count", new ByteTag((byte) item.getAmount()));
if (!item.getEnchantments().isEmpty()) {
List<CompoundTag> enchantmentList = new ArrayList<>();
for (Entry<Enchantment, Integer> entry : item.getEnchantments().entrySet()) {
Map<String, Tag> enchantment = new HashMap<>();
enchantment.put("id", new StringTag(entry.getKey().toString()));
enchantment.put("lvl", new ShortTag(entry.getValue().shortValue()));
enchantmentList.add(new CompoundTag(enchantment));
}
Map<String, Tag> auxData = new HashMap<>();
auxData.put("ench", new ListTag(CompoundTag.class, enchantmentList));
data.put("tag", new CompoundTag(auxData));
}
return data;
}
}

View File

@ -0,0 +1,36 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.world.block.BlockState;
import org.bukkit.Material;
import org.bukkit.block.Block;
public class BukkitBlockUtil {
public static BlockState get(Block block) {
return get(block.getType());
}
public static BlockState get(Material material) {
return BukkitAdapter.asBlockType(material).getDefaultState();
}
}

View File

@ -0,0 +1,44 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.inject.Singleton;
import com.plotsquared.core.util.ChunkManager;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.regions.CuboidRegion;
import io.papermc.lib.PaperLib;
import java.util.concurrent.CompletableFuture;
@Singleton
public class BukkitChunkManager extends ChunkManager {
public static boolean isIn(CuboidRegion region, int x, int z) {
return x >= region.getMinimumPoint().getX() && x <= region.getMaximumPoint().getX() && z >= region
.getMinimumPoint()
.getZ() && z <= region
.getMaximumPoint().getZ();
}
@Override
public CompletableFuture<?> loadChunk(String world, BlockVector2 chunkLoc, boolean force) {
return PaperLib.getChunkAtAsync(BukkitUtil.getWorld(world), chunkLoc.getX(), chunkLoc.getZ(), force);
}
}

View File

@ -0,0 +1,106 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.inject.Singleton;
import com.plotsquared.bukkit.player.BukkitOfflinePlayer;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.core.player.OfflinePlotPlayer;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.util.EconHandler;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.checkerframework.checker.nullness.qual.NonNull;
@Singleton
public class BukkitEconHandler extends EconHandler {
private Economy econ;
private static OfflinePlayer getBukkitOfflinePlayer(PlotPlayer<?> plotPlayer) {
return ((BukkitPlayer) plotPlayer).player;
}
@Override
public boolean init() {
if (this.econ == null) {
setupEconomy();
}
return this.econ != null;
}
private void setupEconomy() {
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null) {
return;
}
RegisteredServiceProvider<Economy> economyProvider =
Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
if (economyProvider != null) {
this.econ = economyProvider.getProvider();
}
}
@Override
public double getMoney(PlotPlayer<?> player) {
double bal = super.getMoney(player);
if (Double.isNaN(bal)) {
return this.econ.getBalance(getBukkitOfflinePlayer(player));
}
return bal;
}
@Override
public void withdrawMoney(PlotPlayer<?> player, double amount) {
this.econ.withdrawPlayer(getBukkitOfflinePlayer(player), amount);
}
@Override
public void depositMoney(PlotPlayer<?> player, double amount) {
this.econ.depositPlayer(getBukkitOfflinePlayer(player), amount);
}
@Override
public void depositMoney(OfflinePlotPlayer player, double amount) {
this.econ.depositPlayer(((BukkitOfflinePlayer) player).player, amount);
}
@Override
public boolean isEnabled(PlotArea plotArea) {
return plotArea.useEconomy();
}
@Override
public @NonNull String format(double balance) {
return this.econ.format(balance);
}
@Override
public boolean isSupported() {
return true;
}
@Override
public double getBalance(PlotPlayer<?> player) {
return this.econ.getBalance(getBukkitOfflinePlayer(player));
}
}

View File

@ -0,0 +1,376 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.flag.implementations.AnimalAttackFlag;
import com.plotsquared.core.plot.flag.implementations.AnimalCapFlag;
import com.plotsquared.core.plot.flag.implementations.DoneFlag;
import com.plotsquared.core.plot.flag.implementations.EntityCapFlag;
import com.plotsquared.core.plot.flag.implementations.HangingBreakFlag;
import com.plotsquared.core.plot.flag.implementations.HostileAttackFlag;
import com.plotsquared.core.plot.flag.implementations.HostileCapFlag;
import com.plotsquared.core.plot.flag.implementations.MiscBreakFlag;
import com.plotsquared.core.plot.flag.implementations.MiscCapFlag;
import com.plotsquared.core.plot.flag.implementations.MobCapFlag;
import com.plotsquared.core.plot.flag.implementations.PveFlag;
import com.plotsquared.core.plot.flag.implementations.PvpFlag;
import com.plotsquared.core.plot.flag.implementations.TamedAttackFlag;
import com.plotsquared.core.plot.flag.implementations.VehicleCapFlag;
import com.plotsquared.core.util.EntityUtil;
import com.plotsquared.core.util.entity.EntityCategories;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import net.kyori.adventure.text.minimessage.Template;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.projectiles.BlockProjectileSource;
import org.bukkit.projectiles.ProjectileSource;
import java.util.Objects;
public class BukkitEntityUtil {
public static final com.sk89q.worldedit.world.entity.EntityType FAKE_ENTITY_TYPE =
new com.sk89q.worldedit.world.entity.EntityType("plotsquared:fake");
public static boolean entityDamage(Entity damager, Entity victim) {
return entityDamage(damager, victim, null);
}
public static boolean entityDamage(Entity damager, Entity victim, EntityDamageEvent.DamageCause cause) {
Location dloc = BukkitUtil.adapt(damager.getLocation());
Location vloc = BukkitUtil.adapt(victim.getLocation());
PlotArea dArea = dloc.getPlotArea();
PlotArea vArea;
if (dArea != null && dArea.contains(vloc.getX(), vloc.getZ())) {
vArea = dArea;
} else {
vArea = vloc.getPlotArea();
}
if (dArea == null && vArea == null) {
return true;
}
Plot dplot;
if (dArea != null) {
dplot = dArea.getPlot(dloc);
} else {
dplot = null;
}
Plot vplot;
if (vArea != null) {
vplot = vArea.getPlot(vloc);
} else {
vplot = null;
}
Plot plot;
String stub;
boolean isPlot = true;
if (dplot == null && vplot == null) {
if (dArea == null) {
return true;
}
plot = null;
stub = "road";
isPlot = false;
} else {
// Prioritize plots for close to seamless pvp zones
if (victim.getTicksLived() > damager.getTicksLived()) {
if (dplot == null || !(victim instanceof Player)) {
if (vplot == null) {
plot = dplot;
} else {
plot = vplot;
}
} else {
plot = dplot;
}
} else if (dplot == null || !(victim instanceof Player)) {
if (vplot == null) {
plot = dplot;
} else {
plot = vplot;
}
} else if (vplot == null) {
plot = dplot;
} else {
plot = vplot;
}
if (plot.hasOwner()) {
stub = "other";
} else {
stub = "unowned";
}
}
boolean roadFlags = vArea != null ? vArea.isRoadFlags() : dArea.isRoadFlags();
PlotArea area = vArea != null ? vArea : dArea;
Player player;
if (damager instanceof Player) { // attacker is player
player = (Player) damager;
} else if (damager instanceof Projectile projectile) {
ProjectileSource shooter = projectile.getShooter();
if (shooter instanceof Player) { // shooter is player
player = (Player) shooter;
} else { // shooter is not player
if (shooter instanceof BlockProjectileSource) {
Location sLoc = BukkitUtil
.adapt(((BlockProjectileSource) shooter).getBlock().getLocation());
dplot = dArea.getPlot(sLoc);
}
player = null;
}
} else { // Attacker is not player
player = null;
}
if (player != null) {
BukkitPlayer plotPlayer = BukkitUtil.adapt(player);
final com.sk89q.worldedit.world.entity.EntityType entityType;
// Create a fake entity type if the type does not have a name
if (victim.getType().getName() == null) {
entityType = FAKE_ENTITY_TYPE;
} else {
entityType = BukkitAdapter.adapt(victim.getType());
}
if (EntityCategories.HANGING.contains(entityType)) { // hanging
if (plot != null && (plot.getFlag(HangingBreakFlag.class) || plot
.isAdded(plotPlayer.getUUID()))) {
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
plotPlayer.sendMessage(
TranslatableCaption.of("done.building_restricted")
);
return false;
}
}
return true;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_DESTROY + "." + stub)
);
return false;
}
} else if (victim.getType() == EntityType.ARMOR_STAND) {
if (plot != null && (plot.getFlag(MiscBreakFlag.class) || plot
.isAdded(plotPlayer.getUUID()))) {
return true;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_DESTROY + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_DESTROY + "." + stub)
);
if (plot != null) {
plot.debug(player.getName()
+ " could not break armor stand because misc-break = false");
}
return false;
}
} else if (EntityCategories.HOSTILE.contains(entityType)) {
if (isPlot) {
if (plot.getFlag(HostileAttackFlag.class) || plot.getFlag(PveFlag.class) || plot
.isAdded(plotPlayer.getUUID())) {
return true;
}
} else if (roadFlags && (area.getRoadFlag(HostileAttackFlag.class) || area
.getFlag(PveFlag.class))) {
return true;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_PVE + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub)
);
if (plot != null) {
plot.debug(player.getName() + " could not attack " + entityType
+ " because pve = false OR hostile-attack = false");
}
return false;
}
} else if (EntityCategories.TAMEABLE.contains(entityType)) { // victim is tameable
if (isPlot) {
if (plot.getFlag(TamedAttackFlag.class) || plot.getFlag(PveFlag.class) || plot
.isAdded(plotPlayer.getUUID())) {
return true;
}
} else if (roadFlags && (area.getRoadFlag(TamedAttackFlag.class) || area
.getFlag(PveFlag.class))) {
return true;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_PVE + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub)
);
if (plot != null) {
plot.debug(player.getName() + " could not attack " + entityType
+ " because pve = false OR tamed-attack = false");
}
return false;
}
} else if (EntityCategories.PLAYER.contains(entityType)) {
if (isPlot) {
if (!plot.getFlag(PvpFlag.class) && !plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_PVP + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_PVP + "." + stub)
);
plot.debug(player.getName() + " could not attack " + entityType
+ " because pve = false");
return false;
} else {
return true;
}
} else if (roadFlags && area.getRoadFlag(PvpFlag.class)) {
return true;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_PVP + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_PVP + "." + stub)
);
return false;
}
} else if (EntityCategories.ANIMAL.contains(entityType)) { // victim is animal
if (isPlot) {
if (plot.getFlag(AnimalAttackFlag.class) || plot.getFlag(PveFlag.class) || plot
.isAdded(plotPlayer.getUUID())) {
return true;
}
} else if (roadFlags && (area.getRoadFlag(AnimalAttackFlag.class) || area
.getFlag(PveFlag.class))) {
return true;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_PVE + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub)
);
if (plot != null) {
plot.debug(player.getName() + " could not attack " + entityType
+ " because pve = false OR animal-attack = false");
}
return false;
}
} else if (EntityCategories.VEHICLE
.contains(entityType)) { // Vehicles are managed in vehicle destroy event
return true;
} else { // victim is something else
if (isPlot) {
if (plot.getFlag(PveFlag.class) || plot.isAdded(plotPlayer.getUUID())) {
return true;
}
} else if (roadFlags && area.getRoadFlag(PveFlag.class)) {
return true;
}
if (!plotPlayer.hasPermission(Permission.PERMISSION_ADMIN_PVE + "." + stub)) {
plotPlayer.sendMessage(
TranslatableCaption.of("permission.no_permission_event"),
Template.of("node", Permission.PERMISSION_ADMIN_PVE + "." + stub)
);
if (plot != null) {
plot.debug(player.getName() + " could not attack " + entityType
+ " because pve = false");
}
return false;
}
}
return true;
} else if (dplot != null && (!dplot.equals(vplot) || Objects
.equals(dplot.getOwnerAbs(), vplot.getOwnerAbs()))) {
return vplot != null && vplot.getFlag(PveFlag.class);
}
//disable the firework damage. too much of a headache to support at the moment.
if (vplot != null) {
if (EntityDamageEvent.DamageCause.ENTITY_EXPLOSION == cause
&& damager.getType() == EntityType.FIREWORK) {
return false;
}
}
if (vplot == null && roadFlags && area.getRoadFlag(PveFlag.class)) {
return true;
}
return ((vplot != null && vplot.getFlag(PveFlag.class)) || !(damager instanceof Arrow
&& !(victim instanceof Creature)));
}
public static boolean checkEntity(Entity entity, Plot plot) {
if (plot == null || !plot.hasOwner() || plot.getFlags().isEmpty() && plot.getArea()
.getFlagContainer().getFlagMap().isEmpty()) {
return false;
}
final com.sk89q.worldedit.world.entity.EntityType entityType =
BukkitAdapter.adapt(entity.getType());
if (EntityCategories.PLAYER.contains(entityType)) {
return false;
}
if (EntityCategories.PROJECTILE.contains(entityType) || EntityCategories.OTHER
.contains(entityType) || EntityCategories.HANGING.contains(entityType)) {
return EntityUtil.checkEntity(plot, EntityCapFlag.ENTITY_CAP_UNLIMITED,
MiscCapFlag.MISC_CAP_UNLIMITED
);
}
// Has to go go before vehicle as horses are both
// animals and vehicles
if (EntityCategories.ANIMAL.contains(entityType) || EntityCategories.VILLAGER
.contains(entityType) || EntityCategories.TAMEABLE.contains(entityType)) {
return EntityUtil
.checkEntity(plot, EntityCapFlag.ENTITY_CAP_UNLIMITED, MobCapFlag.MOB_CAP_UNLIMITED,
AnimalCapFlag.ANIMAL_CAP_UNLIMITED
);
}
if (EntityCategories.HOSTILE.contains(entityType)) {
return EntityUtil
.checkEntity(plot, EntityCapFlag.ENTITY_CAP_UNLIMITED, MobCapFlag.MOB_CAP_UNLIMITED,
HostileCapFlag.HOSTILE_CAP_UNLIMITED
);
}
if (EntityCategories.VEHICLE.contains(entityType)) {
return EntityUtil.checkEntity(plot, EntityCapFlag.ENTITY_CAP_UNLIMITED,
VehicleCapFlag.VEHICLE_CAP_UNLIMITED
);
}
return EntityUtil.checkEntity(plot, EntityCapFlag.ENTITY_CAP_UNLIMITED);
}
}

View File

@ -0,0 +1,169 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.inject.Singleton;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.PlotInventory;
import com.plotsquared.core.plot.PlotItemStack;
import com.plotsquared.core.util.InventoryUtil;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;
@Singleton
public class BukkitInventoryUtil extends InventoryUtil {
private static @Nullable ItemStack getItem(PlotItemStack item) {
if (item == null) {
return null;
}
Material material = BukkitAdapter.adapt(item.getType());
if (material == null) {
return null;
}
ItemStack stack = new ItemStack(material, item.getAmount());
ItemMeta meta = null;
if (item.getName() != null) {
meta = stack.getItemMeta();
Component nameComponent = BukkitUtil.MINI_MESSAGE.parse(item.getName());
meta.setDisplayName(BukkitUtil.LEGACY_COMPONENT_SERIALIZER.serialize(nameComponent));
}
if (item.getLore() != null) {
if (meta == null) {
meta = stack.getItemMeta();
}
List<String> lore = new ArrayList<>();
for (String entry : item.getLore()) {
lore.add(BukkitUtil.LEGACY_COMPONENT_SERIALIZER.serialize(BukkitUtil.MINI_MESSAGE.deserialize(entry)));
}
meta.setLore(lore);
}
if (meta != null) {
stack.setItemMeta(meta);
}
return stack;
}
@SuppressWarnings("deprecation") // Paper deprecation
@Override
public void open(PlotInventory inv) {
BukkitPlayer bp = (BukkitPlayer) inv.getPlayer();
Inventory inventory = Bukkit.createInventory(null, inv.getLines() * 9,
ChatColor.translateAlternateColorCodes('&', inv.getTitle())
);
PlotItemStack[] items = inv.getItems();
for (int i = 0; i < inv.getLines() * 9; i++) {
PlotItemStack item = items[i];
if (item != null) {
inventory.setItem(i, getItem(item));
}
}
bp.player.openInventory(inventory);
}
@Override
public void close(PlotInventory inv) {
if (!inv.isOpen()) {
return;
}
BukkitPlayer bp = (BukkitPlayer) inv.getPlayer();
bp.player.closeInventory();
}
@Override
public boolean setItemChecked(PlotInventory inv, int index, PlotItemStack item) {
BukkitPlayer bp = (BukkitPlayer) inv.getPlayer();
InventoryView opened = bp.player.getOpenInventory();
ItemStack stack = getItem(item);
if (stack == null) {
return false;
}
if (!inv.isOpen()) {
return true;
}
opened.setItem(index, stack);
bp.player.updateInventory();
return true;
}
@SuppressWarnings("deprecation") // Paper deprecation
public PlotItemStack getItem(ItemStack item) {
if (item == null) {
return null;
}
// int id = item.getTypeId();
Material id = item.getType();
ItemMeta meta = item.getItemMeta();
int amount = item.getAmount();
String name = null;
String[] lore = null;
if (item.hasItemMeta()) {
assert meta != null;
if (meta.hasDisplayName()) {
name = meta.getDisplayName();
}
if (meta.hasLore()) {
List<String> itemLore = meta.getLore();
assert itemLore != null;
lore = itemLore.toArray(new String[0]);
}
}
return new PlotItemStack(id.name(), amount, name, lore);
}
@Override
public PlotItemStack[] getItems(PlotPlayer<?> player) {
BukkitPlayer bp = (BukkitPlayer) player;
PlayerInventory inv = bp.player.getInventory();
return IntStream.range(0, 36).mapToObj(i -> getItem(inv.getItem(i)))
.toArray(PlotItemStack[]::new);
}
@SuppressWarnings("deprecation") // #getTitle is needed for Spigot compatibility
@Override
public boolean isOpen(PlotInventory plotInventory) {
if (!plotInventory.isOpen()) {
return false;
}
BukkitPlayer bp = (BukkitPlayer) plotInventory.getPlayer();
InventoryView opened = bp.player.getOpenInventory();
if (plotInventory.isOpen()) {
if (opened.getType() == InventoryType.CRAFTING) {
opened.getTitle();
}
}
return false;
}
}

View File

@ -0,0 +1,346 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.plotsquared.core.generator.AugmentedUtils;
import com.plotsquared.core.inject.factory.ProgressSubscriberFactory;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.location.PlotLoc;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotManager;
import com.plotsquared.core.queue.GlobalBlockQueue;
import com.plotsquared.core.queue.QueueCoordinator;
import com.plotsquared.core.queue.ScopedQueueCoordinator;
import com.plotsquared.core.util.ChunkManager;
import com.plotsquared.core.util.RegionManager;
import com.plotsquared.core.util.WorldUtil;
import com.plotsquared.core.util.entity.EntityCategories;
import com.plotsquared.core.util.task.RunnableVal;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockTypes;
import io.papermc.lib.PaperLib;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static com.plotsquared.core.util.entity.EntityCategories.CAP_ANIMAL;
import static com.plotsquared.core.util.entity.EntityCategories.CAP_ENTITY;
import static com.plotsquared.core.util.entity.EntityCategories.CAP_MISC;
import static com.plotsquared.core.util.entity.EntityCategories.CAP_MOB;
import static com.plotsquared.core.util.entity.EntityCategories.CAP_MONSTER;
import static com.plotsquared.core.util.entity.EntityCategories.CAP_VEHICLE;
@Singleton
public class BukkitRegionManager extends RegionManager {
private final GlobalBlockQueue blockQueue;
@Inject
public BukkitRegionManager(
@NonNull WorldUtil worldUtil, @NonNull GlobalBlockQueue blockQueue, @NonNull
ProgressSubscriberFactory subscriberFactory
) {
super(worldUtil, blockQueue, subscriberFactory);
this.blockQueue = blockQueue;
}
@Override
public boolean handleClear(
@NonNull Plot plot,
@Nullable Runnable whenDone,
@NonNull PlotManager manager,
@Nullable PlotPlayer<?> player
) {
return false;
}
@Override
public int[] countEntities(@NonNull Plot plot) {
int[] existing = (int[]) plot.getMeta("EntityCount");
if (existing != null && (System.currentTimeMillis() - (long) plot.getMeta("EntityCountTime") < 1000)) {
return existing;
}
PlotArea area = plot.getArea();
World world = BukkitUtil.getWorld(area.getWorldName());
Location bot = plot.getBottomAbs();
Location top = plot.getTopAbs();
int bx = bot.getX() >> 4;
int bz = bot.getZ() >> 4;
int tx = top.getX() >> 4;
int tz = top.getZ() >> 4;
int size = tx - bx << 4;
Set<Chunk> chunks = new HashSet<>();
for (int X = bx; X <= tx; X++) {
for (int Z = bz; Z <= tz; Z++) {
if (world.isChunkLoaded(X, Z)) {
chunks.add(world.getChunkAt(X, Z));
}
}
}
boolean doWhole = false;
List<Entity> entities = null;
if (size > 200 && chunks.size() > 200) {
entities = world.getEntities();
if (entities.size() < 16 + size / 8) {
doWhole = true;
}
}
int[] count = new int[6];
if (doWhole) {
for (Entity entity : entities) {
org.bukkit.Location location = entity.getLocation();
PaperLib.getChunkAtAsync(location).thenAccept(chunk -> {
if (chunks.contains(chunk)) {
int X = chunk.getX();
int Z = chunk.getZ();
if (X > bx && X < tx && Z > bz && Z < tz) {
count(count, entity);
} else {
Plot other = area.getPlot(BukkitUtil.adapt(location));
if (plot.equals(other)) {
count(count, entity);
}
}
}
});
}
} else {
for (Chunk chunk : chunks) {
int X = chunk.getX();
int Z = chunk.getZ();
Entity[] entities1 = chunk.getEntities();
for (Entity entity : entities1) {
if (X == bx || X == tx || Z == bz || Z == tz) {
Plot other = area.getPlot(BukkitUtil.adapt(entity.getLocation()));
if (plot.equals(other)) {
count(count, entity);
}
} else {
count(count, entity);
}
}
}
}
return count;
}
@Override
public boolean regenerateRegion(
final @NonNull Location pos1,
final @NonNull Location pos2,
final boolean ignoreAugment,
final @Nullable Runnable whenDone
) {
final BukkitWorld world = (BukkitWorld) worldUtil.getWeWorld(pos1.getWorldName());
final int p1x = pos1.getX();
final int p1z = pos1.getZ();
final int p2x = pos2.getX();
final int p2z = pos2.getZ();
final int bcx = p1x >> 4;
final int bcz = p1z >> 4;
final int tcx = p2x >> 4;
final int tcz = p2z >> 4;
final QueueCoordinator queue = blockQueue.getNewQueue(world);
final QueueCoordinator regenQueue = blockQueue.getNewQueue(world);
queue.addReadChunks(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()).getChunks());
queue.setChunkConsumer(chunk -> {
int x = chunk.getX();
int z = chunk.getZ();
int xxb = x << 4;
int zzb = z << 4;
int xxt = xxb + 15;
int zzt = zzb + 15;
if (xxb >= p1x && xxt <= p2x && zzb >= p1z && zzt <= p2z) {
AugmentedUtils.bypass(ignoreAugment, () -> regenQueue.regenChunk(chunk.getX(), chunk.getZ()));
return;
}
boolean checkX1 = false;
int xxb2;
if (x == bcx) {
xxb2 = p1x - 1;
checkX1 = true;
} else {
xxb2 = xxb;
}
boolean checkX2 = false;
int xxt2;
if (x == tcx) {
xxt2 = p2x + 1;
checkX2 = true;
} else {
xxt2 = xxt;
}
boolean checkZ1 = false;
int zzb2;
if (z == bcz) {
zzb2 = p1z - 1;
checkZ1 = true;
} else {
zzb2 = zzb;
}
boolean checkZ2 = false;
int zzt2;
if (z == tcz) {
zzt2 = p2z + 1;
checkZ2 = true;
} else {
zzt2 = zzt;
}
final ContentMap map = new ContentMap();
if (checkX1) {
map.saveRegion(world, xxb, xxb2, zzb2, zzt2); //
}
if (checkX2) {
map.saveRegion(world, xxt2, xxt, zzb2, zzt2); //
}
if (checkZ1) {
map.saveRegion(world, xxb2, xxt2, zzb, zzb2); //
}
if (checkZ2) {
map.saveRegion(world, xxb2, xxt2, zzt2, zzt); //
}
if (checkX1 && checkZ1) {
map.saveRegion(world, xxb, xxb2, zzb, zzb2); //
}
if (checkX2 && checkZ1) {
map.saveRegion(world, xxt2, xxt, zzb, zzb2); // ?
}
if (checkX1 && checkZ2) {
map.saveRegion(world, xxb, xxb2, zzt2, zzt); // ?
}
if (checkX2 && checkZ2) {
map.saveRegion(world, xxt2, xxt, zzt2, zzt); //
}
CuboidRegion currentPlotClear = new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3());
map.saveEntitiesOut(Bukkit.getWorld(world.getName()).getChunkAt(x, z), currentPlotClear);
AugmentedUtils.bypass(
ignoreAugment,
() -> ChunkManager.setChunkInPlotArea(null, new RunnableVal<ScopedQueueCoordinator>() {
@Override
public void run(ScopedQueueCoordinator value) {
Location min = value.getMin();
int bx = min.getX();
int bz = min.getZ();
for (int x1 = 0; x1 < 16; x1++) {
for (int z1 = 0; z1 < 16; z1++) {
PlotLoc plotLoc = new PlotLoc(bx + x1, bz + z1);
BaseBlock[] ids = map.allBlocks.get(plotLoc);
if (ids != null) {
int minY = value.getMin().getY();
for (int yIndex = 0; yIndex < ids.length; yIndex++) {
int y = yIndex + minY;
BaseBlock id = ids[yIndex];
if (id != null) {
value.setBlock(x1, y, z1, id);
} else {
value.setBlock(x1, y, z1, BlockTypes.AIR.getDefaultState());
}
}
}
}
}
}
}, world.getName(), chunk)
);
//map.restoreBlocks(worldObj, 0, 0);
map.restoreEntities(Bukkit.getWorld(world.getName()));
});
regenQueue.setCompleteTask(whenDone);
queue.setCompleteTask(regenQueue::enqueue);
queue.enqueue();
return true;
}
@Override
public void clearAllEntities(@NonNull Location pos1, @NonNull Location pos2) {
String world = pos1.getWorldName();
final World bukkitWorld = BukkitUtil.getWorld(world);
final List<Entity> entities;
if (bukkitWorld != null) {
entities = new ArrayList<>(bukkitWorld.getEntities());
} else {
entities = new ArrayList<>();
}
int bx = pos1.getX();
int bz = pos1.getZ();
int tx = pos2.getX();
int tz = pos2.getZ();
for (Entity entity : entities) {
if (!(entity instanceof Player)) {
org.bukkit.Location location = entity.getLocation();
if (location.getX() >= bx && location.getX() <= tx && location.getZ() >= bz && location.getZ() <= tz) {
if (entity.hasMetadata("ps-tmp-teleport")) {
continue;
}
entity.remove();
}
}
}
}
private void count(int[] count, @NonNull Entity entity) {
final com.sk89q.worldedit.world.entity.EntityType entityType = BukkitAdapter.adapt(entity.getType());
if (EntityCategories.PLAYER.contains(entityType)) {
return;
} else if (EntityCategories.PROJECTILE.contains(entityType) || EntityCategories.OTHER.contains(entityType) || EntityCategories.HANGING
.contains(entityType)) {
count[CAP_MISC]++;
} else if (EntityCategories.ANIMAL.contains(entityType) || EntityCategories.VILLAGER.contains(entityType) || EntityCategories.TAMEABLE
.contains(entityType)) {
count[CAP_MOB]++;
count[CAP_ANIMAL]++;
} else if (EntityCategories.VEHICLE.contains(entityType)) {
count[CAP_VEHICLE]++;
} else if (EntityCategories.HOSTILE.contains(entityType)) {
count[CAP_MOB]++;
count[CAP_MONSTER]++;
}
count[CAP_ENTITY]++;
}
}

View File

@ -0,0 +1,256 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.ConfigurationNode;
import com.plotsquared.core.configuration.ConfigurationSection;
import com.plotsquared.core.configuration.file.YamlConfiguration;
import com.plotsquared.core.generator.GeneratorWrapper;
import com.plotsquared.core.inject.annotations.WorldConfig;
import com.plotsquared.core.inject.annotations.WorldFile;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotAreaType;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.setup.PlotAreaBuilder;
import com.plotsquared.core.util.SetupUtils;
import com.plotsquared.core.util.task.TaskManager;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.Plugin;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Objects;
@Singleton
public class BukkitSetupUtils extends SetupUtils {
private final PlotAreaManager plotAreaManager;
private final YamlConfiguration worldConfiguration;
private final File worldFile;
@Inject
public BukkitSetupUtils(
final @NonNull PlotAreaManager plotAreaManager,
@WorldConfig final @NonNull YamlConfiguration worldConfiguration,
@WorldFile final @NonNull File worldFile
) {
this.plotAreaManager = plotAreaManager;
this.worldConfiguration = worldConfiguration;
this.worldFile = worldFile;
}
@Override
public void updateGenerators(final boolean force) {
if (loaded && !SetupUtils.generators.isEmpty() && !force) {
return;
}
String testWorld = "CheckingPlotSquaredGenerator";
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
try {
if (plugin.isEnabled()) {
ChunkGenerator generator = plugin.getDefaultWorldGenerator(testWorld, "");
if (generator != null) {
PlotSquared.get().removePlotAreas(testWorld);
String name = plugin.getDescription().getName();
GeneratorWrapper<?> wrapped;
if (generator instanceof GeneratorWrapper<?>) {
wrapped = (GeneratorWrapper<?>) generator;
} else {
wrapped = new BukkitPlotGenerator(testWorld, generator, this.plotAreaManager);
}
SetupUtils.generators.put(name, wrapped);
}
}
} catch (Throwable e) { // Recover from third party generator error
e.printStackTrace();
}
}
loaded = true;
}
@Override
public void unload(String worldName, boolean save) {
TaskManager.runTask(() -> {
World world = Bukkit.getWorld(worldName);
if (world == null) {
return;
}
Location location = Bukkit.getWorlds().get(0).getSpawnLocation();
for (Player player : world.getPlayers()) {
player.teleport(location);
}
if (save) {
for (Chunk chunk : world.getLoadedChunks()) {
chunk.unload(true);
}
} else {
for (Chunk chunk : world.getLoadedChunks()) {
chunk.unload(false);
}
}
Bukkit.unloadWorld(world, false);
});
}
@Override
public String setupWorld(PlotAreaBuilder builder) {
this.updateGenerators(false);
ConfigurationNode[] steps = builder.settingsNodesWrapper() == null ?
new ConfigurationNode[0] : builder.settingsNodesWrapper().getSettingsNodes();
String world = builder.worldName();
PlotAreaType type = builder.plotAreaType();
String worldPath = "worlds." + builder.worldName();
switch (type) {
case PARTIAL -> {
if (builder.areaName() != null) {
if (!this.worldConfiguration.contains(worldPath)) {
this.worldConfiguration.createSection(worldPath);
}
ConfigurationSection worldSection =
this.worldConfiguration.getConfigurationSection(worldPath);
String areaName = builder.areaName() + "-" + builder.minimumId() + "-" + builder.maximumId();
String areaPath = "areas." + areaName;
if (!worldSection.contains(areaPath)) {
worldSection.createSection(areaPath);
}
ConfigurationSection areaSection =
worldSection.getConfigurationSection(areaPath);
HashMap<String, Object> options = new HashMap<>();
for (ConfigurationNode step : steps) {
options.put(step.getConstant(), step.getValue());
}
options.put("generator.type", builder.plotAreaType().toString());
options.put("generator.terrain", builder.terrainType().toString());
options.put("generator.plugin", builder.plotManager());
if (builder.generatorName() != null && !builder.generatorName()
.equals(builder.plotManager())) {
options.put("generator.init", builder.generatorName());
}
for (Entry<String, Object> entry : options.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (worldSection.contains(key)) {
Object current = worldSection.get(key);
if (!Objects.equals(value, current)) {
areaSection.set(key, value);
}
} else {
worldSection.set(key, value);
}
}
}
GeneratorWrapper<?> gen = SetupUtils.generators.get(builder.generatorName());
if (gen != null && gen.isFull()) {
builder.generatorName(null);
}
}
case AUGMENTED -> {
if (!builder.plotManager().endsWith(":single")) {
if (!this.worldConfiguration.contains(worldPath)) {
this.worldConfiguration.createSection(worldPath);
}
if (steps.length != 0) {
ConfigurationSection worldSection =
this.worldConfiguration.getConfigurationSection(worldPath);
for (ConfigurationNode step : steps) {
worldSection.set(step.getConstant(), step.getValue());
}
}
this.worldConfiguration
.set("worlds." + world + ".generator.type", builder.plotAreaType().toString());
this.worldConfiguration
.set("worlds." + world + ".generator.terrain", builder.terrainType().toString());
this.worldConfiguration
.set("worlds." + world + ".generator.plugin", builder.plotManager());
if (builder.generatorName() != null && !builder.generatorName()
.equals(builder.plotManager())) {
this.worldConfiguration
.set("worlds." + world + ".generator.init", builder.generatorName());
}
}
GeneratorWrapper<?> gen = SetupUtils.generators.get(builder.generatorName());
if (gen != null && gen.isFull()) {
builder.generatorName(null);
}
}
case NORMAL -> {
if (steps.length != 0) {
if (!this.worldConfiguration.contains(worldPath)) {
this.worldConfiguration.createSection(worldPath);
}
ConfigurationSection worldSection =
this.worldConfiguration.getConfigurationSection(worldPath);
for (ConfigurationNode step : steps) {
worldSection.set(step.getConstant(), step.getValue());
}
}
}
}
try {
this.worldConfiguration.save(this.worldFile);
} catch (IOException e) {
e.printStackTrace();
}
Objects.requireNonNull(PlotSquared.platform()).worldManager()
.handleWorldCreation(builder.worldName(), builder.generatorName());
if (Bukkit.getWorld(world) != null) {
return world;
}
return builder.worldName();
}
@Override
public String getGenerator(PlotArea plotArea) {
if (SetupUtils.generators.isEmpty()) {
updateGenerators(false);
}
World world = Bukkit.getWorld(plotArea.getWorldName());
if (world == null) {
return null;
}
ChunkGenerator generator = world.getGenerator();
if (!(generator instanceof BukkitPlotGenerator)) {
return null;
}
for (Entry<String, GeneratorWrapper<?>> entry : SetupUtils.generators.entrySet()) {
GeneratorWrapper<?> current = entry.getValue();
if (current.equals(generator)) {
return entry.getKey();
}
}
return null;
}
}

View File

@ -0,0 +1,580 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.inject.Singleton;
import com.plotsquared.bukkit.BukkitPlatform;
import com.plotsquared.bukkit.player.BukkitPlayer;
import com.plotsquared.bukkit.player.BukkitPlayerManager;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.caption.Caption;
import com.plotsquared.core.configuration.caption.LocaleHolder;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.util.BlockUtil;
import com.plotsquared.core.util.MathMan;
import com.plotsquared.core.util.PlayerManager;
import com.plotsquared.core.util.StringComparison;
import com.plotsquared.core.util.WorldUtil;
import com.plotsquared.core.util.task.TaskManager;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockCategories;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
import io.papermc.lib.PaperLib;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.minimessage.Template;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Sign;
import org.bukkit.block.data.Directional;
import org.bukkit.block.data.type.WallSign;
import org.bukkit.entity.Allay;
import org.bukkit.entity.Ambient;
import org.bukkit.entity.Animals;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Boss;
import org.bukkit.entity.EnderCrystal;
import org.bukkit.entity.EnderSignal;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.EvokerFangs;
import org.bukkit.entity.ExperienceOrb;
import org.bukkit.entity.Explosive;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.Firework;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Hanging;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Item;
import org.bukkit.entity.LightningStrike;
import org.bukkit.entity.Monster;
import org.bukkit.entity.NPC;
import org.bukkit.entity.Phantom;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.Shulker;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Snowman;
import org.bukkit.entity.Tameable;
import org.bukkit.entity.Vehicle;
import org.bukkit.entity.WaterMob;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.Semaphore;
import java.util.function.Consumer;
import java.util.function.IntConsumer;
import java.util.stream.Stream;
@SuppressWarnings({"unused", "WeakerAccess"})
@Singleton
public class BukkitUtil extends WorldUtil {
public static final BukkitAudiences BUKKIT_AUDIENCES = BukkitAudiences.create(BukkitPlatform.getPlugin(BukkitPlatform.class));
public static final LegacyComponentSerializer LEGACY_COMPONENT_SERIALIZER = LegacyComponentSerializer.legacySection();
public static final MiniMessage MINI_MESSAGE = MiniMessage.builder().build();
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BukkitUtil.class.getSimpleName());
private final Collection<BlockType> tileEntityTypes = new HashSet<>();
/**
* Turn a Bukkit {@link Player} into a PlotSquared {@link PlotPlayer}
*
* @param player Bukkit player
* @return PlotSquared player
*/
public static @NonNull BukkitPlayer adapt(final @NonNull Player player) {
final PlayerManager<?, ?> playerManager = PlotSquared.platform().playerManager();
return ((BukkitPlayerManager) playerManager).getPlayer(player);
}
/**
* Turn a Bukkit {@link org.bukkit.Location} into a PlotSquared {@link Location}.
* This only copies the 4-tuple (world,x,y,z) and does not include the yaw and the pitch
*
* @param location Bukkit location
* @return PlotSquared location
*/
public static @NonNull Location adapt(final org.bukkit.@NonNull Location location) {
return Location
.at(
com.plotsquared.bukkit.util.BukkitWorld.of(location.getWorld()),
MathMan.roundInt(location.getX()),
MathMan.roundInt(location.getY()),
MathMan.roundInt(location.getZ())
);
}
/**
* Turn a Bukkit {@link org.bukkit.Location} into a PlotSquared {@link Location}.
* This copies the entire 6-tuple (world,x,y,z,yaw,pitch).
*
* @param location Bukkit location
* @return PlotSquared location
*/
public static @NonNull Location adaptComplete(final org.bukkit.@NonNull Location location) {
return Location
.at(
com.plotsquared.bukkit.util.BukkitWorld.of(location.getWorld()),
MathMan.roundInt(location.getX()),
MathMan.roundInt(location.getY()),
MathMan.roundInt(location.getZ()),
location.getYaw(),
location.getPitch()
);
}
/**
* Turn a PlotSquared {@link Location} into a Bukkit {@link org.bukkit.Location}.
* This only copies the 4-tuple (world,x,y,z) and does not include the yaw and the pitch
*
* @param location PlotSquared location
* @return Bukkit location
*/
public static org.bukkit.@NonNull Location adapt(final @NonNull Location location) {
return new org.bukkit.Location(
(World) location.getWorld().getPlatformWorld(),
location.getX(),
location.getY(),
location.getZ()
);
}
/**
* Get a Bukkit {@link World} from its name
*
* @param string World name
* @return World if it exists, or {@code null}
*/
public static @Nullable World getWorld(final @NonNull String string) {
return Bukkit.getWorld(string);
}
private static void ensureLoaded(
final @NonNull String world,
final int x,
final int z,
final @NonNull Consumer<Chunk> chunkConsumer
) {
PaperLib.getChunkAtAsync(Objects.requireNonNull(getWorld(world)), x >> 4, z >> 4, true)
.thenAccept(chunk -> ensureMainThread(chunkConsumer, chunk));
}
private static void ensureLoaded(final @NonNull Location location, final @NonNull Consumer<Chunk> chunkConsumer) {
PaperLib.getChunkAtAsync(adapt(location), true).thenAccept(chunk -> ensureMainThread(chunkConsumer, chunk));
}
private static <T> void ensureMainThread(final @NonNull Consumer<T> consumer, final @NonNull T value) {
if (Bukkit.isPrimaryThread()) {
consumer.accept(value);
} else {
Bukkit.getScheduler().runTask(BukkitPlatform.getPlugin(BukkitPlatform.class), () -> consumer.accept(value));
}
}
@Override
public boolean isBlockSame(final @NonNull BlockState block1, final @NonNull BlockState block2) {
if (block1.equals(block2)) {
return true;
}
final Material mat1 = BukkitAdapter.adapt(block1.getBlockType());
final Material mat2 = BukkitAdapter.adapt(block2.getBlockType());
return mat1 == mat2;
}
@Override
public boolean isWorld(final @NonNull String worldName) {
return getWorld(worldName) != null;
}
@Override
public void getBiome(final @NonNull String world, final int x, final int z, final @NonNull Consumer<BiomeType> result) {
ensureLoaded(world, x, z, chunk -> result.accept(BukkitAdapter.adapt(getWorld(world).getBiome(x, z))));
}
@Override
public @NonNull BiomeType getBiomeSynchronous(final @NonNull String world, final int x, final int z) {
return BukkitAdapter.adapt(Objects.requireNonNull(getWorld(world)).getBiome(x, z));
}
@Override
public void getHighestBlock(final @NonNull String world, final int x, final int z, final @NonNull IntConsumer result) {
ensureLoaded(world, x, z, chunk -> {
final World bukkitWorld = Objects.requireNonNull(getWorld(world));
// Skip top and bottom block
int air = 1;
int maxY = com.plotsquared.bukkit.util.BukkitWorld.getMaxWorldHeight(bukkitWorld);
int minY = com.plotsquared.bukkit.util.BukkitWorld.getMinWorldHeight(bukkitWorld);
for (int y = maxY - 1; y >= minY; y--) {
Block block = bukkitWorld.getBlockAt(x, y, z);
Material type = block.getType();
if (type.isSolid()) {
if (air > 1) {
result.accept(y);
return;
}
air = 0;
} else {
if (block.isLiquid()) {
result.accept(y);
return;
}
air++;
}
}
result.accept(bukkitWorld.getMaxHeight() - 1);
});
}
@Override
@NonNegative
public int getHighestBlockSynchronous(final @NonNull String world, final int x, final int z) {
final World bukkitWorld = Objects.requireNonNull(getWorld(world));
// Skip top and bottom block
int air = 1;
int maxY = com.plotsquared.bukkit.util.BukkitWorld.getMaxWorldHeight(bukkitWorld);
int minY = com.plotsquared.bukkit.util.BukkitWorld.getMinWorldHeight(bukkitWorld);
for (int y = maxY - 1; y >= minY; y--) {
Block block = bukkitWorld.getBlockAt(x, y, z);
Material type = block.getType();
if (type.isSolid()) {
if (air > 1) {
return y;
}
air = 0;
} else {
if (block.isLiquid()) {
return y;
}
air++;
}
}
return bukkitWorld.getMaxHeight() - 1;
}
@Override
public @NonNull String[] getSignSynchronous(final @NonNull Location location) {
Block block = Objects.requireNonNull(getWorld(location.getWorldName())).getBlockAt(
location.getX(),
location.getY(),
location.getZ()
);
try {
return TaskManager.getPlatformImplementation().sync(() -> {
if (block.getState() instanceof Sign sign) {
return sign.getLines();
}
return new String[0];
});
} catch (final Exception e) {
e.printStackTrace();
}
return new String[0];
}
@Override
public @NonNull Location getSpawn(final @NonNull String world) {
final org.bukkit.Location temp = getWorld(world).getSpawnLocation();
return Location.at(world, temp.getBlockX(), temp.getBlockY(), temp.getBlockZ(), temp.getYaw(), temp.getPitch());
}
@Override
public void setSpawn(final @NonNull Location location) {
final World world = getWorld(location.getWorldName());
if (world != null) {
world.setSpawnLocation(location.getX(), location.getY(), location.getZ());
}
}
@Override
public void saveWorld(final @NonNull String worldName) {
final World world = getWorld(worldName);
if (world != null) {
world.save();
}
}
@Override
@SuppressWarnings("deprecation")
public void setSign(
final @NonNull Location location, final @NonNull Caption[] lines,
final @NonNull Template... replacements
) {
ensureLoaded(location.getWorldName(), location.getX(), location.getZ(), chunk -> {
PlotArea area = location.getPlotArea();
final World world = getWorld(location.getWorldName());
final Block block = world.getBlockAt(location.getX(), location.getY(), location.getZ());
final Material type = block.getType();
if (type != Material.LEGACY_SIGN && type != Material.LEGACY_WALL_SIGN) {
BlockFace facing = BlockFace.NORTH;
if (!world.getBlockAt(location.getX(), location.getY(), location.getZ() + 1).getType().isSolid()) {
if (world.getBlockAt(location.getX() - 1, location.getY(), location.getZ()).getType().isSolid()) {
facing = BlockFace.EAST;
} else if (world.getBlockAt(location.getX() + 1, location.getY(), location.getZ()).getType().isSolid()) {
facing = BlockFace.WEST;
} else if (world.getBlockAt(location.getX(), location.getY(), location.getZ() - 1).getType().isSolid()) {
facing = BlockFace.SOUTH;
}
}
if (PlotSquared.platform().serverVersion()[1] == 13) {
block.setType(Material.valueOf(area.legacySignMaterial()), false);
} else {
block.setType(Material.valueOf(area.signMaterial()), false);
}
if (!(block.getBlockData() instanceof WallSign)) {
throw new RuntimeException("Something went wrong generating a sign");
}
final Directional sign = (Directional) block.getBlockData();
sign.setFacing(facing);
block.setBlockData(sign, false);
}
final org.bukkit.block.BlockState blockstate = block.getState();
if (blockstate instanceof final Sign sign) {
for (int i = 0; i < lines.length; i++) {
sign.setLine(i, LEGACY_COMPONENT_SERIALIZER
.serialize(MINI_MESSAGE.parse(lines[i].getComponent(LocaleHolder.console()), replacements)));
}
sign.update(true, false);
}
});
}
@Override
public @NonNull StringComparison<BlockState>.ComparisonResult getClosestBlock(@NonNull String name) {
BlockState state = BlockUtil.get(name);
return new StringComparison<BlockState>().new ComparisonResult(1, state);
}
@Override
public com.sk89q.worldedit.world.@NonNull World getWeWorld(final @NonNull String world) {
return new BukkitWorld(Bukkit.getWorld(world));
}
@Override
public void refreshChunk(int x, int z, String world) {
Bukkit.getWorld(world).refreshChunk(x, z);
}
@Override
public void getBlock(final @NonNull Location location, final @NonNull Consumer<BlockState> result) {
ensureLoaded(location, chunk -> {
final World world = getWorld(location.getWorldName());
final Block block = Objects.requireNonNull(world).getBlockAt(location.getX(), location.getY(), location.getZ());
result.accept(Objects.requireNonNull(BukkitAdapter.asBlockType(block.getType())).getDefaultState());
});
}
@Override
public @NonNull BlockState getBlockSynchronous(final @NonNull Location location) {
final World world = getWorld(location.getWorldName());
final Block block = Objects.requireNonNull(world).getBlockAt(location.getX(), location.getY(), location.getZ());
return Objects.requireNonNull(BukkitAdapter.asBlockType(block.getType())).getDefaultState();
}
@Override
@NonNegative
public double getHealth(final @NonNull PlotPlayer<?> player) {
return Objects.requireNonNull(Bukkit.getPlayer(player.getUUID())).getHealth();
}
@Override
@NonNegative
public int getFoodLevel(final @NonNull PlotPlayer<?> player) {
return Objects.requireNonNull(Bukkit.getPlayer(player.getUUID())).getFoodLevel();
}
@Override
public void setHealth(final @NonNull PlotPlayer<?> player, @NonNegative final double health) {
Objects.requireNonNull(Bukkit.getPlayer(player.getUUID())).setHealth(health);
}
@Override
public void setFoodLevel(final @NonNull PlotPlayer<?> player, @NonNegative final int foodLevel) {
Bukkit.getPlayer(player.getUUID()).setFoodLevel(foodLevel);
}
@Override
public @NonNull Set<com.sk89q.worldedit.world.entity.EntityType> getTypesInCategory(final @NonNull String category) {
final Collection<Class<?>> allowedInterfaces = new HashSet<>();
switch (category) {
case "animal" -> {
allowedInterfaces.add(IronGolem.class);
allowedInterfaces.add(Snowman.class);
allowedInterfaces.add(Animals.class);
allowedInterfaces.add(WaterMob.class);
allowedInterfaces.add(Ambient.class);
if (PlotSquared.platform().serverVersion()[1] >= 19) {
allowedInterfaces.add(Allay.class);
}
}
case "tameable" -> allowedInterfaces.add(Tameable.class);
case "vehicle" -> allowedInterfaces.add(Vehicle.class);
case "hostile" -> {
allowedInterfaces.add(Shulker.class);
allowedInterfaces.add(Monster.class);
allowedInterfaces.add(Boss.class);
allowedInterfaces.add(Slime.class);
allowedInterfaces.add(Ghast.class);
allowedInterfaces.add(Phantom.class);
allowedInterfaces.add(EnderCrystal.class);
}
case "hanging" -> allowedInterfaces.add(Hanging.class);
case "villager" -> allowedInterfaces.add(NPC.class);
case "projectile" -> allowedInterfaces.add(Projectile.class);
case "other" -> {
allowedInterfaces.add(ArmorStand.class);
allowedInterfaces.add(FallingBlock.class);
allowedInterfaces.add(Item.class);
allowedInterfaces.add(Explosive.class);
allowedInterfaces.add(AreaEffectCloud.class);
allowedInterfaces.add(EvokerFangs.class);
allowedInterfaces.add(LightningStrike.class);
allowedInterfaces.add(ExperienceOrb.class);
allowedInterfaces.add(EnderSignal.class);
allowedInterfaces.add(Firework.class);
}
case "player" -> allowedInterfaces.add(Player.class);
default -> LOGGER.error("Unknown entity category requested: {}", category);
}
final Set<com.sk89q.worldedit.world.entity.EntityType> types = new HashSet<>();
outer:
for (final EntityType bukkitType : EntityType.values()) {
final Class<? extends Entity> entityClass = bukkitType.getEntityClass();
if (entityClass == null) {
continue;
}
for (final Class<?> allowedInterface : allowedInterfaces) {
if (allowedInterface.isAssignableFrom(entityClass)) {
types.add(BukkitAdapter.adapt(bukkitType));
continue outer;
}
}
}
return types;
}
@Override
public @NonNull Collection<BlockType> getTileEntityTypes() {
if (this.tileEntityTypes.isEmpty()) {
// Categories
tileEntityTypes.addAll(BlockCategories.BANNERS.getAll());
tileEntityTypes.addAll(BlockCategories.SIGNS.getAll());
tileEntityTypes.addAll(BlockCategories.BEDS.getAll());
tileEntityTypes.addAll(BlockCategories.FLOWER_POTS.getAll());
// Individual Types
// Add these from strings
Stream.of(
"barrel",
"beacon",
"beehive",
"bee_nest",
"bell",
"blast_furnace",
"brewing_stand",
"campfire",
"chest",
"ender_chest",
"trapped_chest",
"command_block",
"end_gateway",
"hopper",
"jigsaw",
"jubekox",
"lectern",
"note_block",
"black_shulker_box",
"blue_shulker_box",
"brown_shulker_box",
"cyan_shulker_box",
"gray_shulker_box",
"green_shulker_box",
"light_blue_shulker_box",
"light_gray_shulker_box",
"lime_shulker_box",
"magenta_shulker_box",
"orange_shulker_box",
"pink_shulker_box",
"purple_shulker_box",
"red_shulker_box",
"shulker_box",
"white_shulker_box",
"yellow_shulker_box",
"smoker",
"structure_block",
"structure_void"
)
.map(BlockTypes::get).filter(Objects::nonNull).forEach(tileEntityTypes::add);
}
return this.tileEntityTypes;
}
@Override
@NonNegative
public int getTileEntityCount(final @NonNull String world, final @NonNull BlockVector2 chunk) {
return Objects.requireNonNull(getWorld(world)).
getChunkAt(chunk.getBlockX(), chunk.getBlockZ()).getTileEntities().length;
}
@Override
public Set<BlockVector2> getChunkChunks(String world) {
Set<BlockVector2> chunks = super.getChunkChunks(world);
if (Bukkit.isPrimaryThread()) {
for (Chunk chunk : Objects.requireNonNull(Bukkit.getWorld(world)).getLoadedChunks()) {
BlockVector2 loc = BlockVector2.at(chunk.getX() >> 5, chunk.getZ() >> 5);
chunks.add(loc);
}
} else {
final Semaphore semaphore = new Semaphore(1);
try {
semaphore.acquire();
Bukkit.getScheduler().runTask(BukkitPlatform.getPlugin(BukkitPlatform.class), () -> {
for (Chunk chunk : Objects.requireNonNull(Bukkit.getWorld(world)).getLoadedChunks()) {
BlockVector2 loc = BlockVector2.at(chunk.getX() >> 5, chunk.getZ() >> 5);
chunks.add(loc);
}
semaphore.release();
});
semaphore.acquireUninterruptibly();
} catch (final Exception e) {
e.printStackTrace();
}
}
return chunks;
}
}

View File

@ -0,0 +1,147 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.common.collect.Maps;
import com.plotsquared.core.location.World;
import org.bukkit.Bukkit;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Map;
public class BukkitWorld implements World<org.bukkit.World> {
private static final Map<String, BukkitWorld> worldMap = Maps.newHashMap();
private static final boolean HAS_MIN_Y;
static {
boolean temp;
try {
org.bukkit.World.class.getMethod("getMinHeight");
temp = true;
} catch (NoSuchMethodException e) {
temp = false;
}
HAS_MIN_Y = temp;
}
private final org.bukkit.World world;
private BukkitWorld(final org.bukkit.World world) {
this.world = world;
}
/**
* Get a new {@link BukkitWorld} from a world name
*
* @param worldName World name
* @return World instance
*/
public static @NonNull BukkitWorld of(final @NonNull String worldName) {
final org.bukkit.World bukkitWorld = Bukkit.getWorld(worldName);
if (bukkitWorld == null) {
throw new IllegalArgumentException(String.format("There is no world with the name '%s'", worldName));
}
return of(bukkitWorld);
}
/**
* Get a new {@link BukkitWorld} from a Bukkit world
*
* @param world Bukkit world
* @return World instance
*/
public static @NonNull BukkitWorld of(final org.bukkit.World world) {
BukkitWorld bukkitWorld = worldMap.get(world.getName());
if (bukkitWorld != null && bukkitWorld.getPlatformWorld().equals(world)) {
return bukkitWorld;
}
bukkitWorld = new BukkitWorld(world);
worldMap.put(world.getName(), bukkitWorld);
return bukkitWorld;
}
/**
* Get the min world height from a Bukkit {@link org.bukkit.World}. Inclusive
*
* @since 6.6.0
*/
public static int getMinWorldHeight(org.bukkit.World world) {
return HAS_MIN_Y ? world.getMinHeight() : 0;
}
/**
* Get the max world height from a Bukkit {@link org.bukkit.World}. Exclusive
*
* @since 6.6.0
*/
public static int getMaxWorldHeight(org.bukkit.World world) {
return HAS_MIN_Y ? world.getMaxHeight() : 256;
}
@Override
public org.bukkit.World getPlatformWorld() {
return this.world;
}
@Override
public @NonNull String getName() {
return this.world.getName();
}
@Override
public int getMinHeight() {
return getMinWorldHeight(world);
}
@Override
public int getMaxHeight() {
return getMaxWorldHeight(world) - 1;
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final BukkitWorld that = (BukkitWorld) o;
return world.equals(that.world);
}
@Override
public int hashCode() {
return world.hashCode();
}
/**
* @deprecated This method is not meant to be invoked or overridden, with no replacement.
*/
@Deprecated(forRemoval = true, since = "6.6.0")
protected boolean canEqual(final Object other) {
return other instanceof BukkitWorld;
}
public String toString() {
return "BukkitWorld(world=" + this.world + ")";
}
}

View File

@ -0,0 +1,131 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.plotsquared.bukkit.entity.EntityWrapper;
import com.plotsquared.bukkit.entity.ReplicatingEntityWrapper;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.location.PlotLoc;
import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.block.BaseBlock;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class ContentMap {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ContentMap.class.getSimpleName());
final Set<EntityWrapper> entities;
final Map<PlotLoc, BaseBlock[]> allBlocks;
ContentMap() {
this.entities = new HashSet<>();
this.allBlocks = new HashMap<>();
}
public void saveRegion(BukkitWorld world, int x1, int x2, int z1, int z2) {
if (z1 > z2) {
int tmp = z1;
z1 = z2;
z2 = tmp;
}
if (x1 > x2) {
int tmp = x1;
x1 = x2;
x2 = tmp;
}
for (int x = x1; x <= x2; x++) {
for (int z = z1; z <= z2; z++) {
saveBlocks(world, x, z);
}
}
}
void saveEntitiesOut(Chunk chunk, CuboidRegion region) {
for (Entity entity : chunk.getEntities()) {
Location location = BukkitUtil.adapt(entity.getLocation());
int x = location.getX();
int z = location.getZ();
if (BukkitChunkManager.isIn(region, x, z)) {
continue;
}
if (entity.getVehicle() != null) {
continue;
}
EntityWrapper wrap = new ReplicatingEntityWrapper(entity, (short) 2);
wrap.saveEntity();
this.entities.add(wrap);
}
}
void saveEntitiesIn(Chunk chunk, CuboidRegion region, boolean delete) {
for (Entity entity : chunk.getEntities()) {
Location location = BukkitUtil.adapt(entity.getLocation());
int x = location.getX();
int z = location.getZ();
if (!BukkitChunkManager.isIn(region, x, z)) {
continue;
}
if (entity.getVehicle() != null) {
continue;
}
EntityWrapper wrap = new ReplicatingEntityWrapper(entity, (short) 2);
wrap.saveEntity();
this.entities.add(wrap);
if (delete) {
if (!(entity instanceof Player)) {
entity.remove();
}
}
}
}
void restoreEntities(World world) {
for (EntityWrapper entity : this.entities) {
try {
entity.spawn(world, 0, 0);
} catch (Exception e) {
LOGGER.error("Failed to restore entity", e);
}
}
this.entities.clear();
}
private void saveBlocks(BukkitWorld world, int x, int z) {
BaseBlock[] ids = new BaseBlock[world.getMaxY() - world.getMinY() + 1];
for (short yIndex = 0; yIndex <= world.getMaxY() - world.getMinY(); yIndex++) {
BaseBlock block = world.getFullBlock(BlockVector3.at(x, yIndex + world.getMinY(), z));
ids[yIndex] = block;
}
PlotLoc loc = new PlotLoc(x, z);
this.allBlocks.put(loc, ids);
}
}

View File

@ -0,0 +1,71 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.plotsquared.bukkit.generator.BukkitAugmentedGenerator;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.generator.GeneratorWrapper;
import com.plotsquared.core.util.SetupUtils;
import org.bukkit.World;
import org.bukkit.generator.ChunkGenerator;
import java.lang.reflect.Field;
import java.util.ArrayList;
public class SetGenCB {
public static void setGenerator(World world) throws Exception {
PlotSquared.platform().setupUtils().updateGenerators(false);
PlotSquared.get().removePlotAreas(world.getName());
ChunkGenerator gen = world.getGenerator();
if (gen == null) {
return;
}
String name = gen.getClass().getCanonicalName();
boolean set = false;
for (GeneratorWrapper<?> wrapper : SetupUtils.generators.values()) {
ChunkGenerator newGen = (ChunkGenerator) wrapper.getPlatformGenerator();
if (newGen == null) {
newGen = (ChunkGenerator) wrapper;
}
if (newGen.getClass().getCanonicalName().equals(name)) {
// set generator
Field generator = world.getClass().getDeclaredField("generator");
Field populators = world.getClass().getDeclaredField("populators");
generator.setAccessible(true);
populators.setAccessible(true);
// Set populators (just in case)
populators.set(world, new ArrayList<>());
// Set generator
generator.set(world, newGen);
populators.set(world, newGen.getDefaultPopulators(world));
// end
set = true;
break;
}
}
if (!set) {
world.getPopulators()
.removeIf(blockPopulator -> blockPopulator instanceof BukkitAugmentedGenerator);
}
PlotSquared.get()
.loadWorld(world.getName(), PlotSquared.platform().getGenerator(world.getName(), null));
}
}

View File

@ -0,0 +1,95 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.stream.JsonReader;
import com.google.inject.Inject;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.PlotVersion;
import com.plotsquared.core.configuration.Settings;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.Bukkit;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import javax.net.ssl.HttpsURLConnection;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
public class UpdateUtility implements Listener {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + UpdateUtility.class.getSimpleName());
public static PlotVersion internalVersion;
public static String spigotVersion;
public static boolean hasUpdate;
private static BukkitTask task;
public final JavaPlugin javaPlugin;
private boolean notify = true;
@Inject
public UpdateUtility(final JavaPlugin javaPlugin) {
this.javaPlugin = javaPlugin;
internalVersion = PlotSquared.get().getVersion();
}
@SuppressWarnings({"deprecation", "DefaultCharset"}) // Suppress Json deprecation, we can't use features from gson 2.8.1 and newer yet
public void updateChecker() {
task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
try {
HttpsURLConnection connection = (HttpsURLConnection) new URL(
"https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=77506")
.openConnection();
connection.setRequestMethod("GET");
JsonObject result = new JsonParser()
.parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
.getAsJsonObject();
spigotVersion = result.get("current_version").getAsString();
} catch (IOException e) {
LOGGER.error("Unable to check for updates. Error: {}", e.getMessage());
return;
}
if (internalVersion.isLaterVersion(spigotVersion)) {
LOGGER.info("There appears to be a PlotSquared update available!");
LOGGER.info("You are running version {}, the latest version is {}",
internalVersion.versionString(), spigotVersion
);
LOGGER.info("https://www.spigotmc.org/resources/77506/updates");
hasUpdate = true;
if (Settings.UpdateChecker.NOTIFY_ONCE) {
cancelTask();
}
} else if (notify) {
notify = false;
LOGGER.info("Congratulations! You are running the latest PlotSquared version");
}
}, 0L, (long) Settings.UpdateChecker.POLL_RATE * 60 * 20);
}
private void cancelTask() {
Bukkit.getScheduler().runTaskLater(javaPlugin, () -> task.cancel(), 20L);
}
}

View File

@ -0,0 +1,123 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util.fawe;
import com.fastasyncworldedit.bukkit.regions.plotsquared.FaweDelegateRegionManager;
import com.google.inject.Inject;
import com.plotsquared.bukkit.util.BukkitRegionManager;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.generator.HybridPlotManager;
import com.plotsquared.core.inject.factory.ProgressSubscriberFactory;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotManager;
import com.plotsquared.core.queue.GlobalBlockQueue;
import com.plotsquared.core.queue.QueueCoordinator;
import com.plotsquared.core.util.WorldUtil;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.biome.BiomeType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Set;
public class FaweRegionManager extends BukkitRegionManager {
private final FaweDelegateRegionManager delegate = new FaweDelegateRegionManager();
@Inject
public FaweRegionManager(WorldUtil worldUtil, GlobalBlockQueue blockQueue, ProgressSubscriberFactory subscriberFactory) {
super(worldUtil, blockQueue, subscriberFactory);
}
@Override
public boolean setCuboids(
final @NonNull PlotArea area,
final @NonNull Set<CuboidRegion> regions,
final @NonNull Pattern blocks,
int minY,
int maxY,
@Nullable PlotPlayer<?> actor,
@Nullable QueueCoordinator queue
) {
return delegate.setCuboids(area, regions, blocks, minY, maxY, queue.getCompleteTask());
}
@Override
public boolean notifyClear(PlotManager manager) {
if (!Settings.FAWE_Components.CLEAR || !(manager instanceof HybridPlotManager)) {
return false;
}
return delegate.notifyClear(manager);
}
@Override
public boolean handleClear(
@NonNull Plot plot,
@Nullable Runnable whenDone,
@NonNull PlotManager manager,
final @Nullable PlotPlayer<?> player
) {
if (!Settings.FAWE_Components.CLEAR || !(manager instanceof HybridPlotManager)) {
return false;
}
return delegate.handleClear(plot, whenDone, manager);
}
@Override
public void swap(
Location pos1,
Location pos2,
Location swapPos,
final @Nullable PlotPlayer<?> player,
final Runnable whenDone
) {
delegate.swap(pos1, pos2, swapPos, whenDone);
}
@Override
public void setBiome(CuboidRegion region, int extendBiome, BiomeType biome, String world, Runnable whenDone) {
delegate.setBiome(region, extendBiome, biome, world, whenDone);
}
@Override
public void setBiome(CuboidRegion region, int extendBiome, BiomeType biome, PlotArea area, Runnable whenDone) {
delegate.setBiome(region, extendBiome, biome, area.getWorldName(), whenDone);
}
@Override
public boolean copyRegion(
final @NonNull Location pos1,
final @NonNull Location pos2,
final @NonNull Location pos3,
final @Nullable PlotPlayer<?> player,
final @NonNull Runnable whenDone
) {
return delegate.copyRegion(pos1, pos2, pos3, whenDone);
}
@Override
public boolean regenerateRegion(final Location pos1, final Location pos2, boolean ignore, final Runnable whenDone) {
return delegate.regenerateRegion(pos1, pos2, ignore, whenDone);
}
}

View File

@ -0,0 +1,82 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util.fawe;
import com.fastasyncworldedit.bukkit.regions.plotsquared.FaweDelegateSchematicHandler;
import com.google.inject.Inject;
import com.plotsquared.core.inject.factory.ProgressSubscriberFactory;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.schematic.Schematic;
import com.plotsquared.core.queue.QueueCoordinator;
import com.plotsquared.core.util.SchematicHandler;
import com.plotsquared.core.util.WorldUtil;
import com.plotsquared.core.util.task.RunnableVal;
import com.sk89q.jnbt.CompoundTag;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.io.InputStream;
import java.net.URL;
import java.util.UUID;
public class FaweSchematicHandler extends SchematicHandler {
private final FaweDelegateSchematicHandler delegate = new FaweDelegateSchematicHandler();
@Inject
public FaweSchematicHandler(WorldUtil worldUtil, ProgressSubscriberFactory subscriberFactory) {
super(worldUtil, subscriberFactory);
}
@Override
public boolean restoreTile(QueueCoordinator queue, CompoundTag tag, int x, int y, int z) {
return false;
}
@Override
public void paste(
final Schematic schematic,
final Plot plot,
final int xOffset,
final int yOffset,
final int zOffset,
final boolean autoHeight,
final PlotPlayer<?> actor,
final RunnableVal<Boolean> whenDone
) {
delegate.paste(schematic, plot, xOffset, yOffset, zOffset, autoHeight, actor, whenDone);
}
@Override
public boolean save(CompoundTag tag, String path) {
return delegate.save(tag, path);
}
@SuppressWarnings("removal") // Just the override
@Override
public void upload(final CompoundTag tag, final UUID uuid, final String file, final RunnableVal<URL> whenDone) {
delegate.upload(tag, uuid, file, whenDone);
}
@Override
public Schematic getSchematic(@NonNull InputStream is) {
return delegate.getSchematic(is);
}
}

View File

@ -0,0 +1,42 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util.task;
import com.plotsquared.core.util.task.PlotSquaredTask;
import org.bukkit.scheduler.BukkitRunnable;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Bukkit implementation of {@link PlotSquaredTask}
*/
public final class BukkitPlotSquaredTask extends BukkitRunnable implements PlotSquaredTask {
@NonNull
private final Runnable runnable;
public BukkitPlotSquaredTask(final @NonNull Runnable runnable) {
this.runnable = runnable;
}
@Override
public void runTask() {
this.runnable.run();
}
}

View File

@ -0,0 +1,121 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util.task;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.plotsquared.bukkit.BukkitPlatform;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.util.task.PlotSquaredTask;
import com.plotsquared.core.util.task.TaskManager;
import com.plotsquared.core.util.task.TaskTime;
import org.bukkit.Bukkit;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
/**
* Bukkit implementation of {@link TaskManager} using
* by {@link org.bukkit.scheduler.BukkitScheduler} and {@link BukkitPlotSquaredTask}
*/
@Singleton
public class BukkitTaskManager extends TaskManager {
private final BukkitPlatform bukkitMain;
private final TaskTime.TimeConverter timeConverter;
@Inject
public BukkitTaskManager(
final @NonNull BukkitPlatform bukkitMain,
final TaskTime.@NonNull TimeConverter timeConverter
) {
this.bukkitMain = bukkitMain;
this.timeConverter = timeConverter;
}
@Override
public PlotSquaredTask taskRepeat(
final @NonNull Runnable runnable,
final @NonNull TaskTime taskTime
) {
final long ticks = this.timeConverter.toTicks(taskTime);
final BukkitPlotSquaredTask bukkitPlotSquaredTask = new BukkitPlotSquaredTask(runnable);
bukkitPlotSquaredTask.runTaskTimer(this.bukkitMain, ticks, ticks);
return bukkitPlotSquaredTask;
}
@Override
public PlotSquaredTask taskRepeatAsync(
final @NonNull Runnable runnable,
final @NonNull TaskTime taskTime
) {
final long ticks = this.timeConverter.toTicks(taskTime);
final BukkitPlotSquaredTask bukkitPlotSquaredTask = new BukkitPlotSquaredTask(runnable);
bukkitPlotSquaredTask.runTaskTimerAsynchronously(this.bukkitMain, ticks, ticks);
return bukkitPlotSquaredTask;
}
@Override
public void taskAsync(final @NonNull Runnable runnable) {
if (this.bukkitMain.isEnabled()) {
new BukkitPlotSquaredTask(runnable).runTaskAsynchronously(this.bukkitMain);
} else {
runnable.run();
}
}
@Override
public <T> T sync(final @NonNull Callable<T> function, final int timeout) throws Exception {
if (PlotSquared.get().isMainThread(Thread.currentThread())) {
return function.call();
}
return this.callMethodSync(function).get(timeout, TimeUnit.MILLISECONDS);
}
@Override
public <T> Future<T> callMethodSync(final @NonNull Callable<T> method) {
return Bukkit.getScheduler().callSyncMethod(this.bukkitMain, method);
}
@Override
public void task(final @NonNull Runnable runnable) {
new BukkitPlotSquaredTask(runnable).runTask(this.bukkitMain);
}
@Override
public void taskLater(
final @NonNull Runnable runnable,
final @NonNull TaskTime taskTime
) {
final long delay = this.timeConverter.toTicks(taskTime);
new BukkitPlotSquaredTask(runnable).runTaskLater(this.bukkitMain, delay);
}
@Override
public void taskLaterAsync(
final @NonNull Runnable runnable,
final @NonNull TaskTime taskTime
) {
final long delay = this.timeConverter.toTicks(taskTime);
new BukkitPlotSquaredTask(runnable).runTaskLaterAsynchronously(this.bukkitMain, delay);
}
}

View File

@ -0,0 +1,43 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util.task;
import com.plotsquared.core.util.task.TaskTime;
import org.bukkit.Bukkit;
import org.checkerframework.checker.index.qual.NonNegative;
/**
* Time converter that uses the server MSPT count to convert between
* different time units
*/
public final class PaperTimeConverter implements TaskTime.TimeConverter {
private static final long MIN_MS_PER_TICKS = 50L;
@Override
public long msToTicks(@NonNegative final long ms) {
return Math.max(1L, (long) (ms / Math.max(MIN_MS_PER_TICKS, Bukkit.getAverageTickTime())));
}
@Override
public long ticksToMs(@NonNegative final long ticks) {
return Math.max(1L, (long) (ticks * Math.max(MIN_MS_PER_TICKS, Bukkit.getAverageTickTime())));
}
}

View File

@ -0,0 +1,41 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.util.task;
import com.plotsquared.core.util.task.TaskTime;
import org.checkerframework.checker.index.qual.NonNegative;
/**
* Naive time converter that assumes that all ticks are 50 milliseconds
*/
public final class SpigotTimeConverter implements TaskTime.TimeConverter {
private static final long MS_PER_TICKS = 50L;
@Override
public long msToTicks(@NonNegative final long ms) {
return Math.max(1L, ms / MS_PER_TICKS);
}
@Override
public long ticksToMs(@NonNegative final long ticks) {
return Math.max(1L, ticks * MS_PER_TICKS);
}
}

View File

@ -0,0 +1,66 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.uuid;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import com.plotsquared.core.uuid.UUIDMapping;
import com.plotsquared.core.uuid.UUIDService;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
/**
* UUID service using the EssentialsX API
*/
public class EssentialsUUIDService implements UUIDService {
private final Essentials essentials;
public EssentialsUUIDService() {
this.essentials = Essentials.getPlugin(Essentials.class);
}
@Override
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
return Collections.emptyList();
}
@Override
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
final List<UUIDMapping> mappings = new ArrayList<>(usernames.size());
for (final String username : usernames) {
try {
final User user = essentials.getUser(username);
if (user != null) {
final UUID uuid = user.getConfigUUID();
if (uuid != null) {
mappings.add(new UUIDMapping(uuid, username));
}
}
} catch (final Exception ignored) {
}
}
return mappings;
}
}

View File

@ -0,0 +1,81 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.uuid;
import com.plotsquared.core.uuid.UUIDMapping;
import com.plotsquared.core.uuid.UUIDService;
import net.luckperms.api.LuckPerms;
import net.luckperms.api.model.user.UserManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* UUID service that uses the LuckPerms API
*/
public class LuckPermsUUIDService implements UUIDService {
private final LuckPerms luckPerms;
public LuckPermsUUIDService() {
final RegisteredServiceProvider<LuckPerms> provider = Bukkit.getServicesManager().getRegistration(LuckPerms.class);
if (provider != null) {
this.luckPerms = provider.getProvider();
} else {
throw new IllegalStateException("LuckPerms not available");
}
}
@Override
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
final List<UUIDMapping> mappings = new ArrayList<>(uuids.size());
final UserManager userManager = this.luckPerms.getUserManager();
for (final UUID uuid : uuids) {
try {
final String username = userManager.lookupUsername(uuid).get();
if (username != null) {
mappings.add(new UUIDMapping(uuid, username));
}
} catch (final Exception ignored) {
}
}
return mappings;
}
@Override
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
final List<UUIDMapping> mappings = new ArrayList<>(usernames.size());
final UserManager userManager = this.luckPerms.getUserManager();
for (final String username : usernames) {
try {
final UUID uuid = userManager.lookupUniqueId(username).get();
if (username != null) {
mappings.add(new UUIDMapping(uuid, username));
}
} catch (final Exception ignored) {
}
}
return mappings;
}
}

View File

@ -0,0 +1,81 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.uuid;
import com.google.common.base.Charsets;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.uuid.UUIDMapping;
import com.plotsquared.core.uuid.UUIDService;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
/**
* UUID service that use {@link org.bukkit.OfflinePlayer offline players}
*/
public class OfflinePlayerUUIDService implements UUIDService {
@Override
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
if (Settings.UUID.FORCE_LOWERCASE || Bukkit.getWorlds().isEmpty()) {
return Collections.emptyList(); // This is useless now
}
final List<UUIDMapping> wrappers = new ArrayList<>(uuids.size());
for (final UUID uuid : uuids) {
final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(uuid);
try {
if (offlinePlayer.hasPlayedBefore()) {
wrappers.add(new UUIDMapping(uuid, offlinePlayer.getName()));
}
} catch (final Exception ignored) {
} /* This can be safely ignored. If this happens, it is
probably because it's called before the worlds have
been loaded. This is bad, but does not break anything */
}
return wrappers;
}
@Override
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
final List<UUIDMapping> wrappers = new ArrayList<>(usernames.size());
for (final String username : usernames) {
if (Settings.UUID.OFFLINE) {
if (Settings.UUID.FORCE_LOWERCASE) {
wrappers.add(new UUIDMapping(UUID.nameUUIDFromBytes(("OfflinePlayer:" +
username.toLowerCase()).getBytes(Charsets.UTF_8)), username));
} else {
wrappers.add(new UUIDMapping(UUID.nameUUIDFromBytes(("OfflinePlayer:" +
username).getBytes(Charsets.UTF_8)), username));
}
} else {
final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(username);
if (offlinePlayer.hasPlayedBefore()) {
wrappers.add(new UUIDMapping(offlinePlayer.getUniqueId(), offlinePlayer.getName()));
}
}
}
return wrappers;
}
}

View File

@ -0,0 +1,60 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.uuid;
import com.destroystokyo.paper.profile.PlayerProfile;
import com.plotsquared.core.uuid.UUIDMapping;
import com.plotsquared.core.uuid.UUIDService;
import org.bukkit.Bukkit;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* UUID service that uses the Paper profile API
*/
public class PaperUUIDService implements UUIDService {
@Override
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
final List<UUIDMapping> mappings = new ArrayList<>(uuids.size());
for (final UUID uuid : uuids) {
final PlayerProfile playerProfile = Bukkit.createProfile(uuid);
if ((playerProfile.isComplete() || playerProfile.completeFromCache()) && playerProfile.getId() != null) {
mappings.add(new UUIDMapping(playerProfile.getId(), playerProfile.getName()));
}
}
return mappings;
}
@Override
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
final List<UUIDMapping> mappings = new ArrayList<>(usernames.size());
for (final String username : usernames) {
final PlayerProfile playerProfile = Bukkit.createProfile(username);
if ((playerProfile.isComplete() || playerProfile.completeFromCache()) && playerProfile.getId() != null) {
mappings.add(new UUIDMapping(playerProfile.getId(), playerProfile.getName()));
}
}
return mappings;
}
}

View File

@ -0,0 +1,143 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.uuid;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.database.SQLite;
import com.plotsquared.core.util.FileUtils;
import com.plotsquared.core.uuid.UUIDMapping;
import com.plotsquared.core.uuid.UUIDService;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
import java.util.function.Consumer;
/**
* UUID service that uses the (legacy) SQL UUID cache
*/
public class SQLiteUUIDService implements UUIDService, Consumer<List<UUIDMapping>> {
private final SQLite sqlite;
public SQLiteUUIDService(final String fileName) {
this.sqlite =
new SQLite(FileUtils.getFile(PlotSquared.platform().getDirectory(), fileName));
try {
this.sqlite.openConnection();
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
try (PreparedStatement stmt = getConnection().prepareStatement(
"CREATE TABLE IF NOT EXISTS `usercache` (uuid VARCHAR(32) NOT NULL, username VARCHAR(32) NOT NULL, PRIMARY KEY (uuid))")) {
stmt.execute();
} catch (SQLException e) {
e.printStackTrace();
}
}
private Connection getConnection() {
synchronized (this.sqlite) {
return this.sqlite.getConnection();
}
}
@Override
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
final List<UUIDMapping> mappings = new ArrayList<>(uuids.size());
try (final PreparedStatement statement = getConnection()
.prepareStatement("SELECT `username` FROM `usercache` WHERE `uuid` = ?")) {
for (final UUID uuid : uuids) {
statement.setString(1, uuid.toString());
try (final ResultSet resultSet = statement.executeQuery()) {
if (resultSet.next()) {
mappings.add(new UUIDMapping(uuid, resultSet.getString("username")));
}
}
}
} catch (final Exception e) {
e.printStackTrace();
}
return mappings;
}
@Override
public @NonNull List<UUIDMapping> getUUIDs(@NonNull List<String> usernames) {
final List<UUIDMapping> mappings = new ArrayList<>(usernames.size());
try (final PreparedStatement statement = getConnection()
.prepareStatement("SELECT `uuid` FROM `usercache` WHERE `username` = ?")) {
for (final String username : usernames) {
statement.setString(1, username);
try (final ResultSet resultSet = statement.executeQuery()) {
if (resultSet.next()) {
mappings.add(new UUIDMapping(
UUID.fromString(resultSet.getString("uuid")),
username
));
}
}
}
} catch (final Exception e) {
e.printStackTrace();
}
return mappings;
}
@Override
public void accept(final List<UUIDMapping> uuidWrappers) {
try (final PreparedStatement statement = getConnection()
.prepareStatement("INSERT OR REPLACE INTO `usercache` (`uuid`, `username`) VALUES(?, ?)")) {
for (final UUIDMapping mapping : uuidWrappers) {
statement.setString(1, mapping.getUuid().toString());
statement.setString(2, mapping.getUsername());
statement.executeUpdate();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
/**
* Read the entire cache at once
*
* @return All read mappings
*/
public @NonNull List<UUIDMapping> getAll() {
final List<UUIDMapping> mappings = new LinkedList<>();
try (final PreparedStatement statement = getConnection().prepareStatement("SELECT * FROM `usercache`")) {
try (final ResultSet resultSet = statement.executeQuery()) {
while (resultSet.next()) {
mappings.add(new UUIDMapping(UUID.fromString(resultSet.getString("uuid")), resultSet.getString("username")));
}
}
} catch (final Exception e) {
e.printStackTrace();
}
return mappings;
}
}

View File

@ -0,0 +1,112 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.bukkit.uuid;
import com.google.common.util.concurrent.RateLimiter;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.uuid.UUIDMapping;
import com.plotsquared.core.uuid.UUIDService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.enginehub.squirrelid.Profile;
import org.enginehub.squirrelid.resolver.HttpRepositoryService;
import org.enginehub.squirrelid.resolver.ProfileService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
/**
* UUID service using SquirrelID
*/
@SuppressWarnings("UnstableApiUsage")
public class SquirrelIdUUIDService implements UUIDService {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + SquirrelIdUUIDService.class.getSimpleName());
private final ProfileService profileService;
private final RateLimiter rateLimiter;
/**
* Create a new SquirrelID UUID service
*
* @param rateLimit Mojangs rate limit is 600 requests per 10 minutes.
* This parameter specifies how many of those requests
* we can use before our internal rate limit kicks in.
*/
public SquirrelIdUUIDService(final int rateLimit) {
this.profileService = HttpRepositoryService.forMinecraft();
// RateLimiter uses request per seconds. The constructor
// parameter rateLimit is requests per 600 seconds
this.rateLimiter = RateLimiter.create(rateLimit / 600.0D);
}
@Override
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
final List<UUIDMapping> results = new ArrayList<>(uuids.size());
this.rateLimiter.acquire(uuids.size());
try {
try {
for (final Profile profile : this.profileService.findAllByUuid(uuids)) {
results.add(new UUIDMapping(profile.getUniqueId(), profile.getName()));
}
} catch (final IllegalArgumentException illegalArgumentException) {
//
// This means that the UUID was invalid for whatever reason, we'll try to
// go through them one by one
//
if (uuids.size() >= 2) {
if (Settings.DEBUG) {
LOGGER.info("(UUID) Found invalid UUID in batch. Will try each UUID individually.");
}
for (final UUID uuid : uuids) {
final List<UUIDMapping> result = this.getNames(Collections.singletonList(uuid));
if (result.isEmpty()) {
continue;
}
results.add(result.get(0));
}
} else if (uuids.size() == 1 && Settings.DEBUG) {
LOGGER.info("(UUID) Found invalid UUID: {}", uuids.get(0));
}
}
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
return results;
}
@Override
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
final List<UUIDMapping> results = new ArrayList<>(usernames.size());
this.rateLimiter.acquire(usernames.size());
try {
for (final Profile profile : this.profileService.findAllByName(usernames)) {
results.add(new UUIDMapping(profile.getUniqueId(), profile.getName()));
}
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
return results;
}
}

View File

@ -0,0 +1,422 @@
name: PlotSquared
main: com.plotsquared.bukkit.BukkitPlatform
api-version: "1.13"
version: "${version}"
load: STARTUP
description: "Easy, yet powerful Plot World generation and management."
authors: [Citymonstret, Empire92, MattBDev, dordsor21, NotMyFault, SirYwell]
website: https://www.spigotmc.org/resources/77506/
softdepend: [Vault, PlaceholderAPI, Essentials, LuckPerms, BungeePerms, MVdWPlaceholderAPI]
loadbefore: [MultiWorld, Multiverse-Core]
depend: [WorldEdit]
database: false
commands:
plots:
description: Plot command.
aliases: [p,plot,ps,plotsquared,p2,2,plotme]
permission: plots.use
permission-message: "You are lacking the permission node 'plots.use'"
permissions:
plots.use:
default: true
plots.projectile.unowned:
default: op
plots.projectile.other:
default: op
plots.toggle.titles:
default: op
plots.toggle.chat:
default: op
plots.toggle.time:
default: op
plots.merge.other:
default: op
plots.merge.keeproad.denied:
default: op
plots.trust.everyone:
default: op
plots.area.create:
default: op
plots.area.info:
default: op
plots.area.list:
default: op
plots.area.regen:
default: op
plots.area.tp:
default: op
plots.auto.mega:
default: op
plots.continue:
default: op
plots.cluster.list:
default: op
plots.cluster.create:
default: op
plots.cluster.create.other:
default: op
plots.cluster.size:
default: op
plots.cluster.delete.other:
default: op
plots.cluster.resize:
default: op
plots.cluster.resize.other:
default: op
plots.cluster.resize.shrink:
default: op
plots.cluster.resize.expand:
default: op
plots.cluster:
default: op
plots.cluster.invite:
default: op
plots.cluster.invite.other:
default: op
plots.cluster.kick:
default: op
plots.cluster.kick.other:
default: op
plots.cluster.leave:
default: op
plots.cluster.tp:
default: op
plots.cluster.tp.other:
default: op
plots.cluster.sethome:
default: op
plots.cluster.sethome.other:
default: op
plots.cluster.command.continue:
default: op
plots.deny.everyone:
default: op
plots.download.world:
default: op
plots.set.flag.other:
default: op
plots.set:
default: op
plots.set.biome:
default: op
plots.set.alias:
default: op
plots.set.home:
default: op
plots.set.main:
default: op
plots.set.floor:
default: op
plots.set.air:
default: op
plots.set.all:
default: op
plots.set.border:
default: op
plots.set.wall:
default: op
plots.set.outline:
default: op
plots.set.middle:
default: op
plots.set.flag:
default: op
plots.flag.remove:
default: op
plots.flag.list:
default: op
plots.list.forsale:
default: op
plots.list.mine:
default: op
plots.list.shared:
default: op
plots.target:
default: op
plots.list.world:
default: op
plots.list.top:
default: op
plots.list.all:
default: op
plots.list.unowned:
default: op
plots.list.player:
default: op
plots.list.done:
default: op
plots.list.expired:
default: op
plots.list.fuzzy:
default: op
plots.list.area:
default: op
plots.comment:
default: op
plots.schematic.paste:
default: op
plots.schematic.list:
default: op
plots.schematic.save:
default: op
plots.visit.shared:
default: op
plots.visit.unowned:
default: op
plots.visit.owned:
default: op
plots.visit.other:
default: op
plots.visit.denied:
default: op
plots.home:
default: op
plots.alias.remove:
default: op
plots.backup:
default: op
plots.backup.save:
default: op
plots.backup.list:
default: op
plots.backup.load:
default: op
plots.rate:
default: op
plots.template.export:
default: op
plots.template.import:
default: op
plots.template:
default: op
plots.components:
default: op
plots.admin:
default: false
children:
plots.admin.command.continue: true
plots.admin.command.delete: true
plots.admin.command.deny: true
plots.admin.command.done: true
plots.admin.command.download: true
plots.admin.command.kick: true
plots.admin.command.load: true
plots.admin.command.merge: true
plots.admin.command.setowner: true
plots.admin.command.remove: true
plots.admin.command.save: true
plots.admin.command.schematic.paste: true
plots.admin.command.schematic.save: true
plots.admin.command.unlink: true
plots.admin.alias.set: true
plots.admin.alias.remove: true
plots.admin.chat.bypass: true
plots.admin.backup.other: true
plots.admin.unsafe: true
plots.admin.debug.other: true
plots.admin.area.sudo: true
plots.admin.interact.blockedcommands: true
plots.admin.update.notify: true
plots.admin.exit.denied: true
plots.admin.entry.denied: true
plots.admin.visit.untrusted: true
plots.admin.entry.forcefield: true
plots.admin.command.chatspy: true
plots.admin.caps.other: true
plots.admin.music.other: true
plots.admin.destroy.unowned: true
plots.admin.destroy.groundlevel: true
plots.admin.destroy.other: true
plots.admin.destroy.road: true
plots.admin.build.road: true
plots.admin.build.unowned: true
plots.admin.build.other: true
plots.admin.interact.road: true
plots.admin.interact.unowned: true
plots.admin.interact.other: true
plots.admin.build.heightlimit: true
plots.admin.command.purge.ratings: true
plots.admin.command.trust: true
plots.admin.command.add: true
plots.admin.info.force: true
plots.admin.command.schematic: true
plots.admin.command.clear: true
plots.admin.flight: true
plots.admin.command.blocked-cmds.shared: true
plots.admin.command.blocked-cmds.road: true
plots.admin.components.other: true
plots.admin.vehicle.break.unowned: true
plots.admin.pve.unowned: true
plots.admin.border.bypass: true
plots.teleport.delay.bypass:
default: op
plots.admin.border.bypass:
default: op
plots.worldedit.bypass:
default: op
plots.gamemode.bypass:
default: op
plots.confirm.bypass:
default: op
plots.flag.notify-enter.bypass:
default: op
plots.flag.notify-leave.bypass:
default: op
plots.permpack.basicflags:
default: false
children:
plots.set.flag: true
plots.flag: true
plots.flag.add: true
plots.flag.remove: true
plots.flag.list: true
plots.flag.info: true
plots.set.flag.titles: true
plots.set.flag.titles.*: true
plots.set.flag.description: true
plots.set.flag.greeting: true
plots.set.flag.farewell: true
plots.set.flag.notify-enter: true
plots.set.flag.notify-enter.*: true
plots.set.flag.notify-leave: true
plots.set.flag.notify-leave.*: true
plots.set.flag.feed: true
plots.set.flag.feed.*: true
plots.set.flag.heal: true
plots.set.flag.heal.*: true
plots.set.flag.invincible: true
plots.set.flag.invincible.*: true
plots.set.flag.instabreak: true
plots.set.flag.instabreak.*: true
plots.set.flag.fly: true
plots.set.flag.fly.*: true
plots.set.flag.gamemode: true
plots.set.flag.gamemode.creative: true
plots.set.flag.gamemode.survival: true
plots.set.flag.gamemode.adventure: true
plots.set.flag.time: true
plots.set.flag.weather: true
plots.set.flag.weather.*: true
plots.set.flag.music: true
plots.set.flag.music.*: true
plots.set.flag.disable-physics: true
plots.set.flag.disable-physics.*: true
plots.set.flag.pve: true
plots.set.flag.pve.*: true
plots.set.flag.pvp: true
plots.set.flag.pvp.*: true
plots.set.flag.explosion: true
plots.set.flag.explosion.*: true
plots.set.flag.hostile-interact: true
plots.set.flag.hostile-interact.*: true
plots.set.flag.hostile-attack: true
plots.set.flag.hostile-attack.*: true
plots.set.flag.player-interact: true
plots.set.flag.player-interact.*: true
plots.set.flag.animal-interact: true
plots.set.flag.animal-interact.*: true
plots.set.flag.animal-attack: true
plots.set.flag.animal-attack.*: true
plots.set.flag.tamed-interact: true
plots.set.flag.tamed-interact.*: true
plots.set.flag.tamed-attack: true
plots.set.flag.tamed-attack.*: true
plots.set.flag.misc-interact: true
plots.set.flag.misc-interact.*: true
plots.set.flag.hanging-place: true
plots.set.flag.hanging-place.*: true
plots.set.flag.hanging-break: true
plots.set.flag.hanging-break.*: true
plots.set.flag.vehicle-use: true
plots.set.flag.vehicle-use.*: true
plots.set.flag.vehicle-place: true
plots.set.flag.vehicle-place.*: true
plots.set.flag.vehicle-break: true
plots.set.flag.vehicle-break.*: true
plots.set.flag.place: true
plots.set.flag.place.*: true
plots.set.flag.break: true
plots.set.flag.break.*: true
plots.set.flag.use: true
plots.set.flag.use.*: true
plots.set.flag.forcefield: true
plots.set.flag.forcefield.*: true
plots.set.flag.price: true
plots.set.flag.no-worldedit: true
plots.set.flag.no-worldedit.*: true
plots.set.flag.titleflag.*: true
plots.permpack.basicinbox:
default: false
children:
plots.inbox.read.public: true
plots.inbox.modify.public: true
plots.inbox.write.public: true
plots.inbox.read.report: true
plots.inbox.write.report: true
plots.inbox.read.owner: true
plots.inbox.modify.owner: true
plots.inbox.write.owner: true
plots.comment: true
plots.inbox: true
plots.permpack.basic:
default: false
children:
plots.use: true
plots.info: true
plots.claim: true
plots.auto: true
plots.home: true
plots.clear: true
plots.delete: true
plots.music: true
plots.list: true
plots.list.mine: true
plots.list.shared: true
plots.list.world: true
plots.list.all: true
plots.list.forsale: true
plots.list.unowned: true
plots.set: true
plots.visit: true
plots.visit.owned: true
plots.visit.shared: true
plots.set.flag: true
plots.flag.add: true
plots.flag.remove: true
plots.flag.list: true
plots.flag.info: true
plots.flag: true
plots.buy: true
plots.chat: true
plots.confirm: true
plots.toggle: true
plots.toggle.titles: true
plots.toggle.chat: true
plots.toggle.time: true
plots.set.biome: true
plots.set.home: true
plots.alias.set: true
plots.alias.remove: true
plots.set.description: true
plots.description: true
plots.alias: true
plots.merge: true
plots.merge.other: true
plots.merge.4: true
plots.unlink: true
plots.denied: true
plots.add: true
plots.trust: true
plots.deny: true
plots.remove: true
plots.untrust: true
plots.undeny: true
plots.kick: true
plots.download: true
plots.save: true
plots.done: true
plots.continue: true
plots.middle: true

76
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at contact<at>intellectualsites.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

82
Core/build.gradle.kts Normal file
View File

@ -0,0 +1,82 @@
import java.time.format.DateTimeFormatter
dependencies {
// Expected everywhere.
compileOnlyApi("org.checkerframework:checker-qual")
// Minecraft expectations
compileOnlyApi("com.google.code.gson:gson")
compileOnly("com.google.guava:guava")
// Platform expectations
compileOnlyApi("org.yaml:snakeyaml")
// Adventure
api("net.kyori:adventure-api")
api("net.kyori:adventure-text-minimessage")
// Guice
api(libs.guice) {
exclude(group = "com.google.guava")
}
api(libs.guiceassistedinject) {
exclude("com.google.inject", "guice")
}
api(libs.spotbugs)
// Plugins
compileOnly(libs.worldeditCore) {
exclude(group = "bukkit-classloader-check")
exclude(group = "mockito-core")
exclude(group = "dummypermscompat")
}
testImplementation(libs.worldeditCore)
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core") { isTransitive = false }
testImplementation("com.fastasyncworldedit:FastAsyncWorldEdit-Core") { isTransitive = false }
// Logging
compileOnlyApi("org.apache.logging.log4j:log4j-api")
// Other libraries
api(libs.prtree)
api(libs.aopalliance)
api(libs.cloudServices)
api(libs.arkitektonika)
api("com.intellectualsites.paster:Paster")
api("com.intellectualsites.informative-annotations:informative-annotations")
}
tasks.processResources {
filesMatching("plugin.properties") {
expand(
"version" to project.version.toString(),
"commit" to rootProject.grgit.head().abbreviatedId,
"date" to rootProject.grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yy.MM.dd"))
)
}
doLast {
copy {
from(File("$rootDir/LICENSE"))
into("$buildDir/resources/main/")
}
}
}
tasks {
withType<Javadoc> {
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
val opt = options as StandardJavadocDocletOptions
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
opt.links("https://checkerframework.org/api/")
opt.links("https://javadoc.io/doc/com.intellectualsites.informative-annotations/informative-annotations/latest/")
opt.isLinkSource = true
opt.bottom(File("$rootDir/javadocfooter.html").readText())
opt.isUse = true
opt.encoding("UTF-8")
opt.keyWords()
opt.addStringOption("-since", isRelease)
}
}

View File

@ -0,0 +1,209 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.core;
import com.plotsquared.core.configuration.caption.Caption;
import com.plotsquared.core.configuration.caption.StaticCaption;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.queue.GlobalBlockQueue;
import com.plotsquared.core.util.ChunkManager;
import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.SchematicHandler;
import com.plotsquared.core.util.query.PlotQuery;
import net.kyori.adventure.text.minimessage.Template;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collections;
import java.util.Set;
import java.util.UUID;
/**
* PlotSquared API.
*
* <p>Useful classes:
* <ul>
* <li>{@link PlotPlayer}</li>
* <li>{@link Plot}</li>
* <li>{@link Location}</li>
* <li>{@link PlotArea}</li>
* <li>{@link PlotSquared}</li>
* </ul>
*
* @version 6
*/
@SuppressWarnings({"unused", "WeakerAccess"})
public class PlotAPI {
public PlotAPI() {
}
/**
* Gets all plots.
*
* @return all plots
*/
public @NonNull Set<@NonNull Plot> getAllPlots() {
return PlotQuery.newQuery().allPlots().asSet();
}
/**
* Gets all plots for a player.
*
* @param player Player, whose plots to search for
* @return all plots that a player owns
*/
public @NonNull Set<@NonNull Plot> getPlayerPlots(final @NonNull PlotPlayer<?> player) {
return PlotQuery.newQuery().ownedBy(player).asSet();
}
/**
* Adds a plot world.
*
* @param plotArea Plot World Object
* @see PlotSquared#addPlotArea(PlotArea)
*/
public void addPlotArea(final @NonNull PlotArea plotArea) {
PlotSquared.get().addPlotArea(plotArea);
}
/**
* ChunkManager class contains several useful methods.
* <ul>
* <li>Chunk deletion</li>
* <li>Moving or copying regions</li>
* <li>Plot swapping</li>
* <li>Entity Tracking</li>
* <li>Region Regeneration</li>
* </ul>
*
* @return ChunkManager
* @see ChunkManager
*/
public @NonNull ChunkManager getChunkManager() {
return PlotSquared.platform().injector().getInstance(ChunkManager.class);
}
/**
* Gets the block/biome set queue
*
* @return GlobalBlockQueue.IMP
*/
public @NonNull GlobalBlockQueue getBlockQueue() {
return PlotSquared.platform().globalBlockQueue();
}
/**
* SchematicHandler class contains methods related to pasting, reading
* and writing schematics.
*
* @return SchematicHandler
* @see SchematicHandler
*/
public @NonNull SchematicHandler getSchematicHandler() {
return PlotSquared.platform().injector().getInstance(SchematicHandler.class);
}
/**
* Gets a list of PlotAreas in the world.
*
* @param world The world to check for plot areas
* @return A set of PlotAreas
*/
public @NonNull Set<@NonNull PlotArea> getPlotAreas(final @Nullable String world) {
if (world == null) {
return Collections.emptySet();
}
return PlotSquared.get().getPlotAreaManager().getPlotAreasSet(world);
}
/**
* Send a message to the console. The message supports color codes.
*
* @param message the message
* @param replacements Variable replacements
*/
public void sendConsoleMessage(
final @NonNull String message,
final @NonNull Template @NonNull ... replacements
) {
ConsolePlayer.getConsole().sendMessage(StaticCaption.of(message), replacements);
}
/**
* Sends a message to the console.
*
* @param caption the message
* @param replacements Variable replacements
*/
public void sendConsoleMessage(
final @NonNull Caption caption,
final @NonNull Template @NonNull ... replacements
) {
ConsolePlayer.getConsole().sendMessage(caption, replacements);
}
/**
* Gets the PlotSquared class.
*
* @return PlotSquared Class
* @see PlotSquared
*/
public @NonNull PlotSquared getPlotSquared() {
return PlotSquared.get();
}
/**
* Gets the PlotPlayer for a UUID.
*
* <p><i>Please note that PlotSquared can be configured to provide
* different UUIDs than Bukkit</i>
*
* @param uuid the uuid of the player to wrap
* @return a {@link PlotPlayer}
*/
public @Nullable PlotPlayer<?> wrapPlayer(final @NonNull UUID uuid) {
return PlotSquared.platform().playerManager().getPlayerIfExists(uuid);
}
/**
* Gets the PlotPlayer for a username.
*
* @param player the player to wrap
* @return a {@link PlotPlayer}
*/
public @Nullable PlotPlayer<?> wrapPlayer(final @NonNull String player) {
return PlotSquared.platform().playerManager().getPlayerIfExists(player);
}
/**
* Registers a listener for PlotSquared Events
*
* @param listener the listener class to register
* @see EventDispatcher#registerListener(Object)
*/
public void registerListener(final @NonNull Object listener) {
PlotSquared.get().getEventDispatcher().registerListener(listener);
}
}

View File

@ -0,0 +1,379 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.core;
import cloud.commandframework.services.ServicePipeline;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.TypeLiteral;
import com.intellectualsites.annotations.DoNotUse;
import com.plotsquared.core.backup.BackupManager;
import com.plotsquared.core.configuration.caption.LocaleHolder;
import com.plotsquared.core.generator.GeneratorWrapper;
import com.plotsquared.core.generator.HybridUtils;
import com.plotsquared.core.generator.IndependentPlotGenerator;
import com.plotsquared.core.inject.annotations.DefaultGenerator;
import com.plotsquared.core.location.World;
import com.plotsquared.core.permissions.PermissionHandler;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.expiration.ExpireManager;
import com.plotsquared.core.plot.world.PlotAreaManager;
import com.plotsquared.core.queue.GlobalBlockQueue;
import com.plotsquared.core.util.ChunkManager;
import com.plotsquared.core.util.EconHandler;
import com.plotsquared.core.util.PlatformWorldManager;
import com.plotsquared.core.util.PlayerManager;
import com.plotsquared.core.util.RegionManager;
import com.plotsquared.core.util.SetupUtils;
import com.plotsquared.core.util.WorldUtil;
import com.plotsquared.core.util.placeholders.PlaceholderRegistry;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.text.Component;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.io.File;
/**
* PlotSquared main utility class
*
* @param <P> Player type
*/
public interface PlotPlatform<P> extends LocaleHolder {
/**
* Gets the directory which contains PlotSquared files. The directory may not exist.
*
* @return the PlotSquared directory
*/
@NonNull File getDirectory();
/**
* Gets the folder where all world data is stored.
*
* @return the world folder
*/
@NonNull File worldContainer();
/**
* Completely shuts down the plugin.
*/
void shutdown();
/**
* Completely shuts down the server.
*/
void shutdownServer();
/**
* Get the name of the plugin
*
* @return Plugin name
*/
default @NonNull String pluginName() {
return "PlotSquared";
}
/**
* Gets the version of Minecraft that is running
*
* @return server version as array of numbers
*/
int[] serverVersion();
/**
* Gets the default minimum world height for the version of Minecraft that the server is running.
*
* @return minimum world height
* @since 6.6.0
*/
int versionMinHeight();
/**
* Gets the default maximum world height for the version of Minecraft that the server is running.
*
* @return maximum world height (inclusive)
* @since 6.6.0
*/
int versionMaxHeight();
/**
* Gets the server implementation name and version
*
* @return server implementation and version as string
*/
@NonNull String serverImplementation();
/**
* Gets the native server code package prefix.
*
* @return The package prefix
*/
@NonNull String serverNativePackage();
/**
* Start Metrics.
*/
void startMetrics();
/**
* If a world is already loaded, set the generator (use NMS if required).
*
* @param world The world to set the generator
*/
void setGenerator(@NonNull String world);
/**
* Unregisters a {@link PlotPlayer} from cache e.g. if they have logged off.
*
* @param player the player to remove
*/
void unregister(@NonNull PlotPlayer<?> player);
/**
* Gets the generator wrapper for a world (world) and generator (name).
*
* @param world The world to get the generator from
* @param name The name of the generator
* @return The generator being used for the provided world
*/
@Nullable GeneratorWrapper<?> getGenerator(
@NonNull String world,
@Nullable String name
);
/**
* Create a platform generator from a plot generator
*
* @param world World name
* @param generator Plot generator
* @return Platform generator wrapper
*/
@NonNull GeneratorWrapper<?> wrapPlotGenerator(
@NonNull String world,
@NonNull IndependentPlotGenerator generator
);
/**
* Usually HybridGen
*
* @return Default implementation generator
*/
default @NonNull IndependentPlotGenerator defaultGenerator() {
return injector().getInstance(Key.get(IndependentPlotGenerator.class, DefaultGenerator.class));
}
/**
* Get the backup manager instance
*
* @return Backup manager
*/
default @NonNull BackupManager backupManager() {
return injector().getInstance(BackupManager.class);
}
/**
* Get the platform specific world manager
*
* @return World manager
*/
default @NonNull PlatformWorldManager<?> worldManager() {
return injector().getInstance(PlatformWorldManager.class);
}
/**
* Get the player manager implementation for the platform
*
* @return Player manager
*/
default @NonNull PlayerManager<? extends PlotPlayer<P>, ? extends P> playerManager() {
return injector().getInstance(Key.get(new TypeLiteral<PlayerManager<? extends PlotPlayer<P>, ? extends P>>() {
}));
}
/**
* Get a platform world wrapper from a world name
*
* @param worldName World name
* @return Platform world wrapper
*/
@Nullable World<?> getPlatformWorld(@NonNull String worldName);
/**
* Get the {@link com.google.inject.Injector} instance used by PlotSquared
*
* @return Injector instance
*/
@NonNull Injector injector();
/**
* Get the world utility implementation
*
* @return World utility
*/
default @NonNull WorldUtil worldUtil() {
return injector().getInstance(WorldUtil.class);
}
/**
* Get the global block queue implementation
*
* @return Global block queue implementation
*/
default @NonNull GlobalBlockQueue globalBlockQueue() {
return injector().getInstance(GlobalBlockQueue.class);
}
/**
* Get the {@link HybridUtils} implementation for the platform
*
* @return Hybrid utils
*/
default @NonNull HybridUtils hybridUtils() {
return injector().getInstance(HybridUtils.class);
}
/**
* Get the {@link SetupUtils} implementation for the platform
*
* @return Setup utils
*/
default @NonNull SetupUtils setupUtils() {
return injector().getInstance(SetupUtils.class);
}
/**
* Get the {@link EconHandler} implementation for the platform
*
* @return Econ handler
*/
default @NonNull EconHandler econHandler() {
return injector().getInstance(EconHandler.class);
}
/**
* Get the {@link RegionManager} implementation for the platform
*
* @return Region manager
*/
default @NonNull RegionManager regionManager() {
return injector().getInstance(RegionManager.class);
}
/**
* Get the {@link ChunkManager} implementation for the platform
*
* @return Region manager
*/
default @NonNull ChunkManager chunkManager() {
return injector().getInstance(ChunkManager.class);
}
/**
* Get the {@link ExpireManager} implementation for the platform
*
* @return Expire manager
* @since 6.10.2
*/
default @NonNull ExpireManager expireManager() {
return injector().getInstance(ExpireManager.class);
}
/**
* Get the {@link PlotAreaManager} implementation.
*
* @return the PlotAreaManager
* @since 6.1.4
*/
@NonNull PlotAreaManager plotAreaManager();
/**
* Get the platform specific console {@link Audience}
*
* @return Console audience
*/
@NonNull Audience consoleAudience();
/**
* Get a formatted string containing all plugins on the server together
* with plugin metadata. Mainly for use in debug pastes
*
* @return Formatted string
*/
@NonNull String pluginsFormatted();
/**
* Get the kind of WorldEdit implementation
*
* @return worldedit implementations
* @since 6.3.0
*/
@DoNotUse
@NonNull String worldEditImplementations();
/**
* Load the caption maps
*/
void copyCaptionMaps();
/**
* Get the {@link PermissionHandler} implementation for the platform
*
* @return Permission handler
*/
default @NonNull PermissionHandler permissionHandler() {
return injector().getInstance(PermissionHandler.class);
}
/**
* Get the {@link ServicePipeline} implementation
*
* @return Service pipeline
*/
default @NonNull ServicePipeline servicePipeline() {
return injector().getInstance(ServicePipeline.class);
}
/**
* Get the {@link PlaceholderRegistry} implementation
*
* @return Placeholder registry
*/
default @NonNull PlaceholderRegistry placeholderRegistry() {
return injector().getInstance(PlaceholderRegistry.class);
}
/**
* Convert a component to a legacy string
*
* @param component Component to convert
* @return Converted string
*/
@NonNull String toLegacyPlatformString(@NonNull Component component);
/**
* Returns if the FastAsyncWorldEdit-PlotSquared hook is active/enabled
*
* @return status of FastAsyncWorldEdit-PlotSquared hook
*/
default boolean isFaweHooking() {
return false;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,153 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.core;
import org.checkerframework.checker.nullness.qual.NonNull;
public final class PlotVersion {
public final int year, month, day, hash;
public final String versionString;
public final int[] version;
public final String suffix;
public PlotVersion(
final int year,
final int month,
final int day,
final int hash,
final String rawVersion
) {
String versionString = rawVersion;
this.year = year;
this.month = month;
this.day = day;
this.hash = hash;
int dash = versionString.indexOf('-');
if (dash != -1) {
suffix = versionString.substring(dash);
versionString = versionString.substring(0, dash);
} else {
suffix = "";
}
this.versionString = versionString.substring(versionString.indexOf('=') + 1);
version = new int[3];
String[] verArray = versionString.substring(versionString.indexOf('=') + 1).split("\\.");
version[0] = verArray.length > 0 ? Integer.parseInt(verArray[0]) : 0;
version[1] = verArray.length > 1 ? Integer.parseInt(verArray[1]) : 0;
version[2] = verArray.length > 2 ? Integer.parseInt(verArray[2]) : 0;
}
public PlotVersion(
final String rawVersion,
final String commit,
final String date
) {
String versionString = rawVersion;
int dash = versionString.indexOf('-');
if (dash != -1) {
suffix = versionString.substring(dash);
versionString = versionString.substring(0, dash);
} else {
suffix = "";
}
this.versionString = versionString.substring(versionString.indexOf('=') + 1);
version = new int[3];
String[] verArray = this.versionString.split("\\.");
version[0] = verArray.length > 0 ? Integer.parseInt(verArray[0]) : 0;
version[1] = verArray.length > 1 ? Integer.parseInt(verArray[1]) : 0;
version[2] = verArray.length > 2 ? Integer.parseInt(verArray[2]) : 0;
this.hash = Integer.parseInt(commit.substring(commit.indexOf('=') + 1), 16);
String[] split1 = date.substring(date.indexOf('=') + 1).split("\\.");
this.year = Integer.parseInt(split1[0]);
this.month = Integer.parseInt(split1[1]);
this.day = Integer.parseInt(split1[2]);
}
public static @NonNull PlotVersion tryParse(
final @NonNull String versionString,
final @NonNull String commit,
final @NonNull String date
) {
try {
return new PlotVersion(versionString, commit, date);
} catch (Exception e) {
e.printStackTrace();
return new PlotVersion(0, 0, 0, 0, "0");
}
}
public @NonNull String versionString() {
if (hash == 0 && versionString == null) {
return "NoVer-SNAPSHOT";
} else {
return versionString + suffix;
}
}
@Override
public String toString() {
if (hash == 0 && versionString == null) {
return "PlotSquared-NoVer-SNAPSHOT";
} else {
return "PlotSquared-" + versionString + suffix;
}
}
/**
* Compare a given version string with the one cached here.
*
* @param versionString the version to compare
* @return {@code true} if the given version is a "later" version
*/
public boolean isLaterVersion(final @NonNull String versionString) {
int dash = versionString.indexOf('-');
String[] verArray =
versionString.substring(0, dash == -1 ? versionString.length() : dash).split("\\.");
int one = Integer.parseInt(verArray[0]);
int two = Integer.parseInt(verArray[1]);
int three = Integer.parseInt(verArray[2]);
if (one > version[0]) {
return true;
} else if (one == version[0] && two > version[1]) {
return true;
} else {
return one == version[0] && two == version[1] && three > version[2];
}
}
/**
* Compare a given version with the one cached here.
*
* @param verArray the version to compare
* @return {@code true} if the given version is a "later" version
*/
public boolean isLaterVersion(int[] verArray) {
if (verArray[0] > version[0]) {
return true;
} else if (verArray[0] == version[0] && verArray[1] > version[1]) {
return true;
} else {
return verArray[0] == version[0] && verArray[1] == version[1]
&& verArray[2] > version[2];
}
}
}

View File

@ -0,0 +1,69 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.core.backup;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
/**
* Object representing a plot backup. This does not actually contain the
* backup itself, it is just a pointer to an available backup
*/
public class Backup {
private final BackupProfile owner;
private final long creationTime;
@Nullable
private final Path file;
Backup(final BackupProfile owner, final long creationTime, final Path file) {
this.owner = owner;
this.creationTime = creationTime;
this.file = file;
}
/**
* Delete the backup
*/
public void delete() {
if (file != null) {
try {
Files.deleteIfExists(file);
} catch (final IOException e) {
e.printStackTrace();
}
}
}
public BackupProfile getOwner() {
return this.owner;
}
public long getCreationTime() {
return this.creationTime;
}
public @Nullable Path getFile() {
return this.file;
}
}

View File

@ -0,0 +1,88 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.core.backup;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.nio.file.Path;
import java.util.Objects;
public interface BackupManager {
/**
* This will perform an automatic backup of the plot iff the plot has an owner,
* automatic backups are enabled.
* Otherwise it will complete immediately.
*
* @param player Player that triggered the backup
* @param plot Plot to perform the automatic backup on
* @param whenDone Action that runs when the automatic backup has been completed
*/
static void backup(@Nullable PlotPlayer<?> player, final @NonNull Plot plot, @NonNull Runnable whenDone) {
Objects.requireNonNull(PlotSquared.platform()).backupManager().automaticBackup(player, plot, whenDone);
}
/**
* Get the backup profile for a plot based on its
* current owner (if there is one)
*
* @param plot Plot to get the backup profile for
* @return Backup profile
*/
@NonNull BackupProfile getProfile(final @NonNull Plot plot);
/**
* This will perform an automatic backup of the plot iff the plot has an owner,
* automatic backups are enabled.
* Otherwise it will complete immediately.
*
* @param player Player that triggered the backup
* @param plot Plot to perform the automatic backup on
* @param whenDone Action that runs when the automatic backup has been completed
*/
void automaticBackup(@Nullable PlotPlayer<?> player, final @NonNull Plot plot, @NonNull Runnable whenDone);
/**
* Get the directory in which backups are stored
*
* @return Backup directory path
*/
@NonNull Path getBackupPath();
/**
* Get the maximum amount of backups that may be stored for
* a plot-owner combo
*
* @return Backup limit
*/
int getBackupLimit();
/**
* Returns true if (potentially) destructive actions should cause
* PlotSquared to create automatic plot backups
*
* @return {@code true} if automatic backups are enabled
*/
boolean shouldAutomaticallyBackup();
}

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