Git Product home page Git Product logo

hrkchat's People

Contributors

cortexpe avatar poggit-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hrkchat's Issues

Add hrk.roleName

Would be nice to have more built-in placeholders like hrk.roleName

How to add PurePerms player's group as placeholder?

Hi,
For many hours I tried to find a solution to make my PurePerms rank appear in the chat, but I can't. I don't know what to do with it and that's why I'm contacting you because I'm just a beginner in php. I hope you understood my question, if you need to specify anything, ask me. If I ask on the wrong page, I apologize in advance.

Code:

(use CortexPE \ HRKChat \ event \ PlaceholderResolveEvent; is more in the other code which if you want I can send too. I wrote the whole code in the GroupJoin plugin, I hope it doesn't matter)
/**
* @param PlaceholderResolveEvent $ev
*
* @priority LOWEST
*/

 public function onPlaceholderResolve(PlaceholderResolveEvent $ev, Player $player): void {
  	
  	if($ev->getPlaceholderName() === "PureChat.players.Rank") {

  			$ev->setValue((string)$ev->getUserDataMgr()->getGroup($player)->getName());
  	}
  }     

HRKChat config.yml:

chatFormat:

1: " &3[&6{{myPlugin.player.latency}}&3]§r §7[Member]§r &7{{hrk.displayName}} {{PurePerms.players.Rank}} &8> &7{{msg}}"
2: " &3[&6{{myPlugin.player.latency}}&3]§r §l§6[§l§4Admin§l§6]§r &7{{hrk.displayName}} {{PurePerms.players.Rank}} &8>
&7{{msg}}"
3: " &3[&6{{myPlugin.player.latency}}&3]§r {{PurePerms.players.Rank}} &7{{hrk.displayName}} test &8> &7{{msg}}"

And this was shown in the console:

[Server] dvodany has joined to server!
[21:06:08] [Server thread/INFO]: The admin dvodany joined the server.
[21:06:10] [Server thread/ERROR]: [HRKChat] Unresolved placeholder 'PurePerms.players.Rank'
[21:06:10] [Server thread/INFO]: [21] [Admin] dvodany NULL > Test

From left to right:
Ping
Rank
Name
PurePerms rank
Message

I am sorry for my bad English.

Undefined method on indexLookupTable

[17:46:36] [Server thread/CRITICAL]: Error: "Call to undefined method CortexPE\Hierarchy\role\RoleManager::indexLookupTable()" (EXCEPTION) in "plugins/Hierarchy_dev-84.phar/src/CortexPE/Hierarchy/role/RoleManager" at line 189
[17:46:36] [Server thread/DEBUG]: #0 plugins/HRKMigrator_dev-3.phar/src/CortexPE/HRKMigrator/Main(128): CortexPE\Hierarchy\role\RoleManager->createRole(string[6] Eltern)
[17:46:36] [Server thread/DEBUG]: #1 plugins/HRKMigrator_dev-3.phar/src/CortexPE/HRKMigrator/Main(81): CortexPE\HRKMigrator\Main->doMigration()
[17:46:36] [Server thread/DEBUG]: #2 src/pocketmine/scheduler/ClosureTask(61): CortexPE\HRKMigrator\Main->CortexPE\HRKMigrator{closure}(integer 1)
[17:46:36] [Server thread/DEBUG]: #3 src/pocketmine/scheduler/TaskHandler(134): pocketmine\scheduler\ClosureTask->onRun(integer 1)
[17:46:36] [Server thread/DEBUG]: #4 src/pocketmine/scheduler/TaskScheduler(176): pocketmine\scheduler\TaskHandler->run(integer 1)
[17:46:36] [Server thread/DEBUG]: #5 src/pocketmine/plugin/PluginManager(643): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1)
[17:46:36] [Server thread/DEBUG]: #6 src/pocketmine/Server(2380): pocketmine\plugin\PluginManager->tickSchedulers(integer 1)
[17:46:36] [Server thread/DEBUG]: #7 src/pocketmine/Server(2143): pocketmine\Server->tick()
[17:46:36] [Server thread/DEBUG]: #8 src/pocketmine/Server(1990): pocketmine\Server->tickProcessor()
[17:46:36] [Server thread/DEBUG]: #9 src/pocketmine/Server(1584): pocketmine\Server->start()
[17:46:36] [Server thread/DEBUG]: #10 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[49] /home/minecraft/multicraft/servers/PE/pocketmine/, string[57] /home/minecraft/multicraft/servers/PE/pocketmine/plugins/)
[17:46:36] [Server thread/DEBUG]: #11 src/pocketmine/PocketMine(296): pocketmine\server()
[17:46:36] [Server thread/DEBUG]: #12 (11): require(string[104] phar:///home/minecraft/multicraft/servers/PE/pocketmine/PocketMine-MP.phar/src/p)
[17:46:36] [Server thread/EMERGENCY]: Ein nicht-behebbarer Fehler ist aufgetreten und der Server stürzte ab. Erstelle einen Crash-Dump...
[17:46:36] [Server thread/EMERGENCY]: Bitte lade die "/home/minecraft/multicraft/servers/PE/pocketmine/crashdumps/Fri_May_8-17.46.36-CEST_2020.log" Datei in das Crash-Archiv hoch und reiche den Link auf der Bug-Reporting Seite ein. Gib so viele Informationen wie möglich.
[17:46:36] [Server thread/EMERGENCY]: Der Crash-Dump wurde automatisch zum Crash-Archiv hinzugefügt. Du kannst ihn unter https://crash.pmmp.io/view/4130609 einsehen, oder du benutzt die ID #4130609
�]0;�[17:46:36] [Server thread/DEBUG]: Disabling all plugins

Error

2020-05-09 [11:08:10] [Server thread/INFO]: Enabling HRKChat v1.1.1
2020-05-09 [11:08:10] [Server thread/CRITICAL]: TypeError: "Return value of CortexPE\Hierarchy\Hierarchy::getRoleManager() must be an instance of CortexPE\Hierarchy\role\RoleManager, null returned" (EXCEPTION) in "plugins/Hierarchy-master/src/CortexPE/Hierarchy/Hierarchy" at line 173

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.