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
This plugin lets you configure a basic Heads-Up Display (HUD) for players.
config.yml
and that format will be used.Configuration is through the config.yml
file.
The following sections are defined:
The displayed text can be:
The default variables are:
You can add more variables by creating a vars.php
in the plugin
directory. For your convenience, there is vars-example.php
available that you can use as a starting point. Copy this file to
vars.php
.
The example vars.php
will create a {score}
and {money}
variable
if you have the relevant plugins.
By default, if you have SimpleAuth
installed, the HUD will be
inactive until you log-in. If you are using something other than
SimpleAuth
you can copy the message-example.php
to message.php
and do whatever checks you need to do.
BasicHUD supports multiple formats. These can be configured through
the config.yml
. So instead of format only having one format
configured, you can configure multiple, like this example:
[CODE]
format:
lv3: '{GREEN}{BasicHUD} {YELLOW}Lv3 {WHITE}{world} ({x},{y},{z}) {bearing} {RED}EUR:{money} Pts:{score}'
lv2: '{GREEN}{BasicHUD} {GREEN}Lv2 {WHITE}{world} ({x},{y},{z}) {bearing} {RED}EUR:{money} Pts:{score}'
lv1: '{GREEN}{BasicHUD} {BLUE}Lv1 {WHITE}{world} ({x},{y},{z}) {bearing} {RED}EUR:{money} Pts:{score}'
lv0: '{GREEN}{BasicHUD} {GRAY}Lv0 {WHITE}{world} ({x},{y},{z}) {bearing} {RED}EUR:{money} Pts:{score}'
[/CODE]
In this example, four formats are defined. To select the format, BasicHUD will test permissions in order until the player has the permission:
So if the player wants to use format lv2, permission basichud.rank.lv2 is required. For multiple matches, the first match is used. If none matches, the last format is used.
Switching formats is not saved. So on join the player always gets the default format. If you want HUD format choices to be saved you need a permissions plugin.
Since BasicHUD takes over the built-in sendPopup functionality, it provides a replacement function for it. To use it you need this fragment of code:
[PHP]
if (($hud = $this->getServer()->getPluginManager()->getPlugin("BasicHUD")) !== null) {
$hud->sendPopup($player,$msg);
} else {
$player->sendPopup($msg);
}
[/PHP]
BasicHUD
Copyright (C) 2015-2017 Alejandro Liu
All Rights Reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Reply to review by :
You can leave one review per plugin release, and delete or update your review at any time