Commit Graph

1151 Commits

Author SHA1 Message Date
dordsor21
9081a5aff6 Fix incorrectly formatted biomes in worlds.yml automagically 2020-04-22 08:22:14 +01: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
ffee7a518e update default biome to match format WorldEdit accepts. 2020-04-21 09:16:02 +01: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
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
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
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
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]
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
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
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
e6c76ad3f3 Entity categories implementation 2020-04-11 21:49:08 +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
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
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
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
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
271109a726 Fix dumdum async getLoadedChunks call, but only because Aikar broke everything. 2020-04-08 21:49:41 +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
bc45b8b695 Merge branch 'features/v5/internal-updates' into features/v5/async-load 2020-04-08 17:17:17 +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
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
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
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
NotMyFault
f2aa9dccd1 Revert "Remove unused code"
This reverts commit 6d779dad05.
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
6d779dad05 Remove unused code
Or at least I made it unused lul
2020-02-20 00:39:32 +01:00