mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Revert "Timings: do not shorten event handler timing names"
This reverts commit a2ff9649d5f9a14a2bb6e9ab7bab4ea731d225a3.
This commit is contained in:
parent
f63d349be4
commit
199ef7401f
@ -310,7 +310,12 @@ abstract class Timings{
|
||||
public static function getEventTimings(Event $event) : TimingsHandler{
|
||||
$eventClass = get_class($event);
|
||||
if(!isset(self::$events[$eventClass])){
|
||||
self::$events[$eventClass] = new TimingsHandler($eventClass, group: "Events");
|
||||
if(str_starts_with($eventClass, "pocketmine\\event\\")){
|
||||
$name = (new \ReflectionClass($event))->getShortName();
|
||||
}else{
|
||||
$name = $eventClass;
|
||||
}
|
||||
self::$events[$eventClass] = new TimingsHandler($name, group: "Events");
|
||||
}
|
||||
|
||||
return self::$events[$eventClass];
|
||||
|
Loading…
x
Reference in New Issue
Block a user