mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 03:35:33 +00:00
Format fix
This commit is contained in:
parent
ddeea2942c
commit
8d468a1efb
@ -86,6 +86,13 @@ class PlayerChatEvent extends PlayerEvent implements Cancellable{
|
||||
}
|
||||
|
||||
public function setFormat($format){
|
||||
//TODO: @deprecated (backwards-compativility)
|
||||
$i = 0;
|
||||
while(($pos = strpos($format, "%s")) !== false){
|
||||
$format = substr($format, 0, $pos) . "{%$i}" . substr($format, $pos + 2);
|
||||
++$i;
|
||||
}
|
||||
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user