Field (@NotNull Value value, @NotNull ObjectReference reference) { for (Field field : reference.referenceType().allFields()) { if (reference.getValue(field) == value) { return field; } } return null; }