mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
PluginManager: Remove useless deprecation warning message
this message just confuses end users and is of little use to a developer. It doesn't make any sense to make a special case for events when we have lots of other deprecated things to think about anyway which won't be shown warnings for.
This commit is contained in:
parent
c237ff538c
commit
eeddaced9f
@ -792,16 +792,6 @@ class PluginManager{
|
|||||||
throw new PluginException($event . " is not an Event");
|
throw new PluginException($event . " is not an Event");
|
||||||
}
|
}
|
||||||
|
|
||||||
$tags = Utils::parseDocComment((string) (new \ReflectionClass($event))->getDocComment());
|
|
||||||
if(isset($tags["deprecated"]) and $this->server->getProperty("settings.deprecated-verbose", true)){
|
|
||||||
$this->server->getLogger()->warning($this->server->getLanguage()->translateString("pocketmine.plugin.deprecatedEvent", [
|
|
||||||
$plugin->getName(),
|
|
||||||
$event,
|
|
||||||
get_class($listener) . "->" . ($executor instanceof MethodEventExecutor ? $executor->getMethod() : "<unknown>")
|
|
||||||
]));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(!$plugin->isEnabled()){
|
if(!$plugin->isEnabled()){
|
||||||
throw new PluginException("Plugin attempted to register " . $event . " while not enabled");
|
throw new PluginException("Plugin attempted to register " . $event . " while not enabled");
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,6 @@ settings:
|
|||||||
shutdown-message: "Server closed"
|
shutdown-message: "Server closed"
|
||||||
#Allow listing plugins via Query
|
#Allow listing plugins via Query
|
||||||
query-plugins: true
|
query-plugins: true
|
||||||
#Show a console message when a plugin uses deprecated API methods
|
|
||||||
deprecated-verbose: true
|
|
||||||
#Enable plugin and core profiling by default
|
#Enable plugin and core profiling by default
|
||||||
enable-profiling: false
|
enable-profiling: false
|
||||||
#Will only add results when tick measurement is below or equal to given value (default 20)
|
#Will only add results when tick measurement is below or equal to given value (default 20)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user