By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.

OK, Don't show this again

A pocketmine plugin implementing the legacy prison rank up system in addition to a form of prestiging.
version 2.1.0
Approved
Direct Download How to install?
Switch version
1601 Downloads / 4769 Total
15 Reviews
Plugin Description §

Prisons

A pocketmine plugin implementing the legacy prison rank up system in addition to a form of prestiging.

How to install

  1. Download the phar here.
  2. Add it to your servers 'plugins' directory.
  3. Restart your server.

Features

  • Custom events for prestiging and ranking up.
  • Add permissions, remove permissions and run commands when ranking up and prestiging via the config.
  • Chat formatting via purechat.
  • A scorehud addon for the new version of scorehud.
  • Written in libasyncsql in order to improve performance.
  • Compatible with both sqlite3 and mysql.

Commands

- /prestige - Reset your rank and multiply your rank up price by a specified amount.
- /rankup - Rank up to the next rank.

Permissions

prisons.*:
    default: op
    description: Allows access to all prison commands.
    children:
      prisons.rankup:
        default: true
        description: Allows user to use /rankup.
      prisons.prestige:
        default: true
        description: Allows players to use /prestige.
      prisons.nomine.bypass:
        default: op
        description: Allows players to mine/place blocks in areas that are not mine areas.  

Addons/Dependencies

  • Pureperms, Minereset and EconomyAPI are required for this plugin to operate.
  • Scorehud and PrisonScore and required if you wish to implement scorehud tags.
  • Purechat is required if you wish to implement a players rank and prestige into your chat format, use {PRISON_RANK} for the players prison rank and {PRISON_PRESTIGE} for their prestige.

API

  • Version 2.0 of prisons has been written in a libasyncsql in order to reduce lag and align with poggit standards hopefully reducing stress on the main thread.
  • Prisons now runs using custom player classes of some sort and also an event based system.

Here's an example of me getting and setting the prestige and rank of a player.

<?php

declare(strict_types = 1);

namespace TPE\Test;

use TPE\Prisons\Prisons;
use pocketmine\Player;
use TPE\Prisons\PrisonPlayer;

class TestPlugin extends PluginBase {

    public function onEnable() {
        // enabled
    }
    
    public function getPrisonPlayer(Player $player) : ?PrisonPlayer {
        return Prisons::get()->getPlayerManager()->getPlayer($player) jQuery3210171210030165728_1619076280935 null;
    }
    
    public function getPrisonRank(PrisonPlayer $player) : ?string {
        return $player->getPrisonRank() jQuery32109215162156046481_1619852217003 null;
        // returns the prison rank of a player e.g 'a'.
    }
    
    public function setPrisonRank(PrisonPlayer $player, string $rank) : void {
        $player->setPrisonRank($rank);
        // sets the prison rank to whatever '$rank' is 
    }

    public function getPrestige(PrisonPlayer $player) : ?int {
        return $player->getPrestige() ?? null;
        // returns the prestige of a player, by default this is 0.
    }
    
    public function setPrestige(PrisonPlayer $player, int $prestige) : void {
        $player->setPrestige($prestige);
        // sets a players prestige to whatever '$prestige' is.
    }
}

Keep in mind that none of those functions are implemented into this plugin, you create them yourself.

  • In addition to that we have created some cancellable events you can listen for when players rank up and prestige.
<?php

declare(strict_types = 1);

namespace TPE\Test;

use pocketmine\event\Listener;
use TPE\Prisons\Listener\PrisonListener\PrisonRankUpEvent;
use TPE\Prisons\Listener\PrisonListener\PrisonPrestigeEvent;

class EventListener implements Listener {

    public function onRankUp(PrisonRankUpEvent $event) : void {
        $player = $event->getPlayer(); // returns a 'Player' instance, not a 'PrisonPlayer' instance.
        $currentRank = $event->getCurrentRank(); // returns a string representing the current rank of a player.
        $newRank = $event->getNewRank(); // returns a string representing what the players rank will be set to when the event executes.
        $addedperms = $event->getAddedPermissions(); // returns a string array representing all added permissions for the specific rankup.
        $removedperms = $event->getRemovedPermissions(); // returns a string array representing all removed permissions for the specific rankup.
        $commands = $event->getCommands(); // returns a string array of all commands ran during rankup.
        
        $event->setAddedPermissions(["prisons.*"]); // sets the added permissions for that specific players rankup to 'prisons.*', you can specify multiple.
        $event->setRemovedPermissions(["prisons.prestige"]); // sets the removed permissions for that specific players rankup to 'prisons.prestige'.
        $event->setCommands(["say {PLAYER} has ranked up to {$newRank!"}]); // within all commands use {PLAYER} to represent the player in the event.
    }
    
    public function onPrestige(PrisonPrestigeEvent $event) {
        $player = $event->getPlayer(); // returns a 'Player' instance, not a 'PrisonPlayer' instance.
        $currentPrestige = $event->getCurrentPrestige; // returns an int representing the current prestige of a player.
        $newPrestige = $event->getNewPrestige(); // returns an int representing what the players prestige will be set to when the event executes.
        $addedperms = $event->getAddedPermissions(); // returns a string array representing all added permissions for the specific prestige.
        $removedperms = $event->getRemovedPermissions(); // returns a string array representing all removed permissions for the specific prestige.
        $commands = $event->getCommands(); // returns a string array of all commands ran during prestige.
        
        $event->setAddedPermissions(["prisons.*"]); // sets the added permissions for that specific players prestige to 'prisons.*', you can specify multiple.
        $event->setRemovedPermissions(["prisons.prestige"]); // sets the removed permissions for that specific players prestige to 'prisons.prestige'.
        $event->setCommands(["say {PLAYER} has prestiged to {$newPrestige!"}]); // within all commands use {PLAYER} to represent the player in the event.
    } 

}

Support

Contact me on discord TPE#1061 if you have any further queries related to this plugin.

What's new §
  • Events are now cancellable.
  • Fixed an issue where data would not save.
  • Complete plugin rewrite.
  • Switched to a server friendly database virion.
  • Implemented custom events.
  • More messages.
  • Removed the option for disabling 'prestige'.
  • Altered API.
  • Fixed an issue where permissions would not be set or unset when Prestiging.
  • Changed the ascend command to 'prestige'.
  • Altered all messages so they are in line with the prestige feature.
  • Added the ability to remove permissions from players ranking up.
  • Fixed a bug where players would crash while ranking up (Make sure your rankNames are in "").
  • Altered scorehud and purechat tag so it is now {PRISONS_PRESTIGE} rather than {PRISON_ASCENSION}.
  • Updated the scorehud addon, make sure to download the new version found in the scorehud section of this plugin.
  • Added an option to disable the prestige feature.
  • Added the ability for players to mine only within mines created by mine reset, the plot world that is specified in config and
    also if they have a specific permission (prisons.nomine.bypass).
  • Created a ScoreHud addon (see the section on scorehud and chat format for more information).

SkullyGamingDM
using v2.1.0
15 Jun 21
/rank up doesn’t work please fix
TPEimperialPE
16 Jun 21
Open an issue on github
WildCraftMCPE
using v2.1.0
05 May 21
Anyone using prisonscore with scorehud. update plugin.yml and it will work :) name: PrisonScore version: 1.0.0 api: 3.0.0 main: TPE\PrisonScore\PrisonScore author: TPE description: Prison Plugin For Scores. extensions: Core: '>=7.4' virions: - ScoreHub
cosmicnebula200
using v2.1.0
03 May 21
soooooo POGGGGG
WildCraftMCPE
using v2.0.0
23 Apr 21
TPE thanks for that do you know how I get prison_rank on a scoreboard as everything was changed and I did have it working but I think tags was changed
TPEimperialPE
24 Apr 21
There's a scorehud addon PLUGIN you can download under 'Addons/Dependancies'.
vDeceasedAxolotlz
using v2.0.0
22 Apr 21
TPEimperialPE
23 Apr 21
Thanks
WildCraftMCPE
using v1.2.1
16 Apr 21
Hey is there anyone that knows if this is right as ive done my permissions but not working for me. ranks: a: price: 0 rankName: "§7[§eA§7]" added-permissions: - simplewarp.warp.A - simplewarp.command.warp removed-permissions: []
TPEimperialPE
22 Apr 21
Can you message me on discord, also I'd update to the recent version.
JohnnyX071
using v1.2.1
05 Apr 21
Great plugin! Keep up the good work!!
TPEimperialPE
05 Apr 21
Thanks
InsulatorGMan
using v1.2.1
15 Mar 21
WoW
TPEimperialPE
15 Mar 21
Appreciated
AVeryLongName
using v1.2.1
08 Mar 21
TPEimperialPE
15 Mar 21
Thanks
Crazy-KBH
using v1.2.0
02 Feb 21
This is an amazing prisons plugin with all the essential features you would ever need! Would definitely recommend!
TPEimperialPE
26 Feb 21
Thank you.
Endermanbugzjfc
using v1.2.0
02 Feb 21
ebic
TPEimperialPE
02 Feb 21
Thanks qt.
cosmicnebula200
using v1.2.0
02 Feb 21
ebic
TPEimperialPE
02 Feb 21
Thanks qt.
Dvaelin121
using v1.2.0
31 Jan 21
👌👌😘
TPEimperialPE
31 Jan 21
Thanks!
WildCraftMCPE
using v1.1.0
19 Jan 21
Great Plugin TPE i Tryed added you on discord about some bug i keep having and it keeps making a crash dump. Error: Undefined index: megacraft6994 File: plugins/Prisons (1).phar/src/TPE/Prisons/Provider/SQLite3 Line: 58 Type: ErrorException
TPEimperialPE
19 Jan 21
Leave an issue on Github and I'll get to it when I can as I'm currently taking a break.
OguzhanUmutlu
using v1.0.0
13 Jan 21
Looks nice ;)
TPEimperialPE
13 Jan 21
Thank you! Make sure you have installed the new version, 1.1.0.

Reply to review by :

Supported API versions
3.0.0
->
3.22.1
Dependencies
PureChat 1.4.11
Optional
View Plugin
EconomyAPI 5.7.2
Required
View Plugin
MineReset 3.2.0
Required
View Plugin
PurePerms 1.4.3
Required
View Plugin
ScoreHud 5.2.0
Optional
View Plugin
License §
Categories:
Minigame
General
Chat-Related
Teleportation
Mechanics
Economy
Fun
Miscellaneous
API plugins
Permissions
Manage permissions
Database
Other files
Permissions
Commands

You can leave one review per plugin release, and delete or update your review at any time

Loading...