Skip to content

Commit

Permalink
fix level related errors
Browse files Browse the repository at this point in the history
and add more rXXX_blah_blah
  • Loading branch information
robske110 committed Oct 11, 2016
1 parent d341049 commit ee4dbae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion SSS/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: SignServerStats
api: [1.13.0, 2.0.0]
version: 0.9.0
version: 0.9.1
load: POSTWORLD
main: robske_110\SSS\rootPlugin
author: robske_110
14 changes: 10 additions & 4 deletions SSS/src/robske_110/SSS/rootPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,16 @@ public function onRun($currentTick){
foreach($this->SSS->doRefreshSigns as $signData){
$pos = $signData[0];
$ip = $signData[1];
$signTile = $this->server->getLevelByName($pos[3])->getTile(new Vector3($pos[0], $pos[1], $pos[2], $pos[3]));
if($signTile instanceof Sign){
$lines = $this->SSS->calcSign($ip);
$signTile->setText($lines[0],$lines[1],$lines[2],$lines[3]);
if($this->server->loadLevel($pos[3])){
$signTile = $this->server->getLevelByName($pos[3])->getTile(new Vector3($pos[0], $pos[1], $pos[2], $pos[3]));
if($signTile instanceof Sign){
$lines = $this->SSS->calcSign($ip);
$signTile->setText($lines[0],$lines[1],$lines[2],$lines[3]);
}else{
$this->server->broadcastMessage("r001_TILE_IS_NOT_SIGN");
}
}else{
$this->server->broadcastMessage("r002_UNKNOWN_LEVEL");
}
}
}
Expand Down

0 comments on commit ee4dbae

Please sign in to comment.