Skip to content

Commit

Permalink
Merge pull request #179 from PrisonTeam/bleeding
Browse files Browse the repository at this point in the history
Bleeding
  • Loading branch information
rbluer authored Dec 25, 2020
2 parents 2996169 + 8d47ac6 commit 108ad60
Show file tree
Hide file tree
Showing 165 changed files with 9,808 additions and 4,932 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Prison Build

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Gradlew permission
run: chmod +x gradlew
- name: Build
run: ./gradlew build

- name: Upload Jar
uses: actions/upload-artifact@v2
with:
name: Prison
path: prison-spigot/build/libs/Prison.jar
1 change: 1 addition & 0 deletions PrisonSpigotMC.bbcode.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[size=200][center][font=Verdana][color=#e69138][b]Prison [/b][/color][/font][/center][/size]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![License](https://img.shields.io/badge/license-GPL%20License%20v3-blue.svg)](LICENSE.md)
[![Build Status](https://travis-ci.org/MC-Prison/Prison.svg?branch=master)](https://travis-ci.org/MC-Prison/Prison)
[![Discord](https://discordapp.com/api/guilds/332602419483770890/widget.png)](https://discord.gg/396ed5F)
[![Discord](https://discordapp.com/api/guilds/332602419483770890/widget.png)](https://discord.gg/DCJ3j6r)

1. [What is Prison?](#what-is-prison)
2. [Why should I use Prison?](#why-should-i-use-prison)
Expand Down
2,010 changes: 212 additions & 1,798 deletions changelog_v3.2.x.md

Large diffs are not rendered by default.

Binary file added docs/images/prison_docs_012_prison_basics_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/prison_docs_0xx_placeholderapi_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
339 changes: 339 additions & 0 deletions docs/prison_changelog_v3.2.0.md

Large diffs are not rendered by default.

1,005 changes: 1,005 additions & 0 deletions docs/prison_changelog_v3.2.1.md

Large diffs are not rendered by default.

725 changes: 725 additions & 0 deletions docs/prison_changelog_v3.2.2.md

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions docs/prison_docs_000_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
* **[Most Recent Version of Prison Documentation](https://github.com/PrisonTeam/Prison/blob/bleeding/docs/prison_docs_000_toc.md)** Docs change frequently, but GITHUG's master versions do not. These are the latest docs!


## Build logs
- **[v3.2.3-alpha - Current](changelog_v3.2.x.md)**
- **[v3.2.0 - 2019-12-03](docs/prison_changelog_v3.2.0.md)**
- **[v3.2.1 - 2020-09-27](docs/prison_changelog_v3.2.1.md)**
- **[v3.2.2 - 2020-11-21](docs/prison_changelog_v3.2.2.md)**

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

# New! Prison Fast Start
Expand Down Expand Up @@ -135,9 +141,8 @@ Prison now has a new set of features that can help you get up and running faster



* **Setting up Vault** - (coming soon)
* [Setting up Vault](prison_docs_016_setting_up_Vault.md)
Including Vault is Strongly Suggested.
Hint: Download from spigotmc.org and copy jar to plugin folder. Zero setup.


* [Setting up EssentialsX](prison_docs_0xx_setting_up_EssentialsX.md) -
Expand Down
32 changes: 20 additions & 12 deletions docs/prison_docs_012_setting_up_prison_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@ There may be no hard dependencies that will prevent Prison from running, but the
* **EssentialsX Chat** - Optional - Enhanced Chat experience.


* **EssentialsX Spawn** - Optional - Enhanced support for Spawns.


* **A permissions plugin of your choice** - Required - Prison works with many different permission plugins through Vault. I strongly suggest LuckPerms since it is free and is under active development so bugs and performance issues will be addressed.
* Warning: LuckPerms v5.0.x crashes older versions of prison, such as V3.2.0 and earlier.
* Notice: Prison v3.2.1 (including the pre-release versions) supports all versions of LuckPerms.
* Strongly suggest using LuckPerms v5.0.x with latest pre-release version of Prison.
* Notice: Prison v3.2.1, and newer, supports all versions of LuckPerms.
* Strongly suggest using LuckPerms v5.x with all of the latest versions of Prison.


* **PlaceholderAPI** - Used through Vault, it is free and provides the core interfaces in to the usage of placeholders. Prison also has a special integration setup for PlaceholderAPI to register all of the Prison placeholders dynamically upon startup. You do not need to download anything from the cloud for prison to work with this plugin.
Expand All @@ -48,20 +45,24 @@ Download Prison from [spigotmc.org's Prison History Page](https://www.spigotmc.o

Setting up Prison is simple:

* Download Prison - Current Releases
- Go to the SpigotMC.org LuckPerm's resource page:
* Download Prison - Current Release
- Go to the SpigotMC.org Prison's resource page:
- [Prison Downloads](https://www.spigotmc.org/resources/prison.1223/history "Prison download can be found under the Version History tab")
- Click on the Version History tab
- Choose the version to download
- Click on the Version History tab if needed
- Choose the latest version to download

* **Download Prison's Pre-Release Version**
- Useful to access newer features and fixes
- You can usually find a build on the Discord Server:
- You can always find the latest alpha build on the Discord Server in the #alpha-versions channel:
- [Prison Discord Server](https://discord.gg/DCJ3j6r)

* Copy to your server's plugin directory
* Copy the prison jar file to your server's plugin directory.

* Remove any older prison jar file

* Restart the server
* Restart the server.

* Prison's startup information contains a lot of information. If you ever have issues, check that information first since it probably will identify what the issues are.

* Follow Prison's documentation on customization, but at this point it's ready for use.

Expand Down Expand Up @@ -131,6 +132,13 @@ On the startup screen, prison shows all of the base commands that are active. Fr
* **/rankup**


If you use the command `/prison` it will not only display all of the sub commands available for `/prison`, but it will also include a list of all the other *root* commands and aliases that have been setup.


<img src="images/prison_docs_012_prison_basics_01.png" alt="Prison Commands" title="Prison Commands" width="600" />



These commands are intended to run in game, but most can be ran from the system console. Sometimes the system console is easier to displays longer listings, such as **/mines list**. Also the console is better with wider text, and with easier to read text since it's not trying to display over a mc world.


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

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

## Setting up Vault

This document provides a quick overview on how to install Vault.

Vault may be optional, but it is a very important plugin. It provides easy integration with economies and permissions. This is useful because its a standard way for prison to hook in and use any plugin that supports Vault.


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

# Optional Dependencies

There aren't any required dependencies to using Vault, but Vault will be useless if there were no other plugins to hook in to it.

The two most useful plugins to use would be EssentialsX and LuckPerms. EssentialsX is useful for its economy, and LP for the permissions.


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

# Setting up Vault

Vault is simple to setup since there are no required configurations.

* Download Vault:
- Go to SigotMC.org Vault download page
- [Vault Download Page]()

* Copy to your server's plugin directory



<hr style="height:1px; border:none; color:#aaf; background-color:#aaf;">
41 changes: 29 additions & 12 deletions docs/prison_docs_0xx_setting_up_EssentialsX.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,29 @@ Setting up Essentials is easy, but you've to choose which plugins to add.
- [EssentialsX Download page](https://www.spigotmc.org/resources/essentialsx.9089/)
* Unzip the download.
* Copy the jar files of your choice to your server's `plugin/` directory.
* The zip file contains multiple jars of the same version. Always use the same versions with each other, but never mix one EssentialsX jar version with another version.
* Available Modules and what is recommended:
* The zip file contains multiple jars of the same version. Always use the same versions with each other, and never mix one EssentialsX jar version with another version.


* Available Modules and what is recommended and what isn't:
* EssentialsX - Main jar - **Required**
* EssentialsXAntiBuild - *Optional* - Don't use if using WorldGuard?
* EssentialsXChat - **Recommended** - Provides chat based placeholders (see below)
* EssentialsXGeoIP - *Optional* - Provide geo locations for players IP addresses
* EssentialsXProtect - *Optional* - Not sure, but shouldn't be used with WorldGuard?
* EssentialsXSpawn - *Optional* - Not sure, but provides special behaviors for spawn? Not sure.
* EssentialsXXMPP - *Don't Use* - Google XXMPP for spigot to confirm if you really have a need to use this. You probably never will.
* EssentialsXXMPP - *Don't Use* - Google _XXMPP for spigot_ to confirm if you really have a need to use this. You probably never will.


* Prison does not require you to change any settings in EssentialsX, but you may if you want to customize a few things.


* Prison does not require you to change any settings in EssentialsX, but you may if you want to customize some things.
* List of possible items to modify:
* Chat prefixes (see below)
* Item prices if you will be using the shop functions through EssentialsX. If you do, I suggest you remove the entries for armor, weapons, tools, food, etc. Otherwise players may accidentally sell things they need. Also you can add new items to be sold.
* Customize kits
* etc...


* Restart your server

<hr style="height:1px; border:none; color:#aaf; background-color:#aaf;">
Expand All @@ -50,19 +57,21 @@ Setting up Essentials is easy, but you've to choose which plugins to add.

## Add the Prison placeholder *Rank Tag* to Player's Chat Prefix

* EssentialsX's plugin folder on the server
* Go to the EssentialsX's plugin folder on the server:


* Path: `plugins\Essentials\`


* Edit the `config.yml` file:
- Search for the section pertaining to chat by using the keyword: **EssentialsChat**
- Add the placeholders {prison_rank_tag} or {prison_rank} to the "format:" line.
* The placeholders should be entered in all lower case
* The placeholders should be **all lower case**
* The curly braces is used by EssentialsX chat engine, not Prison. Other chat plugins may use percent symbols instead.
* {prison_rank} is the rank name without special formatting
* {prison_rank_tag} is the defined tag (with formatting) for that rank
- Example:
```
format: '<{prison_rank_tag}:{DISPLAYNAME}>{MESSAGE}'
```
format: `<{prison_rank_tag}:{DISPLAYNAME}>{MESSAGE}`

Reload EssentialsX settings, or restart the server.

Expand All @@ -72,13 +81,21 @@ Reload EssentialsX settings, or restart the server.

# Applying Settings and Reloading Essentials


* Restart the server. Or use **/essentials reload**.


* Notice: **Don't use /reload to reload the whole server!** Using /reload or another tool such as plugman could corrupt plugins. Prison was not designed to do soft reloads and as such mines, ranks, ladders, and even some player settings and histories could be corrupted.
<img src="images/prison_docs_0xx_setting_up_EssentialsX_01.png" alt="EssentialsX" title="EssentialsX" width="500" />


<img src="images/prison_docs_0xx_setting_up_EssentialsX_01.png" alt="EssentialsX" title="EssentialsX" width="500" />

* If you reload essentials and the placeholders are not working, then you may have to either restart the server, or reload the prison's placeholders with the following commands, both of which are exactly the same:
- `/prison placeholders reload`
- `/prison reload placeholders`


* Notice: **Don't use /reload to reload the whole server!** Using /reload or another tool such as plugman could corrupt plugins. Prison was not designed to do soft reloads and as such mines, ranks, ladders, and even some player settings and histories could be corrupted.



<hr style="height:1px; border:none; color:#aaf; background-color:#aaf;">
Expand All @@ -89,7 +106,7 @@ Reload EssentialsX settings, or restart the server.
# Essentials Currency Commands


Eventually you may have to deal with currency, so here are the esstentals commands.
Eventually you may have to deal with currency, so here are the essentials commands.

* `/eco` - Show the EssentialsX economy commands
* `/eco give <player> <amount>` - Give a player money
Expand Down
36 changes: 33 additions & 3 deletions docs/prison_docs_0xx_setting_up_PlaceholderAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Setting up PlaceholderAPI just need couple of steps:

* Restart your server. Do not use **/reload** or you'll break Prison Placeholders. Prison registers all of the placeholders upon server startup so the registrations will be lost.

* NOTE: Prison now has placeholders reload feature, but the first time you install PlaceholderAPI you will have to restart the server for everything to be properly registered.

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


Expand All @@ -52,9 +54,28 @@ Use the command **/prison placeholders** for a listing the placeholder commands.
* **/prison placeholders search <playerName> <pageNumber> <searchPatterns>**
* **/prison placeholders test <text>**


* **/prison placeholders reload** or **/prison reload placeholders**
- This will reload all placeholders and will re-register them with the proper placeholder plugins. Both of these commands are exactly the same.


Example of reloading prison's placeholders with stats on what was registered.

<img src="images/prison_docs_310_guide_placeholders_7.png" alt="Reloading Prison Placeholders" title="Reload Prison Placeholders" width="600" />



* **/prison version**
- The prison version command is useful for reviewing that placeholder plugins are correctly registered.


* **Prison startup logs**
- The Prison startup messages provides a detailed list of stats pertaining to placeholders, such as the break down of how many were registered and available.


<img src="images/prison_docs_0xx_placeholderapi_01.png" alt="Start up placeholder stats" title="Start up placeholder stats" width="600" />


The listing of all the placeholders is available within the Prison startup information, and through `/prison version`.

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

Expand All @@ -76,9 +97,18 @@ The solution was to download from PlaceholderAPI, their modified version of Vaul
/papi reload
```

As a note, I'm not sure how well Prison behaves with the use of `/papi reload`. It may be good to test with, but safer to just restart the server, once everything appears to be working and looks good. The point is that any plugin reload is good to test with, but if you're going to let your server run for months, its probably best to do a clean restart.
If you use `/papi reload`/ then you will have to reload the placeholders in prison so they are registered with papi. When papi reloads, it forgets everything that was registered before.


You can use either one of the following commands to reload and re-register all of prison's placeholders. Both commands are exactly the same.

```
/prison placeholders reload
/prison reload placeholders
```

If you create new ranks or mines you will also have to reload the prison placeholders. You don't have to reload papi in these situations, just prison.

With this example of installing the PlaceholderAPI and downloading their version of Vault and Essentials, the player reported that once the economy placeholder was working, another placeholder stopped working. Their solution was to reinstall all of the papi (PlaceholderAPI) plugins (not sure if that includes reinstalling papi's version of Vault and Essentials) and then restarted the server. The point here, is a clean start is probably helpful.


<hr style="height:1px; border:none; color:#aaf; background-color:#aaf;">
22 changes: 21 additions & 1 deletion docs/prison_docs_101_setting_up_mines.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Items to add to this document:
# New! Prison Fast Start

Prison now has a new set of features that can help you get up and running faster than ever! `/ranks autoConfigure`. It can auto create your ranks and virtual mines, A through Z, it will link the mines to the ranks, setup the basic rank commands to provide basic access permissions for your players, and assign blocks of increasing values to all mines. All you need to do is to use the command `/mines set area` on all mines to make them physical mines. Plus there are a new features to help provide the finishing touches in almost no time.
- `/ranks autoConfigure`
- `/ranks autoConfigure`
- `/mines set area help`
- `/mines set tracer help`
- `/mines set size help`
Expand Down Expand Up @@ -265,6 +265,26 @@ Note: The new command `/mines set move` is not yet enabled. It is still in devel
<hr style="height:1px; border:none; color:#aaf; background-color:#aaf;">


# Large Mines - Preventing Lag

Large mines present their special own special challenges, one of which is that they can take a long time to reset. Since bukkit cannot handle async resets of blocks because of world corruption, the updates must happen synchronously in the main server thread. For large mines, that can mean causing a significant amount of lag.

To prevent lagging the server, Prison has a feature that can prevent any lag from happening while performing the reset. This feature is called **Reset Paging**. This feature doesn't have to be used with just large mines, but the reset process is a little more complex. When testing, it was actually found to be slightly faster than the normal reset method.

To enable reset paging use the following commands to enable and disable it.

```
/mines set resetPaging <mineName> enable
/mines set resetPaging <mineName> disable
```

The way it works, is that it performs small pages of block updates and keeps an eye on how long it's taking. If the update goes beyond a set amount of time, such as 50 milliseconds, it stops the updates, and then schedules the remaining updates to run later, with no delay. That means if nothing else is trying to run within the main server thread, then it will continue to perform block updates. But if something else was waiting to run, then the mine update will pause and allow the other process to finish. This will prevent vital tasks from backing up because the mine reset yields to other tasks that need to run.




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


# Next Steps - Skipping Resets, Notifications, and Zero Blocks

Expand Down
36 changes: 36 additions & 0 deletions docs/prison_docs_113_setting_up_sellall.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,42 @@ How Multipliers work -> they'll just multiply the value of what you sold, for ex
so ```1000 * 1 = 1000``` is what you'll get (by default this's the value in the sellallconfig.yml), but if you've a Prestige with a multiplier of maybe ```1.5```, then
you'll get ```1000 * 1.5 = 1500```, this isn't even hard math but could make you some confusion.

**SellaAll Signs:**

Open your config.yml and turn on true the sellall sign like this:
```
# NEW: SellAll sign
# New sellall feature which enable a sign with the name of [SellAll] to execute the command /sellall sell of Prison
# To make a sign, give yourself the permission prison.admin and then add as the first line of a sign the tag [SellAll]
sellall-sign: true
sellall-sign-notify: true
sellall-sign-visible-tag: "&7[&3SellAll&7]"
```
You can also turn on or off a notification when clicking the sign, you can edit that in the module-conf/lang/en_US.yml file, and you can edit
the tag from the config.yml which's shown in the sign.

To make a Sign, just place a sign and add as the first line ```[SellAll]```, also be sure to have the permissions ```prison.sign```.
If everything's right, the sign will look like the sellall-sign-visible-tag from the config.yml, and will work on right clicking it.

**SellAll Auto**

You can turn on or off from the SellAllConfig.yml file the SellAll Auto feature, which will sell everything sellable from the player inventory when it's full.
Just edit these config lines like this:
```
Full_Inv_AutoSell: 'true'
Full_Inv_AutoSell_Notification: 'false'
```
You can edit the autoSell notification as you want.

It's also possible to enable or disable sellAll per-User, it'll be them to choose if enable it or not.
They'll need to use the command: `/sellall auto toggle`, it'll let them enable or disable it, when used
for the first time, the user will be stored in the `users` section of the `sellAllConfig.yml`.

The admin can enable this feature from the `sellAllConfig.yml`, by changing this option from `false` to `true`:
```
Options.Full_Inv_AutoSell_perUserToggleable: false
```

# LIST OF COMMANDS
```
/sellall
Expand Down
Loading

0 comments on commit 108ad60

Please sign in to comment.