-
-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branch will remove TownBlockLists saving/loading, remove TownBlocks from TownyWorld, add TownBlocks to Town and TownyUniverse. #3838
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TownyAPI.getInstance().getTownBlock(location).
Towny parses the entire towny\data\townblocks\ folder to create a ConcurrentHashMap in TownyUniverse (probably just temporary for now.) Towny then loads individual TownBlocks from that list, and stores them in the towns. Saving the townblocklist is now done on a per-town basis, only doing the full batch on saveAll().
Continuing on with removing TownBlockLists, ending TownBlocks being tracked per-TownyWorld, adding TownBlocks being tracked per-Town. - Add TownyAPI.isWilderness(WorldCoord worldCoord) method. - Flesh out methods in TownyUniverse for maintaining the global townblocks hashmap. - Remove all traces of saveTownBlockList() and saveTownBlockList(Town town). - Remove extra townblock removal methods from TownyDatabaseHandler (removeOneOfManyTownBlocks(), removeManyTownBlocks()) - Remove deprecated methods used to update ancient Towny databases that still stored TownBlocks in the town and resident files. - (utilLoadTownBlocks(), utilLoadTownBlockTypeData(), utilSaveTownBlocks() - Replaced the Town's List<TownBlock> with ConcurrentHashMap<WorldCoord, TownBlock>. - Removed TownyWorld's ConcurrentHashMap<Coord, TownBlock> townBlocks, with all methods forwarding to TownyUniverse or otherwise handling things.
database/townblocks_update Conflicts: src/com/palmergames/bukkit/towny/command/TownCommand.java src/com/palmergames/bukkit/towny/db/TownyFlatFileSource.java src/com/palmergames/bukkit/towny/object/TownyWorld.java
- Removed Town and TownyUniverse newTownBlock() methods. - Added addTownBlock() to TownyUniverse for populating the TownyUniverse townBlocks ConcurrentHashMap. - Added townBlocks CHM to TownyUniverse.clearAll() to fix /ta reload. - Alter TownCommand.newTown() to reflect change to making new TownBlocks, sorted out needless setting of the homeblock. - Call TownyUniverse.removeTownBlock() directly from DataSource.removeTownBlock(), to begin removal of TownBlocks from towns and then the database. - Alter Flatfile & SQLSource loadTownBlockList(), we now create a new TownBlock object with a null town and then add it to the TownyUniverse townBlock CHM. - Town is taken care of later on in the loading process when each TownBlock is loaded. - Bit of reodering in the Town object for manipulating the Town townBlock CHM. - TownClaimTask has had it's townClaim slightly simplified.
- Minor changes to things, mainly moving more TownBlock lookup calls from pointing to TownyWorld, via the API/TownyUniverse.
- On deletion of a townblock file, try to move it to towny\data\townblocks\worldname\deleted\townname\ - Should make it easier to recover town's townblocks if something does go wrong.
flatfile to mysql.
…sion from flatfile to mysql." This reverts commit fab063b.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This Branch will accomplish a number of things, most importantly:
New Nodes/Commands/ConfigOptions:
None.
Relevant Towny Issue ticket:
All of the tickets in the Disappearing Townblocks project.
#3783 #3796 #3813 #3821 #3844
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.