mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-28 21:15:51 +01:00
Add option to not log failures
There is some insane console spam, would be nice to get rid of it.
This commit is contained in:
parent
b1b35fe025
commit
8bb2215834
@ -4,6 +4,8 @@ import org.bukkit.entity.EntityType;
|
|||||||
|
|
||||||
public class EntityUtil {
|
public class EntityUtil {
|
||||||
|
|
||||||
|
public static boolean logErrors = true;
|
||||||
|
|
||||||
public static EntityType getTypeFromID(int typeID, boolean isObject) {
|
public static EntityType getTypeFromID(int typeID, boolean isObject) {
|
||||||
if (isObject) {
|
if (isObject) {
|
||||||
return getObjectFromID(typeID);
|
return getObjectFromID(typeID);
|
||||||
@ -82,6 +84,7 @@ public class EntityUtil {
|
|||||||
default:
|
default:
|
||||||
type = EntityType.fromId(objectID);
|
type = EntityType.fromId(objectID);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
|
if (logErrors)
|
||||||
System.out.println("Unable to find entity type for " + objectID);
|
System.out.println("Unable to find entity type for " + objectID);
|
||||||
type = EntityType.UNKNOWN;
|
type = EntityType.UNKNOWN;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user