mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
api warning
This commit is contained in:
parent
867b81477e
commit
d83161f3a8
1 changed files with 6 additions and 0 deletions
|
|
@ -157,6 +157,11 @@ class PluginAPI extends stdClass{
|
||||||
console("[INFO] Loading {$pluginInfo["name"]} by {$pluginInfo["author"]}...");
|
console("[INFO] Loading {$pluginInfo["name"]} by {$pluginInfo["author"]}...");
|
||||||
console("[WARNING] PHAR Plugin format is experemental and might cause bugs.");
|
console("[WARNING] PHAR Plugin format is experemental and might cause bugs.");
|
||||||
|
|
||||||
|
$aver = CURRENT_API_VERSION;
|
||||||
|
if($pluginInfo["api"] != $aver){
|
||||||
|
console("[WARNING] API is not the same as Core, might cause bugs({$pluginInfo["api"]} != {$aver})");
|
||||||
|
}
|
||||||
|
|
||||||
$phr = "phar://$filePath/";
|
$phr = "phar://$filePath/";
|
||||||
include($phr."/src/".$pluginInfo["classLoader"]);
|
include($phr."/src/".$pluginInfo["classLoader"]);
|
||||||
$class = $pluginInfo["CLClass"];
|
$class = $pluginInfo["CLClass"];
|
||||||
|
|
@ -267,6 +272,7 @@ class PluginAPI extends stdClass{
|
||||||
$names[] = $p[1]["name"];
|
$names[] = $p[1]["name"];
|
||||||
$versions[] = $p[1]["version"];
|
$versions[] = $p[1]["version"];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($this->plugins as $p){
|
foreach($this->plugins as $p){
|
||||||
if($p[0] instanceof OtherPluginRequirement){
|
if($p[0] instanceof OtherPluginRequirement){
|
||||||
foreach($p[0]->getRequiredPlugins() as $required){
|
foreach($p[0]->getRequiredPlugins() as $required){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue