Prison

Prison Documentation

Prison Documents - Table of Contents

Setting up Prison - The Basics

This document provides a quick overview on how to install Prison and get it running.

Documented updated: 2021-12-03


Download Prison

Download Prison from one of the following sites:

Setting up Prison is simple:


Prison’s Dependencies on Other Plugins

There may be no hard dependencies that will prevent Prison from running, but there are some core plugins that will make it easier to use, and are even required for activation of some features within Prison. This short list is just a suggestion, but alternatives do exist and may be outside of our ability to comment or assist in their usage.

Economy Plugins - Required

Prison requires an active economy in order to active the Ranks plugin. When Prison starts up, it performs many validations on the mines and ranks as they are being loaded. With Ranks, if Prison cannot find an active economy, then it will refuse to load the Ranks module due to possible server corruption (ie… what failed that there is no economy).

Chat Prefix Plugins - Optional

These plugins are used to add rank tags to the player’s chat messages that they send.

Permission Plugins - Required

Permission plugins are not strictly required for Prison to work, but within a server environment almost everything depends upon permissions in order to make things work.

Prison actually uses bukkit’s permission interfaces. This makes it simple for Prison, but it also limits what prison can do. For example, one limitation is with permission groups; Prison is unable to resolve permission groups since that “concept” does not exist in bukkit, but is a concept that is implemented through plugins like PEX and LuckPerms.

Placeholder Plugins

Chat related plugins are able to provides access to Prison placeholders, which can allow Prison data to be included in their content. PAPI is simple and works so well, that it usually is the default choice.

The way a placeholder works, is that it is a text based key that is used to request data. Generally the key is included with other text, such as a chat message, holographic display, or a scoreboard content, and the key is replaced with the requested data. Usually the plugins using placeholders have no idea what other plugins are supplying the requested data; they basically make a general request for information to all plugins, and the plugins that recognize that key will respond.

It should be noted that Prison’s placeholders are just text based keys. They are usually all lower case alpha numeric characters, with underscores, and maybe some colons too. The important thing to understand is that they do not include the escape characters, and that the escape characters may differ from what is required in other plugins. Placeholder escape characters are usually { } or % %, and sometimes you may have to mix the two. The plugin’s documentation should help you identify what’s the correct usage.

All prison placeholders start with prison_ and are usually all lower case. Upper case may work too, but lower case is recommended. Prison tries to ignore the case of its placeholder keys, but its the other plugins that can have issues. For example, if Prison registers all of the plugins as lower case, then the other plugins may not recognize all upper case, or mixed case, as being related to Prison, so therefore they may not send the request to Prison.

An example of a prison placeholder is prison_rank. But used in another plugin, you will need to add escape characters such that it may be either {prison_rank} or %prison_rank%. Prison only controls what the text key is; prison cannot control which escape characters are used in another plugin.

All of Prison’s placeholders have an alias. An alias is a shortened name for a placeholder. Some placeholder names can become large based upon trying to keep their names informative as to what they represent. As an example, prison_rank has an alias of prison_r. And prison_player_balance_earnings_per_minute_formatted has an alias of prison_pb_epmf which can be useful if there is limited space in the configurations. The command /prison placeholders list shows all available placeholders, along with their aliases.

World Protection Plugins

/rg flag __global__ -w world passthrough deny

Enchantment Plugins

Other Plugins


Important Prison Information

Upon starting up, Prison will display a lot of information in the server’s console. This information is intended to help you configure and confirm that prison started correctly with all of the related resources that it is using. It also provides you with valuable information that is needed to help troubleshoot issues, if you should happen to encounter any.

Some of the important details that are listed:


Server Start Up Script

If you are leasing a server from a hosting service you may not be able to customize the startup script. But if you have control over it, then the following information may help.

java -Xms2g -Xmx4g -jar spigot-1.16.5.jar -nogui

Example of enabling debug hooks for the server. This is used with Eclipse, and may work with other IDEs since it’s a java directive.

java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xms2g -Xmx8g -jar spigot-1.16.5.jar -nogui --log-strip-color

Note: The use of --log-strip-color may or may not work within your environment.


Setting up an Eclipse Debugging Session

To go along with the above settings for debugging on port 5005, you need to setup in Eclipse the correct remote debug configuration using a Remote Java Application.

Detailed settings can be found here:

https://www.spigotmc.org/wiki/eclipse-debug-your-plugin/

Basically, under “Debug Configurations…”, add a new “Remote Java Application”. Select a name, such as “Spigot Debugger - Local”, with port 5005, and localhost for the host.

With the spigot server already running, then set a break point in the code, then start the debugger.

If the Eclipse debugger breaks on the selected breakpoint, but yet does not show any source, click on the button in the empty source window to select the correct source. From the popup window, then choose to select an existing Java Project, then select all listed projects associated with your plugin(s), including all sub-projects. The debugger should then select the correct source.


Getting Help

If you should run in to any questions or issues, please first review all online documentation first.

If you cannot find what you need within the documentation, please visit our Discord server to get the quickest responses there.
Prison Discord Server

In order to provide the best support, the prison startup screen provides most of the information that is needed to help trouble shoot your issues. Please take a screen print and provide on discord with a detailed explanation of the issue.

If you do encounter an issue, and the startup information is requested, please include everything from the first line to the last. Please take a screen print and provide on discord with a detailed explanation of the issue. Include everything from:

	[16:21:30 INFO]: [Prison] Enabling Prison v3.2.5

through:

	[16:21:31 INFO]: | Prison | Prison - Finished loading.

Prison Support Submit Information

Prison now has a built in way to share your configurations and settings with support personnel.

More information will be documented in the future, but for now, here are the basics on how to use it.

When requested by the Prison support team, you would first enter the following command to set your name that will be included on all reports to help identify who the are related to. It doesn’t have to be your full discord name, but enough characters to allow us to identify who you are.

These commands will collect all of the related information from your Prison setup, and send it to the website https://paste.helpch.at. It will provide you with an URL. All you need to do is to copy and paste that URL in to the discord chat so the Prison support team can help with your issue.

/prison support setSupportName <yourName>

Once entered, it will enable the following submit tools:

/prison support submit - Show the available tools.

/prison support submit configs
/prison support submit latestLogs
/prison support submit mines
/prison support submit ranks
/prison support submit version

Here is an example that I generated from one of my test servers on 2021-12-03. I have no idea how long the content remains available, but for support purposes, we only need this information for a few hours. https://paste.helpch.at/itejovejeh

Prison Commands

On the startup screen, prison shows all of the base commands that are active. From these commands, they will provide you with sub-listings of all the other commands.

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.

Prison Commands

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.


Getting Started

There is a lot to do get your server up and running. But here are some ideas on what to get started on first. It may even be a good idea to create a couple of small mines in an area that you have not spent much time with your final builds. Plan on creating a couple of test mines and ranks, then deleting them. You can quickly get a good understanding of how prison can be setup by playing around with a lot of the setting within a few minutes.

Remember that the command /prison version will show all the available root level commands by the modules. Entering those commands will show all of the related sub commands.