mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 04:33:56 -07:00
Clarify documentation regarding getMaterial with legacyName = true
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -4225,11 +4225,16 @@ public enum Material implements Keyed {
|
|||||||
/**
|
/**
|
||||||
* Attempts to get the Material with the given name.
|
* Attempts to get the Material with the given name.
|
||||||
* <p>
|
* <p>
|
||||||
* This is a normal lookup, names must be the precise name they are given
|
* This is a normal lookup, names must be the precise name they are given in
|
||||||
* in the enum.
|
* the enum (but optionally including the LEGACY_PREFIX if legacyName is
|
||||||
|
* true).
|
||||||
|
* <p>
|
||||||
|
* If legacyName is true, then the lookup will be against legacy materials,
|
||||||
|
* but the returned Material will be a modern material (ie this method is
|
||||||
|
* useful for updating stored data).
|
||||||
*
|
*
|
||||||
* @param name Name of the material to get
|
* @param name Name of the material to get
|
||||||
* @param legacyName whether this is a legacy name
|
* @param legacyName whether this is a legacy name lookup
|
||||||
* @return Material if found, or null
|
* @return Material if found, or null
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -4269,7 +4274,8 @@ public enum Material implements Keyed {
|
|||||||
* an attempt to format it like the enum.
|
* an attempt to format it like the enum.
|
||||||
*
|
*
|
||||||
* @param name Name of the material to get
|
* @param name Name of the material to get
|
||||||
* @param legacyName whether this is a legacy name
|
* @param legacyName whether this is a legacy name (see
|
||||||
|
* {@link #getMaterial(java.lang.String, boolean)}
|
||||||
* @return Material if found, or null
|
* @return Material if found, or null
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Reference in New Issue
Block a user