mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
Timings: do not shorten event handler timing names
this doesn't work very well in tree view timings
This commit is contained in:
parent
821dd8885b
commit
a2ff9649d5
@ -304,12 +304,7 @@ abstract class Timings{
|
|||||||
public static function getEventTimings(Event $event) : TimingsHandler{
|
public static function getEventTimings(Event $event) : TimingsHandler{
|
||||||
$eventClass = get_class($event);
|
$eventClass = get_class($event);
|
||||||
if(!isset(self::$events[$eventClass])){
|
if(!isset(self::$events[$eventClass])){
|
||||||
if(str_starts_with($eventClass, "pocketmine\\event\\")){
|
self::$events[$eventClass] = new TimingsHandler($eventClass, group: "Events");
|
||||||
$name = (new \ReflectionClass($event))->getShortName();
|
|
||||||
}else{
|
|
||||||
$name = $eventClass;
|
|
||||||
}
|
|
||||||
self::$events[$eventClass] = new TimingsHandler($name, group: "Events");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$events[$eventClass];
|
return self::$events[$eventClass];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user