Workaround client-sede issue, remove this when fixed

This commit is contained in:
Shoghi Cervantes 2015-05-24 10:16:43 +02:00
parent c4d63326be
commit 66435d4f6a
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89
3 changed files with 10 additions and 4 deletions

View File

@ -2706,9 +2706,9 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$pk = new TextPacket();
if(!$this->server->isLanguageForced()){
$pk->type = TextPacket::TYPE_TRANSLATION;
$pk->message = $this->server->getLanguage()->translateString($message, [], "pocketmine.");
$pk->message = $this->server->getLanguage()->translateString($message, $parameters, "pocketmine.");
foreach($parameters as $i => $p){
$parameters[$i] = $this->server->getLanguage()->translateString($p, [], "pocketmine.");
$parameters[$i] = $this->server->getLanguage()->translateString($p, $parameters, "pocketmine.");
}
$pk->parameters = $parameters;
}else{

View File

@ -2204,7 +2204,9 @@ class Server{
if($this->isRunning === false){
return;
}
if($this->sendUsageTicker > 0){
$this->sendUsage(SendUsageTask::TYPE_CLOSE);
}
$this->hasStopped = false;
ini_set("error_reporting", 0);

View File

@ -1008,6 +1008,10 @@ abstract class Entity extends Location implements Metadatable{
}
protected function switchLevel(Level $targetLevel){
if($this->closed){
return false;
}
if($this->isValid()){
$this->server->getPluginManager()->callEvent($ev = new EntityLevelChangeEvent($this, $this->level, $targetLevel));
if($ev->isCancelled()){
@ -1496,7 +1500,7 @@ abstract class Entity extends Location implements Metadatable{
if($this->chunk !== null){
$this->chunk->removeEntity($this);
}
if($this->level instanceof Level){
if($this->level !== null){
$this->level->removeEntity($this);
}
}