mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
LegacyStringToItemParser: mark as deprecated, and point people towards StringToItemParser, which is much nicer
This commit is contained in:
@ -38,9 +38,14 @@ use function strtolower;
|
|||||||
use function trim;
|
use function trim;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class fills in as a substitute for all the stuff that used to make ItemFactory::fromString()
|
* @deprecated
|
||||||
* work. Since legacy item IDs are on their way out, we can't keep using their constants as stringy
|
* @see StringToItemParser
|
||||||
* IDs (especially not considering the unnoticed BC-break potential posed by such a stupid idea).
|
*
|
||||||
|
* This class replaces the functionality that used to be provided by ItemFactory::fromString(), but in a more dynamic
|
||||||
|
* way.
|
||||||
|
* Avoid using this wherever possible. Unless you need to parse item strings containing meta (e.g. "dye:4", "351:4") or
|
||||||
|
* item IDs (e.g. "351"), you should prefer the newer StringToItemParser, which is much more user-friendly, more
|
||||||
|
* flexible, and also supports registering custom aliases for any item in any state.
|
||||||
*/
|
*/
|
||||||
final class LegacyStringToItemParser{
|
final class LegacyStringToItemParser{
|
||||||
use SingletonTrait;
|
use SingletonTrait;
|
||||||
|
Reference in New Issue
Block a user