mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fix log spam from invalid key modifiers (#2746)
This commit is contained in:
1 parent
68cd48287b
commit
c560af69a5
2 files changed
+17
-1
No files matched your search
@@ -120,6 +120,22 @@ public enum KeyModifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static KeyModifier valueFromString(String stringValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
return valueOf(stringValue);
|
||||
}
|
||||
catch (NullPointerException ignored)
|
||||
{
|
||||
return NONE;
|
||||
}
|
||||
catch (IllegalArgumentException ignored)
|
||||
{
|
||||
return NONE;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract boolean matches(int keyCode);
|
||||
|
||||
public abstract boolean isActive();
|
||||
|
||||
Reference in new issue
Block a user