mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
Clarify documentation regarding getMaterial with legacyName = true
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d962970177
commit
10ae864f52
@ -4225,11 +4225,16 @@ public enum Material implements Keyed {
|
||||
/**
|
||||
* Attempts to get the Material with the given name.
|
||||
* <p>
|
||||
* This is a normal lookup, names must be the precise name they are given
|
||||
* in the enum.
|
||||
* This is a normal lookup, names must be the precise name they are given in
|
||||
* 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 legacyName whether this is a legacy name
|
||||
* @param legacyName whether this is a legacy name lookup
|
||||
* @return Material if found, or null
|
||||
*/
|
||||
@Nullable
|
||||
@ -4269,7 +4274,8 @@ public enum Material implements Keyed {
|
||||
* an attempt to format it like the enum.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
@Nullable
|
||||
|
Loading…
Reference in New Issue
Block a user