- 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
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.
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.
- 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
- 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
- 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
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."
* 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>
* 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>
* 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>
* 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>
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.
* 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
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.
* 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
* 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