Example - command use

Main Commands

First of all we check the main command:

/penalty

This will show us the other commands. If you have operator rights, or the specified penalty permission, you will also see the core command:

/penalty core

This command shows detailed information about the plugin core, version numbers and the database. If we run the plugin for the first time we will see that 0 penalties and 0 player datas loaded. First of all, we must create the penalties which we will use for punish the lawbreakers. You are unable to set up a penalty ingame for now, you must write it into file. So you're lucky if you are the owner of the server or you have access to the files directly somehow. If the "Penalty\penalties.yml" file does not exist in the plugins folder we should create it. After we have it, open it to edit.

Let's create penalties

All penalty are built in the following stucture:

penalty: penaltyname

(optional) alias: alternative_name
level #:

(optional) run: command
(optional) playertext: message sent to the target player
(optional) callertext: message sent to the caller player


You can use as many levels in your penalty as many you want. You can replace the # the following ways:

level 1: - it will be runned only if the target is now on (currently reached) level 1 of this penalty (so first case)
level ..3: - it will be runned only if the target is now under or exactly on level 3 (so 1, 2 or 3)
level 3..5: - it will be runned only if the target is now between level 3 and 5 (so 3, 4, 5)
level 6..: - it will be runned only if the target is over or exactly on level 6 (so 6, 7, 8...)


In the level there are the things to do when the target's level passes the level interval. Call these things in the levels "todo". Every level should contain at least one todo, elseway it does nothing, then why to have that level. In a level you can use as many todo as you want. If the level interval of two todos share levels (like "2..5" and "4..7" shares the level 4 and 5) than both the levels 2..5 and 4..7 will be runned in the order they are in the level from up to down.


Comments

Posts Quoted:
Reply
Clear All Quotes