Commit Graph

1414 Commits

Author SHA1 Message Date
3ee29297e0 Add option to force plot chat in plot areas. 2020-04-16 16:55:14 +01:00
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
ee2ed8222d Merge config packages 2020-04-16 06:14:33 +02:00
edaf396894 Merge features/v5/internal-updates into api/v5/packages 2020-04-16 06:11:03 +02:00
6f052f0001 Remove extra line from HEADER 2020-04-16 05:05:58 +02:00
ba40a56c32 Add GPLv3 License headers to all source files. 2020-04-16 04:52:39 +02:00
780be3776a Addressed some comments 2020-04-15 15:26:54 -04:00
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
5772af37fe Reclassify shulker as a hostile mob 2020-04-12 04:46:51 +02:00
6324bb1134 Use entity categories in events 2020-04-12 01:47:56 +02:00
658f2a3fc3 Finalize entity type categorisation 2020-04-12 01:23:13 +02:00
6e536f81ac Add more entity categories 2020-04-12 00:57:50 +02:00
dd9450d36a Add entity category loading code to WorldUtil (implemented in BukkitUtil) 2020-04-11 22:26:31 +02:00
4a249843eb Workaround to accept Slimes and EnderDragons as Monsters 2020-04-11 21:42:52 +02:00
5c1f0f51df Add a custom bStats chart tracking terrain types 2020-04-11 20:56:34 +02:00
2377ce1123 Relocate metrics properly 2020-04-11 19:52:45 +02:00
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
6c1caac731 Rename jar from BukkitAPI to Bukkit 2020-04-11 02:57:00 +02:00
9c3c42c3e6 Rename published maven artifacts
# Conflicts:
#	Bukkit/build.gradle
#	Core/build.gradle
2020-04-11 02:54:34 +02:00
5fc33dcc06 Rename published maven artifacts 2020-04-11 02:39:02 +02:00
dfa977a020 Moved more packaged based on feedback 2020-04-10 20:19:18 -04:00
5be2dfa747 Package Changes 2020-04-10 19:26:07 -04:00
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
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
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
0d26111fa7 Include golems (snowmen, iron golems and shulkers) in the animal-interact flag. 2020-04-09 21:38:24 +02:00
f717589074 Fix typo in MainUtil and switch out Consumer<Integer> to IntConsumer 2020-04-09 11:23:39 +02:00
254a0541cc Fix OfflinePlayerUtil runtime exception 2020-04-08 22:52:13 +02:00
271109a726 Fix dumdum async getLoadedChunks call, but only because Aikar broke everything. 2020-04-08 21:49:41 +02:00
38de74c4ff Make sure PlayerEvents#logout is called 2020-04-08 17:53:11 +02:00
ebba9a2290 Fix interval flags 2020-04-08 17:22:53 +02:00
bc45b8b695 Merge branch 'features/v5/internal-updates' into features/v5/async-load 2020-04-08 17:17:17 +02:00
7ac389b698 Fix block ignition location check 2020-04-08 17:15:17 +02:00
616d22ceac Fix liquid-flow 2020-04-08 17:01:41 +02:00
ef04ed9151 Fix augmented generation 2020-04-08 04:10:22 +02:00
1522632f5a Don't replace blocks if they have identical states already 2020-04-08 02:02:20 +02:00
be6bcafccc Make sure augmented generation doesn't crash the server 2020-04-08 01:23:22 +02:00
283ff945f3 Fix /plot auto performance and remove sign-guessing 2020-04-07 23:39:56 +02:00
7fdb7961ce Merge branch 'features/v5/internal-updates' into features/v5/async-load 2020-04-07 22:13:42 +02:00
5e2e4a8631 Revert testCreate change 2020-04-07 21:43:32 +02:00
e4a6bd0ca5 Don't try to remove players. Fixes #2742. 2020-04-07 20:56:43 +02:00
5547185b3f Prevent synchronous chunk loading whenever possible 2020-04-07 20:19:39 +02:00
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
3a3a06631d Add coral-dry flag 2020-03-25 21:14:58 +01:00
412a3ee344 Support v2 schematics properly. No 3D biomes are supported by it as yet. (#2716) 2020-03-24 09:08:56 +01:00
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
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
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
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
b99631f1bd Fix regen. Fixes #2692 2020-02-24 14:00:45 +01:00