Commit Graph

1273 Commits

Author SHA1 Message Date
Traks
d7c2ab1d16
Make farmland keep its moisture (#3952)
Handle MoistureChangeEvent for farm land
2023-01-31 11:22:13 +01:00
Alexander Brandes
586474c8e6
Merge branch 'v6' into v7 2023-01-23 13:40:52 +01:00
Alexander Brandes
ab357deb48
Put more legacy web interface deprecations in place 2023-01-23 13:40:35 +01:00
Alexander Brandes
bb0f200429
Merge branch 'v6' into v7 2023-01-23 13:18:28 +01:00
Alexander Brandes
5787588500
Move BukkitPlotGenerator#generateChunkData() deprecation from v7 to v6 2023-01-23 13:18:20 +01:00
Alexander Brandes
bed62edc02
Resolved conflicts 2023-01-23 13:03:26 +01:00
Alexander Brandes
ee0f389c78
Merge branch 'v6' into v7 2023-01-23 13:01:48 +01:00
Alexander Brandes
be8903128d
Release 6.10.9 2023-01-23 12:28:33 +01:00
Jordan
5af8be4293
chore: Remove things marked as for removal (#3941)
* chore: Remove things marked as for removal

* Address feedback

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-01-21 16:44:28 +01:00
dordsor21
746028afbc
*Actually clean up 2023-01-17 13:25:46 +00:00
dordsor21
6efd581500
Merge branch 'v6' into v7
# Conflicts:
#	.github/workflows/codeql.yml
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java
#	Bukkit/src/main/java/com/plotsquared/bukkit/listener/ProjectileEventListener.java
#	Core/src/main/java/com/plotsquared/core/command/Add.java
#	Core/src/main/java/com/plotsquared/core/command/Caps.java
#	Core/src/main/java/com/plotsquared/core/command/Cluster.java
#	Core/src/main/java/com/plotsquared/core/command/Continue.java
#	Core/src/main/java/com/plotsquared/core/command/Copy.java
#	Core/src/main/java/com/plotsquared/core/command/Save.java
#	Core/src/main/java/com/plotsquared/core/command/Visit.java
#	Core/src/main/java/com/plotsquared/core/plot/Plot.java
#	build.gradle.kts
2023-01-17 11:51:39 +00:00
Jordan
f6f00dfcda
fix: Remove chunk#isLoaded call in BukkitChunkCoordinator (#3934) 2023-01-16 17:14:20 +00: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
Jordan
39d2f1a72c
chore: remove uses of deprecated Permissions class and add javadoc notes (#3930)
- Closes #3907
2023-01-15 14:08:59 +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
Alexander Brandes
a12490c3eb
Fixes #3919 2023-01-09 23:50:13 +01:00
Alexander Brandes
7135bdd6aa
Fix compile errors 2023-01-08 10:36:41 +01:00
Alexander Brandes
3198c3b081
Merge branch 'v6' into v7 2023-01-08 10:20:15 +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
Jordan
f3bc504a6f
refactor: adjust specific Nullable annotations used (#3869) 2022-12-02 12:39:38 +00: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
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
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
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
BlockyTheDev
d5445cfbef
Don't kill owned road entities (leashed / named) (#3829) 2022-10-10 17:41:25 +01:00
Hannes Greule
49b19e0eaf
Check proper locations on PortalCreateEvent (#3834)
check proper locations on PortalCreateEvent
2022-10-08 15:13:11 +02:00
StealWonders
5786e8cc7a
refactor: replace guava's Iterables with Java's stream API (#3823) 2022-10-03 21:51:05 +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
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
Pierre Maurice Schwang
986812b9e4
chore: make snow set more future-proof (#3768) 2022-08-19 13:41:04 +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
Traks
3b747ffecf
Don't allow wall corals to dry (#3746) 2022-07-29 23:00:55 +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
Traks
4d4d2ab087
Ignore cancelled projectile launch events (#3709) 2022-06-28 21:15:09 +02:00
dordsor21
c0bfa297bb
Ensure use of new generation methods only on 1.19 and above 2022-06-27 17:40:46 +01:00
Jordan
75fd9b2631
Update to new Spigot generation API (#3659)
* Address deprecations in queue/generation code

* Move to new generation API
 - Currently not working due to lack of biome-setting capability via BiomeProvider for flat worlds

* Any fixes to flat world biome setting will target 1.19

* Ensure compiled is actually set to true in BlockBucket

* Delegate to platformGenerator in deprecated generation method if applicable when using new generation methods (1.19)

* Re-add wrongly removed method

* Handle exceptions using logger

* We can simplify getting relative offset using floormod

* Replace many booleans with EnumSet

* Address comments, remove needless boolean return for populateChunk
2022-06-22 14:57:39 +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
Alexander Brandes
6b680fb2c0
Merge v6/v7 2022-06-21 11:00:53 +02:00
Hannes Greule
6a54328f7d
refactor: replace usages of switch over keyed enums (#3673) 2022-06-19 00:59:43 +01:00
Jordan
27ffe4fcdc
Address deprecations in queue/generation code (#3658) 2022-06-16 15:41:03 +01:00
dordsor21
c83b13e374
Merge branch 'v6' into v7
# Conflicts:
#	Core/src/main/java/com/plotsquared/core/command/Chat.java
#	Core/src/main/java/com/plotsquared/core/command/Save.java
#	Core/src/main/java/com/plotsquared/core/configuration/caption/Templates.java
#	Core/src/main/java/com/plotsquared/core/plot/PlotArea.java
#	Core/src/main/java/com/plotsquared/core/util/MainUtil.java
#	Core/src/main/java/com/plotsquared/core/util/RegExUtil.java
#	build.gradle.kts
#	gradle/libs.versions.toml
2022-06-16 15:25:33 +01:00
Alexander Brandes
3d5c694daa
chore: Comply with OSSRH licensing guidelines (#3684) 2022-06-15 20:17:17 +02:00
Jordan
23360057b9
Chore: General deprecations (#3660)
Address deprecations for removal throughout the plugin
2022-06-13 23:45:27 +02:00
Alexander Brandes
d08381dfed
build: Release 6.9.0 2022-06-13 11:23:48 +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
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
09cc59a1c1
docs: Unify WE, P2 and Fawe abbreviations (#3672) 2022-06-11 16:16:06 +02:00
Alexander Brandes
26c0c1b7cd
Merge branch 'v6' into v7 2022-06-11 14:11:25 +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
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
Alexander Brandes
764c94c9cc
Merge branch 'v6' into v7 2022-06-10 01:14:09 +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
396a1575d2
Merge branch 'v6' into v7 2022-05-18 22:13:29 +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
Alexander Brandes
b53d2d03a4
Merge branch 'v6' into v7 2022-05-15 15:41:17 +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
Pierre Maurice Schwang
62ee60a76c
Update MiniMessage to 4.10.1 (#3617)
* chore!: bump MiniMessage to 4.10.1

BREAKING CHANGE: bumping MiniMessage and Adventure removes the adventure Template class and breaks the whole messaging system api wise

* chore: fix minimessage messages, fix circular method reference
2022-05-14 17:05:28 +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
dordsor21
13d7357c85
Niceties
- Better ordering of augmented information printed to consol on startup
 - Override
2022-05-10 01:43:01 +01: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
Hannes Greule
dc5c80d812
clean up PlayerCommandPreprocess listener (#3557) 2022-04-01 19:30:37 +02: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
dordsor21
5f233bb5d1 Use new FAWE method including actor for schematic pasting 2022-03-09 16:31:33 +01:00
NotMyFault
fd4a542062
build: Release 6.6.0 2022-03-07 15:35:00 +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
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
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
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
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
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
Alex
ff5d79699d
docs: Add @since annotation for v6 changes (#3471) 2022-01-24 21:46:01 +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
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
Alex
d14d2caa2d
refactor: Prepare removal of our maven repository (#3451) 2022-01-13 14:50:07 +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
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
Jordan
31f48cc7d1
Fix: 1.18 uses the same field as 1.17 for mustNotSave (#3428) 2022-01-05 21:22:09 +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
NotMyFault
25095f4546
chore: Welcome 2022 2022-01-02 22:22:19 +01:00
Yannick Lamprecht
9f4af889f7
fix: npe thrown in entity spawn listener (#3399) 2021-12-27 11:01:28 +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