mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Obtain GIT information
This commit is contained in:
parent
40b43a911e
commit
6763e93a8d
@ -113,6 +113,11 @@ class ServerAPI{
|
|||||||
self::$serverRequest = $this->server;
|
self::$serverRequest = $this->server;
|
||||||
$this->setProperty("server-id", $this->server->serverID);
|
$this->setProperty("server-id", $this->server->serverID);
|
||||||
$this->server->api = $this;
|
$this->server->api = $this;
|
||||||
|
if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information!
|
||||||
|
$sha1 = trim(file_get_contents(FILE_PATH.".git/refs/heads/master"));
|
||||||
|
console("[GIT] Commit \x1b[33m".$sha1);
|
||||||
|
}
|
||||||
|
|
||||||
if($this->getProperty("upnp-forwarding") === true){
|
if($this->getProperty("upnp-forwarding") === true){
|
||||||
console("[INFO] [UPnP] Trying to port forward...");
|
console("[INFO] [UPnP] Trying to port forward...");
|
||||||
UPnP_PortForward($this->getProperty("port"));
|
UPnP_PortForward($this->getProperty("port"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user