Skip to content

Commit

Permalink
Merge pull request #239 from PrisonTeam/bleeding_branch_v3.3.0-alpha.13
Browse files Browse the repository at this point in the history
Bleeding branch v3.3.0 alpha.13
  • Loading branch information
rbluer authored Aug 28, 2022
2 parents 150e6dc + eef4c92 commit 038b935
Show file tree
Hide file tree
Showing 114 changed files with 8,330 additions and 2,171 deletions.
322 changes: 321 additions & 1 deletion docs/changelog_v3.3.x.md

Large diffs are not rendered by default.

103 changes: 98 additions & 5 deletions docs/knownissues_v3.3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,57 @@



# TODO Items for v3.3.0-alpha.11
# TODO Items for v3.3.0-alpha.13


- In the GUI menu, the config setting: Enchantment_effect_current_rank is off by 1. If D rank it shows E being unlocked. - CITYJD


- Add `*all*` to `/mines set notification` - CITYJD


- Auto-Forced-Rankups and prestiges when the player has enough money. Kikiisyourfriend
- a new autoFeatures entry

- Enable Access to prior mines - kikiisyourfriend
- disable to prevent going back to prior rank mines.


- DONE: prison_rank__linked_mines_rankname prison_r_lm_rankname provide a placeholder for the mine's tags. B0mer


- DONE: Mines tp: option to list all available mines per rank? Thaysa


- bStats:
- DONE: Remove Plugins & Prison Ladders
- DONE: Add: modules, Economy (integrations), Perms (integrations), Placeholder (intg)
- DONE: Add: Language
-


- `/ranks player` is not including all of the info for rank multipliers like it should have.
- add them
- List total rank multiplier. Show the multiplier per ladder.



- Custom mine shapes - Chain / darragh



- admin - prevent you breaking mine liners - me... on other people's servers. lol


- It looks like the following text field is no longer being used, but it should with the placeholders `prison_mines_timeleft_minename` ... looks like it's using the long version. May want to provide a short and long format? Long (the current default) may be way too long...
`core_text__time_units_short=y,m,w,d,h,m,s`

- There is a potential error with the class tech.mcprison.prison.util.TextMessage in that all of the messages are using `.withReplacements( "%s" )` but yet none of the text components are using parameters. So if a parameter is added to any of those, the `%s` could potentially cause errors!? Need to test and if errors, then remove all of the `.withReplacements()` in that class.




- DONE: Option to skip applying the rank cost multiplier to a specific ladder.


- For v3.3.0 release:
Expand All @@ -18,8 +66,8 @@
- ranks and ladders
- auto prestiges (unlimited) based upon formulas
- new file formats - json ORM?
- archiving old players
- more work on top-n rankings
- DONE usind topn: archiving old players
- DONE: more work on top-n rankings
- /mines wguard - worldguard hints for mines (generate scripts to run?) - Use patterns that can be edited


Expand Down Expand Up @@ -53,7 +101,9 @@

- autofeatures BLOCKEVENTS priority - include backpacks on auto sell - Ryankayz

- Top block and top tokens - Phoung Nguyen

- TopN for tokens - Phoung Nguyen


- (done ??) auto features autosell - tie to sellall's player toggle - Ryankayz

Expand All @@ -64,8 +114,10 @@

- Mine Resets - Glass block not being removed - harold

- Archive old players - budderman18
- DONE?: Archive old players - budderman18
- archive all player files to a zip. Remove the originals. If player logs back on, then restore the archives. Prevent startup from adding these players back.
- Archiving players in topN - this may address the archive needs. Part of the issue was related to performance calculations upon startup, which the new topn does address.


- Placeholders - dynamic content -
- custom placeholders based upon other primary placeholders?
Expand Down Expand Up @@ -196,6 +248,47 @@ https://github.com/Auxilor/EcoEnchants/blob/master/eco-core/core-plugin/src/main

# Completed tasks

. DONE: Use of placeholders in gui mines is not working correctly - PassBl
- Trying to use: - '&7Test Cost P1: &3%prison_rank__player_cost_formatted_p1%'
- Using deluxe menus - may not be sending player info with placeholders?
- Fixed: complex new calculations for `prison_rank__player_cost` calculations.


- DONE: Mine Bomb Name and tags not showing color - Thaysa
- Works with 1.8.8
- Fails with 1.18.2 - colors are fine in GUIs and commands


- DONE: Modified the `/mine blockEvent` commands to auto show the existing rows if only the mine name is entered for the command. It will show the list of rows, then the user can select it, then continue entering the rest of the command. There has been a lot of confusion on how to work with the blockEvent rows since it was not obvious they had to first "list" the blockEvents for that mine.


- DONE: If prison cannot hook in to the economy, prison should see if CMI is a plugin on the server, then it should try to enable the delayed startup for CMI. Kind of a forced-auto-enable if CMI is detected.


- DONE: Mine bombs - If at rank d and in mine w and I set off a mine bomb, it will not break any blocks, but it will lock them and prevent others at that rank from breaking them. - redonthehead
- player should not be able to "lock" blocks
- DONE: Player should not be able to drop a mine bomb in a mine they don't have access to


- DONE: command `/ranks topn` - does not appear to be sorting by prestiges first - redonthehead
- Fixed? Force sort when using the command each time.
- When player's rankup, should probably force a sort.
- The sorting should be somewhat low cost, since if players are in the same position, it short-circuits the sorting so there is less processing. Ie.. if nothing is sorted, it's only one quick pass. If only one player changes, then it's only moving that player.

- DONE: Issue with topn Rank-Score. When player is at top of default ladder and has not prestiged yet.
- Rank-score looks like it's just their money balance?


- DONE: Sellall enablement - needs to be in module.yml, but must enable it in config.yml?
- bug in alpha.12?


- DONE: A placeholder in PLAYER that will show the next tag for both default and prestige. - surawesome
- but only show next prestige if on last rank in default. Default will show first rank.
- {prison_rankup_linked_rank_tag} <- [p]\\[d]
- {prison_rankup_linked_rank_tag_prestiges} {prison_rankup_linked_rank_tag_default}

- DONE: Top block and top tokens - Phoung Nguyen


- DONE: When placing a mine, it spams resets while it's setting up the liner and the primary mine. May be an issue with zero block resets and having zero block counts remaining. May want to initially set the block counts to something like 1, then after the mine is done being laid out, then reset it. When it's in "tracer" mode, no blocks exist that can be broken, so a value of 1 cannot be decreased.i
Expand Down
21 changes: 15 additions & 6 deletions docs/prison_docs_000_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@
<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">


# Prison Supports Spigot 1.8 through Spigot 1.18.x
# Prison Supports Java 1.8 though Java 17
# Prison Supports Spigot 1.8 through Spigot 1.19.x
# Prison Supports Java 1.8 though Java 19
# Prison is created for the Spigot Platform, and works on other platforms based upon Spigot


With the release of Spigot 1.17.x, there were a few minor changes that were needed to be made to prison to support Java 16. These were mostly related to a couple of NMS routines that were trying to figure out the player's default language they have selected. Due to new restrictions moving forward with Spigot, the ability to correctly identify the player's default language may not be possible, but prison will still use the selected language setting in the config files.


Prison supports both Spigot 1.17.1 and Spigot 1.18.x, along with Java 17. At this time there hasn't been any reports of incompatibilities. Since prison is using a library to support the correct blocks for the version of the server that you are running, we are limited to when updates are released for that library. Luckily they have had a couple of releases and we have applied them to the latest alpha releases. So if you are wanting to maximize the new Spigot 1.18.x experience, please upgrade to the latest alpha release as found on our discord server in the #alpha channel.
Prison supports Spigot 1.19.x, along with Java 17 and 18. At this time there hasn't been any reports of incompatibilities. Since prison is using a library to support the correct blocks for the version of the server that you are running, we are limited to when updates are released for that library. Luckily they have had a couple of releases and we have applied them to the latest alpha releases. So if you are wanting to maximize the new Spigot 1.19 experience, please upgrade to the latest alpha release as found on our discord server in the #alpha channel.


### Newer features and updates in Prison:


* Prison Backups: Prison now has a new feature that will backup (zip) all of the files within it's plugin directory. Prison now will perform an automated backup when it detects a change in Prison's version to help preserve settings from prior versions. See the new [Prison Backup Document](prison_docs_050_Prison_backups.md).

* Auto Configure: Even if you really don't want to use auto configure when setting up your server, it may be worth trying it out just to see what it does. If you're not happy with it, then deleting the `plugins/Prison/` directory will remove "everything" and on the next restart of your server, prison will load for the first time. So if you are just getting started with prison, it's worth a try.


Expand All @@ -58,6 +57,8 @@ Prison supports both Spigot 1.17.1 and Spigot 1.18.x, along with Java 17. At th

These new features are in the planning stages...

* Block Converters: Auto features can be controlled by enabling different blocks to perform different functions, if so desired. Currently the list of blocks is very limited and hard coded in both the configuration files, and also in the source code. But Block Converters will remove all of that, and place the configs in a new json file. The new format will provide a very powerful way to control all block conversions, such as smelting, blocking, and even drops. It will support permissions on all blocks and items, so you could setup a smelting to provide multiple block types, or even provide different block and item types based upon perms. Block Converters will take prison to the next level on mining customizations, but yet simplify auto features in both the auto features configs and code.

* New backpacks: A rewrite of the backpacks that will give a little more flexibility. You will be ble to use them as backpacks, or as vaults. Could even sell, or trade backpacks/vaults with their contents. ETA is unknown since a new storage management system needs to be created.

* Mine Effects: The ability to set mine effects for a given mine, or to allow players to buy effects using their earned tokens. Effects could be simple potion effects (haste, night vision), or even effects such as no fall damage, and even flight. Other options could be no-pvp, enable pvp, no block break, no fire, etc... The options are numerous, but will be added a little at a time, and upon request.
Expand Down Expand Up @@ -224,6 +225,9 @@ Auto configure can get you up and running with as little as two commands. The f
# Guides: Setting Up the Server Basics


* [Prison Backup Document](prison_docs_050_Prison_backups.md) Automatic and manual backups of `plugins/Prison/` directory.


* [Setting up a Spigot Server](prison_docs_010_setting_up_a_spigot_server.md)
Setting up Java. Setting up and running BuildTool. Creating a runnable Spigot Server.

Expand Down Expand Up @@ -324,6 +328,11 @@ Get your prison setup quickly by running the command `/ranks autoCommand` which



* [Setting up Mine Bombs](prison_docs_130_Prison_Mine_Bombs.md)
A work in progress: How to use and setup Prison Mine Bombs.



* [Setting up Backpacks](prison_docs_117_setting_up_backpacks.md)
How to enable backpacks.

Expand Down
139 changes: 139 additions & 0 deletions docs/prison_docs_050_Prison_backups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@

### Prison Documentation
[Prison Documents - Table of Contents](prison_docs_000_toc.md)

## Prison - Prison Backups

Prison has the new capability with v3.3.0-beta.12d to make backups of all of its files. Prison will automatically make a backup when it detects that the server is starting up with a new version of prison. Manual backups are also available.

All backup files are zip files and can be opened, unzipped, or inflated by almost any zip/compression tool.

Prison will generate temporary files through different conditions, such as if it detects a possible problem when saving data. During a backup, prison will identify all of these temporary files, and will purge them once they are added to a backup, thus cleaning up the file storage that prison uses.

If anything needs to be recovered from a backup, then it must be done manually.


<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">


# The Prison Backup Command

The Prison back command is:

`/prison support backup <notes>`

This command generates a manual backup. The notes are used to append to the file name so as to help identify the purpose of the backup.


<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">


# Backup Locations

The backups are stored in the directory:

`plugins/Prison/backups/`

None of the backups are ever removed automatically. If they are to be removed, they must manually be removed.

<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">



# The versions.log file

All backups are logged in the file:
`plugins/Prison/backups/versions.log`

Also all detections of version changes for Prison are logged in this file, which is how prison detects when a new version of prison is being used.

It should be noted that only the last entry in the versions.log file is used to compare to the current version, and if the versions do not match, then it forces a version change backup. The important point here is that "any" change will be detected and trigger a backup, which will work if downgraded or if it skips many versions.

<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">



# The "Backup Stats" Report

Within each backup, there will be generated one Backup Stats report that will be placed at the root directory of the backup. It is a plain text file.

This report contains detailed information on what temporary files were backed up and then deleted.

The rest of this report is a dump of all of the `/prison suppor submit` documents, all combined together in to one document.

<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">



# The Auto Backup on Version Change Detection


The problem with backing up the files within Prison upon startup, is that the Backup Stats file cannot be generated because all of the sub-systems that build that report, have not yet been loaded. But there is a risk that on a version update, the original configuration files may be automatically backed up.

To deal with this issue of starting up and potential changes to the config files, prison, upon startup, will make a backup of all config files. That way, if any are updated upon startup, their prior state and format will have been preserved as a backup file.

The list of configuration files that are copied as backup files:

- config.yml
- autoFeaturesConfig.yml
- blockConvertersConfig.json
- modules.yml
- module_conf/mines/mineBombsConfig.json
- SellAllConfig.yml
- GuiConfig.yml
- backpacks/backpacksconfig.yml

All of these files are copied with a new name that follows this format:
`<fileName>.newPrisonVersion_<timestamp>.bu`

The format of the `<fileName>` is the original file name, as listed above, with the file suffix.

The format of the `<timestamp>` is:
`yyyy-MM-dd_HH-mm-ss`


The location of these backup files will be located in the same directory as the original files. An example of what the `plugins/Prison/` folder enteries would look like is as follows:


```
autoFeaturesConfig.yml
autoFeaturesConfig.yml.newPrisonVersion_2022-07-06_22-18-23.bu
blockConvertersConfig.json
blockConvertersConfig.json.newPrisonVersion_2022-07-06_22-18-23.bu
config.yml
config.yml.newPrisonVersion_2022-07-06_22-18-23.bu
GuiConfig.yml
GuiConfig.yml.newPrisonVersion_2022-07-06_22-18-23.bu
modules.yml
modules.yml.newPrisonVersion_2022-07-06_22-18-23.bu
SellAllConfig.yml
SellAllConfig.yml.newPrisonVersion_2022-07-06_22-18-23.bu
```

**Please note:** All of these backup files will be removed once the backup is finished.

<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">



# Temporary Files Will Be Purged after being Backed Up


Prison Backups will identify various temporary files. These files will be added to the current backup, and then they will be removed from the server's file system.

This is a list of identifiers that are used to detect temporary files, where `*` is a wild-card character.

- `*.bu`
- `*.temp`
- `*.del`
- `_archived_*`
- `*.json.ver_*.txt`

**Warning:** When temporary files are backed up, they are removed from the server's file system. Therefore the **only** copy of those files are within that specific backup file. Therefore, it is very important that you do not delete these backup files without careful consideration. Deleting them will mean the permanent loss of those files.





<hr style="height:3px; border:none; color:#aaf; background-color:#aaf;">

Loading

0 comments on commit 038b935

Please sign in to comment.