Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Make ItemRewriter type getters nullable and optional (#3737)
Dieser Commit ist enthalten in:
Ursprung
2d03110f08
Commit
908823c612
@ -45,11 +45,35 @@ public interface ItemRewriter<T extends Protocol> extends Rewriter<T> {
|
||||
*/
|
||||
@Nullable Item handleItemToServer(@Nullable Item item);
|
||||
|
||||
Type<Item> itemType();
|
||||
/**
|
||||
* Returns the item type of the current protocol.
|
||||
* @return item type
|
||||
*/
|
||||
@Nullable default Type<Item> itemType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Type<Item[]> itemArrayType();
|
||||
/**
|
||||
* Returns the item array type of the current protocol.
|
||||
* @return item array type
|
||||
*/
|
||||
@Nullable default Type<Item[]> itemArrayType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Type<Item> mappedItemType();
|
||||
/**
|
||||
* Returns the mapped item type of the target protocol.
|
||||
* @return mapped item type
|
||||
*/
|
||||
@Nullable default Type<Item> mappedItemType() {
|
||||
return itemType();
|
||||
}
|
||||
|
||||
Type<Item[]> mappedItemArrayType();
|
||||
/**
|
||||
* Returns the mapped item array type of the target protocol.
|
||||
* @return mapped item array type
|
||||
*/
|
||||
@Nullable default Type<Item[]> mappedItemArrayType() {
|
||||
return itemArrayType();
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren