mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-08 09:27:34 +01:00
Support 1.16 PlayerDigType enumeration variable change (#889)
This commit is contained in:
parent
fbe46f7bac
commit
deb192b04d
@ -151,14 +151,23 @@ public abstract class EnumWrappers {
|
||||
ENTITY_DIED
|
||||
}
|
||||
|
||||
public enum PlayerDigType {
|
||||
public enum PlayerDigType implements AliasedEnum{
|
||||
START_DESTROY_BLOCK,
|
||||
ABORT_DESTROY_BLOCK,
|
||||
STOP_DESTROY_BLOCK,
|
||||
DROP_ALL_ITEMS,
|
||||
DROP_ITEM,
|
||||
RELEASE_USE_ITEM,
|
||||
SWAP_HELD_ITEMS
|
||||
SWAP_HELD_ITEMS("SWAP_ITEM_WITH_OFFHAND");
|
||||
|
||||
String[] aliases;
|
||||
PlayerDigType(String... aliases) {
|
||||
this.aliases = aliases;
|
||||
}
|
||||
@Override
|
||||
public String[] getAliases() {
|
||||
return aliases;
|
||||
}
|
||||
}
|
||||
|
||||
public enum PlayerAction implements AliasedEnum {
|
||||
@ -625,7 +634,7 @@ public abstract class EnumWrappers {
|
||||
}
|
||||
|
||||
public static EquivalentConverter<PlayerDigType> getPlayerDiggingActionConverter() {
|
||||
return new EnumConverter<>(getPlayerDigTypeClass(), PlayerDigType.class);
|
||||
return new AliasedEnumConverter<>(getPlayerDigTypeClass(), PlayerDigType.class);
|
||||
}
|
||||
|
||||
public static EquivalentConverter<PlayerAction> getEntityActionConverter() {
|
||||
|
Loading…
Reference in New Issue
Block a user